effect-monad-0.6.1: Embeds effect systems into Haskell using parameteric effect monads

Safe HaskellNone
LanguageHaskell98

Control.Coeffect.Coreader

Synopsis

Documentation

data IxCoreader s a Source

Provides 'reader monad'-like behaviour but as a comonad, using an indexed version of the product comonad

Constructors

IxR 

Fields

runCoreader :: (a, Set s)
 

Instances

CoeffectZip [*] IxCoreader 
Coeffect [*] IxCoreader 
type Unit [*] IxCoreader = [] * 
type Meet [*] IxCoreader s t = Union * s t 
type CzipInv [*] IxCoreader s t = Unionable s t 
type Inv [*] IxCoreader s t = (Unionable s t, Split s t (Union * s t)) 
type Plus [*] IxCoreader s t = Union * s t 

ask :: Var v -> IxCoreader `[v :-> a]` b -> a Source

ask for the value of variable v, e.g., 'ask (Var::(Var "x"))'