aivika-transformers-6.1: 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-Inferred
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.

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.

Instances

Instances details
MonadException IO Source #

An instance of the type class.

Instance details

Defined in Simulation.Aivika.IO.Exception

Methods

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

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

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