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

Moduleghc-9.10.3GHC2021

GHC.Utils.Monad.State.Strict

A state monad which is strict in its state.

  • 1 type
  • 8 values
  • Packageghc-9.10.3
  • Exports10
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceStrict.hs

The State monad

6 declarations
newtypenewtype State s a
#

A state monad which is strict in the state s, but lazy in the value a.

See Note [Strict State monad] for the particular notion of strictness and implementation details.

Instances3Monad, Functor, Applicative
  • Monad (State s)Defined in ghc-9.10.3 · GHC.Utils.Monad.State.Strict
  • Functor (State s)Defined in ghc-9.10.3 · GHC.Utils.Monad.State.Strict
  • Applicative (State s)Defined in ghc-9.10.3 · GHC.Utils.Monad.State.Strict
patternpattern State :: (s -> (# a, s #)) -> State s a
#

Operations

4 declarations