TVar package:ihaskell

A MutVar# behaves like a single-element mutable array.
Modify the contents of a MutVar#, returning the previous contents and the result of applying the given function to the previous contents. Note that this isn't strictly speaking the correct type for this function; it should really be MutVar# s a -> (a -> (a,b)) -> State# s -> (# State# s, a, (a, b) #), but we don't know about pairs here. Warning: this can fail with an unchecked exception.
Modify the contents of a MutVar#, returning the previous contents and the result of applying the given function to the previous contents. Warning: this can fail with an unchecked exception.
Compare the underlying pointers of two MutVar#s.
Compare the underlying pointers of two TVar#s.