Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Monad type class for short-cicuiting computation.
Synopsis
- class Monad μ => MonadFinish f μ | μ -> f where
- finish :: f -> μ α
Documentation
class Monad μ => MonadFinish f μ | μ -> f where Source #
Class of monads that support short-circuiting.
Short-circuit the computation with the provided value.
finish f >>= rest = finish f
Instances
Orphan instances
MonadRWS r w s μ => MonadRWS r w s (FinishT f μ) Source # | |
MonadError e μ => MonadError e (FinishT f μ) Source # | |
throwError :: e -> FinishT f μ a # catchError :: FinishT f μ a -> (e -> FinishT f μ a) -> FinishT f μ a # | |
MonadReader r μ => MonadReader r (FinishT f μ) Source # | |
MonadState s μ => MonadState s (FinishT f μ) Source # | |
MonadWriter w μ => MonadWriter w (FinishT f μ) Source # | |
MonadCont μ => MonadCont (FinishT f μ) Source # | |