| Safe Haskell | None | 
|---|---|
| Language | GHC2021 | 
Control.Monad.Freer
Description
This module defines the freer monad Freer, which allows manipulating
   effectful computations algebraically.
It is unlikely you need this, except maybe to define your own backends or something. We may hide/remove it in future versions.
Documentation
data Freer (f :: Type -> Type) a where Source #
Freer monads.
A freer monad Freer f a represents an effectful computation that returns a
 value of type a. The parameter f :: * -> * is a effect signature that
 defines the effectful operations allowed in the computation. Freer f a is
 called a freer monad in that it's a Monad given any f.
Constructors
| Return :: forall a (f :: Type -> Type). a -> Freer f a | A pure computation.  | 
| Do :: forall (f :: Type -> Type) b a. f b -> (b -> Freer f a) -> Freer f a | An effectful computation where the first argument   | 
interpFreer :: Monad m => (forall b. f b -> m b) -> Freer f a -> m a Source #
Interpret the effects in a freer monad in terms of another monad.