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

Modulepolysemy-1.9.2.0Haskell2010

Polysemy.Internal.Writer

  • 1 type
  • 6 values
  • Packagepolysemy-1.9.2.0
  • Exports7
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceWriter.hs
datadata Writer o (m :: Type -> Type) a where
#

An effect capable of emitting and intercepting messages.

Constructors

  • Tell :: o -> Writer o m ()

    Write a message to the log.

  • Listen :: m a1 -> Writer o m (o, a1)

    Return the log produced by the higher-order action.

  • Pass :: m (o -> o, a) -> Writer o m a

    Run the given action and apply the function it returns to the log.

valuepass :: Member (Writer o) r => Sem r (o -> o, a) -> Sem r a
#

Run the given action and apply the function it returns to the log.