/usr/share/doc/libghc-regex-applicative-doc/html/Text-Regex-Applicative-Object.html is in libghc-regex-applicative-doc 0.3.3-3build1.
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 | <!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>Text.Regex.Applicative.Object</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_Text-Regex-Applicative-Object.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text-Regex-Applicative-Object.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">regex-applicative-0.3.3: Regex-based parsing with applicative interface</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>(c) Roman Cheplyaka</td></tr><tr><th>License</th><td>MIT</td></tr><tr><th>Maintainer</th><td>Roman Cheplyaka <roma@ro-che.info></td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Text.Regex.Applicative.Object</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This is a low-level interface to the regex engine.</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:ReObject">ReObject</a> s r</li><li class="src short"><a href="#v:compile">compile</a> :: <a href="Text-Regex-Applicative.html#t:RE">RE</a> s r -> <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r</li><li class="src short"><a href="#v:emptyObject">emptyObject</a> :: <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r</li><li class="src short"><span class="keyword">data</span> <a href="#t:Thread">Thread</a> s r</li><li class="src short"><a href="#v:threads">threads</a> :: <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r -> [<a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r]</li><li class="src short"><a href="#v:failed">failed</a> :: <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isResult">isResult</a> :: <a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:getResult">getResult</a> :: <a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> r</li><li class="src short"><a href="#v:results">results</a> :: <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r -> [r]</li><li class="src short"><span class="keyword">data</span> <a href="#t:ThreadId">ThreadId</a></li><li class="src short"><a href="#v:threadId">threadId</a> :: <a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Text-Regex-Applicative-Object.html#t:ThreadId">ThreadId</a></li><li class="src short"><a href="#v:step">step</a> :: s -> <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r -> <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r</li><li class="src short"><a href="#v:stepThread">stepThread</a> :: s -> <a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r -> [<a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r]</li><li class="src short"><a href="#v:fromThreads">fromThreads</a> :: [<a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r] -> <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r</li><li class="src short"><a href="#v:addThread">addThread</a> :: <a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r -> <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r -> <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:ReObject" class="def">ReObject</a> s r <a href="src/Text-Regex-Applicative-Object.html#ReObject" class="link">Source</a> <a href="#t:ReObject" class="selflink">#</a></p><div class="doc"><p>The state of the engine is represented as a "regex object" of type
<code><code><a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a></code> s r</code>, where <code>s</code> is the type of symbols and <code>r</code> is the
result type (as in the <code><a href="Text-Regex-Applicative.html#t:RE">RE</a></code> type). Think of <code><a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a></code> as a collection of
<code><a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a></code>s ordered by priority. E.g. threads generated by the left part of
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#v:-60--124--62-"><|></a></code> come before the threads generated by the right part.</p></div></div><div class="top"><p class="src"><a id="v:compile" class="def">compile</a> :: <a href="Text-Regex-Applicative.html#t:RE">RE</a> s r -> <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r <a href="src/Text-Regex-Applicative-Object.html#compile" class="link">Source</a> <a href="#v:compile" class="selflink">#</a></p><div class="doc"><p>Compile a regular expression into a regular expression object</p></div></div><div class="top"><p class="src"><a id="v:emptyObject" class="def">emptyObject</a> :: <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r <a href="src/Text-Regex-Applicative-Object.html#emptyObject" class="link">Source</a> <a href="#v:emptyObject" class="selflink">#</a></p><div class="doc"><p>Empty object (with no threads)</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Thread" class="def">Thread</a> s r <a href="src/Text-Regex-Applicative-Types.html#Thread" class="link">Source</a> <a href="#t:Thread" class="selflink">#</a></p><div class="doc"><p>A thread either is a result or corresponds to a symbol in the regular
expression, which is expected by that thread.</p></div></div><div class="top"><p class="src"><a id="v:threads" class="def">threads</a> :: <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r -> [<a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r] <a href="src/Text-Regex-Applicative-Object.html#threads" class="link">Source</a> <a href="#v:threads" class="selflink">#</a></p><div class="doc"><p>List of all threads of an object. Each non-result thread has a unique id.</p></div></div><div class="top"><p class="src"><a id="v:failed" class="def">failed</a> :: <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Text-Regex-Applicative-Object.html#failed" class="link">Source</a> <a href="#v:failed" class="selflink">#</a></p><div class="doc"><p>Check if the object has no threads. In that case it never will
produce any new threads as a result of <code><a href="Text-Regex-Applicative-Object.html#v:step">step</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:isResult" class="def">isResult</a> :: <a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Text-Regex-Applicative-Object.html#isResult" class="link">Source</a> <a href="#v:isResult" class="selflink">#</a></p><div class="doc"><p>Check whether a thread is a result thread</p></div></div><div class="top"><p class="src"><a id="v:getResult" class="def">getResult</a> :: <a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> r <a href="src/Text-Regex-Applicative-Object.html#getResult" class="link">Source</a> <a href="#v:getResult" class="selflink">#</a></p><div class="doc"><p>Return the result of a result thread, or <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> if it's not a result
thread</p></div></div><div class="top"><p class="src"><a id="v:results" class="def">results</a> :: <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r -> [r] <a href="src/Text-Regex-Applicative-Object.html#results" class="link">Source</a> <a href="#v:results" class="selflink">#</a></p><div class="doc"><p>Extract the result values from all the result threads of an object</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:ThreadId" class="def">ThreadId</a> <a href="src/Text-Regex-Applicative-Types.html#ThreadId" class="link">Source</a> <a href="#t:ThreadId" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:threadId" class="def">threadId</a> :: <a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Text-Regex-Applicative-Object.html#t:ThreadId">ThreadId</a> <a href="src/Text-Regex-Applicative-Types.html#threadId" class="link">Source</a> <a href="#v:threadId" class="selflink">#</a></p><div class="doc"><p>Returns thread identifier. This will be <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#v:Just">Just</a></code> for ordinary threads and
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> for results.</p></div></div><div class="top"><p class="src"><a id="v:step" class="def">step</a> :: s -> <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r -> <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r <a href="src/Text-Regex-Applicative-Object.html#step" class="link">Source</a> <a href="#v:step" class="selflink">#</a></p><div class="doc"><p>Feed a symbol into a regex object</p></div></div><div class="top"><p class="src"><a id="v:stepThread" class="def">stepThread</a> :: s -> <a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r -> [<a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r] <a href="src/Text-Regex-Applicative-Object.html#stepThread" class="link">Source</a> <a href="#v:stepThread" class="selflink">#</a></p><div class="doc"><p>Feed a symbol into a non-result thread. It is an error to call <code><a href="Text-Regex-Applicative-Object.html#v:stepThread">stepThread</a></code>
on a result thread.</p></div></div><div class="top"><p class="src"><a id="v:fromThreads" class="def">fromThreads</a> :: [<a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r] -> <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r <a href="src/Text-Regex-Applicative-Object.html#fromThreads" class="link">Source</a> <a href="#v:fromThreads" class="selflink">#</a></p><div class="doc"><p>Create an object from a list of threads. It is recommended that all
threads come from the same <code><a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a></code>, unless you know what you're doing.
However, it should be safe to filter out or rearrange threads.</p></div></div><div class="top"><p class="src"><a id="v:addThread" class="def">addThread</a> :: <a href="Text-Regex-Applicative-Object.html#t:Thread">Thread</a> s r -> <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r -> <a href="Text-Regex-Applicative-Object.html#t:ReObject">ReObject</a> s r <a href="src/Text-Regex-Applicative-Object.html#addThread" class="link">Source</a> <a href="#v:addThread" class="selflink">#</a></p><div class="doc"><p>Add a thread to an object. The new thread will have lower priority than the
threads which are already in the object.</p><p>If a (non-result) thread with the same id already exists in the object, the
object is not changed.</p></div></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>
|