cleff- Fast and concise extensible effects
Safe HaskellNone



This module contains definitions of some basic types related to effects. You won't need this module directly; these functionalities are reexported in the Cleff module.

This is an internal module and its API may change even between minor versions. Therefore you should be extra careful if you're to depend on this module.



type Effect = (Type -> Type) -> Type -> Type Source #

The type of effects. An effect e m a takes an effect monad type m :: Type -> Type and a result type a :: Type.

type (:>) = Elem infix 0 Source #

e :> es means the effect e is present in the effect stack es, and therefore can be used in an Eff es computation.

type family xs :>> es :: Constraint where ... infix 0 Source #

xs :>> es means the list of effects xs are all present in the effect stack es. This is a convenient type alias for (e1 :> es, ..., en :> es).


'[] :>> _ = () 
(x ': xs) :>> es = (x :> es, xs :>> es) 

type family xs ++ ys where ... infixr 5 Source #

Type level list concatenation.


'[] ++ ys = ys 
(x ': xs) ++ ys = x ': (xs ++ ys) 

type (~>) f g = forall a. f a -> g a infixr 0 Source #

The type of natural transformations from functor f to g.