aivika-transformers-5.4: Transformers for the Aivika simulation library

CopyrightCopyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell2010

Simulation.Aivika.Trans.Exception

Description

Tested with: GHC 8.0.1

It defines a type class of monads with exception handling capabilities.

Synopsis

Documentation

class Monad m => MonadException m where Source #

A computation within which we can throw an exception.

Minimal complete definition

catchComp, finallyComp, throwComp

Methods

catchComp :: Exception e => m a -> (e -> m a) -> m a Source #

Catch an exception within the computation.

finallyComp :: m a -> m b -> m a Source #

Introduce a finalisation block.

throwComp :: Exception e => e -> m a Source #

Throw an exception.