HORIZON HASKELLDocslts/ghc-9.14.x6d5fdfd2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 6d5fdfd · 2026-10-12

Moduleghc-lib-parser-9.14.1.20251220GHC2021

GHC.Utils.Monad.State.Strict

A state monad which is strict in its state.

Contents
  1. The State monad
  2. Operations
Synopsis

The State monad

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.

Constructors

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

Operations