polysemy-conc-0.1.0.2: Polysemy Effects for Concurrency
Safe HaskellNone
LanguageHaskell2010

Polysemy.Conc.Data.Critical

Description

 
Synopsis

Documentation

data Critical :: Effect where Source #

An effect that catches exceptions.

The point of this is to catch exceptions that haven't been anticipated, as a failsafe. Used internally in this library.

Constructors

Catch :: Exception e => m a -> Critical m (Either e a)

Catch all exceptions of type e in this computation.

Instances

Instances details
type DefiningModule Critical Source # 
Instance details

Defined in Polysemy.Conc.Data.Critical

type DefiningModule Critical = "Polysemy.Conc.Data.Critical"

catchAs :: forall e a r. Exception e => Member Critical r => a -> Sem r a -> Sem r a Source #

Catch exceptions of type e and return a fallback value.

run :: Member Critical r => Sem r a -> Sem r (Either SomeException a) Source #

Convenience overload for SomeException.

runAs :: Member Critical r => a -> Sem r a -> Sem r a Source #

Convenience overload for SomeException.