Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data StreamExcept a m e
- = FinalExcept (Final (ExceptT e m) a)
- | InitialExcept (OptimizedStreamT (ExceptT e m) a)
- toFinal :: Functor m => StreamExcept a m e -> Final (ExceptT e m) a
- runStreamExcept :: StreamExcept a m e -> OptimizedStreamT (ExceptT e m) a
- safely :: Monad m => StreamExcept a m Void -> OptimizedStreamT m a
Documentation
data StreamExcept a m e Source #
A stream that can terminate with an exception.
In automaton
, such streams mainly serve as a vehicle to bring control flow to AutomatonExcept
(which is based on StreamExcept
), and the docs there apply here as well.
StreamExcept
is not only a Monad
, it also has more efficient Selective
, Applicative
, and Functor
interfaces.
FinalExcept (Final (ExceptT e m) a) | When using |
InitialExcept (OptimizedStreamT (ExceptT e m) a) | This is usually the faster encoding, as it can be optimized by GHC. |
Instances
runStreamExcept :: StreamExcept a m e -> OptimizedStreamT (ExceptT e m) a Source #
safely :: Monad m => StreamExcept a m Void -> OptimizedStreamT m a Source #