/usr/share/doc/libghc-explicit-exception-doc/html/Control-Monad-Exception-Synchronous.html is in libghc-explicit-exception-doc 0.1.7.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Monad.Exception.Synchronous</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Monad-Exception-Synchronous.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Monad-Exception-Synchronous.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">explicit-exception-0.1.7.1: Exceptions which are explicit in the type signature.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Monad.Exception.Synchronous</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Synchronous exceptions immediately abort a series of computations.
We provide monads for describing this behaviour.
In contrast to ErrorT from <code>mtl</code> or <code>transformers</code> package
we do not pose restrictions on the exception type.
</p><p>How to tell, that a function can possibly throw more than one (kind of) exception?
</p><p>If you would use the exception type <code>(Either ParserException IOError)</code>
then this is different from <code>(Either IOError ParserException)</code>.
Thus we recommned using type classes for exceptions.
Then you can use one type containing all exceptions in an application,
but the type signature still tells which exceptions are actually possible.
Examples:
</p><pre> parser :: ParserException e => ExceptionalT e ParserMonad a
getLine :: IOException e => ExceptionalT e IO String
fileParser :: (ParserException e, IOException e) => ExceptionalT e IO String
</pre><p>Unfortunately, this way you cannot remove single exceptions
from the constraints by catching them.
You can only remove all of them using <code><a href="Control-Monad-Exception-Synchronous.html#v:resolve">resolve</a></code> or none.
For a more advanced approach,
that allows removing exceptions constraints
by some non-Haskell-98 type hackery,
see the exception package by Joseph Iborra.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Exceptional">Exceptional</a> e a<ul class="subs"><li>= <a href="#v:Success">Success</a> a </li><li>| <a href="#v:Exception">Exception</a> e </li></ul></li><li class="src short"><a href="#v:fromMaybe">fromMaybe</a> :: e -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a</li><li class="src short"><a href="#v:toMaybe">toMaybe</a> :: <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a</li><li class="src short"><a href="#v:fromEither">fromEither</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> e a -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a</li><li class="src short"><a href="#v:toEither">toEither</a> :: <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> e a</li><li class="src short"><a href="#v:fromExitCode">fromExitCode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Exit.html#t:ExitCode">ExitCode</a> -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> ()</li><li class="src short"><a href="#v:toExitCode">toExitCode</a> :: <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> () -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Exit.html#t:ExitCode">ExitCode</a></li><li class="src short"><a href="#v:getExceptionNull">getExceptionNull</a> :: <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e () -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> e</li><li class="src short"><a href="#v:switch">switch</a> :: (e -> b) -> (a -> b) -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a -> b</li><li class="src short"><a href="#v:force">force</a> :: <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a</li><li class="src short"><a href="#v:mapException">mapException</a> :: (e0 -> e1) -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e0 a -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e1 a</li><li class="src short"><a href="#v:mapExceptional">mapExceptional</a> :: (e0 -> e1) -> (a -> b) -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e0 a -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e1 b</li><li class="src short"><a href="#v:throw">throw</a> :: e -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a</li><li class="src short"><a href="#v:assert">assert</a> :: e -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e ()</li><li class="src short"><a href="#v:catch">catch</a> :: <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e0 a -> (e0 -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e1 a) -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e1 a</li><li class="src short"><a href="#v:resolve">resolve</a> :: (e -> a) -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a -> a</li><li class="src short"><a href="#v:merge">merge</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:Monoid">Monoid</a> e => <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e (a -> b) -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e b</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ExceptionalT">ExceptionalT</a> e m a = <a href="#v:ExceptionalT">ExceptionalT</a> {<ul class="subs"><li><a href="#v:runExceptionalT">runExceptionalT</a> :: m (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a)</li></ul>}</li><li class="src short"><a href="#v:fromMaybeT">fromMaybeT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => e -> <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Maybe.html#t:MaybeT">MaybeT</a> m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a</li><li class="src short"><a href="#v:toMaybeT">toMaybeT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Maybe.html#t:MaybeT">MaybeT</a> m a</li><li class="src short"><a href="#v:fromErrorT">fromErrorT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Error.html#t:ErrorT">ErrorT</a> e m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a</li><li class="src short"><a href="#v:toErrorT">toErrorT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Error.html#t:ErrorT">ErrorT</a> e m a</li><li class="src short"><a href="#v:fromEitherT">fromEitherT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> e a) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a</li><li class="src short"><a href="#v:toEitherT">toEitherT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> e a)</li><li class="src short"><a href="#v:fromExitCodeT">fromExitCodeT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> m => m <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Exit.html#t:ExitCode">ExitCode</a> -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> m ()</li><li class="src short"><a href="#v:toExitCodeT">toExitCodeT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> m () -> m <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Exit.html#t:ExitCode">ExitCode</a></li><li class="src short"><a href="#v:switchT">switchT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (e -> m b) -> (a -> m b) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> m b</li><li class="src short"><a href="#v:forceT">forceT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a</li><li class="src short"><a href="#v:mapExceptionT">mapExceptionT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (e0 -> e1) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e0 m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e1 m a</li><li class="src short"><a href="#v:mapExceptionalT">mapExceptionalT</a> :: (m (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e0 a) -> n (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e1 b)) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e0 m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e1 n b</li><li class="src short"><a href="#v:throwT">throwT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => e -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a</li><li class="src short"><a href="#v:assertT">assertT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => e -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m ()</li><li class="src short"><a href="#v:catchT">catchT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e0 m a -> (e0 -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e1 m a) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e1 m a</li><li class="src short"><a href="#v:bracketT">bracketT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m h -> (h -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m ()) -> (h -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a</li><li class="src short"><a href="#v:resolveT">resolveT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (e -> m a) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> m a</li><li class="src short"><a href="#v:tryT">tryT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> m (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a)</li><li class="src short"><a href="#v:manyT">manyT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (e0 -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> e1) -> (a -> b -> b) -> b -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e0 m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e1 m b</li><li class="src short"><a href="#v:manyMonoidT">manyMonoidT</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:Monoid">Monoid</a> a) => (e0 -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> e1) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e0 m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e1 m a</li><li class="src short"><a href="#v:mergeT">mergeT</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:Monoid">Monoid</a> e, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m) => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m (a -> b) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Exceptional" class="def">Exceptional</a> e a <a href="src/Control-Monad-Exception-Synchronous.html#Exceptional" class="link">Source</a></p><div class="doc"><p>Like <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a></code>, but explicitly intended for handling of exceptional results.
In contrast to <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a></code> we do not support <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#v:fail">fail</a></code>.
Calling <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#v:fail">fail</a></code> in the <code><a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a></code> monad is an error.
This way, we do not require that an exception can be derived from a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></code>,
yet, we require no constraint on the exception type at all.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Success" class="def">Success</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Exception" class="def">Exception</a> e</td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:Exceptional" class="caption collapser" onclick="toggleSection('i:Exceptional')">Instances</p><div id="section.i:Exceptional" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad-Fix.html#t:MonadFix">MonadFix</a> (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e)</td><td class="doc"><p>I think it is not a good idea to use this instance,
maybe we shoul remove it.
It expects that the constructor is <code><a href="Control-Monad-Exception-Synchronous.html#v:Success">Success</a></code>
and the result is undefined otherwise.
But if the constructor must always be <code><a href="Control-Monad-Exception-Synchronous.html#v:Success">Success</a></code>,
why using <code><a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a></code> then, at all?
</p></td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> e, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> a) => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a)</td><td class="doc empty"> </td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> e, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> a) => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:fromMaybe" class="def">fromMaybe</a> :: e -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a<a href="src/Control-Monad-Exception-Synchronous.html#fromMaybe" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toMaybe" class="def">toMaybe</a> :: <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a<a href="src/Control-Monad-Exception-Synchronous.html#toMaybe" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:fromEither" class="def">fromEither</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> e a -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a<a href="src/Control-Monad-Exception-Synchronous.html#fromEither" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toEither" class="def">toEither</a> :: <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> e a<a href="src/Control-Monad-Exception-Synchronous.html#toEither" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:fromExitCode" class="def">fromExitCode</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Exit.html#t:ExitCode">ExitCode</a> -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> ()<a href="src/Control-Monad-Exception-Synchronous.html#fromExitCode" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toExitCode" class="def">toExitCode</a> :: <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> () -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Exit.html#t:ExitCode">ExitCode</a><a href="src/Control-Monad-Exception-Synchronous.html#toExitCode" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:getExceptionNull" class="def">getExceptionNull</a> :: <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e () -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> e<a href="src/Control-Monad-Exception-Synchronous.html#getExceptionNull" class="link">Source</a></p><div class="doc"><p>useful in connection with <code><a href="Control-Monad-Exception-Asynchronous.html#t:continue">continue</a></code>
</p></div></div><div class="top"><p class="src"><a name="v:switch" class="def">switch</a> :: (e -> b) -> (a -> b) -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a -> b<a href="src/Control-Monad-Exception-Synchronous.html#switch" class="link">Source</a></p><div class="doc"><p>Counterpart to <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#v:either">either</a></code> for <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:force" class="def">force</a> :: <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a<a href="src/Control-Monad-Exception-Synchronous.html#force" class="link">Source</a></p><div class="doc"><p>If you are sure that the value is always a <code><a href="Control-Monad-Exception-Synchronous.html#v:Success">Success</a></code>
you can tell that the run-time system
thus making your program lazy.
However, try to avoid this function by using <code><a href="Control-Monad-Exception-Synchronous.html#v:catch">catch</a></code> and friends,
since this function is partial.
</p></div></div><div class="top"><p class="src"><a name="v:mapException" class="def">mapException</a> :: (e0 -> e1) -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e0 a -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e1 a<a href="src/Control-Monad-Exception-Synchronous.html#mapException" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:mapExceptional" class="def">mapExceptional</a> :: (e0 -> e1) -> (a -> b) -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e0 a -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e1 b<a href="src/Control-Monad-Exception-Synchronous.html#mapExceptional" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:throw" class="def">throw</a> :: e -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a<a href="src/Control-Monad-Exception-Synchronous.html#throw" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:assert" class="def">assert</a> :: e -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e ()<a href="src/Control-Monad-Exception-Synchronous.html#assert" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:catch" class="def">catch</a> :: <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e0 a -> (e0 -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e1 a) -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e1 a<a href="src/Control-Monad-Exception-Synchronous.html#catch" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:resolve" class="def">resolve</a> :: (e -> a) -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a -> a<a href="src/Control-Monad-Exception-Synchronous.html#resolve" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:merge" class="def">merge</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:Monoid">Monoid</a> e => <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e (a -> b) -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a -> <a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e b<a href="src/Control-Monad-Exception-Synchronous.html#merge" class="link">Source</a></p><div class="doc"><p>see <code><a href="Control-Monad-Exception-Synchronous.html#v:mergeT">mergeT</a></code>
</p></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ExceptionalT" class="def">ExceptionalT</a> e m a <a href="src/Control-Monad-Exception-Synchronous.html#ExceptionalT" class="link">Source</a></p><div class="doc"><p>like ErrorT, but ExceptionalT is the better name in order to distinguish from real (programming) errors
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ExceptionalT" class="def">ExceptionalT</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:runExceptionalT" class="def">runExceptionalT</a> :: m (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a)</dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:ExceptionalT" class="caption collapser" onclick="toggleSection('i:ExceptionalT')">Instances</p><div id="section.i:ExceptionalT" class="show"><table><tr><td class="src"><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Class.html#t:MonadTrans">MonadTrans</a> (<a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> (<a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> (<a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad-Fix.html#t:MonadFix">MonadFix</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad-Fix.html#t:MonadFix">MonadFix</a> (<a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m)</td><td class="doc"><p>Same restrictions applies as for <code>instance MonadFix (Exceptional e a)</code>.
</p></td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m)</td><td class="doc empty"> </td></tr><tr><td class="src">(MonadSIO m, ContainsIOException e) => <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:fromMaybeT" class="def">fromMaybeT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => e -> <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Maybe.html#t:MaybeT">MaybeT</a> m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a<a href="src/Control-Monad-Exception-Synchronous.html#fromMaybeT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toMaybeT" class="def">toMaybeT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Maybe.html#t:MaybeT">MaybeT</a> m a<a href="src/Control-Monad-Exception-Synchronous.html#toMaybeT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:fromErrorT" class="def">fromErrorT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Error.html#t:ErrorT">ErrorT</a> e m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a<a href="src/Control-Monad-Exception-Synchronous.html#fromErrorT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toErrorT" class="def">toErrorT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Error.html#t:ErrorT">ErrorT</a> e m a<a href="src/Control-Monad-Exception-Synchronous.html#toErrorT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:fromEitherT" class="def">fromEitherT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> e a) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a<a href="src/Control-Monad-Exception-Synchronous.html#fromEitherT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toEitherT" class="def">toEitherT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> e a)<a href="src/Control-Monad-Exception-Synchronous.html#toEitherT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:fromExitCodeT" class="def">fromExitCodeT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> m => m <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Exit.html#t:ExitCode">ExitCode</a> -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> m ()<a href="src/Control-Monad-Exception-Synchronous.html#fromExitCodeT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toExitCodeT" class="def">toExitCodeT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> m () -> m <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-Exit.html#t:ExitCode">ExitCode</a><a href="src/Control-Monad-Exception-Synchronous.html#toExitCodeT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:switchT" class="def">switchT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (e -> m b) -> (a -> m b) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> m b<a href="src/Control-Monad-Exception-Synchronous.html#switchT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:forceT" class="def">forceT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a<a href="src/Control-Monad-Exception-Synchronous.html#forceT" class="link">Source</a></p><div class="doc"><p>see <code><a href="Control-Monad-Exception-Synchronous.html#v:force">force</a></code>
</p></div></div><div class="top"><p class="src"><a name="v:mapExceptionT" class="def">mapExceptionT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (e0 -> e1) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e0 m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e1 m a<a href="src/Control-Monad-Exception-Synchronous.html#mapExceptionT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:mapExceptionalT" class="def">mapExceptionalT</a> :: (m (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e0 a) -> n (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e1 b)) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e0 m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e1 n b<a href="src/Control-Monad-Exception-Synchronous.html#mapExceptionalT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:throwT" class="def">throwT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => e -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a<a href="src/Control-Monad-Exception-Synchronous.html#throwT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:assertT" class="def">assertT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => e -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m ()<a href="src/Control-Monad-Exception-Synchronous.html#assertT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:catchT" class="def">catchT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e0 m a -> (e0 -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e1 m a) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e1 m a<a href="src/Control-Monad-Exception-Synchronous.html#catchT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:bracketT" class="def">bracketT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m h -> (h -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m ()) -> (h -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a<a href="src/Control-Monad-Exception-Synchronous.html#bracketT" class="link">Source</a></p><div class="doc"><p>If the enclosed monad has custom exception facilities,
they could skip the cleanup code.
Make sure, that this cannot happen by choosing an appropriate monad.
</p></div></div><div class="top"><p class="src"><a name="v:resolveT" class="def">resolveT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (e -> m a) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> m a<a href="src/Control-Monad-Exception-Synchronous.html#resolveT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:tryT" class="def">tryT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> m (<a href="Control-Monad-Exception-Synchronous.html#t:Exceptional">Exceptional</a> e a)<a href="src/Control-Monad-Exception-Synchronous.html#tryT" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:manyT" class="def">manyT</a><a href="src/Control-Monad-Exception-Synchronous.html#manyT" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> (e0 -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> e1)</td><td class="doc"><p>exception handler
</p></td></tr><tr><td class="src">-> (a -> b -> b)</td><td class="doc"><p><code>cons</code> function
</p></td></tr><tr><td class="src">-> b</td><td class="doc"><pre>empty</pre></td></tr><tr><td class="src">-> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e0 m a</td><td class="doc"><p>atomic action to repeat
</p></td></tr><tr><td class="src">-> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e1 m b</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Repeat an action until an exception occurs.
Initialize the result with <code>empty</code> and add new elements using <code>cons</code>
(e.g. <code>[]</code> and <code>(:)</code>).
The exception handler decides whether the terminating exception
is re-raised (<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Just">Just</a></code>) or catched (<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Nothing">Nothing</a></code>).
</p></div></div><div class="top"><p class="src"><a name="v:manyMonoidT" class="def">manyMonoidT</a><a href="src/Control-Monad-Exception-Synchronous.html#manyMonoidT" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:Monoid">Monoid</a> a)</td><td class="doc empty"> </td></tr><tr><td class="src">=> (e0 -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> e1)</td><td class="doc"><p>exception handler
</p></td></tr><tr><td class="src">-> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e0 m a</td><td class="doc"><p>atomic action to repeat
</p></td></tr><tr><td class="src">-> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e1 m a</td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><a name="v:mergeT" class="def">mergeT</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:Monoid">Monoid</a> e, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m) => <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m (a -> b) -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m a -> <a href="Control-Monad-Exception-Synchronous.html#t:ExceptionalT">ExceptionalT</a> e m b<a href="src/Control-Monad-Exception-Synchronous.html#mergeT" class="link">Source</a></p><div class="doc"><p>This combines two actions similar to Applicative's <code><a href="*">*</a></code>.
The result action fails if one of the input action fails,
but both actions are executed.
E.g. consider a compiler that emits all errors
that can be detected independently,
but eventually aborts if there is at least one error.
</p><p>The exception type <code>e</code> might be a list type,
or an <code>Endo</code> type that implements a difflist.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>
|