Copyright | (C) 2016 Aaron Levin |
---|---|

License | BSD-style (see the file LICENSE) |

Maintainer | Aaron Levin <aaron.michael.benjamin.levin@gmail.com> |

Stability | provisional |

Portability | non-portable (rank-2 polymorphism) |

Safe Haskell | None |

Language | Haskell2010 |

"van Laarhoven encoded Free Monad with extensible effects"

- (.:.) :: effect m -> Effects effects m -> Effects (effect : effects) m
- data Effects a m where
- newtype Free effects a = Free {}
- class HasEffect effects effect where
- iterM :: Monad m => Effects effects m -> Free effects a -> m a
- liftF :: HasEffect effects effect => (forall m. Monad m => effect m -> m a) -> Free effects a

# Documentation

(.:.) :: effect m -> Effects effects m -> Effects (effect : effects) m infixr 4 Source

Helper combinator for creating values of 'Effects effects m'

a customized HList of effects. We need to carry the `m`

param around for
type inference.

The van Laarhoven-encoded Free Monad with Extensible effects

class HasEffect effects effect where Source

A class to help us fetch effects from our effect stack.

HasEffect ((:) ((* -> *) -> *) effect effects) effect Source | An instance of |

HasEffect effects effect => HasEffect ((:) ((* -> *) -> *) notIt effects) effect Source | An instance of |