Module

Control.Eff

Package
purescript-effectful
Repository
the-dr-lazy/purescript-effectful

#Environment Source

type Environment :: Row ((Type -> Type) -> Type -> Type) -> Typetype Environment r = (Variant r (Eff r)) ~> (Action r)

#Action Source

data Action :: Row ((Type -> Type) -> Type -> Type) -> Type -> Typedata Action r a

Constructors

#Eff Source

newtype Eff :: Row Algebra -> Type -> Typenewtype Eff r a

Constructors

Instances

#mk Source

mk :: forall r. (Variant r (Eff r)) ~> (Eff r)

#un Source

un :: forall r a. Eff r a -> Environment r -> Aff a

#unsafeMkFromAff Source

unsafeMkFromAff :: forall r. Aff ~> (Eff r)

#interpret Source

interpret :: forall tag from r fromr. Cons tag from r fromr => Functor (from (Eff fromr)) => IsSymbol tag => Proxy tag -> ((from (Eff fromr)) ~> (Eff fromr)) -> (Eff fromr) ~> (Eff r)

#intercept Source

intercept :: forall tag from r fromr. Cons tag from r fromr => IsSymbol tag => Functor (from (Eff fromr)) => Proxy tag -> ((from (Eff fromr)) ~> (Eff fromr)) -> (Eff fromr) ~> (Eff fromr)

#reinterpret Source

reinterpret :: forall tag from r tor fromr fromtor. Cons tag from r fromr => Cons tag from tor fromtor => IsSymbol tag => Functor (from (Eff fromtor)) => Proxy tag -> ((from (Eff fromtor)) ~> (Eff fromtor)) -> (Eff fromr) ~> (Eff tor)

#expand Source

expand :: forall from r fromr. Union from r fromr => (Eff from) ~> (Eff fromr)

#send Source

send :: forall tag f r fr a. IsSymbol tag => Functor (f (Eff fr)) => Cons tag f r fr => Proxy tag -> f (Eff fr) a -> Eff fr a

#run Source

run :: forall a. Eff () a -> Aff a

Re-exports from Control.Eff.Algebra

#Algebra Source

type Algebra = (Type -> Type) -> Type -> Type