| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Bluefin.Capability.ThrowCatch
Description
You probably don't want to use this module, rather you'll want
Bluefin.Capability.Throw for most exception use
cases. ThrowCatch exists mainly to support MonadError
instances.
Synopsis
- data ThrowCatch ex (e :: Effects)
- try :: forall ex (es :: Effects) a. (forall (e :: Effects). ThrowCatch ex e -> Eff (e :& es) a) -> Eff es (Either ex a)
- handle :: forall ex (es :: Effects) a. (ex -> Eff es a) -> (forall (e :: Effects). ThrowCatch ex e -> Eff (e :& es) a) -> Eff es a
- catch :: forall ex (es :: Effects) a. (forall (e :: Effects). ThrowCatch ex e -> Eff (e :& es) a) -> (ex -> Eff es a) -> Eff es a
- throw :: forall (e :: Effects) (es :: Effects) ex a. e <: es => ThrowCatch ex e -> ex -> Eff es a
- localTry :: forall (e :: Effects) (es :: Effects) ex a. e <: es => ThrowCatch ex e -> Eff es a -> Eff es (Either ex a)
- localCatch :: forall (e :: Effects) (es :: Effects) ex a. e <: es => ThrowCatch ex e -> Eff es a -> (ex -> Eff es a) -> Eff es a
- localHandle :: forall (e :: Effects) (es :: Effects) ex a. e <: es => ThrowCatch ex e -> (ex -> Eff es a) -> Eff es a -> Eff es a
Capability
data ThrowCatch ex (e :: Effects) #
A scoped exception capability that can catch within its own scope.
Instances
| e <: es => OneWayCoercible (ThrowCatch ex e :: Type) (ThrowCatch ex es :: Type) | |
Defined in Bluefin.Internal Methods oneWayCoercibleImpl :: OneWayCoercibleD (ThrowCatch ex e) (ThrowCatch ex es) # | |
| Handle (ThrowCatch ex) | |
Defined in Bluefin.Internal Methods handleImpl :: HandleD (ThrowCatch ex) # | |
Handlers
Effectful operations
Arguments
| :: forall (e :: Effects) (es :: Effects) ex a. e <: es | |
| => ThrowCatch ex e | |
| -> ex | |
| -> Eff es a | ͘ |