Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Data.Stream.Recursive
Synopsis
- newtype Recursive m a = Recursive {
- getRecursive :: m (Result (Recursive m a) a)
- toRecursive :: Functor m => StreamT m a -> Recursive m a
- fromRecursive :: Recursive m a -> StreamT m a
- constM :: Functor m => m a -> Recursive m a
Documentation
newtype Recursive m a Source #
A stream transformer in recursive encoding.
One step of the stream transformer performs a monadic action and results in an output and a new stream.
Constructors
Recursive | |
Fields
|
Instances
MFunctor Recursive Source # | |
Alternative m => Alternative (Recursive m) Source # | |
Applicative m => Applicative (Recursive m) Source # | |
Defined in Data.Stream.Recursive | |
Functor m => Functor (Recursive m) Source # | |
toRecursive :: Functor m => StreamT m a -> Recursive m a Source #
Translate a coalgebraically encoded stream into a recursive one.
This is usually a performance penalty.
fromRecursive :: Recursive m a -> StreamT m a Source #
Translate a recursive stream into a coalgebraically encoded one.
The internal state is the stream itself.