This file is indexed.

/usr/share/doc/libghc-ranged-sets-doc/html/Data-Ranged-Boundaries.html is in libghc-ranged-sets-doc 0.3.0-5build2.

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
34
35
36
37
38
<!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.Ranged.Boundaries</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_Data-Ranged-Boundaries.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Ranged-Boundaries.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">Ranged-sets-0.3.0: Ranged sets for Haskell</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>paul@cogito.org.uk</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Data.Ranged.Boundaries</p></div><div id="description"><p class="caption">Description</p><div class="doc empty">&nbsp;</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">class</span> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="#t:DiscreteOrdered">DiscreteOrdered</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:adjacent">adjacent</a> :: a -&gt; a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:adjacentBelow">adjacentBelow</a> :: a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a</li></ul></li><li class="src short"><a href="#v:enumAdjacent">enumAdjacent</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Enum">Enum</a> a) =&gt; a -&gt; a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:boundedAdjacent">boundedAdjacent</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Enum">Enum</a> a) =&gt; a -&gt; a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:boundedBelow">boundedBelow</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Enum">Enum</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Bounded">Bounded</a> a) =&gt; a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a</li><li class="src short"><span class="keyword">data</span>  <a href="#t:Boundary">Boundary</a> a<ul class="subs"><li>= <a href="#v:BoundaryAbove">BoundaryAbove</a> a  </li><li>| <a href="#v:BoundaryBelow">BoundaryBelow</a> a  </li><li>| <a href="#v:BoundaryAboveAll">BoundaryAboveAll</a>  </li><li>| <a href="#v:BoundaryBelowAll">BoundaryBelowAll</a>  </li></ul></li><li class="src short"><a href="#v:above">above</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> v =&gt; <a href="Data-Ranged-Boundaries.html#t:Boundary">Boundary</a> v -&gt; v -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-47--62--47-">(/&gt;/)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> v =&gt; v -&gt; <a href="Data-Ranged-Boundaries.html#t:Boundary">Boundary</a> v -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">class</span> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a name="t:DiscreteOrdered" class="def">DiscreteOrdered</a> a  <span class="keyword">where</span><a href="src/Data-Ranged-Boundaries.html#DiscreteOrdered" class="link">Source</a></p><div class="doc"><p>Distinguish between dense and sparse ordered types.  A dense type is
one in which any two values <code>v1 &lt; v2</code> have a third value <code>v3</code> such that
<code>v1 &lt; v3 &lt; v2</code>.
</p><p>In theory the floating types are dense, although in practice they can only have
finitely many values.  This class treats them as dense.
</p><p>Tuples up to 4 members are declared as instances.  Larger tuples may be added
if necessary.
</p><p>Most values of sparse types have an <code>adjacentBelow</code>, such that, for all x:
</p><pre> case adjacentBelow x of
    Just x1 -&gt; adjacent x1 x
    Nothing -&gt; True
</pre><p>The exception is for bounded types when <code>x == lowerBound</code>.  For dense types
<code>adjacentBelow</code> always returns <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#v:Nothing">Nothing</a></code>.
</p><p>This approach was suggested by Ben Rudiak-Gould on comp.lang.functional.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:adjacent" class="def">adjacent</a> :: a -&gt; a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Ranged-Boundaries.html#adjacent" class="link">Source</a></p><div class="doc"><p>Two values <code>x</code> and <code>y</code> are adjacent if <code>x &lt; y</code> and there does not
 exist a third value between them.  Always <code>False</code> for dense types.
</p></div><p class="src"><a name="v:adjacentBelow" class="def">adjacentBelow</a> :: a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a<a href="src/Data-Ranged-Boundaries.html#adjacentBelow" class="link">Source</a></p><div class="doc"><p>The value immediately below the argument, if it can be determined.
</p></div></div><div class="subs instances"><p id="control.i:DiscreteOrdered" class="caption collapser" onclick="toggleSection('i:DiscreteOrdered')">Instances</p><div id="section.i:DiscreteOrdered" class="show"><table><tr><td class="src"><a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> [a]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ratio.html#t:Ratio">Ratio</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> a, <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> b) =&gt; <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> (a, b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> b, <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> c) =&gt; <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> (a, b, c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> b, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> c, <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> d) =&gt; <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> (a, b, c, d)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:enumAdjacent" class="def">enumAdjacent</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Enum">Enum</a> a) =&gt; a -&gt; a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Ranged-Boundaries.html#enumAdjacent" class="link">Source</a></p><div class="doc"><p>Check adjacency for sparse enumerated types (i.e. where there
 is no value between <code>x</code> and <code>succ x</code>).
</p></div></div><div class="top"><p class="src"><a name="v:boundedAdjacent" class="def">boundedAdjacent</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Enum">Enum</a> a) =&gt; a -&gt; a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Ranged-Boundaries.html#boundedAdjacent" class="link">Source</a></p><div class="doc"><p>Check adjacency, allowing for case where x = maxBound.  Use as the
 definition of <a href="adjacent.html">adjacent</a> for bounded enumerated types such as Int and Char.
</p></div></div><div class="top"><p class="src"><a name="v:boundedBelow" class="def">boundedBelow</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Enum">Enum</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Bounded">Bounded</a> a) =&gt; a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a<a href="src/Data-Ranged-Boundaries.html#boundedBelow" class="link">Source</a></p><div class="doc"><p>The usual implementation of <code><a href="Data-Ranged-Boundaries.html#v:adjacentBelow">adjacentBelow</a></code> for bounded enumerated types.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Boundary" class="def">Boundary</a> a <a href="src/Data-Ranged-Boundaries.html#Boundary" class="link">Source</a></p><div class="doc"><p>A Boundary is a division of an ordered type into values above
and below the boundary.  No value can sit on a boundary.
</p><p>Known bug: for Bounded types
</p><ul><li><pre>BoundaryAbove maxBound &lt; BoundaryAboveAll</pre></li><li><pre>BoundaryBelow minBound &gt; BoundaryBelowAll</pre></li></ul><p>This is incorrect because there are no possible values in
between the left and right sides of these inequalities.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:BoundaryAbove" class="def">BoundaryAbove</a> a</td><td class="doc"><p>The argument is the highest value below the boundary.
</p></td></tr><tr><td class="src"><a name="v:BoundaryBelow" class="def">BoundaryBelow</a> a</td><td class="doc"><p>The argument is the lowest value above the boundary.
</p></td></tr><tr><td class="src"><a name="v:BoundaryAboveAll" class="def">BoundaryAboveAll</a></td><td class="doc"><p>The boundary above all values.
</p></td></tr><tr><td class="src"><a name="v:BoundaryBelowAll" class="def">BoundaryBelowAll</a></td><td class="doc"><p>The boundary below all values.
</p></td></tr></table></div><div class="subs instances"><p id="control.i:Boundary" class="caption collapser" onclick="toggleSection('i:Boundary')">Instances</p><div id="section.i:Boundary" class="show"><table><tr><td class="src"><a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> (<a href="Data-Ranged-Boundaries.html#t:Boundary">Boundary</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> (<a href="Data-Ranged-Boundaries.html#t:Boundary">Boundary</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> (<a href="Data-Ranged-Boundaries.html#t:Boundary">Boundary</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-quickcheck2-doc/html/Test-QuickCheck-Arbitrary.html#t:Arbitrary">Arbitrary</a> a =&gt; <a href="/usr/share/doc/libghc-quickcheck2-doc/html/Test-QuickCheck-Arbitrary.html#t:Arbitrary">Arbitrary</a> (<a href="Data-Ranged-Boundaries.html#t:Boundary">Boundary</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-quickcheck2-doc/html/Test-QuickCheck-Arbitrary.html#t:CoArbitrary">CoArbitrary</a> a =&gt; <a href="/usr/share/doc/libghc-quickcheck2-doc/html/Test-QuickCheck-Arbitrary.html#t:CoArbitrary">CoArbitrary</a> (<a href="Data-Ranged-Boundaries.html#t:Boundary">Boundary</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:above" class="def">above</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> v =&gt; <a href="Data-Ranged-Boundaries.html#t:Boundary">Boundary</a> v -&gt; v -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Ranged-Boundaries.html#above" class="link">Source</a></p><div class="doc"><p>True if the value is above the boundary, false otherwise.
</p></div></div><div class="top"><p class="src"><a name="v:-47--62--47-" class="def">(/&gt;/)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> v =&gt; v -&gt; <a href="Data-Ranged-Boundaries.html#t:Boundary">Boundary</a> v -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a><a href="src/Data-Ranged-Boundaries.html#%2F%3E%2F" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Data-Ranged-Boundaries.html#v:above">above</a></code>, but with the arguments reversed for more intuitive infix
 usage.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>