This file is indexed.

/usr/share/doc/libghc-pool-conduit-doc/html/Data-Conduit-Pool.html is in libghc-pool-conduit-doc 0.1.2-1build2.

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
<!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>Data.Conduit.Pool</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_Data-Conduit-Pool.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Conduit-Pool.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">pool-conduit-0.1.2: Resource pool allocations via ResourceT.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Data.Conduit.Pool</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Allocate resources from a pool, guaranteeing resource handling via the
 ResourceT transformer.
</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:ManagedResource">ManagedResource</a> m a = <a href="#v:ManagedResource">ManagedResource</a> {<ul class="subs"><li><a href="#v:mrValue">mrValue</a> :: a</li><li><a href="#v:mrReuse">mrReuse</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -&gt; m ()</li><li><a href="#v:mrRelease">mrRelease</a> :: m ()</li></ul>}</li><li class="src short"><a href="#v:takeResource">takeResource</a> :: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResource">MonadResource</a> m =&gt; <a href="Data-Conduit-Pool.html#t:Pool">Pool</a> a -&gt; m (<a href="Data-Conduit-Pool.html#t:ManagedResource">ManagedResource</a> m a)</li><li class="src short"><a href="#v:takeResourceCheck">takeResourceCheck</a> :: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResource">MonadResource</a> m =&gt; <a href="Data-Conduit-Pool.html#t:Pool">Pool</a> a -&gt; (a -&gt; m <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -&gt; m (<a href="Data-Conduit-Pool.html#t:ManagedResource">ManagedResource</a> m a)</li><li class="src short"><span class="keyword">data</span>  <a href="#t:Pool">Pool</a> a</li><li class="src short"><a href="#v:createPool">createPool</a> ::  <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> a -&gt; (a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/time-1.4.0.1/Data-Time-Clock.html#t:NominalDiffTime">NominalDiffTime</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="Data-Conduit-Pool.html#t:Pool">Pool</a> a)</li><li class="src short"><a href="#v:withResource">withResource</a> :: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m =&gt; <a href="Data-Conduit-Pool.html#t:Pool">Pool</a> a -&gt; (a -&gt; m b) -&gt; m b</li><li class="src short"><a href="#v:withResourceTimeout">withResourceTimeout</a> :: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Conduit-Pool.html#t:Pool">Pool</a> a -&gt; (a -&gt; m b) -&gt; m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> b)</li><li class="src short"><a href="#v:withResourceT">withResourceT</a> :: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResource">MonadResource</a> m =&gt; <a href="Data-Conduit-Pool.html#t:Pool">Pool</a> a -&gt; (a -&gt; m b) -&gt; m b</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:ManagedResource" class="def">ManagedResource</a> m a <a href="src/Data-Conduit-Pool.html#ManagedResource" class="link">Source</a></p><div class="doc"><p>The result of taking a resource.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ManagedResource" class="def">ManagedResource</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:mrValue" class="def">mrValue</a> :: a</dt><dd class="doc"><p>The actual resource.
</p></dd><dt class="src"><a name="v:mrReuse" class="def">mrReuse</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -&gt; m ()</dt><dd class="doc"><p>Let's you specify whether the resource should be returned to the pool
 (via <code><a href="/usr/share/doc/libghc-resource-pool-doc/html/Data-Pool.html#v:putResource">putResource</a></code>) or destroyed (via <code><a href="/usr/share/doc/libghc-resource-pool-doc/html/Data-Pool.html#v:destroyResource">destroyResource</a></code>) on release.
 This defaults to destruction, in case of exceptions.
</p></dd><dt class="src"><a name="v:mrRelease" class="def">mrRelease</a> :: m ()</dt><dd class="doc"><p>Release this resource, either destroying it or returning it to the
 pool.
</p></dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:takeResource" class="def">takeResource</a> :: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResource">MonadResource</a> m =&gt; <a href="Data-Conduit-Pool.html#t:Pool">Pool</a> a -&gt; m (<a href="Data-Conduit-Pool.html#t:ManagedResource">ManagedResource</a> m a)<a href="src/Data-Conduit-Pool.html#takeResource" class="link">Source</a></p><div class="doc"><p>Take a resource from the pool and register a release action.
</p></div></div><div class="top"><p class="src"><a name="v:takeResourceCheck" class="def">takeResourceCheck</a> :: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResource">MonadResource</a> m =&gt; <a href="Data-Conduit-Pool.html#t:Pool">Pool</a> a -&gt; (a -&gt; m <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -&gt; m (<a href="Data-Conduit-Pool.html#t:ManagedResource">ManagedResource</a> m a)<a href="src/Data-Conduit-Pool.html#takeResourceCheck" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Data-Conduit-Pool.html#v:takeResource">takeResource</a></code>, but apply some action to check if a resource is
 still valid.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Pool" class="def">Pool</a> a </p><div class="subs instances"><p id="control.i:Pool" class="caption collapser" onclick="toggleSection('i:Pool')">Instances</p><div id="section.i:Pool" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> (<a href="Data-Conduit-Pool.html#t:Pool">Pool</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:createPool" class="def">createPool</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> a</td><td class="doc"><p>Action that creates a new resource.
</p></td></tr><tr><td class="src">-&gt; (a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>Action that destroys an existing resource.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Stripe count.  The number of distinct sub-pools to maintain.
 The smallest acceptable value is 1.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/time-1.4.0.1/Data-Time-Clock.html#t:NominalDiffTime">NominalDiffTime</a></td><td class="doc"><p>Amount of time for which an unused resource is kept open.
 The smallest acceptable value is 0.5 seconds.
</p><p>The elapsed time before destroying a resource may be a little
 longer than requested, as the reaper thread wakes at 1-second
 intervals.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Maximum number of resources to keep open per stripe.  The
 smallest acceptable value is 1.
</p><p>Requests for resources will block if this limit is reached on a
 single stripe, even if other stripes have idle resources
 available.
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> (<a href="Data-Conduit-Pool.html#t:Pool">Pool</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><a name="v:withResource" class="def">withResource</a> :: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m =&gt; <a href="Data-Conduit-Pool.html#t:Pool">Pool</a> a -&gt; (a -&gt; m b) -&gt; m b</p><div class="doc"><p>Temporarily take a resource from a <code><a href="Data-Conduit-Pool.html#t:Pool">Pool</a></code>, perform an action with
 it, and return it to the pool afterwards.
</p><ul><li> If the pool has an idle resource available, it is used
   immediately.
</li><li> Otherwise, if the maximum number of resources has not yet been
   reached, a new resource is created and used.
</li><li> If the maximum number of resources has been reached, this
   function blocks until a resource becomes available.
</li></ul><p>If the action throws an exception of any type, the resource is
 destroyed, and not returned to the pool.
</p><p>It probably goes without saying that you should never manually
 destroy a pooled resource, as doing so will almost certainly cause
 a subsequent user (who expects the resource to be valid) to throw
 an exception.
</p></div></div><div class="top"><p class="src"><a name="v:withResourceTimeout" class="def">withResourceTimeout</a><a href="src/Data-Conduit-Pool.html#withResourceTimeout" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Timeout period in microseconds
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Conduit-Pool.html#t:Pool">Pool</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; (a -&gt; m b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> b)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Like <code><a href="Data-Conduit-Pool.html#v:withResource">withResource</a></code>, but times out the operation if resource
 allocation does not complete within the given timeout period.
</p><p>Since 0.1.2
</p></div></div><div class="top"><p class="src"><a name="v:withResourceT" class="def">withResourceT</a> :: <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResource">MonadResource</a> m =&gt; <a href="Data-Conduit-Pool.html#t:Pool">Pool</a> a -&gt; (a -&gt; m b) -&gt; m b<a href="src/Data-Conduit-Pool.html#withResourceT" class="link">Source</a></p><div class="doc"><p>Like <code><a href="Data-Conduit-Pool.html#v:withResource">withResource</a></code>, but uses <code><a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadResource">MonadResource</a></code> instead of <code><a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadBaseControl">MonadBaseControl</a></code>.
</p><p>Since 0.1.1
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>