HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulerebase-1.21.2Haskell2010

Rebase.GHC.STRef

  • 1 type
  • 3 values
  • Packagerebase-1.21.2
  • Exports4
  • LanguageHaskell2010
  • LicenceMIT
  • SourceSTRef.hs
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"

Constructors

Instances4NFData2, NFData1, Eq, NFData
  • NFData2 STRefDefined in deepseq-1.5.0.0 · Control.DeepSeq
  • NFData1 (STRef s)Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • Eq (STRef s a)Defined in ghc-internal-9.1003.0 · GHC.Internal.STRef

    Pointer equality.

  • NFData (STRef s a)Defined in deepseq-1.5.0.0 · Control.DeepSeq

    NOTE: Only strict in the reference and not the referenced value.