| Copyright | (c) The University of Glasgow 1994-2002 | 
|---|---|
| License | see libraries/base/LICENSE | 
| Maintainer | cvs-ghc@haskell.org | 
| Stability | internal | 
| Portability | non-portable (GHC Extensions) | 
| Safe Haskell | Unsafe | 
| Language | Haskell2010 | 
GHC.STRef
Description
References in the ST monad.
Documentation
a value of type STRef s a is a mutable variable in state thread s,
 containing a value of type a
>>>:{runST (do ref <- newSTRef "hello" x <- readSTRef ref writeSTRef ref (x ++ "world") readSTRef ref ) :} "helloworld"
writeSTRef :: STRef s a -> a -> ST s () #
Write a new value into an STRef