bluefin-internal-0.0.2.0: The Bluefin effect system, internals
Safe HaskellSafe-Inferred
LanguageHaskell2010

Bluefin.Internal.Examples

Documentation

myInc :: e :> es => MyHandle e -> Eff es () Source #

myBail :: e :> es => MyHandle e -> Eff es r Source #

runMyHandle :: (forall e. MyHandle e -> Eff (e :& es) a) -> Eff es (Either String (a, Int)) Source #

throwI Source #

Arguments

:: e1 :> es 
=> (?ex :: Exception e e1) 
=> e

Value to throw

-> Eff es a 

modifyI Source #

Arguments

:: forall st s es. st :> es 
=> (?st :: State s st) 
=> (s -> s)

Apply this function to the state. The new value of the state is forced before writing it to the state.

-> Eff es () 

getI Source #

Arguments

:: forall st s es. st :> es 
=> (?st :: State s st) 
=> Eff es s

The current value of the state

while :: Eff es Bool -> Eff es a -> Eff es () Source #

evalStateI Source #

Arguments

:: s

Initial state

-> (forall st. (?st :: State s st) => Eff (st :& es) a)

Stateful computation

-> Eff es a

Result