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.Input

Description

 
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.