bluefin-0.10.1.0: The Bluefin effect system
Safe HaskellNone
LanguageHaskell2010

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

Capability

data ThrowCatch ex (e :: Effects) #

A scoped exception capability that can catch within its own scope.

Instances

Instances details
e <: es => OneWayCoercible (ThrowCatch ex e :: Type) (ThrowCatch ex es :: Type) 
Instance details

Defined in Bluefin.Internal

Handle (ThrowCatch ex) 
Instance details

Defined in Bluefin.Internal

Handlers

try #

Arguments

:: forall ex (es :: Effects) a. (forall (e :: Effects). ThrowCatch ex e -> Eff (e :& es) a) 
-> Eff es (Either ex a)

͘

handle #

Arguments

:: forall ex (es :: Effects) a. (ex -> Eff es a) 
-> (forall (e :: Effects). ThrowCatch ex e -> Eff (e :& es) a) 
-> Eff es a

͘

catch #

Arguments

:: forall ex (es :: Effects) a. (forall (e :: Effects). ThrowCatch ex e -> Eff (e :& es) a) 
-> (ex -> Eff es a) 
-> Eff es a

͘

Effectful operations

throw #

Arguments

:: forall (e :: Effects) (es :: Effects) ex a. e <: es 
=> ThrowCatch ex e 
-> ex 
-> Eff es a

͘

Local handling

localTry #

Arguments

:: forall (e :: Effects) (es :: Effects) ex a. e <: es 
=> ThrowCatch ex e 
-> Eff es a 
-> Eff es (Either ex a)

͘

localCatch #

Arguments

:: forall (e :: Effects) (es :: Effects) ex a. e <: es 
=> ThrowCatch ex e 
-> Eff es a 
-> (ex -> Eff es a) 
-> Eff es a

͘

localHandle #

Arguments

:: forall (e :: Effects) (es :: Effects) ex a. e <: es 
=> ThrowCatch ex e 
-> (ex -> Eff es a) 
-> Eff es a 
-> Eff es a

͘