extensible-effects-concurrent-0.21.1: Message passing concurrency as extensible-effect

Safe HaskellNone
LanguageHaskell2010

Control.Eff.LogWriter.Capture

Description

Synopsis

Documentation

captureLogWriter :: LogWriter CaptureLogs Source #

A LogWriter monad that provides pure logging by capturing via the Writer effect.

See exampleLogCapture

newtype CaptureLogs a Source #

A LogWriter monad that provides pure logging by capturing via the Writer effect.

Constructors

MkCaptureLogs 
Instances
Monad CaptureLogs Source # 
Instance details

Defined in Control.Eff.LogWriter.Capture

Functor CaptureLogs Source # 
Instance details

Defined in Control.Eff.LogWriter.Capture

Methods

fmap :: (a -> b) -> CaptureLogs a -> CaptureLogs b #

(<$) :: a -> CaptureLogs b -> CaptureLogs a #

Applicative CaptureLogs Source # 
Instance details

Defined in Control.Eff.LogWriter.Capture

Methods

pure :: a -> CaptureLogs a #

(<*>) :: CaptureLogs (a -> b) -> CaptureLogs a -> CaptureLogs b #

liftA2 :: (a -> b -> c) -> CaptureLogs a -> CaptureLogs b -> CaptureLogs c #

(*>) :: CaptureLogs a -> CaptureLogs b -> CaptureLogs b #

(<*) :: CaptureLogs a -> CaptureLogs b -> CaptureLogs a #

HandleLogWriter CaptureLogs Source #

A LogWriter monad for pure logging.

The HandleLogWriter instance for this type assumes a Writer effect.

Instance details

Defined in Control.Eff.LogWriter.Capture

Associated Types

type LogWriterEffects CaptureLogs :: [Type -> Type] Source #

type LogWriterEffects CaptureLogs Source # 
Instance details

Defined in Control.Eff.LogWriter.Capture

type CaptureLogWriter = Writer LogMessage Source #

Alias for the Writer that contains the captured LogMessages from CaptureLogs.

runCaptureLogWriter :: Eff (CaptureLogWriter ': e) a -> Eff e (a, [LogMessage]) Source #

Run a Writer for LogMessages.

Such a Writer is needed to handle CaptureLogWriter