/usr/share/doc/libghc-scanner-doc/html/Scanner-Internal.html is in libghc-scanner-doc 0.2-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 | <!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>Scanner.Internal</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_Scanner-Internal.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Scanner-Internal.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">scanner-0.2: Fast non-backtracking incremental combinator parsing for bytestrings</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Scanner.Internal</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Scanner implementation</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">newtype</span> <a href="#t:Scanner">Scanner</a> a = <a href="#v:Scanner">Scanner</a> {<ul class="subs"><li><a href="#v:run">run</a> :: <span class="keyword">forall</span> r. <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Scanner-Internal.html#t:Next">Next</a> a r -> <a href="Scanner-Internal.html#t:Result">Result</a> r</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:Next">Next</a> a r = <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> a -> <a href="Scanner-Internal.html#t:Result">Result</a> r</li><li class="src short"><span class="keyword">data</span> <a href="#t:Result">Result</a> r<ul class="subs"><li>= <a href="#v:Done">Done</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> r</li><li>| <a href="#v:Fail">Fail</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li>| <a href="#v:More">More</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Scanner-Internal.html#t:Result">Result</a> r)</li></ul></li><li class="src short"><a href="#v:scan">scan</a> :: <a href="Scanner-Internal.html#t:Scanner">Scanner</a> r -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Scanner-Internal.html#t:Result">Result</a> r</li><li class="src short"><a href="#v:anyWord8">anyWord8</a> :: <a href="Scanner-Internal.html#t:Scanner">Scanner</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Word.html#t:Word8">Word8</a></li><li class="src short"><a href="#v:takeWhile">takeWhile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Word.html#t:Word8">Word8</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="Scanner-Internal.html#t:Scanner">Scanner</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:take">take</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="Scanner-Internal.html#t:Scanner">Scanner</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:endOfInput">endOfInput</a> :: <a href="Scanner-Internal.html#t:Scanner">Scanner</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:string">string</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> ()</li><li class="src short"><a href="#v:lookAhead">lookAhead</a> :: <a href="Scanner-Internal.html#t:Scanner">Scanner</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Word.html#t:Word8">Word8</a>)</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:Scanner" class="def">Scanner</a> a <a href="src/Scanner-Internal.html#Scanner" class="link">Source</a> <a href="#t:Scanner" class="selflink">#</a></p><div class="doc"><p>CPS scanner without backtracking</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Scanner" class="def">Scanner</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:run" class="def">run</a> :: <span class="keyword">forall</span> r. <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Scanner-Internal.html#t:Next">Next</a> a r -> <a href="Scanner-Internal.html#t:Result">Result</a> r</dfn><div class="doc empty"> </div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:Scanner" class="caption collapser" onclick="toggleSection('i:Scanner')">Instances</p><div id="section.i:Scanner" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Scanner:Monad:1" class="instance expander" onclick="toggleSection('i:id:Scanner:Monad:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> <a href="Scanner-Internal.html#t:Scanner">Scanner</a></span> <a href="src/Scanner-Internal.html#line-57" class="link">Source</a> <a href="#t:Scanner" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Scanner:Monad:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--61-">(>>=)</a> :: <a href="Scanner-Internal.html#t:Scanner">Scanner</a> a -> (a -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> b) -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> b <a href="#v:-62--62--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62--62-">(>>)</a> :: <a href="Scanner-Internal.html#t:Scanner">Scanner</a> a -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> b -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> b <a href="#v:-62--62-" class="selflink">#</a></p><p class="src"><a href="#v:return">return</a> :: a -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> a <a href="#v:return" class="selflink">#</a></p><p class="src"><a href="#v:fail">fail</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> a <a href="#v:fail" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Scanner:Functor:2" class="instance expander" onclick="toggleSection('i:id:Scanner:Functor:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> <a href="Scanner-Internal.html#t:Scanner">Scanner</a></span> <a href="src/Scanner-Internal.html#line-39" class="link">Source</a> <a href="#t:Scanner" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Scanner:Functor:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -> b) -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> a -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(<$)</a> :: a -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> b -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Scanner:Applicative:3" class="instance expander" onclick="toggleSection('i:id:Scanner:Applicative:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Applicative">Applicative</a> <a href="Scanner-Internal.html#t:Scanner">Scanner</a></span> <a href="src/Scanner-Internal.html#line-45" class="link">Source</a> <a href="#t:Scanner" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Scanner:Applicative:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pure">pure</a> :: a -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> a <a href="#v:pure" class="selflink">#</a></p><p class="src"><a href="#v:-60--42--62-">(<*>)</a> :: <a href="Scanner-Internal.html#t:Scanner">Scanner</a> (a -> b) -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> a -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> b <a href="#v:-60--42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-42--62-">(*>)</a> :: <a href="Scanner-Internal.html#t:Scanner">Scanner</a> a -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> b -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> b <a href="#v:-42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-60--42-">(<*)</a> :: <a href="Scanner-Internal.html#t:Scanner">Scanner</a> a -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> b -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> a <a href="#v:-60--42-" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Next" class="def">Next</a> a r = <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> a -> <a href="Scanner-Internal.html#t:Result">Result</a> r <a href="src/Scanner-Internal.html#Next" class="link">Source</a> <a href="#t:Next" class="selflink">#</a></p><div class="doc"><p>Scanner continuation</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Result" class="def">Result</a> r <a href="src/Scanner-Internal.html#Result" class="link">Source</a> <a href="#t:Result" class="selflink">#</a></p><div class="doc"><p>Scanner result</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Done" class="def">Done</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> r</td><td class="doc"><p>Successful result with the rest of input</p></td></tr><tr><td class="src"><a id="v:Fail" class="def">Fail</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></td><td class="doc"><p>Scanner failed with rest of input and error message</p></td></tr><tr><td class="src"><a id="v:More" class="def">More</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Scanner-Internal.html#t:Result">Result</a> r)</td><td class="doc"><p>Need more input</p></td></tr></table></div></div><div class="top"><p class="src"><a id="v:scan" class="def">scan</a> :: <a href="Scanner-Internal.html#t:Scanner">Scanner</a> r -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Scanner-Internal.html#t:Result">Result</a> r <a href="src/Scanner-Internal.html#scan" class="link">Source</a> <a href="#v:scan" class="selflink">#</a></p><div class="doc"><p>Run scanner with the input</p></div></div><div class="top"><p class="src"><a id="v:anyWord8" class="def">anyWord8</a> :: <a href="Scanner-Internal.html#t:Scanner">Scanner</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Word.html#t:Word8">Word8</a> <a href="src/Scanner-Internal.html#anyWord8" class="link">Source</a> <a href="#v:anyWord8" class="selflink">#</a></p><div class="doc"><p>Consume the next word</p><p>It fails if end of input</p></div></div><div class="top"><p class="src"><a id="v:takeWhile" class="def">takeWhile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Word.html#t:Word8">Word8</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="Scanner-Internal.html#t:Scanner">Scanner</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Scanner-Internal.html#takeWhile" class="link">Source</a> <a href="#v:takeWhile" class="selflink">#</a></p><div class="doc"><p>Take input while the predicate is <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#v:True">True</a></code></p></div></div><div class="top"><p class="src"><a id="v:take" class="def">take</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="Scanner-Internal.html#t:Scanner">Scanner</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Scanner-Internal.html#take" class="link">Source</a> <a href="#v:take" class="selflink">#</a></p><div class="doc"><p>Take the specified number of bytes</p></div></div><div class="top"><p class="src"><a id="v:endOfInput" class="def">endOfInput</a> :: <a href="Scanner-Internal.html#t:Scanner">Scanner</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/Scanner-Internal.html#endOfInput" class="link">Source</a> <a href="#v:endOfInput" 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> when there is no more input</p></div></div><div class="top"><p class="src"><a id="v:string" class="def">string</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="Scanner-Internal.html#t:Scanner">Scanner</a> () <a href="src/Scanner-Internal.html#string" class="link">Source</a> <a href="#v:string" class="selflink">#</a></p><div class="doc"><p>Consume the specified string</p><p>Warning: it is not optimized yet, so for for small string it is better
to consume it byte-by-byte using <code><a href="Scanner.html#v:word8">word8</a></code></p></div></div><div class="top"><p class="src"><a id="v:lookAhead" class="def">lookAhead</a> :: <a href="Scanner-Internal.html#t:Scanner">Scanner</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Word.html#t:Word8">Word8</a>) <a href="src/Scanner-Internal.html#lookAhead" class="link">Source</a> <a href="#v:lookAhead" class="selflink">#</a></p><div class="doc"><p>Return the next byte, if any, without consuming it</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>
|