This file is indexed.

/usr/share/doc/libghc-foundation-doc/html/Foundation-String-Read.html is in libghc-foundation-doc 0.0.17-1.

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
<!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>Foundation.String.Read</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_Foundation-String-Read.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Foundation-String-Read.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">foundation-0.0.17: Alternative prelude with batteries and no dependencies</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">Foundation.String.Read</p></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:readInteger">readInteger</a> :: <a href="Foundation-String.html#t:String">String</a> -&gt; <a href="Foundation.html#t:Maybe">Maybe</a> <a href="Foundation.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:readIntegral">readIntegral</a> :: (<a href="Foundation.html#t:HasNegation">HasNegation</a> i, <a href="Foundation-Primitive.html#t:IntegralUpsize">IntegralUpsize</a> <a href="Foundation.html#t:Word8">Word8</a> i, <a href="Foundation-Numerical.html#t:Additive">Additive</a> i, <a href="Foundation-Numerical.html#t:Multiplicative">Multiplicative</a> i, <a href="Foundation-Numerical.html#t:IsIntegral">IsIntegral</a> i) =&gt; <a href="Foundation-String.html#t:String">String</a> -&gt; <a href="Foundation.html#t:Maybe">Maybe</a> i</li><li class="src short"><a href="#v:readNatural">readNatural</a> :: <a href="Foundation-String.html#t:String">String</a> -&gt; <a href="Foundation.html#t:Maybe">Maybe</a> <a href="Foundation.html#t:Natural">Natural</a></li><li class="src short"><a href="#v:readDouble">readDouble</a> :: <a href="Foundation-String.html#t:String">String</a> -&gt; <a href="Foundation.html#t:Maybe">Maybe</a> <a href="Foundation.html#t:Double">Double</a></li><li class="src short"><a href="#v:readRational">readRational</a> :: <a href="Foundation-String.html#t:String">String</a> -&gt; <a href="Foundation.html#t:Maybe">Maybe</a> <a href="Foundation.html#t:Rational">Rational</a></li><li class="src short"><a href="#v:readFloatingExact">readFloatingExact</a> :: <a href="Foundation-String.html#t:String">String</a> -&gt; ReadFloatingCallback a -&gt; <a href="Foundation.html#t:Maybe">Maybe</a> a</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:readInteger" class="def">readInteger</a> :: <a href="Foundation-String.html#t:String">String</a> -&gt; <a href="Foundation.html#t:Maybe">Maybe</a> <a href="Foundation.html#t:Integer">Integer</a> <a href="#v:readInteger" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:readIntegral" class="def">readIntegral</a> :: (<a href="Foundation.html#t:HasNegation">HasNegation</a> i, <a href="Foundation-Primitive.html#t:IntegralUpsize">IntegralUpsize</a> <a href="Foundation.html#t:Word8">Word8</a> i, <a href="Foundation-Numerical.html#t:Additive">Additive</a> i, <a href="Foundation-Numerical.html#t:Multiplicative">Multiplicative</a> i, <a href="Foundation-Numerical.html#t:IsIntegral">IsIntegral</a> i) =&gt; <a href="Foundation-String.html#t:String">String</a> -&gt; <a href="Foundation.html#t:Maybe">Maybe</a> i <a href="#v:readIntegral" class="selflink">#</a></p><div class="doc"><p>Read an Integer from a String</p><p>Consume an optional minus sign and many digits until end of string.</p></div></div><div class="top"><p class="src"><a id="v:readNatural" class="def">readNatural</a> :: <a href="Foundation-String.html#t:String">String</a> -&gt; <a href="Foundation.html#t:Maybe">Maybe</a> <a href="Foundation.html#t:Natural">Natural</a> <a href="#v:readNatural" class="selflink">#</a></p><div class="doc"><p>Read a Natural from a String</p><p>Consume many digits until end of string.</p></div></div><div class="top"><p class="src"><a id="v:readDouble" class="def">readDouble</a> :: <a href="Foundation-String.html#t:String">String</a> -&gt; <a href="Foundation.html#t:Maybe">Maybe</a> <a href="Foundation.html#t:Double">Double</a> <a href="#v:readDouble" class="selflink">#</a></p><div class="doc"><p>Try to read a Double</p></div></div><div class="top"><p class="src"><a id="v:readRational" class="def">readRational</a> :: <a href="Foundation-String.html#t:String">String</a> -&gt; <a href="Foundation.html#t:Maybe">Maybe</a> <a href="Foundation.html#t:Rational">Rational</a> <a href="#v:readRational" class="selflink">#</a></p><div class="doc"><p>Try to read a floating number as a Rational</p><p>Note that for safety reason, only exponent between -10000 and 10000 is allowed
 as otherwise DoS/OOM is very likely. if you don't want this behavior,
 switching to a scientific type (not provided yet) that represent the
 exponent separately is the advised solution.</p></div></div><div class="top"><p class="src"><a id="v:readFloatingExact" class="def">readFloatingExact</a> :: <a href="Foundation-String.html#t:String">String</a> -&gt; ReadFloatingCallback a -&gt; <a href="Foundation.html#t:Maybe">Maybe</a> a <a href="#v:readFloatingExact" class="selflink">#</a></p><div class="doc"><p>Read an Floating like number of the form:</p><dl><dt> <code><a href="Foundation-Numerical.html#v:-45-">-</a></code> </dt><dd><a href="numbers">numbers</a> [ <code><a href="Foundation.html#v:.">.</a></code> <a href="numbers">numbers</a> ] [ ( <code>e</code> | <code>E</code> ) [ <code><a href="Foundation-Numerical.html#v:-45-">-</a></code> ] <a href="number">number</a> ]</dd></dl><p>Call a function with:</p><ul><li>A boolean representing if the number is negative</li><li>The digits part represented as a single natural number (123.456 is represented as 123456)</li><li>The number of digits in the fractional part (e.g. 123.456 =&gt; 3)</li><li>The exponent if any</li></ul><p>The code is structured as a simple state machine that:</p><ul><li>Optionally Consume a <code><a href="Foundation-Numerical.html#v:-45-">-</a></code> sign</li><li>Consume number for the integral part</li><li>Optionally</li><li>Consume <code><a href="Foundation.html#v:.">.</a></code></li><li>Consume remaining digits if not already end of string</li><li>Optionally Consume a <code>e</code> or <code>E</code> follow by an optional <code><a href="Foundation-Numerical.html#v:-45-">-</a></code> and a number</li></ul></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>