/usr/share/doc/libghc-pipes-safe-doc/html/Pipes-Safe.html is in libghc-pipes-safe-doc 2.2.6-1build1.
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 | <!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>Pipes.Safe</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Pipes-Safe.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Pipes-Safe.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">pipes-safe-2.2.6: Safety for the pipes ecosystem</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Trustworthy</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Pipes.Safe</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">SafeT</a></li><li><a href="#g:2">MonadSafe</a></li><li><a href="#g:3">Utilities</a></li><li><a href="#g:4">Re-exports</a></li><li><a href="#section.orphans">Orphan instances</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module provides an orphan <code><a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadCatch">MonadCatch</a></code> instance for <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a></code> of the
form:</p><pre>instance (MonadCatch m, MonadIO m) => MonadCatch (Proxy a' a b' b m) where</pre><p>... so you can throw and catch exceptions within pipes using all
<code><a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadCatch">MonadCatch</a></code> operations.</p><p>This module also provides generalized versions of some <code><a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadCatch">MonadCatch</a></code>
operations so that you can also protect against premature termination of
connected components. For example, if you protect a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#v:readFile">readFile</a></code> computation
using <code><a href="Pipes-Safe.html#v:bracket">bracket</a></code> from this module:</p><pre>-- readFile.hs
import Pipes
import qualified Pipes.Prelude as P
import Pipes.Safe
import qualified System.IO as IO
import Prelude hiding (readFile)
readFile :: FilePath -> Producer' String (SafeT IO) ()
readFile file = bracket
(do h <- IO.openFile file IO.ReadMode
putStrLn $ "{" ++ file ++ " open}"
return h )
(\h -> do
IO.hClose h
putStrLn $ "{" ++ file ++ " closed}" )
P.fromHandle</pre><p>... then this generalized <code><a href="Pipes-Safe.html#v:bracket">bracket</a></code> will guard against both exceptions and
premature termination of other pipes:</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>runSafeT $ runEffect $ readFile "readFile.hs" >-> P.take 4 >-> P.stdoutLn
</code></strong>{readFile.hs open}
-- readFile.hs
import Pipes
import qualified Pipes.Prelude as P
import Pipes.Safe
{readFile.hs closed}
</pre><p>Note that the <code><a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadCatch">MonadCatch</a></code> instance for <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a></code> provides weaker versions of
<code><a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#v:mask">mask</a></code> and <code><a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#v:uninterruptibleMask">uninterruptibleMask</a></code> that do not completely prevent asynchronous
exceptions. Instead, they provide a weaker guarantee that asynchronous
exceptions will only occur during <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes.html#v:await">await</a></code>s or <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes.html#v:yield">yield</a></code>s and
nowhere else. For example, if you write:</p><pre>mask_ $ do
x <- await
lift $ print x
lift $ print x</pre><p>... then you may receive an asynchronous exception during the <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes.html#v:await">await</a></code>,
but you will not receive an asynchronous exception during or in between the
two <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#v:print">print</a></code> statements. This weaker guarantee suffices to provide
asynchronous exception safety.</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:SafeT">SafeT</a> m r</li><li class="src short"><a href="#v:runSafeT">runSafeT</a> :: (<a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadMask">MonadMask</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m) => <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m r -> m r</li><li class="src short"><a href="#v:runSafeP">runSafeP</a> :: (<a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadMask">MonadMask</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m) => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Effect">Effect</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m) r -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Effect-39-">Effect'</a> m r</li><li class="src short"><span class="keyword">data</span> <a href="#t:ReleaseKey">ReleaseKey</a></li><li class="src short"><span class="keyword">class</span> (<a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadCatch">MonadCatch</a> m, <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadMask">MonadMask</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="Pipes-Safe.html#t:Base">Base</a> m)) => <a href="#t:MonadSafe">MonadSafe</a> m <span class="keyword">where</span><ul class="subs"><li><span class="keyword">type</span> <a href="#t:Base">Base</a> (m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a></li></ul></li><li class="src short"><a href="#v:onException">onException</a> :: <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => m a -> <a href="Pipes-Safe.html#t:Base">Base</a> m b -> m a</li><li class="src short"><a href="#v:tryP">tryP</a> :: (<a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a> e) => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m r -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> e r)</li><li class="src short"><a href="#v:catchP">catchP</a> :: (<a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a> e) => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m r -> (e -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m r) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m r</li><li class="src short"><a href="#v:finally">finally</a> :: <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => m a -> <a href="Pipes-Safe.html#t:Base">Base</a> m b -> m a</li><li class="src short"><a href="#v:bracket">bracket</a> :: <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => <a href="Pipes-Safe.html#t:Base">Base</a> m a -> (a -> <a href="Pipes-Safe.html#t:Base">Base</a> m b) -> (a -> m c) -> m c</li><li class="src short"><a href="#v:bracket_">bracket_</a> :: <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => <a href="Pipes-Safe.html#t:Base">Base</a> m a -> <a href="Pipes-Safe.html#t:Base">Base</a> m b -> m c -> m c</li><li class="src short"><a href="#v:bracketOnError">bracketOnError</a> :: <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => <a href="Pipes-Safe.html#t:Base">Base</a> m a -> (a -> <a href="Pipes-Safe.html#t:Base">Base</a> m b) -> (a -> m c) -> m c</li><li class="src short">module <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html">Control.Monad.Catch</a></li><li class="src short">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception.html">Control.Exception</a></li></ul></div><div id="interface"><h1 id="g:1">SafeT</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:SafeT" class="def">SafeT</a> m r <a href="src/Pipes-Safe.html#SafeT" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></p><div class="doc"><p><code><a href="Pipes-Safe.html#t:SafeT">SafeT</a></code> is a monad transformer that extends the base monad with the ability
to <code><a href="Pipes-Safe.html#v:register">register</a></code> and <code><a href="Pipes-Safe.html#v:release">release</a></code> finalizers.</p><p>All unreleased finalizers are called at the end of the <code><a href="Pipes-Safe.html#t:SafeT">SafeT</a></code> block, even
in the event of exceptions.</p></div><div class="subs instances"><p id="control.i:SafeT" class="caption collapser" onclick="toggleSection('i:SafeT')">Instances</p><div id="section.i:SafeT" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadTrans:1" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadTrans:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Class.html#t:MonadTrans">MonadTrans</a> <a href="Pipes-Safe.html#t:SafeT">SafeT</a></span> <a href="src/Pipes-Safe.html#line-203" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadTrans:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:lift">lift</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:lift" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadBase:2" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadBase:2')"></span> <a href="file:///usr/share/doc/libghc-transformers-base-doc/html/Control-Monad-Base.html#t:MonadBase">MonadBase</a> b m => <a href="file:///usr/share/doc/libghc-transformers-base-doc/html/Control-Monad-Base.html#t:MonadBase">MonadBase</a> b (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-201" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadBase:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBase">liftBase</a> :: b α -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m α <a href="#v:liftBase" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadBaseControl:3" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadBaseControl:3')"></span> <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> b m => <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> b (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-206" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadBaseControl:3" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:StM">StM</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) a :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="#t:StM" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBaseWith">liftBaseWith</a> :: (<a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:RunInBase">RunInBase</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m) b -> b a) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:liftBaseWith" class="selflink">#</a></p><p class="src"><a href="#v:restoreM">restoreM</a> :: <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:StM">StM</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m) a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:restoreM" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadError:4" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadError:4')"></span> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:MonadError">MonadError</a> e m => <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:MonadError">MonadError</a> e (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-200" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadError:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:throwError">throwError</a> :: e -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:throwError" class="selflink">#</a></p><p class="src"><a href="#v:catchError">catchError</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> (e -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:catchError" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadState:5" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadState:5')"></span> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m => <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-200" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadState:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -> (a, s)) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:state" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadWriter:6" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadWriter:6')"></span> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w m => <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-200" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadWriter:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:writer">writer</a> :: (a, w) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:writer" class="selflink">#</a></p><p class="src"><a href="#v:tell">tell</a> :: w -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m () <a href="#v:tell" class="selflink">#</a></p><p class="src"><a href="#v:listen">listen</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m (a, w) <a href="#v:listen" class="selflink">#</a></p><p class="src"><a href="#v:pass">pass</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m (a, w -> w) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:pass" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:Monad:7" class="instance expander" onclick="toggleSection('i:id:SafeT:Monad:7')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-199" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:Monad:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--61-">(>>=)</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> (a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b <a href="#v:-62--62--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62--62-">(>>)</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b <a href="#v:-62--62-" class="selflink">#</a></p><p class="src"><a href="#v:return">return</a> :: a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:return" class="selflink">#</a></p><p class="src"><a href="#v:fail">fail</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:fail" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:Functor:8" class="instance expander" onclick="toggleSection('i:id:SafeT:Functor:8')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-199" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:Functor:8" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -> b) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(<$)</a> :: a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadFix:9" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadFix:9')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-Fix.html#t:MonadFix">MonadFix</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-Fix.html#t:MonadFix">MonadFix</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-199" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadFix:9" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mfix">mfix</a> :: (a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:mfix" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:Applicative:10" class="instance expander" onclick="toggleSection('i:id:SafeT:Applicative:10')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-199" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:Applicative:10" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pure">pure</a> :: a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:pure" class="selflink">#</a></p><p class="src"><a href="#v:-60--42--62-">(<*>)</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m (a -> b) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b <a href="#v:-60--42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-42--62-">(*>)</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b <a href="#v:-42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-60--42-">(<*)</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:-60--42-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadIO:11" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadIO:11')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-201" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadIO:11" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftIO">liftIO</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:liftIO" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:Alternative:12" class="instance expander" onclick="toggleSection('i:id:SafeT:Alternative:12')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Alternative">Alternative</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Alternative">Alternative</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-199" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:Alternative:12" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:empty">empty</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:empty" class="selflink">#</a></p><p class="src"><a href="#v:-60--124--62-">(<|>)</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:-60--124--62-" class="selflink">#</a></p><p class="src"><a href="#v:some">some</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m [a] <a href="#v:some" class="selflink">#</a></p><p class="src"><a href="#v:many">many</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m [a] <a href="#v:many" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadPlus:13" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadPlus:13')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-199" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadPlus:13" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mzero">mzero</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:mzero" class="selflink">#</a></p><p class="src"><a href="#v:mplus">mplus</a> :: <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:mplus" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadThrow:14" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadThrow:14')"></span> <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadThrow">MonadThrow</a> m => <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadThrow">MonadThrow</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-201" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadThrow:14" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:throwM">throwM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a> e => e -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:throwM" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadCatch:15" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadCatch:15')"></span> <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadCatch">MonadCatch</a> m => <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadCatch">MonadCatch</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-201" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadCatch:15" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:catch">catch</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a> e => <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> (e -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:catch" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadMask:16" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadMask:16')"></span> <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadMask">MonadMask</a> m => <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadMask">MonadMask</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-201" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadMask:16" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mask">mask</a> :: ((<span class="keyword">forall</span> a. <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b <a href="#v:mask" class="selflink">#</a></p><p class="src"><a href="#v:uninterruptibleMask">uninterruptibleMask</a> :: ((<span class="keyword">forall</span> a. <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b <a href="#v:uninterruptibleMask" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadCont:17" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadCont:17')"></span> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Cont-Class.html#t:MonadCont">MonadCont</a> m => <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Cont-Class.html#t:MonadCont">MonadCont</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-200" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadCont:17" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:callCC">callCC</a> :: ((a -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m b) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:callCC" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:PrimMonad:18" class="instance expander" onclick="toggleSection('i:id:SafeT:PrimMonad:18')"></span> <a href="file:///usr/share/doc/libghc-primitive-doc/html/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> m => <a href="file:///usr/share/doc/libghc-primitive-doc/html/Control-Monad-Primitive.html#t:PrimMonad">PrimMonad</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-221" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:PrimMonad:18" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-primitive-doc/html/Control-Monad-Primitive.html#t:PrimState">PrimState</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="#t:PrimState" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:primitive">primitive</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Prim.html#t:State-35-">State#</a> (<a href="file:///usr/share/doc/libghc-primitive-doc/html/Control-Monad-Primitive.html#t:PrimState">PrimState</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)) -> (#<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Exts.html#v:VoidRep">VoidRep</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-Exts.html#v:PtrRepLifted">PtrRepLifted</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.5.0.0/GHC-Prim.html#t:State-35-">State#</a> (<a href="file:///usr/share/doc/libghc-primitive-doc/html/Control-Monad-Primitive.html#t:PrimState">PrimState</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)), a#)) -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m a <a href="#v:primitive" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:MonadSafe:19" class="instance expander" onclick="toggleSection('i:id:SafeT:MonadSafe:19')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadCatch">MonadCatch</a> m, <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadMask">MonadMask</a> m) => <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-283" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:MonadSafe:19" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="src/Pipes-Safe.html#Base" class="link">Source</a> <a href="#t:Base" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBase">liftBase</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m) r -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m r <a href="src/Pipes-Safe.html#liftBase" class="link">Source</a> <a href="#v:liftBase" class="selflink">#</a></p><p class="src"><a href="#v:register">register</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m) () -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> <a href="src/Pipes-Safe.html#register" class="link">Source</a> <a href="#v:register" class="selflink">#</a></p><p class="src"><a href="#v:release">release</a> :: <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m () <a href="src/Pipes-Safe.html#release" class="link">Source</a> <a href="#v:release" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:PrimState:20" class="instance expander" onclick="toggleSection('i:id:SafeT:PrimState:20')"></span> <span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-primitive-doc/html/Control-Monad-Primitive.html#t:PrimState">PrimState</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-222" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:PrimState:20" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-primitive-doc/html/Control-Monad-Primitive.html#t:PrimState">PrimState</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m) = <a href="file:///usr/share/doc/libghc-primitive-doc/html/Control-Monad-Primitive.html#t:PrimState">PrimState</a> m</div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:Base:21" class="instance expander" onclick="toggleSection('i:id:SafeT:Base:21')"></span> <span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-284" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:Base:21" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m) = m</div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:SafeT:StM:22" class="instance expander" onclick="toggleSection('i:id:SafeT:StM:22')"></span> <span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:StM">StM</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m) a</span> <a href="src/Pipes-Safe.html#line-208" class="link">Source</a> <a href="#t:SafeT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:SafeT:StM:22" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:StM">StM</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m) a = <a href="file:///usr/share/doc/libghc-monad-control-doc/html/Control-Monad-Trans-Control.html#t:StM">StM</a> m a</div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:runSafeT" class="def">runSafeT</a> :: (<a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadMask">MonadMask</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m) => <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m r -> m r <a href="src/Pipes-Safe.html#runSafeT" class="link">Source</a> <a href="#v:runSafeT" class="selflink">#</a></p><div class="doc"><p>Run the <code><a href="Pipes-Safe.html#t:SafeT">SafeT</a></code> monad transformer, executing all unreleased finalizers at
the end of the computation</p></div></div><div class="top"><p class="src"><a id="v:runSafeP" class="def">runSafeP</a> :: (<a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadMask">MonadMask</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m) => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Effect">Effect</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m) r -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Effect-39-">Effect'</a> m r <a href="src/Pipes-Safe.html#runSafeP" class="link">Source</a> <a href="#v:runSafeP" class="selflink">#</a></p><div class="doc"><p>Run <code><a href="Pipes-Safe.html#t:SafeT">SafeT</a></code> in the base monad, executing all unreleased finalizers at the
end of the computation</p><p>Use <code><a href="Pipes-Safe.html#v:runSafeP">runSafeP</a></code> to safely flush all unreleased finalizers and ensure prompt
finalization without exiting the <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a></code> monad.</p></div></div><h1 id="g:2">MonadSafe</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:ReleaseKey" class="def">ReleaseKey</a> <a href="src/Pipes-Safe.html#ReleaseKey" class="link">Source</a> <a href="#t:ReleaseKey" class="selflink">#</a></p><div class="doc"><p>Token used to <code><a href="Pipes-Safe.html#v:release">release</a></code> a previously <code><a href="Pipes-Safe.html#v:register">register</a></code>ed finalizer</p></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadCatch">MonadCatch</a> m, <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadMask">MonadMask</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="Pipes-Safe.html#t:Base">Base</a> m)) => <a id="t:MonadSafe" class="def">MonadSafe</a> m <span class="keyword">where</span> <a href="src/Pipes-Safe.html#MonadSafe" class="link">Source</a> <a href="#t:MonadSafe" class="selflink">#</a></p><div class="doc"><p><code><a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a></code> lets you <code><a href="Pipes-Safe.html#v:register">register</a></code> and <code><a href="Pipes-Safe.html#v:release">release</a></code> finalizers that execute in a
<code><a href="Pipes-Safe.html#t:Base">Base</a></code> monad</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="Pipes-Safe.html#v:liftBase">liftBase</a>, <a href="Pipes-Safe.html#v:register">register</a>, <a href="Pipes-Safe.html#v:release">release</a></p></div><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a id="t:Base" class="def">Base</a> (m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="src/Pipes-Safe.html#Base" class="link">Source</a> <a href="#t:Base" class="selflink">#</a></p><div class="doc"><p>The monad used to run resource management actions, corresponding to the
monad directly beneath <code><a href="Pipes-Safe.html#t:SafeT">SafeT</a></code></p></div></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:liftBase" class="def">liftBase</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> m r -> m r <a href="src/Pipes-Safe.html#liftBase" class="link">Source</a> <a href="#v:liftBase" class="selflink">#</a></p><div class="doc"><p>Lift an action from the <code><a href="Pipes-Safe.html#t:Base">Base</a></code> monad</p></div><p class="src"><a id="v:register" class="def">register</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> m () -> m <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> <a href="src/Pipes-Safe.html#register" class="link">Source</a> <a href="#v:register" class="selflink">#</a></p><div class="doc"><p><code><a href="Pipes-Safe.html#v:register">register</a></code> a finalizer, ensuring that the finalizer gets called if the
finalizer is not <code><a href="Pipes-Safe.html#v:release">release</a></code>d before the end of the surrounding <code><a href="Pipes-Safe.html#t:SafeT">SafeT</a></code>
block.</p></div><p class="src"><a id="v:release" class="def">release</a> :: <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> -> m () <a href="src/Pipes-Safe.html#release" class="link">Source</a> <a href="#v:release" class="selflink">#</a></p><div class="doc"><p><code><a href="Pipes-Safe.html#v:release">release</a></code> a registered finalizer</p><p>You can safely call <code><a href="Pipes-Safe.html#v:release">release</a></code> more than once on the same <code><a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a></code>.
Every <code><a href="Pipes-Safe.html#v:release">release</a></code> after the first one does nothing.</p></div></div><div class="subs instances"><p id="control.i:MonadSafe" class="caption collapser" onclick="toggleSection('i:MonadSafe')">Instances</p><div id="section.i:MonadSafe" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadSafe:MonadSafe:1" class="instance expander" onclick="toggleSection('i:ic:MonadSafe:MonadSafe:1')"></span> <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> (<a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m)</span> <a href="src/Pipes-Safe.html#line-326" class="link">Source</a> <a href="#t:MonadSafe" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadSafe:MonadSafe:1" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="src/Pipes-Safe.html#Base" class="link">Source</a> <a href="#t:Base" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBase">liftBase</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m) r -> <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m r <a href="src/Pipes-Safe.html#liftBase" class="link">Source</a> <a href="#v:liftBase" class="selflink">#</a></p><p class="src"><a href="#v:register">register</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m) () -> <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> <a href="src/Pipes-Safe.html#register" class="link">Source</a> <a href="#v:register" class="selflink">#</a></p><p class="src"><a href="#v:release">release</a> :: <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> -> <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch-Pure.html#t:CatchT">CatchT</a> m () <a href="src/Pipes-Safe.html#release" class="link">Source</a> <a href="#v:release" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadSafe:MonadSafe:2" class="instance expander" onclick="toggleSection('i:ic:MonadSafe:MonadSafe:2')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadCatch">MonadCatch</a> m, <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadMask">MonadMask</a> m) => <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m)</span> <a href="src/Pipes-Safe.html#line-283" class="link">Source</a> <a href="#t:MonadSafe" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadSafe:MonadSafe:2" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="src/Pipes-Safe.html#Base" class="link">Source</a> <a href="#t:Base" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBase">liftBase</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m) r -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m r <a href="src/Pipes-Safe.html#liftBase" class="link">Source</a> <a href="#v:liftBase" class="selflink">#</a></p><p class="src"><a href="#v:register">register</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="Pipes-Safe.html#t:SafeT">SafeT</a> m) () -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> <a href="src/Pipes-Safe.html#register" class="link">Source</a> <a href="#v:register" class="selflink">#</a></p><p class="src"><a href="#v:release">release</a> :: <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> -> <a href="Pipes-Safe.html#t:SafeT">SafeT</a> m () <a href="src/Pipes-Safe.html#release" class="link">Source</a> <a href="#v:release" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadSafe:MonadSafe:3" class="instance expander" onclick="toggleSection('i:ic:MonadSafe:MonadSafe:3')"></span> (<a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> w) => <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w m)</span> <a href="src/Pipes-Safe.html#line-350" class="link">Source</a> <a href="#t:MonadSafe" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadSafe:MonadSafe:3" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="src/Pipes-Safe.html#Base" class="link">Source</a> <a href="#t:Base" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBase">liftBase</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w m) r -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w m r <a href="src/Pipes-Safe.html#liftBase" class="link">Source</a> <a href="#v:liftBase" class="selflink">#</a></p><p class="src"><a href="#v:register">register</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w m) () -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w m <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> <a href="src/Pipes-Safe.html#register" class="link">Source</a> <a href="#v:register" class="selflink">#</a></p><p class="src"><a href="#v:release">release</a> :: <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w m () <a href="src/Pipes-Safe.html#release" class="link">Source</a> <a href="#v:release" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadSafe:MonadSafe:4" class="instance expander" onclick="toggleSection('i:ic:MonadSafe:MonadSafe:4')"></span> <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s m)</span> <a href="src/Pipes-Safe.html#line-338" class="link">Source</a> <a href="#t:MonadSafe" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadSafe:MonadSafe:4" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="src/Pipes-Safe.html#Base" class="link">Source</a> <a href="#t:Base" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBase">liftBase</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s m) r -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s m r <a href="src/Pipes-Safe.html#liftBase" class="link">Source</a> <a href="#v:liftBase" class="selflink">#</a></p><p class="src"><a href="#v:register">register</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s m) () -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s m <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> <a href="src/Pipes-Safe.html#register" class="link">Source</a> <a href="#v:register" class="selflink">#</a></p><p class="src"><a href="#v:release">release</a> :: <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s m () <a href="src/Pipes-Safe.html#release" class="link">Source</a> <a href="#v:release" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadSafe:MonadSafe:5" class="instance expander" onclick="toggleSection('i:ic:MonadSafe:MonadSafe:5')"></span> <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Identity.html#t:IdentityT">IdentityT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> m)</span> <a href="src/Pipes-Safe.html#line-320" class="link">Source</a> <a href="#t:MonadSafe" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadSafe:MonadSafe:5" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Identity.html#t:IdentityT">IdentityT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="src/Pipes-Safe.html#Base" class="link">Source</a> <a href="#t:Base" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBase">liftBase</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Identity.html#t:IdentityT">IdentityT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> m) r -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Identity.html#t:IdentityT">IdentityT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> m r <a href="src/Pipes-Safe.html#liftBase" class="link">Source</a> <a href="#v:liftBase" class="selflink">#</a></p><p class="src"><a href="#v:register">register</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Identity.html#t:IdentityT">IdentityT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> m) () -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Identity.html#t:IdentityT">IdentityT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> m <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> <a href="src/Pipes-Safe.html#register" class="link">Source</a> <a href="#v:register" class="selflink">#</a></p><p class="src"><a href="#v:release">release</a> :: <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Identity.html#t:IdentityT">IdentityT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> m () <a href="src/Pipes-Safe.html#release" class="link">Source</a> <a href="#v:release" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadSafe:MonadSafe:6" class="instance expander" onclick="toggleSection('i:ic:MonadSafe:MonadSafe:6')"></span> <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s m)</span> <a href="src/Pipes-Safe.html#line-344" class="link">Source</a> <a href="#t:MonadSafe" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadSafe:MonadSafe:6" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="src/Pipes-Safe.html#Base" class="link">Source</a> <a href="#t:Base" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBase">liftBase</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s m) r -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s m r <a href="src/Pipes-Safe.html#liftBase" class="link">Source</a> <a href="#v:liftBase" class="selflink">#</a></p><p class="src"><a href="#v:register">register</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s m) () -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s m <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> <a href="src/Pipes-Safe.html#register" class="link">Source</a> <a href="#v:register" class="selflink">#</a></p><p class="src"><a href="#v:release">release</a> :: <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s m () <a href="src/Pipes-Safe.html#release" class="link">Source</a> <a href="#v:release" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadSafe:MonadSafe:7" class="instance expander" onclick="toggleSection('i:ic:MonadSafe:MonadSafe:7')"></span> (<a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> w) => <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w m)</span> <a href="src/Pipes-Safe.html#line-356" class="link">Source</a> <a href="#t:MonadSafe" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadSafe:MonadSafe:7" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="src/Pipes-Safe.html#Base" class="link">Source</a> <a href="#t:Base" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBase">liftBase</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w m) r -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w m r <a href="src/Pipes-Safe.html#liftBase" class="link">Source</a> <a href="#v:liftBase" class="selflink">#</a></p><p class="src"><a href="#v:register">register</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w m) () -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w m <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> <a href="src/Pipes-Safe.html#register" class="link">Source</a> <a href="#v:register" class="selflink">#</a></p><p class="src"><a href="#v:release">release</a> :: <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w m () <a href="src/Pipes-Safe.html#release" class="link">Source</a> <a href="#v:release" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadSafe:MonadSafe:8" class="instance expander" onclick="toggleSection('i:ic:MonadSafe:MonadSafe:8')"></span> <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader.html#t:ReaderT">ReaderT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> i m)</span> <a href="src/Pipes-Safe.html#line-332" class="link">Source</a> <a href="#t:MonadSafe" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadSafe:MonadSafe:8" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader.html#t:ReaderT">ReaderT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> i m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="src/Pipes-Safe.html#Base" class="link">Source</a> <a href="#t:Base" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBase">liftBase</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader.html#t:ReaderT">ReaderT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> i m) r -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader.html#t:ReaderT">ReaderT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> i m r <a href="src/Pipes-Safe.html#liftBase" class="link">Source</a> <a href="#v:liftBase" class="selflink">#</a></p><p class="src"><a href="#v:register">register</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader.html#t:ReaderT">ReaderT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> i m) () -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader.html#t:ReaderT">ReaderT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> i m <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> <a href="src/Pipes-Safe.html#register" class="link">Source</a> <a href="#v:register" class="selflink">#</a></p><p class="src"><a href="#v:release">release</a> :: <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader.html#t:ReaderT">ReaderT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> i m () <a href="src/Pipes-Safe.html#release" class="link">Source</a> <a href="#v:release" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadSafe:MonadSafe:9" class="instance expander" onclick="toggleSection('i:ic:MonadSafe:MonadSafe:9')"></span> (<a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> w) => <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Lazy.html#t:RWST">RWST</a> i w s m)</span> <a href="src/Pipes-Safe.html#line-362" class="link">Source</a> <a href="#t:MonadSafe" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadSafe:MonadSafe:9" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Lazy.html#t:RWST">RWST</a> i w s m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="src/Pipes-Safe.html#Base" class="link">Source</a> <a href="#t:Base" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBase">liftBase</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Lazy.html#t:RWST">RWST</a> i w s m) r -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Lazy.html#t:RWST">RWST</a> i w s m r <a href="src/Pipes-Safe.html#liftBase" class="link">Source</a> <a href="#v:liftBase" class="selflink">#</a></p><p class="src"><a href="#v:register">register</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Lazy.html#t:RWST">RWST</a> i w s m) () -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Lazy.html#t:RWST">RWST</a> i w s m <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> <a href="src/Pipes-Safe.html#register" class="link">Source</a> <a href="#v:register" class="selflink">#</a></p><p class="src"><a href="#v:release">release</a> :: <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Lazy.html#t:RWST">RWST</a> i w s m () <a href="src/Pipes-Safe.html#release" class="link">Source</a> <a href="#v:release" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadSafe:MonadSafe:10" class="instance expander" onclick="toggleSection('i:ic:MonadSafe:MonadSafe:10')"></span> (<a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> w) => <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Strict.html#t:RWST">RWST</a> i w s m)</span> <a href="src/Pipes-Safe.html#line-368" class="link">Source</a> <a href="#t:MonadSafe" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadSafe:MonadSafe:10" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Strict.html#t:RWST">RWST</a> i w s m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="src/Pipes-Safe.html#Base" class="link">Source</a> <a href="#t:Base" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBase">liftBase</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Strict.html#t:RWST">RWST</a> i w s m) r -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Strict.html#t:RWST">RWST</a> i w s m r <a href="src/Pipes-Safe.html#liftBase" class="link">Source</a> <a href="#v:liftBase" class="selflink">#</a></p><p class="src"><a href="#v:register">register</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Strict.html#t:RWST">RWST</a> i w s m) () -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Strict.html#t:RWST">RWST</a> i w s m <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> <a href="src/Pipes-Safe.html#register" class="link">Source</a> <a href="#v:register" class="selflink">#</a></p><p class="src"><a href="#v:release">release</a> :: <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Strict.html#t:RWST">RWST</a> i w s m () <a href="src/Pipes-Safe.html#release" class="link">Source</a> <a href="#v:release" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadSafe:MonadSafe:11" class="instance expander" onclick="toggleSection('i:ic:MonadSafe:MonadSafe:11')"></span> <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m)</span> <a href="src/Pipes-Safe.html#line-314" class="link">Source</a> <a href="#t:MonadSafe" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadSafe:MonadSafe:11" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a>) :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="src/Pipes-Safe.html#Base" class="link">Source</a> <a href="#t:Base" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftBase">liftBase</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m) r -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m r <a href="src/Pipes-Safe.html#liftBase" class="link">Source</a> <a href="#v:liftBase" class="selflink">#</a></p><p class="src"><a href="#v:register">register</a> :: <a href="Pipes-Safe.html#t:Base">Base</a> (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m) () -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> <a href="src/Pipes-Safe.html#register" class="link">Source</a> <a href="#v:register" class="selflink">#</a></p><p class="src"><a href="#v:release">release</a> :: <a href="Pipes-Safe.html#t:ReleaseKey">ReleaseKey</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m () <a href="src/Pipes-Safe.html#release" class="link">Source</a> <a href="#v:release" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><h1 id="g:3">Utilities</h1><div class="doc"><p>These utilities let you supply a finalizer that runs in the <code><a href="Pipes-Safe.html#t:Base">Base</a></code> monad
(i.e. the monad directly beneath <code><a href="Pipes-Safe.html#t:SafeT">SafeT</a></code>). If you don't need to use the
full power of the <code><a href="Pipes-Safe.html#t:Base">Base</a></code> monad and you only need to use to use <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a></code>, then
just wrap the finalizer in <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#v:liftIO">liftIO</a></code>, like this:</p><pre>myAction `finally` (liftIO myFinalizer)</pre><p>This will lead to a simple inferred type with a single <code><a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a></code>
constraint:</p><pre>(MonadSafe m) => ...</pre><p>For examples of this, see the utilities in <a href="Pipes-Safe-Prelude.html">Pipes.Safe.Prelude</a>.</p><p>If you omit the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#v:liftIO">liftIO</a></code>, the compiler will infer the following constraint
instead:</p><pre>(MonadSafe m, Base m ~ IO) => ...</pre><p>This means that this function would require <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a></code> directly beneath the
<code><a href="Pipes-Safe.html#t:SafeT">SafeT</a></code> monad transformer, which might not be what you want.</p></div><div class="top"><p class="src"><a id="v:onException" class="def">onException</a> :: <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => m a -> <a href="Pipes-Safe.html#t:Base">Base</a> m b -> m a <a href="src/Pipes-Safe.html#onException" class="link">Source</a> <a href="#v:onException" class="selflink">#</a></p><div class="doc"><p>Analogous to <code><a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#v:onException">onException</a></code> from <code>Control.Monad.Catch</code>, except this also
protects against premature termination</p><p><code>(`onException` io)</code> is a monad morphism.</p></div></div><div class="top"><p class="src"><a id="v:tryP" class="def">tryP</a> :: (<a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a> e) => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m r -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> e r) <a href="src/Pipes-Safe.html#tryP" class="link">Source</a> <a href="#v:tryP" class="selflink">#</a></p><div class="doc"><p>Transform a <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a></code> into one that catches any exceptions caused by its
effects, and returns the resulting exception.</p></div></div><div class="top"><p class="src"><a id="v:catchP" class="def">catchP</a> :: (<a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a> e) => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m r -> (e -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m r) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m r <a href="src/Pipes-Safe.html#catchP" class="link">Source</a> <a href="#v:catchP" class="selflink">#</a></p><div class="doc"><p>Allows direct handling of exceptions raised by the effects in a <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:finally" class="def">finally</a> :: <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => m a -> <a href="Pipes-Safe.html#t:Base">Base</a> m b -> m a <a href="src/Pipes-Safe.html#finally" class="link">Source</a> <a href="#v:finally" class="selflink">#</a></p><div class="doc"><p>Analogous to <code><a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#v:finally">finally</a></code> from <code>Control.Monad.Catch</code>, except this also
protects against premature termination</p></div></div><div class="top"><p class="src"><a id="v:bracket" class="def">bracket</a> :: <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => <a href="Pipes-Safe.html#t:Base">Base</a> m a -> (a -> <a href="Pipes-Safe.html#t:Base">Base</a> m b) -> (a -> m c) -> m c <a href="src/Pipes-Safe.html#bracket" class="link">Source</a> <a href="#v:bracket" class="selflink">#</a></p><div class="doc"><p>Analogous to <code><a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#v:bracket">bracket</a></code> from <code>Control.Monad.Catch</code>, except this also
protects against premature termination</p></div></div><div class="top"><p class="src"><a id="v:bracket_" class="def">bracket_</a> :: <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => <a href="Pipes-Safe.html#t:Base">Base</a> m a -> <a href="Pipes-Safe.html#t:Base">Base</a> m b -> m c -> m c <a href="src/Pipes-Safe.html#bracket_" class="link">Source</a> <a href="#v:bracket_" class="selflink">#</a></p><div class="doc"><p>Analogous to <code><a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#v:bracket_">bracket_</a></code> from <code>Control.Monad.Catch</code>, except this also
protects against premature termination</p></div></div><div class="top"><p class="src"><a id="v:bracketOnError" class="def">bracketOnError</a> :: <a href="Pipes-Safe.html#t:MonadSafe">MonadSafe</a> m => <a href="Pipes-Safe.html#t:Base">Base</a> m a -> (a -> <a href="Pipes-Safe.html#t:Base">Base</a> m b) -> (a -> m c) -> m c <a href="src/Pipes-Safe.html#bracketOnError" class="link">Source</a> <a href="#v:bracketOnError" class="selflink">#</a></p><div class="doc"><p>Analogous to <code><a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#v:bracketOnError">bracketOnError</a></code> from <code>Control.Monad.Catch</code>, except this also
protects against premature termination</p></div></div><h1 id="g:4">Re-exports</h1><div class="doc"><p><code>Control.Monad.Catch</code> re-exports all functions except for the ones that
conflict with the generalized versions provided here (i.e. <code><a href="Pipes-Safe.html#v:bracket">bracket</a></code>,
<code><a href="Pipes-Safe.html#v:finally">finally</a></code>, etc.).</p><p><code>Control.Exception</code> re-exports <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:Exception">Exception</a></code> and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a></code>.</p></div><div class="top"><p class="src">module <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html">Control.Monad.Catch</a></p></div><div class="top"><p class="src">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Exception.html">Control.Exception</a></p></div><h1>Orphan instances</h1><div id="section.orphans" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:o:ic:MonadMask:MonadMask:1" class="instance expander" onclick="toggleSection('i:o:ic:MonadMask:MonadMask:1')"></span> (<a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadMask">MonadMask</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m) => <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadMask">MonadMask</a> (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m)</span> <a href="src/Pipes-Safe.html#line-183" class="link">Source</a> <a href="#v:-36-fMonadMaskProxy" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:o:ic:MonadMask:MonadMask:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mask">mask</a> :: ((<span class="keyword">forall</span> c. <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m c -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m c) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m b) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m b <a href="#v:mask" class="selflink">#</a></p><p class="src"><a href="#v:uninterruptibleMask">uninterruptibleMask</a> :: ((<span class="keyword">forall</span> c. <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m c -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m c) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m b) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Internal.html#t:Proxy">Proxy</a> a' a b' b m b <a href="#v:uninterruptibleMask" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|