cleff-0.2.0.0: Fast and concise extensible effects
Copyright(c) 2021 Xy Ren
LicenseBSD3
Maintainerxy.r@outlook.com
Stabilityexperimental
Portabilitynon-portable (GHC only)
Safe HaskellTrustworthy
LanguageHaskell2010

Cleff.Output

Description

 
Synopsis

Effect

data Output o :: Effect where Source #

An effect that is capable of sending outputs, for example to a log file or an output stream.

Constructors

Output :: o -> Output o m () 

Operations

output :: Output o :> es => o -> Eff es () Source #

Interpretations

outputToListState :: Eff (Output o ': es) ~> Eff (State [o] ': es) Source #

Run an Output effect by accumulating a list.

outputToWriter :: (o -> o') -> Eff (Output o ': es) ~> Eff (Writer o' ': es) Source #

Run an Output effect by translating it into a Writer.

ignoreOutput :: Eff (Output o ': es) ~> Eff es Source #

Ignore outputs of an Output effect altogether.

runOutputEff :: (o -> Eff es ()) -> Eff (Output o ': es) ~> Eff es Source #

Run an Output effect by performing a computation for each output.