| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Control.Monad.Freer
Description
This module defines the freer monad Freer, which allows manipulating
effectful computations algebraically.
Documentation
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 :: a -> Freer f a | A pure computation. |
| Do :: f b -> (b -> Freer f a) -> Freer f a | An effectful computation where the first argument |
interpFreer :: Monad m => (forall a. f a -> m a) -> Freer f a -> m a Source #
Interpret the effects in a freer monad in terms of another monad.