This file is indexed.

/usr/share/doc/libghc-text-doc/html/Data-Text-Unsafe.html is in libghc-text-doc 1.2.2.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
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!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.Text.Unsafe</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_Data-Text-Unsafe.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Text-Unsafe.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">text-1.2.2.1: An efficient packed Unicode text type.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(c) 2009, 2010, 2011 Bryan O'Sullivan</td></tr><tr><th>License</th><td>BSD-style</td></tr><tr><th>Maintainer</th><td>bos@serpentine.com</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Data.Text.Unsafe</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A module containing unsafe <code><a href="Data-Text.html#t:Text">Text</a></code> operations, for very very careful
 use in heavily tested code.</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"><a href="#v:inlineInterleaveST">inlineInterleaveST</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-ST.html#t:ST">ST</a> s a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-ST.html#t:ST">ST</a> s a</li><li class="src short"><a href="#v:inlinePerformIO">inlinePerformIO</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; a</li><li class="src short"><a href="#v:unsafeDupablePerformIO">unsafeDupablePerformIO</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; a</li><li class="src short"><span class="keyword">data</span> <a href="#t:Iter">Iter</a> = <a href="#v:Iter">Iter</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:iter">iter</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <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="Data-Text-Unsafe.html#t:Iter">Iter</a></li><li class="src short"><a href="#v:iter_">iter_</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <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/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:reverseIter">reverseIter</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <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/Data-Char.html#t:Char">Char</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a>)</li><li class="src short"><a href="#v:reverseIter_">reverseIter_</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <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/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:unsafeHead">unsafeHead</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:unsafeTail">unsafeTail</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <a href="Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:lengthWord16">lengthWord16</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:takeWord16">takeWord16</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="Data-Text.html#t:Text">Text</a> -&gt; <a href="Data-Text.html#t:Text">Text</a></li><li class="src short"><a href="#v:dropWord16">dropWord16</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="Data-Text.html#t:Text">Text</a> -&gt; <a href="Data-Text.html#t:Text">Text</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:inlineInterleaveST" class="def">inlineInterleaveST</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-ST.html#t:ST">ST</a> s a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-ST.html#t:ST">ST</a> s a <a href="src/Data-Text-Internal-Unsafe.html#inlineInterleaveST" class="link">Source</a> <a href="#v:inlineInterleaveST" class="selflink">#</a></p><div class="doc"><p>Allow an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-ST.html#t:ST">ST</a></code> computation to be deferred lazily. When passed an
 action of type <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-ST.html#t:ST">ST</a></code> <code>s</code> <code>a</code>, the action will only be performed when
 the value of <code>a</code> is demanded.</p><p>This function is identical to the normal unsafeInterleaveST, but is
 inlined and hence faster.</p><p><em>Note</em>: This operation is highly unsafe, as it can introduce
 externally visible non-determinism into an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-ST.html#t:ST">ST</a></code> action.</p></div></div><div class="top"><p class="src"><a id="v:inlinePerformIO" class="def">inlinePerformIO</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; a <a href="src/Data-Text-Internal-Unsafe.html#inlinePerformIO" class="link">Source</a> <a href="#v:inlinePerformIO" class="selflink">#</a></p><div class="doc"><p>Just like unsafePerformIO, but we inline it. Big performance gains as
 it exposes lots of things to further inlining. <em>Very unsafe</em>. In
 particular, you should do no memory allocation inside an
 <code><a href="Data-Text-Unsafe.html#v:inlinePerformIO">inlinePerformIO</a></code> block. On Hugs this is just <code>unsafePerformIO</code>.</p></div></div><div class="top"><p class="src"><a id="v:unsafeDupablePerformIO" class="def">unsafeDupablePerformIO</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -&gt; a <a href="#v:unsafeDupablePerformIO" class="selflink">#</a></p><div class="doc"><p>This version of <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> is more efficient
because it omits the check that the IO is only being performed by a
single thread.  Hence, when you use <code><a href="Data-Text-Unsafe.html#v:unsafeDupablePerformIO">unsafeDupablePerformIO</a></code>,
there is a possibility that the IO action may be performed multiple
times (on a multiprocessor), and you should therefore ensure that
it gives the same results each time. It may even happen that one
of the duplicated IO actions is only run partially, and then interrupted
in the middle without an exception being raised. Therefore, functions
like <code>bracket</code> cannot be used safely within <code><a href="Data-Text-Unsafe.html#v:unsafeDupablePerformIO">unsafeDupablePerformIO</a></code>.</p><p><em>Since: 4.4.0.0</em></p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Iter" class="def">Iter</a> <a href="src/Data-Text-Unsafe.html#Iter" class="link">Source</a> <a href="#t:Iter" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Iter" class="def">Iter</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> !<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 empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><a id="v:iter" class="def">iter</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <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="Data-Text-Unsafe.html#t:Iter">Iter</a> <a href="src/Data-Text-Unsafe.html#iter" class="link">Source</a> <a href="#v:iter" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> Iterate (unsafely) one step forwards through a UTF-16
 array, returning the current character and the delta to add to give
 the next offset to iterate at.</p></div></div><div class="top"><p class="src"><a id="v:iter_" class="def">iter_</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <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/Data-Int.html#t:Int">Int</a> <a href="src/Data-Text-Unsafe.html#iter_" class="link">Source</a> <a href="#v:iter_" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> Iterate one step through a UTF-16 array, returning the
 delta to add to give the next offset to iterate at.</p></div></div><div class="top"><p class="src"><a id="v:reverseIter" class="def">reverseIter</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <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/Data-Char.html#t:Char">Char</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a>) <a href="src/Data-Text-Unsafe.html#reverseIter" class="link">Source</a> <a href="#v:reverseIter" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> Iterate one step backwards through a UTF-16 array,
 returning the current character and the delta to add (i.e. a
 negative number) to give the next offset to iterate at.</p></div></div><div class="top"><p class="src"><a id="v:reverseIter_" class="def">reverseIter_</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <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/Data-Int.html#t:Int">Int</a> <a href="src/Data-Text-Unsafe.html#reverseIter_" class="link">Source</a> <a href="#v:reverseIter_" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> Iterate one step backwards through a UTF-16 array,
 returning the delta to add (i.e. a negative number) to give the
 next offset to iterate at.</p></div></div><div class="top"><p class="src"><a id="v:unsafeHead" class="def">unsafeHead</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Text-Unsafe.html#unsafeHead" class="link">Source</a> <a href="#v:unsafeHead" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> A variant of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:head">head</a></code> for non-empty <code><a href="Data-Text.html#t:Text">Text</a></code>. <code><a href="Data-Text-Unsafe.html#v:unsafeHead">unsafeHead</a></code>
 omits the check for the empty case, so there is an obligation on
 the programmer to provide a proof that the <code><a href="Data-Text.html#t:Text">Text</a></code> is non-empty.</p></div></div><div class="top"><p class="src"><a id="v:unsafeTail" class="def">unsafeTail</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <a href="Data-Text.html#t:Text">Text</a> <a href="src/Data-Text-Unsafe.html#unsafeTail" class="link">Source</a> <a href="#v:unsafeTail" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> A variant of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:tail">tail</a></code> for non-empty <code><a href="Data-Text.html#t:Text">Text</a></code>. <code><a href="Data-Text-Unsafe.html#v:unsafeTail">unsafeTail</a></code>
 omits the check for the empty case, so there is an obligation on
 the programmer to provide a proof that the <code><a href="Data-Text.html#t:Text">Text</a></code> is non-empty.</p></div></div><div class="top"><p class="src"><a id="v:lengthWord16" class="def">lengthWord16</a> :: <a href="Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="src/Data-Text-Unsafe.html#lengthWord16" class="link">Source</a> <a href="#v:lengthWord16" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> Return the length of a <code><a href="Data-Text.html#t:Text">Text</a></code> in units of <code>Word16</code>.  This
 is useful for sizing a target array appropriately before using
 <code>unsafeCopyToPtr</code>.</p></div></div><div class="top"><p class="src"><a id="v:takeWord16" class="def">takeWord16</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="Data-Text.html#t:Text">Text</a> -&gt; <a href="Data-Text.html#t:Text">Text</a> <a href="src/Data-Text-Unsafe.html#takeWord16" class="link">Source</a> <a href="#v:takeWord16" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> Unchecked take of <code>k</code> <code>Word16</code>s from the front of a <code><a href="Data-Text.html#t:Text">Text</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:dropWord16" class="def">dropWord16</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="Data-Text.html#t:Text">Text</a> -&gt; <a href="Data-Text.html#t:Text">Text</a> <a href="src/Data-Text-Unsafe.html#dropWord16" class="link">Source</a> <a href="#v:dropWord16" class="selflink">#</a></p><div class="doc"><p><em>O(1)</em> Unchecked drop of <code>k</code> <code>Word16</code>s from the front of a <code><a href="Data-Text.html#t:Text">Text</a></code>.</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>