Copyright | (c) Atze van der Ploeg 2014 |
---|---|
License | BSD-style |
Maintainer | atzeus@gmail.org |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
Control.Monad.Free.Reflectable
Description
A free monad that supports alternating between building and observing.
It supports all operations (>>=
, return
, fromView
and toView
) in worst case constant time.
See the paper Reflection without Remorse: Revealing a hidden sequence to speed up Monadic Reflection, Atze van der Ploeg and Oleg Kiselyov, Haskell Symposium 2014 for more details.
Paper: http://homepages.cwi.nl/~ploeg/zseq.pdf Talk : http://www.youtube.com/watch?v=_XoI65Rxmss
Documentation
data FreeMonadView f a Source
fromView :: FreeMonadView f a -> FreeMonad f a Source
toView :: Functor f => FreeMonad f a -> FreeMonadView f a Source