This file is indexed.

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

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!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.Ranges</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-Ranges.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Ranged-Ranges.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>Safe Haskell</th><td>None</td></tr></table><p class="caption">Data.Ranged.Ranges</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Construction
</a></li><li><a href="#g:2">Predicates
</a></li><li><a href="#g:3">Membership
</a></li><li><a href="#g:4">Set Operations
</a></li><li><a href="#g:5">QuickCheck properties
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A range has an upper and lower boundary.
</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="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> v =&gt; <a href="#t:Range">Range</a> v = <a href="#v:Range">Range</a> {<ul class="subs"><li><a href="#v:rangeLower">rangeLower</a> :: <a href="Data-Ranged-Boundaries.html#t:Boundary">Boundary</a> v</li><li><a href="#v:rangeUpper">rangeUpper</a> :: <a href="Data-Ranged-Boundaries.html#t:Boundary">Boundary</a> v</li></ul>}</li><li class="src short"><a href="#v:emptyRange">emptyRange</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v</li><li class="src short"><a href="#v:fullRange">fullRange</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v</li><li class="src short"><a href="#v:rangeIsEmpty">rangeIsEmpty</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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><li class="src short"><a href="#v:rangeIsFull">rangeIsFull</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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><li class="src short"><a href="#v:rangeOverlap">rangeOverlap</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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><li class="src short"><a href="#v:rangeEncloses">rangeEncloses</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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><li class="src short"><a href="#v:rangeSingletonValue">rangeSingletonValue</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> v</li><li class="src short"><a href="#v:rangeHas">rangeHas</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-Ranges.html#t:Range">Range</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:rangeListHas">rangeListHas</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-Ranges.html#t:Range">Range</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:singletonRange">singletonRange</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v</li><li class="src short"><a href="#v:rangeIntersection">rangeIntersection</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v</li><li class="src short"><a href="#v:rangeUnion">rangeUnion</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; [<a href="Data-Ranged-Ranges.html#t:Range">Range</a> v]</li><li class="src short"><a href="#v:rangeDifference">rangeDifference</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; [<a href="Data-Ranged-Ranges.html#t:Range">Range</a> v]</li><li class="src short"><a href="#v:prop_unionRange">prop_unionRange</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> a -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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 class="src short"><a href="#v:prop_unionRangeLength">prop_unionRangeLength</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> a -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> 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:prop_intersectionRange">prop_intersectionRange</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> a -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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 class="src short"><a href="#v:prop_differenceRange">prop_differenceRange</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> a -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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 class="src short"><a href="#v:prop_intersectionOverlap">prop_intersectionOverlap</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> a -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> 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:prop_enclosureUnion">prop_enclosureUnion</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> a -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> 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:prop_singletonRangeHas">prop_singletonRangeHas</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</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 class="src short"><a href="#v:prop_singletonRangeHasOnly">prop_singletonRangeHasOnly</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</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:prop_singletonRangeConverse">prop_singletonRangeConverse</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</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 class="src short"><a href="#v:prop_emptyNonSingleton">prop_emptyNonSingleton</a> :: <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:prop_fullNonSingleton">prop_fullNonSingleton</a> :: <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:prop_nonSingleton">prop_nonSingleton</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a> -&gt; <a href="/usr/share/doc/libghc-quickcheck2-doc/html/Test-QuickCheck-Property.html#t:Property">Property</a></li><li class="src short"><a href="#v:prop_intSingleton">prop_intSingleton</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integer">Integer</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integer">Integer</a> -&gt; <a href="/usr/share/doc/libghc-quickcheck2-doc/html/Test-QuickCheck-Property.html#t:Property">Property</a></li></ul></div><div id="interface"><h2 id="g:1">Construction
</h2><div class="top"><p class="src"><span class="keyword">data</span> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> v =&gt; <a name="t:Range" class="def">Range</a> v <a href="src/Data-Ranged-Ranges.html#Range" class="link">Source</a></p><div class="doc"><p>A Range has upper and lower boundaries.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Range" class="def">Range</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:rangeLower" class="def">rangeLower</a> :: <a href="Data-Ranged-Boundaries.html#t:Boundary">Boundary</a> v</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:rangeUpper" class="def">rangeUpper</a> :: <a href="Data-Ranged-Boundaries.html#t:Boundary">Boundary</a> v</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Range" class="caption collapser" onclick="toggleSection('i:Range')">Instances</p><div id="section.i:Range" 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-Ranges.html#t:Range">Range</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-Ranges.html#t:Range">Range</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, <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/Text-Show.html#t:Show">Show</a> (<a href="Data-Ranged-Ranges.html#t:Range">Range</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> v, <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> v) =&gt; <a href="/usr/share/doc/libghc-quickcheck2-doc/html/Test-QuickCheck-Arbitrary.html#t:Arbitrary">Arbitrary</a> (<a href="Data-Ranged-Ranges.html#t:Range">Range</a> v)</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> v, <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> v) =&gt; <a href="/usr/share/doc/libghc-quickcheck2-doc/html/Test-QuickCheck-Arbitrary.html#t:CoArbitrary">CoArbitrary</a> (<a href="Data-Ranged-Ranges.html#t:Range">Range</a> v)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:emptyRange" class="def">emptyRange</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v<a href="src/Data-Ranged-Ranges.html#emptyRange" class="link">Source</a></p><div class="doc"><p>The empty range
</p></div></div><div class="top"><p class="src"><a name="v:fullRange" class="def">fullRange</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v<a href="src/Data-Ranged-Ranges.html#fullRange" class="link">Source</a></p><div class="doc"><p>The full range.  All values are within it.
</p></div></div><h2 id="g:2">Predicates
</h2><div class="top"><p class="src"><a name="v:rangeIsEmpty" class="def">rangeIsEmpty</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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-Ranges.html#rangeIsEmpty" class="link">Source</a></p><div class="doc"><p>A range is empty unless its upper boundary is greater than its lower
 boundary.
</p></div></div><div class="top"><p class="src"><a name="v:rangeIsFull" class="def">rangeIsFull</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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-Ranges.html#rangeIsFull" class="link">Source</a></p><div class="doc"><p>A range is full if it contains every possible value.
</p></div></div><div class="top"><p class="src"><a name="v:rangeOverlap" class="def">rangeOverlap</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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-Ranges.html#rangeOverlap" class="link">Source</a></p><div class="doc"><p>Two ranges overlap if their intersection is non-empty.
</p></div></div><div class="top"><p class="src"><a name="v:rangeEncloses" class="def">rangeEncloses</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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-Ranges.html#rangeEncloses" class="link">Source</a></p><div class="doc"><p>The first range encloses the second if every value in the second range is
 also within the first range.  If the second range is empty then this is
 always true.
</p></div></div><div class="top"><p class="src"><a name="v:rangeSingletonValue" class="def">rangeSingletonValue</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> v<a href="src/Data-Ranged-Ranges.html#rangeSingletonValue" class="link">Source</a></p><div class="doc"><p>If the range is a singleton, returns <code>Just</code> the value.  Otherwise returns
 <code>Nothing</code>.
</p><p>Known bug: This always returns <code>Nothing</code> for ranges including
 <code>BoundaryBelowAll</code> or <code>BoundaryAboveAll</code>.  For bounded types this can be
 incorrect.  For instance, the following range only contains one value:
</p><pre>    Range (BoundaryBelow maxBound) BoundaryAboveAll
</pre></div></div><h2 id="g:3">Membership
</h2><div class="top"><p class="src"><a name="v:rangeHas" class="def">rangeHas</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-Ranges.html#t:Range">Range</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-Ranges.html#rangeHas" class="link">Source</a></p><div class="doc"><p>True if the value is within the range.
</p></div></div><div class="top"><p class="src"><a name="v:rangeListHas" class="def">rangeListHas</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-Ranges.html#t:Range">Range</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-Ranges.html#rangeListHas" class="link">Source</a></p><div class="doc"><p>True if the value is within one of the ranges.
</p></div></div><h2 id="g:4">Set Operations
</h2><div class="top"><p class="src"><a name="v:singletonRange" class="def">singletonRange</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v<a href="src/Data-Ranged-Ranges.html#singletonRange" class="link">Source</a></p><div class="doc"><p>A range containing a single value
</p></div></div><div class="top"><p class="src"><a name="v:rangeIntersection" class="def">rangeIntersection</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v<a href="src/Data-Ranged-Ranges.html#rangeIntersection" class="link">Source</a></p><div class="doc"><p>Intersection of two ranges, if any.
</p></div></div><div class="top"><p class="src"><a name="v:rangeUnion" class="def">rangeUnion</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; [<a href="Data-Ranged-Ranges.html#t:Range">Range</a> v]<a href="src/Data-Ranged-Ranges.html#rangeUnion" class="link">Source</a></p><div class="doc"><p>Union of two ranges.  Returns one or two results.
</p><p>If there are two results then they are guaranteed to have a non-empty
 gap in between, but may not be in ascending order.
</p></div></div><div class="top"><p class="src"><a name="v:rangeDifference" class="def">rangeDifference</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> v =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> v -&gt; [<a href="Data-Ranged-Ranges.html#t:Range">Range</a> v]<a href="src/Data-Ranged-Ranges.html#rangeDifference" class="link">Source</a></p><div class="doc"><p><code>range1</code> minus <code>range2</code>.  Returns zero, one or two results.  Multiple
 results are guaranteed to have non-empty gaps in between, but may not be in
 ascending order.
</p></div></div><h2 id="g:5">QuickCheck properties
</h2><div class="top"><p class="src"><a name="v:prop_unionRange" class="def">prop_unionRange</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> a -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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-Ranges.html#prop_unionRange" class="link">Source</a></p><div class="doc"><p>The union of two ranges has a value iff either range has it.
</p><pre> prop_unionRange r1 r2 n =
    (r1 `rangeHas` n || r2 `rangeHas` n)
    == (r1 `rangeUnion` r2) `rangeListHas` n
</pre></div></div><div class="top"><p class="src"><a name="v:prop_unionRangeLength" class="def">prop_unionRangeLength</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> a -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> 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-Ranges.html#prop_unionRangeLength" class="link">Source</a></p><div class="doc"><p>The union of two ranges always contains one or two ranges.
</p><pre> prop_unionRangeLength r1 r2 = (n == 1) || (n == 2)
    where n = length $ rangeUnion r1 r2
</pre></div></div><div class="top"><p class="src"><a name="v:prop_intersectionRange" class="def">prop_intersectionRange</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> a -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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-Ranges.html#prop_intersectionRange" class="link">Source</a></p><div class="doc"><p>The intersection of two ranges has a value iff both ranges have it.
</p><pre> prop_intersectionRange r1 r2 n =
    (r1 `rangeHas` n &amp;&amp; r2 `rangeHas` n)
    == (r1 `rangeIntersection` r2) `rangeHas` n
</pre></div></div><div class="top"><p class="src"><a name="v:prop_differenceRange" class="def">prop_differenceRange</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> a -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</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-Ranges.html#prop_differenceRange" class="link">Source</a></p><div class="doc"><p>The difference of two ranges has a value iff the first range has it and
 the second does not.
</p><pre> prop_differenceRange r1 r2 n =
    (r1 `rangeHas` n &amp;&amp; not (r2 `rangeHas` n))
    == (r1 `rangeDifference` r2) `rangeListHas` n
</pre></div></div><div class="top"><p class="src"><a name="v:prop_intersectionOverlap" class="def">prop_intersectionOverlap</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> a -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> 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-Ranges.html#prop_intersectionOverlap" class="link">Source</a></p><div class="doc"><p>Iff two ranges overlap then their intersection is non-empty.
</p><pre> prop_intersectionOverlap r1 r2 =
     (rangeIsEmpty $ rangeIntersection r1 r2) == (rangeOverlap r1 r2)
</pre></div></div><div class="top"><p class="src"><a name="v:prop_enclosureUnion" class="def">prop_enclosureUnion</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</a> a =&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> a -&gt; <a href="Data-Ranged-Ranges.html#t:Range">Range</a> 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-Ranges.html#prop_enclosureUnion" class="link">Source</a></p><div class="doc"><p>Range enclosure makes union an identity function.
</p><pre> prop_enclosureUnion r1 r2 =
    rangeEncloses r1 r2 == (rangeUnion r1 r2 == [r1])
</pre></div></div><div class="top"><p class="src"><a name="v:prop_singletonRangeHas" class="def">prop_singletonRangeHas</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</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-Ranges.html#prop_singletonRangeHas" class="link">Source</a></p><div class="doc"><p>Range Singleton has its member.
</p><pre> prop_singletonRangeHas v = singletonRange v `rangeHas` v
</pre></div></div><div class="top"><p class="src"><a name="v:prop_singletonRangeHasOnly" class="def">prop_singletonRangeHasOnly</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</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-Ranges.html#prop_singletonRangeHasOnly" class="link">Source</a></p><div class="doc"><p>Range Singleton has only its member.
</p><pre> prop_singletonHasOnly v1 v2 =
    (v1 == v2) == (singletonRange v1 `rangeHas` v2)
</pre></div></div><div class="top"><p class="src"><a name="v:prop_singletonRangeConverse" class="def">prop_singletonRangeConverse</a> :: <a href="Data-Ranged-Boundaries.html#t:DiscreteOrdered">DiscreteOrdered</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-Ranges.html#prop_singletonRangeConverse" class="link">Source</a></p><div class="doc"><p>A singleton range can have its value extracted.
</p><pre> prop_singletonRangeConverse v =
    rangeSingletonValue (singletonRange v) == Just v
</pre></div></div><div class="top"><p class="src"><a name="v:prop_emptyNonSingleton" class="def">prop_emptyNonSingleton</a> :: <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-Ranges.html#prop_emptyNonSingleton" class="link">Source</a></p><div class="doc"><p>The empty range is not a singleton.
</p><pre> prop_emptyNonSingleton = rangeSingletonValue emptyRange == Nothing
</pre></div></div><div class="top"><p class="src"><a name="v:prop_fullNonSingleton" class="def">prop_fullNonSingleton</a> :: <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-Ranges.html#prop_fullNonSingleton" class="link">Source</a></p><div class="doc"><p>The full range is not a singleton.
</p><pre> prop_fullNonSingleton = rangeSingletonValue fullRange == Nothing
</pre></div></div><div class="top"><p class="src"><a name="v:prop_nonSingleton" class="def">prop_nonSingleton</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a> -&gt; <a href="/usr/share/doc/libghc-quickcheck2-doc/html/Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Data-Ranged-Ranges.html#prop_nonSingleton" class="link">Source</a></p><div class="doc"><p>For real x and y, <code>x &lt; y</code> implies that any range between them is a
 non-singleton.
</p></div></div><div class="top"><p class="src"><a name="v:prop_intSingleton" class="def">prop_intSingleton</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integer">Integer</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integer">Integer</a> -&gt; <a href="/usr/share/doc/libghc-quickcheck2-doc/html/Test-QuickCheck-Property.html#t:Property">Property</a><a href="src/Data-Ranged-Ranges.html#prop_intSingleton" class="link">Source</a></p><div class="doc"><p>For all integers x and y, any range formed from boundaries on either side
 of x and y is a singleton iff it contains exactly one integer.
</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>