This file is indexed.

/usr/share/doc/libghc-stm-doc/html/Control-Concurrent-STM-TBQueue.html is in libghc-stm-doc 2.4.4.1-3.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Control.Concurrent.STM.TBQueue</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_Control-Concurrent-STM-TBQueue.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Concurrent-STM-TBQueue.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">stm-2.4.4.1: Software Transactional Memory</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(c) The University of Glasgow 2012</td></tr><tr><th>License</th><td>BSD-style (see the file libraries/base/LICENSE)</td></tr><tr><th>Maintainer</th><td>libraries@haskell.org</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>non-portable (requires STM)</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Control.Concurrent.STM.TBQueue</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">TBQueue</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p><code><a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a></code> is a bounded version of <code>TQueue</code>. The queue has a maximum
 capacity set when it is created.  If the queue already contains the
 maximum number of elements, then <code><a href="Control-Concurrent-STM-TBQueue.html#v:writeTBQueue">writeTBQueue</a></code> blocks until an
 element is removed from the queue.</p><p>The implementation is based on the traditional purely-functional
 queue representation that uses two lists to obtain amortised <em>O(1)</em>
 enqueue and dequeue operations.</p><p><em>Since: 2.4</em></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:TBQueue">TBQueue</a> a</li><li class="src short"><a href="#v:newTBQueue">newTBQueue</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> (<a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a)</li><li class="src short"><a href="#v:newTBQueueIO">newTBQueueIO</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a)</li><li class="src short"><a href="#v:readTBQueue">readTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> a</li><li class="src short"><a href="#v:tryReadTBQueue">tryReadTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</li><li class="src short"><a href="#v:peekTBQueue">peekTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> a</li><li class="src short"><a href="#v:tryPeekTBQueue">tryPeekTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</li><li class="src short"><a href="#v:writeTBQueue">writeTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> ()</li><li class="src short"><a href="#v:unGetTBQueue">unGetTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> ()</li><li class="src short"><a href="#v:isEmptyTBQueue">isEmptyTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isFullTBQueue">isFullTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1 id="g:1">TBQueue</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:TBQueue" class="def">TBQueue</a> a <a href="src/Control-Concurrent-STM-TBQueue.html#TBQueue" class="link">Source</a> <a href="#t:TBQueue" class="selflink">#</a></p><div class="doc"><p><code><a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a></code> is an abstract type representing a bounded FIFO channel.</p><p><em>Since: 2.4</em></p></div><div class="subs instances"><p id="control.i:TBQueue" class="caption collapser" onclick="toggleSection('i:TBQueue')">Instances</p><div id="section.i:TBQueue" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:TBQueue:Eq:1" class="instance expander" onclick="toggleSection('i:id:TBQueue:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a)</span> <a href="src/Control-Concurrent-STM-TBQueue.html#line-60" class="link">Source</a> <a href="#t:TBQueue" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:TBQueue:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:newTBQueue" class="def">newTBQueue</a> <a href="src/Control-Concurrent-STM-TBQueue.html#newTBQueue" class="link">Source</a> <a href="#v:newTBQueue" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>maximum number of elements the queue can hold</p></td></tr><tr><td class="src">-&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> (<a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Build and returns a new instance of <code><a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a></code></p></div></div><div class="top"><p class="src"><a id="v:newTBQueueIO" class="def">newTBQueueIO</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a) <a href="src/Control-Concurrent-STM-TBQueue.html#newTBQueueIO" class="link">Source</a> <a href="#v:newTBQueueIO" class="selflink">#</a></p><div class="doc"><p><code>IO</code> version of <code><a href="Control-Concurrent-STM-TBQueue.html#v:newTBQueue">newTBQueue</a></code>.  This is useful for creating top-level
 <code><a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a></code>s using <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO-Unsafe.html#v:unsafePerformIO">unsafePerformIO</a></code>, because using
 <code><a href="Control-Monad-STM.html#v:atomically">atomically</a></code> inside <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO-Unsafe.html#v:unsafePerformIO">unsafePerformIO</a></code> isn't
 possible.</p></div></div><div class="top"><p class="src"><a id="v:readTBQueue" class="def">readTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> a <a href="src/Control-Concurrent-STM-TBQueue.html#readTBQueue" class="link">Source</a> <a href="#v:readTBQueue" class="selflink">#</a></p><div class="doc"><p>Read the next value from the <code><a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:tryReadTBQueue" class="def">tryReadTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) <a href="src/Control-Concurrent-STM-TBQueue.html#tryReadTBQueue" class="link">Source</a> <a href="#v:tryReadTBQueue" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="Control-Concurrent-STM-TBQueue.html#v:readTBQueue">readTBQueue</a></code> which does not retry. Instead it
 returns <code>Nothing</code> if no value is available.</p></div></div><div class="top"><p class="src"><a id="v:peekTBQueue" class="def">peekTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> a <a href="src/Control-Concurrent-STM-TBQueue.html#peekTBQueue" class="link">Source</a> <a href="#v:peekTBQueue" class="selflink">#</a></p><div class="doc"><p>Get the next value from the <code>TBQueue</code> without removing it,
 retrying if the channel is empty.</p></div></div><div class="top"><p class="src"><a id="v:tryPeekTBQueue" class="def">tryPeekTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) <a href="src/Control-Concurrent-STM-TBQueue.html#tryPeekTBQueue" class="link">Source</a> <a href="#v:tryPeekTBQueue" class="selflink">#</a></p><div class="doc"><p>A version of <code><a href="Control-Concurrent-STM-TBQueue.html#v:peekTBQueue">peekTBQueue</a></code> which does not retry. Instead it
 returns <code>Nothing</code> if no value is available.</p></div></div><div class="top"><p class="src"><a id="v:writeTBQueue" class="def">writeTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> () <a href="src/Control-Concurrent-STM-TBQueue.html#writeTBQueue" class="link">Source</a> <a href="#v:writeTBQueue" class="selflink">#</a></p><div class="doc"><p>Write a value to a <code><a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a></code>; blocks if the queue is full.</p></div></div><div class="top"><p class="src"><a id="v:unGetTBQueue" class="def">unGetTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> () <a href="src/Control-Concurrent-STM-TBQueue.html#unGetTBQueue" class="link">Source</a> <a href="#v:unGetTBQueue" class="selflink">#</a></p><div class="doc"><p>Put a data item back onto a channel, where it will be the next item read.
 Blocks if the queue is full.</p></div></div><div class="top"><p class="src"><a id="v:isEmptyTBQueue" class="def">isEmptyTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Control-Concurrent-STM-TBQueue.html#isEmptyTBQueue" class="link">Source</a> <a href="#v:isEmptyTBQueue" class="selflink">#</a></p><div class="doc"><p>Returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:True">True</a></code> if the supplied <code><a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a></code> is empty.</p></div></div><div class="top"><p class="src"><a id="v:isFullTBQueue" class="def">isFullTBQueue</a> :: <a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a> a -&gt; <a href="Control-Monad-STM.html#t:STM">STM</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Control-Concurrent-STM-TBQueue.html#isFullTBQueue" class="link">Source</a> <a href="#v:isFullTBQueue" class="selflink">#</a></p><div class="doc"><p>Returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:True">True</a></code> if the supplied <code><a href="Control-Concurrent-STM-TBQueue.html#t:TBQueue">TBQueue</a></code> is full.</p><p><em>Since: 2.4.3</em></p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>