HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulebase-4.23.0.0Haskell2010

Data.STRef.Lazy

Mutable references in the lazy ST monad.

  • 1 type
  • 4 values
  • Packagebase-4.23.0.0
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceLazy.hs

STRefs

5 declarations
datadata STRef s a
#

a value of type STRef s a is a mutable variable in state thread s, containing a value of type a

Example1 expression
:{runST (do    ref <- newSTRef "hello"    x <- readSTRef ref    writeSTRef ref (x ++ "world")    readSTRef ref ):}"helloworld"
Instances1Eq
  • Eq (STRef s a)Defined in ghc-internal-10.0.0 · GHC.Internal.STRef

    Pointer equality.