Copyright | (c) 2021 Xy Ren |
---|---|
License | BSD3 |
Maintainer | xy.r@outlook.com |
Stability | experimental |
Portability | non-portable (GHC only) |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Synopsis
- data Output o :: Effect where
- output :: Output o :> es => o -> Eff es ()
- outputToListState :: Eff (Output o ': es) ~> Eff (State [o] ': es)
- outputToWriter :: (o -> o') -> Eff (Output o ': es) ~> Eff (Writer o' ': es)
- ignoreOutput :: Eff (Output o ': es) ~> Eff es
- runOutputEff :: (o -> Eff es ()) -> Eff (Output o ': es) ~> Eff es
- mapOutput :: Output o' :> es => (o -> o') -> Eff (Output o ': es) ~> Eff es
- bindOutput :: Output o' :> es => (o -> Eff es o') -> Eff (Output o ': es) ~> Eff es
Effect
data Output o :: Effect where Source #
An effect that is capable of producing outputs, for example writing to a log file or an output stream.
Operations
Interpretations
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.