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

Safe HaskellNone
LanguageHaskell2010

Control.Effect.Exception

Synopsis

Documentation

class (EffectBracket s l, MemberEffect Exception (Exception s e) l) => EffectException s e l Source

Instances

(EffectBracket s l, MemberEffect (* -> * -> * -> *) Exception (Exception s e) l) => EffectException s e l 

data Exception s e a Source

An effect that describes the possibility of failure.

Instances

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

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

Completely handles an exception effect.

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

Raises an exception.

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

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

myComputation `except` \ex -> doSomethingWith ex