Copyright | (c) Atze van der Ploeg 2014 |
---|---|
License | BSD-style |
Maintainer | atzeus@gmail.org |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
An operational 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 ProgramView r a where Source
Bind :: r w -> (w -> Program r a) -> ProgramView r a | |
Return :: a -> ProgramView r a |
fromView :: ProgramView r a -> Program r a Source
toView :: Program r a -> ProgramView r a Source