This file is indexed.

/usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch-Pure.html is in libghc-exceptions-doc 0.3.2-1.

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
<!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.Catch.Pure</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-Catch-Pure.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Monad-Catch-Pure.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">exceptions-0.3.2: Extensible optionally-pure exceptions</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Edward Kmett &lt;ekmett@gmail.com&gt;</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Control.Monad.Catch.Pure</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Transformer
</a></li><li><a href="#g:2">Typeclass
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module supplies a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#v:pure">pure</a></code> monad transformer that can be used for
 mock-testing code that throws exceptions, so long as those exceptions
 are always thrown with <code><a href="Control-Monad-Catch.html#v:throwM">throwM</a></code>.
</p><p>Do not mix <code><a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a></code> with <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code>. Choose one or the other for the
 bottom of your transformer stack!
</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">newtype</span>  <a href="#t:CatchT">CatchT</a> m a = <a href="#v:CatchT">CatchT</a> {<ul class="subs"><li><a href="#v:runCatchT">runCatchT</a> :: m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Control-Monad-Catch.html#t:SomeException">SomeException</a> a)</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:Catch">Catch</a> = <a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> <a href="/usr/share/doc/libghc-transformers-doc/html/Data-Functor-Identity.html#t:Identity">Identity</a></li><li class="src short"><a href="#v:runCatch">runCatch</a> ::  <a href="Control-Monad-Catch-Pure.html#t:Catch">Catch</a> a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Control-Monad-Catch.html#t:SomeException">SomeException</a> a</li><li class="src short"><a href="#v:mapCatchT">mapCatchT</a> ::  (m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Control-Monad-Catch.html#t:SomeException">SomeException</a> a) -&gt; n (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Control-Monad-Catch.html#t:SomeException">SomeException</a> b)) -&gt; <a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m a -&gt; <a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> n b</li><li class="src short">module <a href="Control-Monad-Catch.html">Control.Monad.Catch</a></li></ul></div><div id="interface"><h1 id="g:1">Transformer
</h1><div class="doc"><p>The <code>transformers</code>-style monad transfomer
</p></div><div class="top"><p class="src"><span class="keyword">newtype</span>  <a name="t:CatchT" class="def">CatchT</a> m a <a href="src/Control-Monad-Catch-Pure.html#CatchT" class="link">Source</a></p><div class="doc"><p>Add <code><a href="Control-Monad-Catch.html#t:Exception">Exception</a></code> handling abilities to a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code>.
</p><p>This should <em>never</em> be used in combination with <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code>. Think of <code><a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a></code>
 as an alternative base monad for use with mocking code that solely throws
 exceptions via <code><a href="Control-Monad-Catch.html#v:throwM">throwM</a></code>.
</p><p>Note: that <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a></code> monad has these abilities already, so stacking <code><a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a></code> on top
 of it does not add any value and can possibly be confusing:
</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>(error &quot;Hello!&quot; :: IO ()) `catch` (\(e :: ErrorCall) -&gt; liftIO $ print e)
</code></strong>Hello!
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>runCatchT $ (error &quot;Hello!&quot; :: CatchT IO ()) `catch` (\(e :: ErrorCall) -&gt; liftIO $ print e)
</code></strong>*** Exception: Hello!
</pre><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>runCatchT $ (throwM (ErrorCall &quot;Hello!&quot;) :: CatchT IO ()) `catch` (\(e :: ErrorCall) -&gt; liftIO $ print e)
</code></strong>Hello!
</pre></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:CatchT" class="def">CatchT</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:runCatchT" class="def">runCatchT</a> :: m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Control-Monad-Catch.html#t:SomeException">SomeException</a> a)</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:CatchT" class="caption collapser" onclick="toggleSection('i:CatchT')">Instances</p><div id="section.i:CatchT" 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-Catch-Pure.html#t:CatchT">CatchT</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Class.html#t:MonadRWS">MonadRWS</a> r w s m =&gt; <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Class.html#t:MonadRWS">MonadRWS</a> r w s (<a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader-Class.html#t:MonadReader">MonadReader</a> e m =&gt; <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader-Class.html#t:MonadReader">MonadReader</a> e (<a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m =&gt; <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s (<a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w m =&gt; <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w (<a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <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-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <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-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <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-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:MonadPlus">MonadPlus</a> (<a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <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-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Foldable.html#t:Foldable">Foldable</a> m =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Foldable.html#t:Foldable">Foldable</a> (<a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</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/Data-Traversable.html#t:Traversable">Traversable</a> m) =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Traversable.html#t:Traversable">Traversable</a> (<a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Alternative">Alternative</a> (<a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m =&gt; <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="Control-Monad-Catch.html#t:MonadCatch">MonadCatch</a> (<a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Catch" class="def">Catch</a> = <a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> <a href="/usr/share/doc/libghc-transformers-doc/html/Data-Functor-Identity.html#t:Identity">Identity</a><a href="src/Control-Monad-Catch-Pure.html#Catch" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:runCatch" class="def">runCatch</a> ::  <a href="Control-Monad-Catch-Pure.html#t:Catch">Catch</a> a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Control-Monad-Catch.html#t:SomeException">SomeException</a> a<a href="src/Control-Monad-Catch-Pure.html#runCatch" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:mapCatchT" class="def">mapCatchT</a> ::  (m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Control-Monad-Catch.html#t:SomeException">SomeException</a> a) -&gt; n (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> <a href="Control-Monad-Catch.html#t:SomeException">SomeException</a> b)) -&gt; <a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m a -&gt; <a href="Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> n b<a href="src/Control-Monad-Catch-Pure.html#mapCatchT" class="link">Source</a></p><div class="doc"><p>Map the unwrapped computation using the given function.
</p><ul><li> <code><code>runErrorT</code> (<code>mapErrorT</code> f m) = f (<code>runErrorT</code> m</code>)
</li></ul></div></div><h1 id="g:2">Typeclass
</h1><div class="doc"><p>The mtl style typeclass
</p></div><div class="top"><p class="src">module <a href="Control-Monad-Catch.html">Control.Monad.Catch</a></p></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>