effin-0.2.1.1: A Typeable-free implementation of extensible effects

Safe HaskellNone
LanguageHaskell2010

Control.Effect.Exception

Synopsis

Documentation

class MemberEffect Exception (Exception e) l => EffectException e l

Instances

MemberEffect (* -> * -> *) Exception (Exception e) l => EffectException e l 

data Exception e a

An effect that describes the possibility of failure.

Instances

Functor (Exception e) 
type Is (* -> * -> *) Exception f 

runException :: (EffectBracket s l, Show e) => Effect (Exception e :+ l) a -> Effect l (Either e a)

Completely handles an exception effect.

raise :: EffectException e l => e -> Effect l a

Raises an exception.

except :: EffectException e l => Effect l a -> (e -> Effect l a) -> Effect l a

Handles an exception. Intended to be used in infix form.

myComputation `except` \ex -> doSomethingWith ex