cleff-0.1.0.0: Fast and concise extensible effects
Safe HaskellNone
LanguageHaskell2010

Cleff.Input

Synopsis

Effect

data Input i :: Effect where Source #

An effect that is capable of reading from some input source, such as an input stream.

Constructors

Input :: Input i m i 

Operations

input :: Input i :> es => Eff es i Source #

inputs :: Input i :> es => (i -> i') -> Eff es i' Source #

Apply a function to the result of input.

Interpretations

runInputConst :: i -> Eff (Input i ': es) ~> Eff es Source #

Run an Input effect by giving a constant input value.

inputToListState :: Eff (Input (Maybe i) ': es) ~> Eff (State [i] ': es) Source #

Run an Input effect by going through a list of values.

runInputEff :: Eff es i -> Eff (Input i ': es) ~> Eff es Source #

Run an Input effect by performing a computation for each input request.