/usr/share/doc/libghc-trifecta-doc/html/Text-Trifecta-Result.html is in libghc-trifecta-doc 1.5.2-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 | <!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.Trifecta.Result</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_Text-Trifecta-Result.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text-Trifecta-Result.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">trifecta-1.5.2: A modern parser combinator library with convenient diagnostics</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(c) Edward Kmett 2011-2014</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>ekmett@gmail.com</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>non-portable</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Text.Trifecta.Result</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Parse Results</a></li><li><a href="#g:2">Parsing Errors</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Results and Parse Errors</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:Result">Result</a> a<ul class="subs"><li>= <a href="#v:Success">Success</a> a</li><li>| <a href="#v:Failure">Failure</a> <a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a></li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:AsResult">AsResult</a> s t a b | s -> a, t -> b, s b -> t, t a -> s <span class="keyword">where</span><ul class="subs"><li><a href="#v:_Result">_Result</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Prism">Prism</a> s t (<a href="Text-Trifecta-Result.html#t:Result">Result</a> a) (<a href="Text-Trifecta-Result.html#t:Result">Result</a> b)</li></ul></li><li class="src short"><a href="#v:_Success">_Success</a> :: <a href="Text-Trifecta-Result.html#t:AsResult">AsResult</a> s t a b => <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Prism">Prism</a> s t a b</li><li class="src short"><a href="#v:_Failure">_Failure</a> :: <a href="Text-Trifecta-Result.html#t:AsResult">AsResult</a> s s a a => <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Prism-39-">Prism'</a> s <a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Err">Err</a> = <a href="#v:Err">Err</a> {<ul class="subs"><li><a href="#v:_reason">_reason</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a></li><li><a href="#v:_footnotes">_footnotes</a> :: [<a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a>]</li><li><a href="#v:_expected">_expected</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.6.2/Data-Set.html#t:Set">Set</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></li></ul>}</li><li class="src short"><span class="keyword">class</span> <a href="#t:HasErr">HasErr</a> c <span class="keyword">where</span><ul class="subs"><li><a href="#v:err">err</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> c <a href="Text-Trifecta-Result.html#t:Err">Err</a></li><li><a href="#v:expected">expected</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> c (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.6.2/Data-Set.html#t:Set">Set</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a>)</li><li><a href="#v:footnotes">footnotes</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> c [<a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a>]</li><li><a href="#v:reason">reason</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> c (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a>)</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:Errable">Errable</a> m <span class="keyword">where</span><ul class="subs"><li><a href="#v:raiseErr">raiseErr</a> :: <a href="Text-Trifecta-Result.html#t:Err">Err</a> -> m a</li></ul></li><li class="src short"><a href="#v:explain">explain</a> :: <a href="Text-Trifecta-Rendering.html#t:Rendering">Rendering</a> -> <a href="Text-Trifecta-Result.html#t:Err">Err</a> -> <a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a></li><li class="src short"><a href="#v:failed">failed</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> -> <a href="Text-Trifecta-Result.html#t:Err">Err</a></li></ul></div><div id="interface"><h1 id="g:1">Parse Results</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Result" class="def">Result</a> a <a href="src/Text-Trifecta-Result.html#Result" class="link">Source</a></p><div class="doc"><p>The result of parsing. Either we succeeded or something went wrong.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Success" class="def">Success</a> a</td><td class="doc empty"> </td></tr><tr><td class="src"><a name="v:Failure" class="def">Failure</a> <a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a></td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:Result" class="caption collapser" onclick="toggleSection('i:Result')">Instances</p><div id="section.i:Result" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> <a href="Text-Trifecta-Result.html#t:Result">Result</a></span> <a href="src/Text-Trifecta-Result.html#line-99" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Applicative">Applicative</a> <a href="Text-Trifecta-Result.html#t:Result">Result</a></span> <a href="src/Text-Trifecta-Result.html#line-127" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Foldable.html#t:Foldable">Foldable</a> <a href="Text-Trifecta-Result.html#t:Result">Result</a></span> <a href="src/Text-Trifecta-Result.html#line-99" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Traversable.html#t:Traversable">Traversable</a> <a href="Text-Trifecta-Result.html#t:Result">Result</a></span> <a href="src/Text-Trifecta-Result.html#line-99" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> <a href="Text-Trifecta-Result.html#t:Result">Result</a></span> <a href="src/Text-Trifecta-Result.html#line-136" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> (<a href="Text-Trifecta-Result.html#t:Result">Result</a> a)</span> <a href="src/Text-Trifecta-Result.html#line-99" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> a => <a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Pretty">Pretty</a> (<a href="Text-Trifecta-Result.html#t:Result">Result</a> a)</span> <a href="src/Text-Trifecta-Result.html#line-123" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Text-Trifecta-Result.html#t:AsResult">AsResult</a> (<a href="Text-Trifecta-Result.html#t:Result">Result</a> a) (<a href="Text-Trifecta-Result.html#t:Result">Result</a> b) a b</span> <a href="src/Text-Trifecta-Result.html#line-105" class="link">Source</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:AsResult" class="def">AsResult</a> s t a b | s -> a, t -> b, s b -> t, t a -> s <span class="keyword">where</span> <a href="src/Text-Trifecta-Result.html#AsResult" class="link">Source</a></p><div class="doc"><p>A <code><a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Prism">Prism</a></code> that lets you embed or retrieve a <code><a href="Text-Trifecta-Result.html#t:Result">Result</a></code> in a potentially larger type.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src">Nothing</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:_Result" class="def">_Result</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Prism">Prism</a> s t (<a href="Text-Trifecta-Result.html#t:Result">Result</a> a) (<a href="Text-Trifecta-Result.html#t:Result">Result</a> b) <a href="src/Text-Trifecta-Result.html#_Result" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:AsResult" class="caption collapser" onclick="toggleSection('i:AsResult')">Instances</p><div id="section.i:AsResult" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Text-Trifecta-Result.html#t:AsResult">AsResult</a> (<a href="Text-Trifecta-Result.html#t:Result">Result</a> a) (<a href="Text-Trifecta-Result.html#t:Result">Result</a> b) a b</span> <a href="src/Text-Trifecta-Result.html#line-105" class="link">Source</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:_Success" class="def">_Success</a> :: <a href="Text-Trifecta-Result.html#t:AsResult">AsResult</a> s t a b => <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Prism">Prism</a> s t a b <a href="src/Text-Trifecta-Result.html#_Success" class="link">Source</a></p><div class="doc"><p>The <code><a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Prism">Prism</a></code> for the <code><a href="Text-Trifecta-Result.html#v:Success">Success</a></code> constructor of <code><a href="Text-Trifecta-Result.html#t:Result">Result</a></code></p></div></div><div class="top"><p class="src"><a name="v:_Failure" class="def">_Failure</a> :: <a href="Text-Trifecta-Result.html#t:AsResult">AsResult</a> s s a a => <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Prism-39-">Prism'</a> s <a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a> <a href="src/Text-Trifecta-Result.html#_Failure" class="link">Source</a></p><div class="doc"><p>The <code><a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Prism">Prism</a></code> for the <code><a href="Text-Trifecta-Result.html#v:Failure">Failure</a></code> constructor of <code><a href="Text-Trifecta-Result.html#t:Result">Result</a></code></p></div></div><h1 id="g:2">Parsing Errors</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Err" class="def">Err</a> <a href="src/Text-Trifecta-Result.html#Err" class="link">Source</a></p><div class="doc"><p>This is used to report an error. What went wrong, some supplemental docs and a set of things expected
at the current location. This does not, however, include the actual location.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Err" class="def">Err</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:_reason" class="def">_reason</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:_footnotes" class="def">_footnotes</a> :: [<a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a>]</dt><dd class="doc empty"> </dd><dt class="src"><a name="v:_expected" class="def">_expected</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.6.2/Data-Set.html#t:Set">Set</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Err" class="caption collapser" onclick="toggleSection('i:Err')">Instances</p><div id="section.i:Err" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Monoid.html#t:Monoid">Monoid</a> <a href="Text-Trifecta-Result.html#t:Err">Err</a></span> <a href="src/Text-Trifecta-Result.html#line-65" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-semigroups-doc/html/Data-Semigroup.html#t:Semigroup">Semigroup</a> <a href="Text-Trifecta-Result.html#t:Err">Err</a></span> <a href="src/Text-Trifecta-Result.html#line-60" class="link">Source</a></td><td class="doc empty"> </td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Text-Trifecta-Result.html#t:HasErr">HasErr</a> <a href="Text-Trifecta-Result.html#t:Err">Err</a></span> <a href="src/Text-Trifecta-Result.html#line-58" class="link">Source</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:HasErr" class="def">HasErr</a> c <span class="keyword">where</span> <a href="src/Text-Trifecta-Result.html#HasErr" class="link">Source</a></p><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="Text-Trifecta-Result.html#v:err">err</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:err" class="def">err</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> c <a href="Text-Trifecta-Result.html#t:Err">Err</a> <a href="src/Text-Trifecta-Result.html#err" class="link">Source</a></p><p class="src"><a name="v:expected" class="def">expected</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> c (<a href="file:///usr/share/doc/ghc-doc/html/libraries/containers-0.5.6.2/Data-Set.html#t:Set">Set</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a>) <a href="src/Text-Trifecta-Result.html#expected" class="link">Source</a></p><p class="src"><a name="v:footnotes" class="def">footnotes</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> c [<a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a>] <a href="src/Text-Trifecta-Result.html#footnotes" class="link">Source</a></p><p class="src"><a name="v:reason" class="def">reason</a> :: <a href="file:///usr/share/doc/libghc-lens-doc/html/Control-Lens-Type.html#t:Lens-39-">Lens'</a> c (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a>) <a href="src/Text-Trifecta-Result.html#reason" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:HasErr" class="caption collapser" onclick="toggleSection('i:HasErr')">Instances</p><div id="section.i:HasErr" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Text-Trifecta-Result.html#t:HasErr">HasErr</a> <a href="Text-Trifecta-Result.html#t:Err">Err</a></span> <a href="src/Text-Trifecta-Result.html#line-58" class="link">Source</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Errable" class="def">Errable</a> m <span class="keyword">where</span> <a href="src/Text-Trifecta-Result.html#Errable" class="link">Source</a></p><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:raiseErr" class="def">raiseErr</a> :: <a href="Text-Trifecta-Result.html#t:Err">Err</a> -> m a <a href="src/Text-Trifecta-Result.html#raiseErr" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:Errable" class="caption collapser" onclick="toggleSection('i:Errable')">Instances</p><div id="section.i:Errable" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Text-Trifecta-Result.html#t:Errable">Errable</a> <a href="Text-Trifecta-Parser.html#t:Parser">Parser</a></span> <a href="src/Text-Trifecta-Result.html#line-154" class="link">Source</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:explain" class="def">explain</a> :: <a href="Text-Trifecta-Rendering.html#t:Rendering">Rendering</a> -> <a href="Text-Trifecta-Result.html#t:Err">Err</a> -> <a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a> <a href="src/Text-Trifecta-Result.html#explain" class="link">Source</a></p><div class="doc"><p>Convert a location and an <code><a href="Text-Trifecta-Result.html#t:Err">Err</a></code> into a <code><a href="file:///usr/share/doc/libghc-ansi-wl-pprint-doc/html/Text-PrettyPrint-ANSI-Leijen.html#t:Doc">Doc</a></code></p></div></div><div class="top"><p class="src"><a name="v:failed" class="def">failed</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> -> <a href="Text-Trifecta-Result.html#t:Err">Err</a> <a href="src/Text-Trifecta-Result.html#failed" class="link">Source</a></p><div class="doc"><p>Generate a simple <code><a href="Text-Trifecta-Result.html#t:Err">Err</a></code> word-wrapping the supplied message.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|