| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Bluefin.EarlyReturn
Description
This is an old interface and will be deprecated in the future. You are encouraged to use Bluefin.Capability.ReturnEarly instead.
Synopsis
- type EarlyReturn = Exception
- withEarlyReturn :: forall r (es :: Effects). (forall (e :: Effects). EarlyReturn r e -> Eff (e :& es) r) -> Eff es r
- returnEarly :: forall (e :: Effects) (es :: Effects) r a. e <: es => EarlyReturn r e -> r -> Eff es a
Documentation
Early return allows to define a block from which you can return early. Early return is implemented as an exception, and its API is just an alternate interface to exceptions.
Handle
type EarlyReturn = Exception #
Handlers
withEarlyReturn :: forall r (es :: Effects). (forall (e :: Effects). EarlyReturn r e -> Eff (e :& es) r) -> Eff es r #
Effectful operations
returnEarly :: forall (e :: Effects) (es :: Effects) r a. e <: es => EarlyReturn r e -> r -> Eff es a #