effect-monad-0.8.1.0: Embeds effect systems and program logics into Haskell using graded monads and parameterised monads

Safe HaskellNone
LanguageHaskell98

Control.Coeffect.Coreader

Synopsis

Documentation

data IxCoreader (s :: [Mapping Symbol *]) a Source #

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

Constructors

IxR 

Fields

Instances

CoeffectZip [Mapping Symbol *] IxCoreader Source # 

Associated Types

type Meet IxCoreader (c :: IxCoreader -> * -> *) (s :: IxCoreader) (t :: IxCoreader) :: k Source #

type CzipInv IxCoreader (c :: IxCoreader -> * -> *) (s :: IxCoreader) (t :: IxCoreader) :: Constraint Source #

Methods

czip :: CzipInv IxCoreader c s t => c s a -> c t b -> c (Meet IxCoreader c s t) (a, b) Source #

Coeffect [Mapping Symbol *] IxCoreader Source # 

Associated Types

type Inv IxCoreader (c :: IxCoreader -> * -> *) (s :: IxCoreader) (t :: IxCoreader) :: Constraint Source #

type Unit IxCoreader (c :: IxCoreader -> * -> *) :: k Source #

type Plus IxCoreader (c :: IxCoreader -> * -> *) (s :: IxCoreader) (t :: IxCoreader) :: k Source #

Methods

extract :: c (Unit IxCoreader c) a -> a Source #

extend :: Inv IxCoreader c s t => (c t a -> b) -> c (Plus IxCoreader c s t) a -> c s b Source #

type Unit [Mapping Symbol *] IxCoreader Source # 
type Meet [Mapping Symbol *] IxCoreader s t Source # 
type CzipInv [Mapping Symbol *] IxCoreader s t Source # 
type Inv [Mapping Symbol *] IxCoreader s t Source # 
type Inv [Mapping Symbol *] IxCoreader s t = (Unionable s t, Split s t (Union Symbol * s t))
type Plus [Mapping Symbol *] IxCoreader s t Source # 

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

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