Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 6e204a966e8c42d976f99a1700ce5f20 > files > 3845

ghc-7.4.2-4.mga5.i586.rpm

<!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>Prelude</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_Prelude.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">haskell98-2.0.0.1: Compatibility with Haskell 98</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Prelude</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Standard types, classes and related functions
</a><ul><li><a href="#g:2">Basic data types
</a><ul><li><a href="#g:3">Tuples
</a></li></ul></li><li><a href="#g:4">Basic type classes
</a></li><li><a href="#g:5">Numbers
</a><ul><li><a href="#g:6">Numeric types
</a></li><li><a href="#g:7">Numeric type classes
</a></li><li><a href="#g:8">Numeric functions
</a></li></ul></li><li><a href="#g:9">Monads and functors
</a></li><li><a href="#g:10">Miscellaneous functions
</a></li></ul></li><li><a href="#g:11">List operations
</a><ul><li><a href="#g:12">Reducing lists (folds)
</a><ul><li><a href="#g:13">Special folds
</a></li></ul></li><li><a href="#g:14">Building lists
</a><ul><li><a href="#g:15">Scans
</a></li><li><a href="#g:16">Infinite lists
</a></li></ul></li><li><a href="#g:17">Sublists
</a></li><li><a href="#g:18">Searching lists
</a></li><li><a href="#g:19">Zipping and unzipping lists
</a></li><li><a href="#g:20">Functions on strings
</a></li></ul></li><li><a href="#g:21">Converting to and from <code>String</code>
</a><ul><li><a href="#g:22">Converting to <code>String</code>
</a></li><li><a href="#g:23">Converting from <code>String</code>
</a></li></ul></li><li><a href="#g:24">Basic Input and output
</a><ul><li><a href="#g:25">Simple I/O operations
</a><ul><li><a href="#g:26">Output functions
</a></li><li><a href="#g:27">Input functions
</a></li><li><a href="#g:28">Files
</a></li></ul></li><li><a href="#g:29">Exception handling in the I/O monad
</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>The Haskell 98 Prelude: a standard module imported by default
 into all Haskell modules.  For more documentation, see the Haskell 98
 Report <a href="http://www.haskell.org/onlinereport/">http://www.haskell.org/onlinereport/</a>.
</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:Bool">Bool</a> <ul class="subs"><li>= <a href="#v:False">False</a>  </li><li>| <a href="#v:True">True</a>  </li></ul></li><li class="src short"><a href="#v:-38--38-">(&amp;&amp;)</a> :: <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-124--124-">(||)</a> :: <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:not">not</a> :: <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:otherwise">otherwise</a> :: <a href="Prelude.html#t:Bool">Bool</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Maybe">Maybe</a> a<ul class="subs"><li>= <a href="#v:Nothing">Nothing</a>  </li><li>| <a href="#v:Just">Just</a> a  </li></ul></li><li class="src short"><a href="#v:maybe">maybe</a> ::  b -&gt; (a -&gt; b) -&gt; <a href="Prelude.html#t:Maybe">Maybe</a> a -&gt; b</li><li class="src short"><span class="keyword">data</span>  <a href="#t:Either">Either</a> a b<ul class="subs"><li>= <a href="#v:Left">Left</a> a  </li><li>| <a href="#v:Right">Right</a> b  </li></ul></li><li class="src short"><a href="#v:either">either</a> ::  (a -&gt; c) -&gt; (b -&gt; c) -&gt; <a href="Prelude.html#t:Either">Either</a> a b -&gt; c</li><li class="src short"><span class="keyword">data</span>  <a href="#t:Ordering">Ordering</a> <ul class="subs"><li>= <a href="#v:LT">LT</a>  </li><li>| <a href="#v:EQ">EQ</a>  </li><li>| <a href="#v:GT">GT</a>  </li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Char">Char</a> </li><li class="src short"><span class="keyword">type</span> <a href="#t:String">String</a> = [<a href="Prelude.html#t:Char">Char</a>]</li><li class="src short"><a href="#v:fst">fst</a> ::  (a, b) -&gt; a</li><li class="src short"><a href="#v:snd">snd</a> ::  (a, b) -&gt; b</li><li class="src short"><a href="#v:curry">curry</a> ::  ((a, b) -&gt; c) -&gt; a -&gt; b -&gt; c</li><li class="src short"><a href="#v:uncurry">uncurry</a> ::  (a -&gt; b -&gt; c) -&gt; (a, b) -&gt; c</li><li class="src short"><span class="keyword">class</span>  <a href="#t:Eq">Eq</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:-61--61-">(==)</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li><a href="#v:-47--61-">(/=)</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></li></ul></li><li class="src short"><span class="keyword">class</span> <a href="Prelude.html#t:Eq">Eq</a> a =&gt; <a href="#t:Ord">Ord</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:compare">compare</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Ordering">Ordering</a></li><li><a href="#v:-60-">(&lt;)</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li><a href="#v:-62--61-">(&gt;=)</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li><a href="#v:-62-">(&gt;)</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li><a href="#v:-60--61-">(&lt;=)</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li><a href="#v:max">max</a> :: a -&gt; a -&gt; a</li><li><a href="#v:min">min</a> :: a -&gt; a -&gt; a</li></ul></li><li class="src short"><span class="keyword">class</span>  <a href="#t:Enum">Enum</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:succ">succ</a> :: a -&gt; a</li><li><a href="#v:pred">pred</a> :: a -&gt; a</li><li><a href="#v:toEnum">toEnum</a> :: <a href="Prelude.html#t:Int">Int</a> -&gt; a</li><li><a href="#v:fromEnum">fromEnum</a> :: a -&gt; <a href="Prelude.html#t:Int">Int</a></li><li><a href="#v:enumFrom">enumFrom</a> :: a -&gt; [a]</li><li><a href="#v:enumFromThen">enumFromThen</a> :: a -&gt; a -&gt; [a]</li><li><a href="#v:enumFromTo">enumFromTo</a> :: a -&gt; a -&gt; [a]</li><li><a href="#v:enumFromThenTo">enumFromThenTo</a> :: a -&gt; a -&gt; a -&gt; [a]</li></ul></li><li class="src short"><span class="keyword">class</span>  <a href="#t:Bounded">Bounded</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:minBound">minBound</a> :: a</li><li><a href="#v:maxBound">maxBound</a> :: a</li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Int">Int</a> </li><li class="src short"><span class="keyword">data</span>  <a href="#t:Integer">Integer</a> </li><li class="src short"><span class="keyword">data</span>  <a href="#t:Float">Float</a> </li><li class="src short"><span class="keyword">data</span>  <a href="#t:Double">Double</a> </li><li class="src short"><span class="keyword">type</span> <a href="#t:Rational">Rational</a> = <a href="Ratio.html#t:Ratio">Ratio</a> <a href="Prelude.html#t:Integer">Integer</a></li><li class="src short"><span class="keyword">class</span>  <a href="#t:Num">Num</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:-43-">(+)</a> :: a -&gt; a -&gt; a</li><li><a href="#v:-42-">(*)</a> :: a -&gt; a -&gt; a</li><li><a href="#v:-45-">(-)</a> :: a -&gt; a -&gt; a</li><li><a href="#v:negate">negate</a> :: a -&gt; a</li><li><a href="#v:abs">abs</a> :: a -&gt; a</li><li><a href="#v:signum">signum</a> :: a -&gt; a</li><li><a href="#v:fromInteger">fromInteger</a> :: <a href="Prelude.html#t:Integer">Integer</a> -&gt; a</li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Prelude.html#t:Num">Num</a> a, <a href="Prelude.html#t:Ord">Ord</a> a) =&gt; <a href="#t:Real">Real</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:toRational">toRational</a> :: a -&gt; <a href="Prelude.html#t:Rational">Rational</a></li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Prelude.html#t:Real">Real</a> a, <a href="Prelude.html#t:Enum">Enum</a> a) =&gt; <a href="#t:Integral">Integral</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:quot">quot</a> :: a -&gt; a -&gt; a</li><li><a href="#v:rem">rem</a> :: a -&gt; a -&gt; a</li><li><a href="#v:div">div</a> :: a -&gt; a -&gt; a</li><li><a href="#v:mod">mod</a> :: a -&gt; a -&gt; a</li><li><a href="#v:quotRem">quotRem</a> :: a -&gt; a -&gt; (a, a)</li><li><a href="#v:divMod">divMod</a> :: a -&gt; a -&gt; (a, a)</li><li><a href="#v:toInteger">toInteger</a> :: a -&gt; <a href="Prelude.html#t:Integer">Integer</a></li></ul></li><li class="src short"><span class="keyword">class</span> <a href="Prelude.html#t:Num">Num</a> a =&gt; <a href="#t:Fractional">Fractional</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:-47-">(/)</a> :: a -&gt; a -&gt; a</li><li><a href="#v:recip">recip</a> :: a -&gt; a</li><li><a href="#v:fromRational">fromRational</a> :: <a href="Prelude.html#t:Rational">Rational</a> -&gt; a</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="Prelude.html#t:Fractional">Fractional</a> a =&gt; <a href="#t:Floating">Floating</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:pi">pi</a> :: a</li><li><a href="#v:exp">exp</a> :: a -&gt; a</li><li><a href="#v:sqrt">sqrt</a> :: a -&gt; a</li><li><a href="#v:log">log</a> :: a -&gt; a</li><li><a href="#v:-42--42-">(**)</a> :: a -&gt; a -&gt; a</li><li><a href="#v:logBase">logBase</a> :: a -&gt; a -&gt; a</li><li><a href="#v:sin">sin</a> :: a -&gt; a</li><li><a href="#v:tan">tan</a> :: a -&gt; a</li><li><a href="#v:cos">cos</a> :: a -&gt; a</li><li><a href="#v:asin">asin</a> :: a -&gt; a</li><li><a href="#v:atan">atan</a> :: a -&gt; a</li><li><a href="#v:acos">acos</a> :: a -&gt; a</li><li><a href="#v:sinh">sinh</a> :: a -&gt; a</li><li><a href="#v:tanh">tanh</a> :: a -&gt; a</li><li><a href="#v:cosh">cosh</a> :: a -&gt; a</li><li><a href="#v:asinh">asinh</a> :: a -&gt; a</li><li><a href="#v:atanh">atanh</a> :: a -&gt; a</li><li><a href="#v:acosh">acosh</a> :: a -&gt; a</li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Prelude.html#t:Real">Real</a> a, <a href="Prelude.html#t:Fractional">Fractional</a> a) =&gt; <a href="#t:RealFrac">RealFrac</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:properFraction">properFraction</a> :: <a href="Prelude.html#t:Integral">Integral</a> b =&gt; a -&gt; (b, a)</li><li><a href="#v:truncate">truncate</a> :: <a href="Prelude.html#t:Integral">Integral</a> b =&gt; a -&gt; b</li><li><a href="#v:round">round</a> :: <a href="Prelude.html#t:Integral">Integral</a> b =&gt; a -&gt; b</li><li><a href="#v:ceiling">ceiling</a> :: <a href="Prelude.html#t:Integral">Integral</a> b =&gt; a -&gt; b</li><li><a href="#v:floor">floor</a> :: <a href="Prelude.html#t:Integral">Integral</a> b =&gt; a -&gt; b</li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Prelude.html#t:RealFrac">RealFrac</a> a, <a href="Prelude.html#t:Floating">Floating</a> a) =&gt; <a href="#t:RealFloat">RealFloat</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:floatRadix">floatRadix</a> :: a -&gt; <a href="Prelude.html#t:Integer">Integer</a></li><li><a href="#v:floatDigits">floatDigits</a> :: a -&gt; <a href="Prelude.html#t:Int">Int</a></li><li><a href="#v:floatRange">floatRange</a> :: a -&gt; (<a href="Prelude.html#t:Int">Int</a>, <a href="Prelude.html#t:Int">Int</a>)</li><li><a href="#v:decodeFloat">decodeFloat</a> :: a -&gt; (<a href="Prelude.html#t:Integer">Integer</a>, <a href="Prelude.html#t:Int">Int</a>)</li><li><a href="#v:encodeFloat">encodeFloat</a> :: <a href="Prelude.html#t:Integer">Integer</a> -&gt; <a href="Prelude.html#t:Int">Int</a> -&gt; a</li><li><a href="#v:exponent">exponent</a> :: a -&gt; <a href="Prelude.html#t:Int">Int</a></li><li><a href="#v:significand">significand</a> :: a -&gt; a</li><li><a href="#v:scaleFloat">scaleFloat</a> :: <a href="Prelude.html#t:Int">Int</a> -&gt; a -&gt; a</li><li><a href="#v:isNaN">isNaN</a> :: a -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li><a href="#v:isInfinite">isInfinite</a> :: a -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li><a href="#v:isDenormalized">isDenormalized</a> :: a -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li><a href="#v:isNegativeZero">isNegativeZero</a> :: a -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li><a href="#v:isIEEE">isIEEE</a> :: a -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li><a href="#v:atan2">atan2</a> :: a -&gt; a -&gt; a</li></ul></li><li class="src short"><a href="#v:subtract">subtract</a> :: <a href="Prelude.html#t:Num">Num</a> a =&gt; a -&gt; a -&gt; a</li><li class="src short"><a href="#v:even">even</a> :: <a href="Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:odd">odd</a> :: <a href="Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:gcd">gcd</a> :: <a href="Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; a -&gt; a</li><li class="src short"><a href="#v:lcm">lcm</a> :: <a href="Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; a -&gt; a</li><li class="src short"><a href="#v:-94-">(^)</a> :: (<a href="Prelude.html#t:Num">Num</a> a, <a href="Prelude.html#t:Integral">Integral</a> b) =&gt; a -&gt; b -&gt; a</li><li class="src short"><a href="#v:-94--94-">(^^)</a> :: (<a href="Prelude.html#t:Fractional">Fractional</a> a, <a href="Prelude.html#t:Integral">Integral</a> b) =&gt; a -&gt; b -&gt; a</li><li class="src short"><a href="#v:fromIntegral">fromIntegral</a> :: (<a href="Prelude.html#t:Integral">Integral</a> a, <a href="Prelude.html#t:Num">Num</a> b) =&gt; a -&gt; b</li><li class="src short"><a href="#v:realToFrac">realToFrac</a> :: (<a href="Prelude.html#t:Real">Real</a> a, <a href="Prelude.html#t:Fractional">Fractional</a> b) =&gt; a -&gt; b</li><li class="src short"><span class="keyword">class</span>  <a href="#t:Monad">Monad</a> m  <span class="keyword">where</span><ul class="subs"><li><a href="#v:-62--62--61-">(&gt;&gt;=)</a> ::  m a -&gt; (a -&gt; m b) -&gt; m b</li><li><a href="#v:-62--62-">(&gt;&gt;)</a> ::  m a -&gt; m b -&gt; m b</li><li><a href="#v:return">return</a> ::  a -&gt; m a</li><li><a href="#v:fail">fail</a> ::  <a href="Prelude.html#t:String">String</a> -&gt; m a</li></ul></li><li class="src short"><span class="keyword">class</span>  <a href="#t:Functor">Functor</a> f  <span class="keyword">where</span><ul class="subs"><li><a href="#v:fmap">fmap</a> ::  (a -&gt; b) -&gt; f a -&gt; f b</li></ul></li><li class="src short"><a href="#v:mapM">mapM</a> :: <a href="Prelude.html#t:Monad">Monad</a> m =&gt; (a -&gt; m b) -&gt; [a] -&gt; m [b]</li><li class="src short"><a href="#v:mapM_">mapM_</a> :: <a href="Prelude.html#t:Monad">Monad</a> m =&gt; (a -&gt; m b) -&gt; [a] -&gt; m ()</li><li class="src short"><a href="#v:sequence">sequence</a> :: <a href="Prelude.html#t:Monad">Monad</a> m =&gt; [m a] -&gt; m [a]</li><li class="src short"><a href="#v:sequence_">sequence_</a> :: <a href="Prelude.html#t:Monad">Monad</a> m =&gt; [m a] -&gt; m ()</li><li class="src short"><a href="#v:-61--60--60-">(=&lt;&lt;)</a> :: <a href="Prelude.html#t:Monad">Monad</a> m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b</li><li class="src short"><a href="#v:id">id</a> ::  a -&gt; a</li><li class="src short"><a href="#v:const">const</a> ::  a -&gt; b -&gt; a</li><li class="src short"><a href="#v:.">(.)</a> ::  (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c</li><li class="src short"><a href="#v:flip">flip</a> ::  (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c</li><li class="src short"><a href="#v:-36-">($)</a> ::  (a -&gt; b) -&gt; a -&gt; b</li><li class="src short"><a href="#v:until">until</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; (a -&gt; a) -&gt; a -&gt; a</li><li class="src short"><a href="#v:asTypeOf">asTypeOf</a> ::  a -&gt; a -&gt; a</li><li class="src short"><a href="#v:error">error</a> ::  [<a href="Prelude.html#t:Char">Char</a>] -&gt; a</li><li class="src short"><a href="#v:undefined">undefined</a> ::  a</li><li class="src short"><a href="#v:seq">seq</a> ::  a -&gt; b -&gt; b</li><li class="src short"><a href="#v:-36--33-">($!)</a> ::  (a -&gt; b) -&gt; a -&gt; b</li><li class="src short"><a href="#v:map">map</a> ::  (a -&gt; b) -&gt; [a] -&gt; [b]</li><li class="src short"><a href="#v:-43--43-">(++)</a> ::  [a] -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:filter">filter</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:head">head</a> ::  [a] -&gt; a</li><li class="src short"><a href="#v:last">last</a> ::  [a] -&gt; a</li><li class="src short"><a href="#v:tail">tail</a> ::  [a] -&gt; [a]</li><li class="src short"><a href="#v:init">init</a> ::  [a] -&gt; [a]</li><li class="src short"><a href="#v:null">null</a> ::  [a] -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:length">length</a> ::  [a] -&gt; <a href="Prelude.html#t:Int">Int</a></li><li class="src short"><a href="#v:-33--33-">(!!)</a> ::  [a] -&gt; <a href="Prelude.html#t:Int">Int</a> -&gt; a</li><li class="src short"><a href="#v:reverse">reverse</a> ::  [a] -&gt; [a]</li><li class="src short"><a href="#v:foldl">foldl</a> ::  (a -&gt; b -&gt; a) -&gt; a -&gt; [b] -&gt; a</li><li class="src short"><a href="#v:foldl1">foldl1</a> ::  (a -&gt; a -&gt; a) -&gt; [a] -&gt; a</li><li class="src short"><a href="#v:foldr">foldr</a> ::  (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; b</li><li class="src short"><a href="#v:foldr1">foldr1</a> ::  (a -&gt; a -&gt; a) -&gt; [a] -&gt; a</li><li class="src short"><a href="#v:and">and</a> :: [<a href="Prelude.html#t:Bool">Bool</a>] -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:or">or</a> :: [<a href="Prelude.html#t:Bool">Bool</a>] -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:any">any</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:all">all</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:sum">sum</a> :: <a href="Prelude.html#t:Num">Num</a> a =&gt; [a] -&gt; a</li><li class="src short"><a href="#v:product">product</a> :: <a href="Prelude.html#t:Num">Num</a> a =&gt; [a] -&gt; a</li><li class="src short"><a href="#v:concat">concat</a> ::  [[a]] -&gt; [a]</li><li class="src short"><a href="#v:concatMap">concatMap</a> ::  (a -&gt; [b]) -&gt; [a] -&gt; [b]</li><li class="src short"><a href="#v:maximum">maximum</a> :: <a href="Prelude.html#t:Ord">Ord</a> a =&gt; [a] -&gt; a</li><li class="src short"><a href="#v:minimum">minimum</a> :: <a href="Prelude.html#t:Ord">Ord</a> a =&gt; [a] -&gt; a</li><li class="src short"><a href="#v:scanl">scanl</a> ::  (a -&gt; b -&gt; a) -&gt; a -&gt; [b] -&gt; [a]</li><li class="src short"><a href="#v:scanl1">scanl1</a> ::  (a -&gt; a -&gt; a) -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:scanr">scanr</a> ::  (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; [b]</li><li class="src short"><a href="#v:scanr1">scanr1</a> ::  (a -&gt; a -&gt; a) -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:iterate">iterate</a> ::  (a -&gt; a) -&gt; a -&gt; [a]</li><li class="src short"><a href="#v:repeat">repeat</a> ::  a -&gt; [a]</li><li class="src short"><a href="#v:replicate">replicate</a> ::  <a href="Prelude.html#t:Int">Int</a> -&gt; a -&gt; [a]</li><li class="src short"><a href="#v:cycle">cycle</a> ::  [a] -&gt; [a]</li><li class="src short"><a href="#v:take">take</a> ::  <a href="Prelude.html#t:Int">Int</a> -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:drop">drop</a> ::  <a href="Prelude.html#t:Int">Int</a> -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:splitAt">splitAt</a> ::  <a href="Prelude.html#t:Int">Int</a> -&gt; [a] -&gt; ([a], [a])</li><li class="src short"><a href="#v:takeWhile">takeWhile</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:dropWhile">dropWhile</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [a]</li><li class="src short"><a href="#v:span">span</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; ([a], [a])</li><li class="src short"><a href="#v:break">break</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; ([a], [a])</li><li class="src short"><a href="#v:elem">elem</a> :: <a href="Prelude.html#t:Eq">Eq</a> a =&gt; a -&gt; [a] -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:notElem">notElem</a> :: <a href="Prelude.html#t:Eq">Eq</a> a =&gt; a -&gt; [a] -&gt; <a href="Prelude.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:lookup">lookup</a> :: <a href="Prelude.html#t:Eq">Eq</a> a =&gt; a -&gt; [(a, b)] -&gt; <a href="Prelude.html#t:Maybe">Maybe</a> b</li><li class="src short"><a href="#v:zip">zip</a> ::  [a] -&gt; [b] -&gt; [(a, b)]</li><li class="src short"><a href="#v:zip3">zip3</a> ::  [a] -&gt; [b] -&gt; [c] -&gt; [(a, b, c)]</li><li class="src short"><a href="#v:zipWith">zipWith</a> ::  (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]</li><li class="src short"><a href="#v:zipWith3">zipWith3</a> ::  (a -&gt; b -&gt; c -&gt; d) -&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d]</li><li class="src short"><a href="#v:unzip">unzip</a> ::  [(a, b)] -&gt; ([a], [b])</li><li class="src short"><a href="#v:unzip3">unzip3</a> ::  [(a, b, c)] -&gt; ([a], [b], [c])</li><li class="src short"><a href="#v:lines">lines</a> :: <a href="Prelude.html#t:String">String</a> -&gt; [<a href="Prelude.html#t:String">String</a>]</li><li class="src short"><a href="#v:words">words</a> :: <a href="Prelude.html#t:String">String</a> -&gt; [<a href="Prelude.html#t:String">String</a>]</li><li class="src short"><a href="#v:unlines">unlines</a> :: [<a href="Prelude.html#t:String">String</a>] -&gt; <a href="Prelude.html#t:String">String</a></li><li class="src short"><a href="#v:unwords">unwords</a> :: [<a href="Prelude.html#t:String">String</a>] -&gt; <a href="Prelude.html#t:String">String</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:ShowS">ShowS</a> = <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:String">String</a></li><li class="src short"><span class="keyword">class</span>  <a href="#t:Show">Show</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:showsPrec">showsPrec</a> :: <a href="Prelude.html#t:Int">Int</a> -&gt; a -&gt; <a href="Prelude.html#t:ShowS">ShowS</a></li><li><a href="#v:show">show</a> :: a -&gt; <a href="Prelude.html#t:String">String</a></li><li><a href="#v:showList">showList</a> :: [a] -&gt; <a href="Prelude.html#t:ShowS">ShowS</a></li></ul></li><li class="src short"><a href="#v:shows">shows</a> :: <a href="Prelude.html#t:Show">Show</a> a =&gt; a -&gt; <a href="Prelude.html#t:ShowS">ShowS</a></li><li class="src short"><a href="#v:showChar">showChar</a> :: <a href="Prelude.html#t:Char">Char</a> -&gt; <a href="Prelude.html#t:ShowS">ShowS</a></li><li class="src short"><a href="#v:showString">showString</a> :: <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:ShowS">ShowS</a></li><li class="src short"><a href="#v:showParen">showParen</a> :: <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:ShowS">ShowS</a> -&gt; <a href="Prelude.html#t:ShowS">ShowS</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:ReadS">ReadS</a> a = <a href="Prelude.html#t:String">String</a> -&gt; [(a, <a href="Prelude.html#t:String">String</a>)]</li><li class="src short"><span class="keyword">class</span>  <a href="#t:Read">Read</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:readsPrec">readsPrec</a> :: <a href="Prelude.html#t:Int">Int</a> -&gt; <a href="Prelude.html#t:ReadS">ReadS</a> a</li><li><a href="#v:readList">readList</a> :: <a href="Prelude.html#t:ReadS">ReadS</a> [a]</li></ul></li><li class="src short"><a href="#v:reads">reads</a> :: <a href="Prelude.html#t:Read">Read</a> a =&gt; <a href="Prelude.html#t:ReadS">ReadS</a> a</li><li class="src short"><a href="#v:readParen">readParen</a> ::  <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:ReadS">ReadS</a> a -&gt; <a href="Prelude.html#t:ReadS">ReadS</a> a</li><li class="src short"><a href="#v:read">read</a> :: <a href="Prelude.html#t:Read">Read</a> a =&gt; <a href="Prelude.html#t:String">String</a> -&gt; a</li><li class="src short"><a href="#v:lex">lex</a> :: <a href="Prelude.html#t:ReadS">ReadS</a> <a href="Prelude.html#t:String">String</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:IO">IO</a> a</li><li class="src short"><a href="#v:putChar">putChar</a> :: <a href="Prelude.html#t:Char">Char</a> -&gt; <a href="Prelude.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:putStr">putStr</a> :: <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:putStrLn">putStrLn</a> :: <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:print">print</a> :: <a href="Prelude.html#t:Show">Show</a> a =&gt; a -&gt; <a href="Prelude.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:getChar">getChar</a> :: <a href="Prelude.html#t:IO">IO</a> <a href="Prelude.html#t:Char">Char</a></li><li class="src short"><a href="#v:getLine">getLine</a> :: <a href="Prelude.html#t:IO">IO</a> <a href="Prelude.html#t:String">String</a></li><li class="src short"><a href="#v:getContents">getContents</a> :: <a href="Prelude.html#t:IO">IO</a> <a href="Prelude.html#t:String">String</a></li><li class="src short"><a href="#v:interact">interact</a> :: (<a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:String">String</a>) -&gt; <a href="Prelude.html#t:IO">IO</a> ()</li><li class="src short"><span class="keyword">type</span> <a href="#t:FilePath">FilePath</a> = <a href="Prelude.html#t:String">String</a></li><li class="src short"><a href="#v:readFile">readFile</a> :: <a href="Prelude.html#t:FilePath">FilePath</a> -&gt; <a href="Prelude.html#t:IO">IO</a> <a href="Prelude.html#t:String">String</a></li><li class="src short"><a href="#v:writeFile">writeFile</a> :: <a href="Prelude.html#t:FilePath">FilePath</a> -&gt; <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:appendFile">appendFile</a> :: <a href="Prelude.html#t:FilePath">FilePath</a> -&gt; <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:readIO">readIO</a> :: <a href="Prelude.html#t:Read">Read</a> a =&gt; <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:readLn">readLn</a> :: <a href="Prelude.html#t:Read">Read</a> a =&gt; <a href="Prelude.html#t:IO">IO</a> a</li><li class="src short"><span class="keyword">type</span> <a href="#t:IOError">IOError</a> = <a href="../base-4.5.1.0/Control-Exception-Base.html#t:IOException">IOException</a></li><li class="src short"><a href="#v:ioError">ioError</a> ::  <a href="Prelude.html#t:IOError">IOError</a> -&gt; <a href="Prelude.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:userError">userError</a> :: <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:IOError">IOError</a></li><li class="src short"><a href="#v:catch">catch</a> ::  <a href="Prelude.html#t:IO">IO</a> a -&gt; (<a href="Prelude.html#t:IOError">IOError</a> -&gt; <a href="Prelude.html#t:IO">IO</a> a) -&gt; <a href="Prelude.html#t:IO">IO</a> a</li></ul></div><div id="interface"><h1 id="g:1">Standard types, classes and related functions
</h1><h2 id="g:2">Basic data types
</h2><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Bool" class="def">Bool</a>  </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:False" class="def">False</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:True" class="def">True</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Bool" class="caption collapser" onclick="toggleSection('i:Bool')">Instances</p><div id="section.i:Bool" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Ix.html#t:Ix">Ix</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Generic <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Foreign-Storable.html#t:Storable">Storable</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Random.html#t:Random">Random</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:-38--38-" class="def">(&amp;&amp;)</a> :: <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:-124--124-" class="def">(||)</a> :: <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:not" class="def">not</a> :: <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:Bool">Bool</a></p></div><div class="top"><p class="src"><a name="v:otherwise" class="def">otherwise</a> :: <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-Base.html#otherwise" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:otherwise">otherwise</a></code> is defined as the value <code><a href="Prelude.html#v:True">True</a></code>.  It helps to make
 guards more readable.  eg.
</p><pre>  f x | x &lt; 0     = ...
      | otherwise = ...
</pre></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Maybe" class="def">Maybe</a> a <a href="../base-4.5.1.0/src/Data-Maybe.html#Maybe" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#t:Maybe">Maybe</a></code> type encapsulates an optional value.  A value of type
 <code><code><a href="Prelude.html#t:Maybe">Maybe</a></code> a</code> either contains a value of type <code>a</code> (represented as <code><code><a href="Prelude.html#v:Just">Just</a></code> a</code>), 
 or it is empty (represented as <code><a href="Prelude.html#v:Nothing">Nothing</a></code>).  Using <code><a href="Prelude.html#t:Maybe">Maybe</a></code> is a good way to 
 deal with errors or exceptional cases without resorting to drastic
 measures such as <code><a href="Prelude.html#v:error">error</a></code>.
</p><p>The <code><a href="Prelude.html#t:Maybe">Maybe</a></code> type is also a monad.  It is a simple kind of error
 monad, where all errors are represented by <code><a href="Prelude.html#v:Nothing">Nothing</a></code>.  A richer
 error monad can be built using the <code><a href="../base-4.5.1.0/Data-Either.html#t:Either">Either</a></code> type.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Nothing" class="def">Nothing</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Just" class="def">Just</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Maybe" class="caption collapser" onclick="toggleSection('i:Maybe')">Instances</p><div id="section.i:Maybe" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Monad">Monad</a> <a href="Prelude.html#t:Maybe">Maybe</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Functor">Functor</a> <a href="Prelude.html#t:Maybe">Maybe</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable1">Typeable1</a> <a href="Prelude.html#t:Maybe">Maybe</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Monad.html#t:MonadPlus">MonadPlus</a> <a href="Prelude.html#t:Maybe">Maybe</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> a =&gt; <a href="Prelude.html#t:Eq">Eq</a> (<a href="Prelude.html#t:Maybe">Maybe</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> a =&gt; <a href="Prelude.html#t:Ord">Ord</a> (<a href="Prelude.html#t:Maybe">Maybe</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> a =&gt; <a href="Prelude.html#t:Read">Read</a> (<a href="Prelude.html#t:Maybe">Maybe</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> a =&gt; <a href="Prelude.html#t:Show">Show</a> (<a href="Prelude.html#t:Maybe">Maybe</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Generic (<a href="Prelude.html#t:Maybe">Maybe</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:maybe" class="def">maybe</a> ::  b -&gt; (a -&gt; b) -&gt; <a href="Prelude.html#t:Maybe">Maybe</a> a -&gt; b<a href="../base-4.5.1.0/src/Data-Maybe.html#maybe" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#v:maybe">maybe</a></code> function takes a default value, a function, and a <code><a href="Prelude.html#t:Maybe">Maybe</a></code>
 value.  If the <code><a href="Prelude.html#t:Maybe">Maybe</a></code> value is <code><a href="Prelude.html#v:Nothing">Nothing</a></code>, the function returns the
 default value.  Otherwise, it applies the function to the value inside
 the <code><a href="Prelude.html#v:Just">Just</a></code> and returns the result.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Either" class="def">Either</a> a b <a href="../base-4.5.1.0/src/Data-Either.html#Either" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#t:Either">Either</a></code> type represents values with two possibilities: a value of
type <code><code><a href="Prelude.html#t:Either">Either</a></code> a b</code> is either <code><code><a href="Prelude.html#v:Left">Left</a></code> a</code> or <code><code><a href="Prelude.html#v:Right">Right</a></code> b</code>.
</p><p>The <code><a href="Prelude.html#t:Either">Either</a></code> type is sometimes used to represent a value which is
either correct or an error; by convention, the <code><a href="Prelude.html#v:Left">Left</a></code> constructor is
used to hold an error value and the <code><a href="Prelude.html#v:Right">Right</a></code> constructor is used to
hold a correct value (mnemonic: &quot;right&quot; also means &quot;correct&quot;).
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Left" class="def">Left</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Right" class="def">Right</a> b</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Either" class="caption collapser" onclick="toggleSection('i:Either')">Instances</p><div id="section.i:Either" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable2">Typeable2</a> <a href="Prelude.html#t:Either">Either</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (<a href="Prelude.html#t:Either">Either</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (<a href="Prelude.html#t:Either">Either</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b) =&gt; <a href="Prelude.html#t:Read">Read</a> (<a href="Prelude.html#t:Either">Either</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b) =&gt; <a href="Prelude.html#t:Show">Show</a> (<a href="Prelude.html#t:Either">Either</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Generic (<a href="Prelude.html#t:Either">Either</a> a b)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:either" class="def">either</a> ::  (a -&gt; c) -&gt; (b -&gt; c) -&gt; <a href="Prelude.html#t:Either">Either</a> a b -&gt; c<a href="../base-4.5.1.0/src/Data-Either.html#either" class="link">Source</a></p><div class="doc"><p>Case analysis for the <code><a href="Prelude.html#t:Either">Either</a></code> type.
 If the value is <code><code><a href="Prelude.html#v:Left">Left</a></code> a</code>, apply the first function to <code>a</code>;
 if it is <code><code><a href="Prelude.html#v:Right">Right</a></code> b</code>, apply the second function to <code>b</code>.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Ordering" class="def">Ordering</a>  </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LT" class="def">LT</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:EQ" class="def">EQ</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:GT" class="def">GT</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Ordering" class="caption collapser" onclick="toggleSection('i:Ordering')">Instances</p><div id="section.i:Ordering" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Ix.html#t:Ix">Ix</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Generic <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Char" class="def">Char</a>  </p><div class="subs instances"><p id="control.i:Char" class="caption collapser" onclick="toggleSection('i:Char')">Instances</p><div id="section.i:Char" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Ix.html#t:Ix">Ix</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Generic <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Foreign-Storable.html#t:Storable">Storable</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Random.html#t:Random">Random</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:String" class="def">String</a> = [<a href="Prelude.html#t:Char">Char</a>]<a href="../base-4.5.1.0/src/GHC-Base.html#String" class="link">Source</a></p><div class="doc"><p>A <code><a href="Prelude.html#t:String">String</a></code> is a list of characters.  String constants in Haskell are values
 of type <code><a href="Prelude.html#t:String">String</a></code>.
</p></div></div><h3 id="g:3">Tuples
</h3><div class="top"><p class="src"><a name="v:fst" class="def">fst</a> ::  (a, b) -&gt; a<a href="../base-4.5.1.0/src/Data-Tuple.html#fst" class="link">Source</a></p><div class="doc"><p>Extract the first component of a pair.
</p></div></div><div class="top"><p class="src"><a name="v:snd" class="def">snd</a> ::  (a, b) -&gt; b<a href="../base-4.5.1.0/src/Data-Tuple.html#snd" class="link">Source</a></p><div class="doc"><p>Extract the second component of a pair.
</p></div></div><div class="top"><p class="src"><a name="v:curry" class="def">curry</a> ::  ((a, b) -&gt; c) -&gt; a -&gt; b -&gt; c<a href="../base-4.5.1.0/src/Data-Tuple.html#curry" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:curry">curry</a></code> converts an uncurried function to a curried function.
</p></div></div><div class="top"><p class="src"><a name="v:uncurry" class="def">uncurry</a> ::  (a -&gt; b -&gt; c) -&gt; (a, b) -&gt; c<a href="../base-4.5.1.0/src/Data-Tuple.html#uncurry" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:uncurry">uncurry</a></code> converts a curried function to a function on pairs.
</p></div></div><h2 id="g:4">Basic type classes
</h2><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Eq" class="def">Eq</a> a  <span class="keyword">where</span></p><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:-61--61-" class="def">(==)</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></p><p class="src"><a name="v:-47--61-" class="def">(/=)</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></p></div><div class="subs instances"><p id="control.i:Eq" class="caption collapser" onclick="toggleSection('i:Eq')">Instances</p><div id="section.i:Eq" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int8">Int8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int16">Int16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int32">Int32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int64">Int64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> ()</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="IO.html#t:Handle">Handle</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> Number</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="IO.html#t:HandlePosn">HandlePosn</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Error.html#t:Errno">Errno</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:AsyncException">AsyncException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:ArrayException">ArrayException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="System.html#t:ExitCode">ExitCode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="MarshalError.html#t:IOErrorType">IOErrorType</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="IO.html#t:BufferMode">BufferMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/GHC-IO-Handle.html#t:Newline">Newline</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/GHC-IO-Handle.html#t:NewlineMode">NewlineMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:WordPtr">WordPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:IntPtr">IntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Data-Char.html#t:GeneralCategory">GeneralCategory</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CChar">CChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSChar">CSChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUChar">CUChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CShort">CShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUShort">CUShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CInt">CInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUInt">CUInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLong">CLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULong">CULong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLLong">CLLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULLong">CULLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CFloat">CFloat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CDouble">CDouble</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CPtrdiff">CPtrdiff</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSize">CSize</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CWchar">CWchar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSigAtomic">CSigAtomic</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CClock">CClock</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CTime">CTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUSeconds">CUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSUSeconds">CSUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntPtr">CIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntPtr">CUIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntMax">CIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntMax">CUIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/GHC-IO-Device.html#t:IODeviceType">IODeviceType</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="IO.html#t:SeekMode">SeekMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="IO.html#t:IOMode">IOMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Text-Read-Lex.html#t:Lexeme">Lexeme</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Text-Read-Lex.html#t:Lexeme-39-">Lexeme'</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:MaskingState">MaskingState</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:IOException">IOException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:ArithException">ArithException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:TypeRep">TypeRep</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:TyCon">TyCon</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../directory-1.1.0.2/System-Directory.html#t:Permissions">Permissions</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Locale.html#t:TimeLocale">TimeLocale</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Time.html#t:Month">Month</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Time.html#t:Day">Day</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Time.html#t:ClockTime">ClockTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Time.html#t:CalendarTime">CalendarTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Time.html#t:TimeDiff">TimeDiff</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../time-1.4/Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../time-1.4/Data-Time-Clock.html#t:UTCTime">UTCTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../time-1.4/Data-Time-Clock.html#t:NominalDiffTime">NominalDiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../time-1.4/Data-Time-Clock.html#t:UniversalTime">UniversalTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="../time-1.4/Data-Time-Clock.html#t:DiffTime">DiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> Fixity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> Associativity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> Arity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Directory.html#t:Permissions">Permissions</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> a =&gt; <a href="Prelude.html#t:Eq">Eq</a> [a]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> a =&gt; <a href="Prelude.html#t:Eq">Eq</a> (<a href="Ratio.html#t:Ratio">Ratio</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> a =&gt; <a href="Prelude.html#t:Eq">Eq</a> (<a href="Complex.html#t:Complex">Complex</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> (<a href="../base-4.5.1.0/Data-IORef.html#t:IORef">IORef</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> a =&gt; <a href="Prelude.html#t:Eq">Eq</a> (<a href="Prelude.html#t:Maybe">Maybe</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (<a href="Prelude.html#t:Either">Either</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Ix.html#t:Ix">Ix</a> i, <a href="Prelude.html#t:Eq">Eq</a> e) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (<a href="Array.html#t:Array">Array</a> i e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b, <a href="Prelude.html#t:Eq">Eq</a> c) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b, c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> (<a href="../array-0.4.0.0/Data-Array-ST.html#t:STArray">STArray</a> s i e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b, <a href="Prelude.html#t:Eq">Eq</a> c, <a href="Prelude.html#t:Eq">Eq</a> d) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b, c, d)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b, <a href="Prelude.html#t:Eq">Eq</a> c, <a href="Prelude.html#t:Eq">Eq</a> d, <a href="Prelude.html#t:Eq">Eq</a> e) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b, c, d, e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b, <a href="Prelude.html#t:Eq">Eq</a> c, <a href="Prelude.html#t:Eq">Eq</a> d, <a href="Prelude.html#t:Eq">Eq</a> e, <a href="Prelude.html#t:Eq">Eq</a> f) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b, c, d, e, f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b, <a href="Prelude.html#t:Eq">Eq</a> c, <a href="Prelude.html#t:Eq">Eq</a> d, <a href="Prelude.html#t:Eq">Eq</a> e, <a href="Prelude.html#t:Eq">Eq</a> f, <a href="Prelude.html#t:Eq">Eq</a> g) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b, c, d, e, f, g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b, <a href="Prelude.html#t:Eq">Eq</a> c, <a href="Prelude.html#t:Eq">Eq</a> d, <a href="Prelude.html#t:Eq">Eq</a> e, <a href="Prelude.html#t:Eq">Eq</a> f, <a href="Prelude.html#t:Eq">Eq</a> g, <a href="Prelude.html#t:Eq">Eq</a> h) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b, c, d, e, f, g, h)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b, <a href="Prelude.html#t:Eq">Eq</a> c, <a href="Prelude.html#t:Eq">Eq</a> d, <a href="Prelude.html#t:Eq">Eq</a> e, <a href="Prelude.html#t:Eq">Eq</a> f, <a href="Prelude.html#t:Eq">Eq</a> g, <a href="Prelude.html#t:Eq">Eq</a> h, <a href="Prelude.html#t:Eq">Eq</a> i) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b, c, d, e, f, g, h, i)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b, <a href="Prelude.html#t:Eq">Eq</a> c, <a href="Prelude.html#t:Eq">Eq</a> d, <a href="Prelude.html#t:Eq">Eq</a> e, <a href="Prelude.html#t:Eq">Eq</a> f, <a href="Prelude.html#t:Eq">Eq</a> g, <a href="Prelude.html#t:Eq">Eq</a> h, <a href="Prelude.html#t:Eq">Eq</a> i, <a href="Prelude.html#t:Eq">Eq</a> j) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b, c, d, e, f, g, h, i, j)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b, <a href="Prelude.html#t:Eq">Eq</a> c, <a href="Prelude.html#t:Eq">Eq</a> d, <a href="Prelude.html#t:Eq">Eq</a> e, <a href="Prelude.html#t:Eq">Eq</a> f, <a href="Prelude.html#t:Eq">Eq</a> g, <a href="Prelude.html#t:Eq">Eq</a> h, <a href="Prelude.html#t:Eq">Eq</a> i, <a href="Prelude.html#t:Eq">Eq</a> j, <a href="Prelude.html#t:Eq">Eq</a> k) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b, c, d, e, f, g, h, i, j, k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b, <a href="Prelude.html#t:Eq">Eq</a> c, <a href="Prelude.html#t:Eq">Eq</a> d, <a href="Prelude.html#t:Eq">Eq</a> e, <a href="Prelude.html#t:Eq">Eq</a> f, <a href="Prelude.html#t:Eq">Eq</a> g, <a href="Prelude.html#t:Eq">Eq</a> h, <a href="Prelude.html#t:Eq">Eq</a> i, <a href="Prelude.html#t:Eq">Eq</a> j, <a href="Prelude.html#t:Eq">Eq</a> k, <a href="Prelude.html#t:Eq">Eq</a> l) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b, c, d, e, f, g, h, i, j, k, l)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b, <a href="Prelude.html#t:Eq">Eq</a> c, <a href="Prelude.html#t:Eq">Eq</a> d, <a href="Prelude.html#t:Eq">Eq</a> e, <a href="Prelude.html#t:Eq">Eq</a> f, <a href="Prelude.html#t:Eq">Eq</a> g, <a href="Prelude.html#t:Eq">Eq</a> h, <a href="Prelude.html#t:Eq">Eq</a> i, <a href="Prelude.html#t:Eq">Eq</a> j, <a href="Prelude.html#t:Eq">Eq</a> k, <a href="Prelude.html#t:Eq">Eq</a> l, <a href="Prelude.html#t:Eq">Eq</a> m) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b, c, d, e, f, g, h, i, j, k, l, m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b, <a href="Prelude.html#t:Eq">Eq</a> c, <a href="Prelude.html#t:Eq">Eq</a> d, <a href="Prelude.html#t:Eq">Eq</a> e, <a href="Prelude.html#t:Eq">Eq</a> f, <a href="Prelude.html#t:Eq">Eq</a> g, <a href="Prelude.html#t:Eq">Eq</a> h, <a href="Prelude.html#t:Eq">Eq</a> i, <a href="Prelude.html#t:Eq">Eq</a> j, <a href="Prelude.html#t:Eq">Eq</a> k, <a href="Prelude.html#t:Eq">Eq</a> l, <a href="Prelude.html#t:Eq">Eq</a> m, <a href="Prelude.html#t:Eq">Eq</a> n) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b, c, d, e, f, g, h, i, j, k, l, m, n)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Eq">Eq</a> a, <a href="Prelude.html#t:Eq">Eq</a> b, <a href="Prelude.html#t:Eq">Eq</a> c, <a href="Prelude.html#t:Eq">Eq</a> d, <a href="Prelude.html#t:Eq">Eq</a> e, <a href="Prelude.html#t:Eq">Eq</a> f, <a href="Prelude.html#t:Eq">Eq</a> g, <a href="Prelude.html#t:Eq">Eq</a> h, <a href="Prelude.html#t:Eq">Eq</a> i, <a href="Prelude.html#t:Eq">Eq</a> j, <a href="Prelude.html#t:Eq">Eq</a> k, <a href="Prelude.html#t:Eq">Eq</a> l, <a href="Prelude.html#t:Eq">Eq</a> m, <a href="Prelude.html#t:Eq">Eq</a> n, <a href="Prelude.html#t:Eq">Eq</a> o) =&gt; <a href="Prelude.html#t:Eq">Eq</a> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="Prelude.html#t:Eq">Eq</a> a =&gt; <a name="t:Ord" class="def">Ord</a> a  <span class="keyword">where</span></p><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:compare" class="def">compare</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Ordering">Ordering</a></p><p class="src"><a name="v:-60-" class="def">(&lt;)</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></p><p class="src"><a name="v:-62--61-" class="def">(&gt;=)</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></p><p class="src"><a name="v:-62-" class="def">(&gt;)</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></p><p class="src"><a name="v:-60--61-" class="def">(&lt;=)</a> :: a -&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a></p><p class="src"><a name="v:max" class="def">max</a> :: a -&gt; a -&gt; a</p><p class="src"><a name="v:min" class="def">min</a> :: a -&gt; a -&gt; a</p></div><div class="subs instances"><p id="control.i:Ord" class="caption collapser" onclick="toggleSection('i:Ord')">Instances</p><div id="section.i:Ord" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int8">Int8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int16">Int16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int32">Int32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int64">Int64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> ()</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:AsyncException">AsyncException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:ArrayException">ArrayException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="System.html#t:ExitCode">ExitCode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="IO.html#t:BufferMode">BufferMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/GHC-IO-Handle.html#t:Newline">Newline</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/GHC-IO-Handle.html#t:NewlineMode">NewlineMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:WordPtr">WordPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:IntPtr">IntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Data-Char.html#t:GeneralCategory">GeneralCategory</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CChar">CChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSChar">CSChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUChar">CUChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CShort">CShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUShort">CUShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CInt">CInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUInt">CUInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLong">CLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULong">CULong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLLong">CLLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULLong">CULLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CFloat">CFloat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CDouble">CDouble</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CPtrdiff">CPtrdiff</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSize">CSize</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CWchar">CWchar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSigAtomic">CSigAtomic</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CClock">CClock</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CTime">CTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUSeconds">CUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSUSeconds">CSUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntPtr">CIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntPtr">CUIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntMax">CIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntMax">CUIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="IO.html#t:SeekMode">SeekMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="IO.html#t:IOMode">IOMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:ArithException">ArithException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:TypeRep">TypeRep</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:TyCon">TyCon</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../directory-1.1.0.2/System-Directory.html#t:Permissions">Permissions</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Locale.html#t:TimeLocale">TimeLocale</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Time.html#t:Month">Month</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Time.html#t:Day">Day</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Time.html#t:ClockTime">ClockTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Time.html#t:CalendarTime">CalendarTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Time.html#t:TimeDiff">TimeDiff</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../time-1.4/Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../time-1.4/Data-Time-Clock.html#t:UTCTime">UTCTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../time-1.4/Data-Time-Clock.html#t:NominalDiffTime">NominalDiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../time-1.4/Data-Time-Clock.html#t:UniversalTime">UniversalTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="../time-1.4/Data-Time-Clock.html#t:DiffTime">DiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> Fixity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> Associativity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> Arity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Directory.html#t:Permissions">Permissions</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> a =&gt; <a href="Prelude.html#t:Ord">Ord</a> [a]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Prelude.html#t:Ord">Ord</a> (<a href="Ratio.html#t:Ratio">Ratio</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> a =&gt; <a href="Prelude.html#t:Ord">Ord</a> (<a href="Prelude.html#t:Maybe">Maybe</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (<a href="Prelude.html#t:Either">Either</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Ix.html#t:Ix">Ix</a> i, <a href="Prelude.html#t:Ord">Ord</a> e) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (<a href="Array.html#t:Array">Array</a> i e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b, <a href="Prelude.html#t:Ord">Ord</a> c) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b, c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b, <a href="Prelude.html#t:Ord">Ord</a> c, <a href="Prelude.html#t:Ord">Ord</a> d) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b, c, d)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b, <a href="Prelude.html#t:Ord">Ord</a> c, <a href="Prelude.html#t:Ord">Ord</a> d, <a href="Prelude.html#t:Ord">Ord</a> e) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b, c, d, e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b, <a href="Prelude.html#t:Ord">Ord</a> c, <a href="Prelude.html#t:Ord">Ord</a> d, <a href="Prelude.html#t:Ord">Ord</a> e, <a href="Prelude.html#t:Ord">Ord</a> f) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b, c, d, e, f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b, <a href="Prelude.html#t:Ord">Ord</a> c, <a href="Prelude.html#t:Ord">Ord</a> d, <a href="Prelude.html#t:Ord">Ord</a> e, <a href="Prelude.html#t:Ord">Ord</a> f, <a href="Prelude.html#t:Ord">Ord</a> g) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b, c, d, e, f, g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b, <a href="Prelude.html#t:Ord">Ord</a> c, <a href="Prelude.html#t:Ord">Ord</a> d, <a href="Prelude.html#t:Ord">Ord</a> e, <a href="Prelude.html#t:Ord">Ord</a> f, <a href="Prelude.html#t:Ord">Ord</a> g, <a href="Prelude.html#t:Ord">Ord</a> h) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b, c, d, e, f, g, h)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b, <a href="Prelude.html#t:Ord">Ord</a> c, <a href="Prelude.html#t:Ord">Ord</a> d, <a href="Prelude.html#t:Ord">Ord</a> e, <a href="Prelude.html#t:Ord">Ord</a> f, <a href="Prelude.html#t:Ord">Ord</a> g, <a href="Prelude.html#t:Ord">Ord</a> h, <a href="Prelude.html#t:Ord">Ord</a> i) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b, c, d, e, f, g, h, i)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b, <a href="Prelude.html#t:Ord">Ord</a> c, <a href="Prelude.html#t:Ord">Ord</a> d, <a href="Prelude.html#t:Ord">Ord</a> e, <a href="Prelude.html#t:Ord">Ord</a> f, <a href="Prelude.html#t:Ord">Ord</a> g, <a href="Prelude.html#t:Ord">Ord</a> h, <a href="Prelude.html#t:Ord">Ord</a> i, <a href="Prelude.html#t:Ord">Ord</a> j) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b, c, d, e, f, g, h, i, j)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b, <a href="Prelude.html#t:Ord">Ord</a> c, <a href="Prelude.html#t:Ord">Ord</a> d, <a href="Prelude.html#t:Ord">Ord</a> e, <a href="Prelude.html#t:Ord">Ord</a> f, <a href="Prelude.html#t:Ord">Ord</a> g, <a href="Prelude.html#t:Ord">Ord</a> h, <a href="Prelude.html#t:Ord">Ord</a> i, <a href="Prelude.html#t:Ord">Ord</a> j, <a href="Prelude.html#t:Ord">Ord</a> k) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b, c, d, e, f, g, h, i, j, k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b, <a href="Prelude.html#t:Ord">Ord</a> c, <a href="Prelude.html#t:Ord">Ord</a> d, <a href="Prelude.html#t:Ord">Ord</a> e, <a href="Prelude.html#t:Ord">Ord</a> f, <a href="Prelude.html#t:Ord">Ord</a> g, <a href="Prelude.html#t:Ord">Ord</a> h, <a href="Prelude.html#t:Ord">Ord</a> i, <a href="Prelude.html#t:Ord">Ord</a> j, <a href="Prelude.html#t:Ord">Ord</a> k, <a href="Prelude.html#t:Ord">Ord</a> l) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b, c, d, e, f, g, h, i, j, k, l)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b, <a href="Prelude.html#t:Ord">Ord</a> c, <a href="Prelude.html#t:Ord">Ord</a> d, <a href="Prelude.html#t:Ord">Ord</a> e, <a href="Prelude.html#t:Ord">Ord</a> f, <a href="Prelude.html#t:Ord">Ord</a> g, <a href="Prelude.html#t:Ord">Ord</a> h, <a href="Prelude.html#t:Ord">Ord</a> i, <a href="Prelude.html#t:Ord">Ord</a> j, <a href="Prelude.html#t:Ord">Ord</a> k, <a href="Prelude.html#t:Ord">Ord</a> l, <a href="Prelude.html#t:Ord">Ord</a> m) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b, c, d, e, f, g, h, i, j, k, l, m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b, <a href="Prelude.html#t:Ord">Ord</a> c, <a href="Prelude.html#t:Ord">Ord</a> d, <a href="Prelude.html#t:Ord">Ord</a> e, <a href="Prelude.html#t:Ord">Ord</a> f, <a href="Prelude.html#t:Ord">Ord</a> g, <a href="Prelude.html#t:Ord">Ord</a> h, <a href="Prelude.html#t:Ord">Ord</a> i, <a href="Prelude.html#t:Ord">Ord</a> j, <a href="Prelude.html#t:Ord">Ord</a> k, <a href="Prelude.html#t:Ord">Ord</a> l, <a href="Prelude.html#t:Ord">Ord</a> m, <a href="Prelude.html#t:Ord">Ord</a> n) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b, c, d, e, f, g, h, i, j, k, l, m, n)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Ord">Ord</a> a, <a href="Prelude.html#t:Ord">Ord</a> b, <a href="Prelude.html#t:Ord">Ord</a> c, <a href="Prelude.html#t:Ord">Ord</a> d, <a href="Prelude.html#t:Ord">Ord</a> e, <a href="Prelude.html#t:Ord">Ord</a> f, <a href="Prelude.html#t:Ord">Ord</a> g, <a href="Prelude.html#t:Ord">Ord</a> h, <a href="Prelude.html#t:Ord">Ord</a> i, <a href="Prelude.html#t:Ord">Ord</a> j, <a href="Prelude.html#t:Ord">Ord</a> k, <a href="Prelude.html#t:Ord">Ord</a> l, <a href="Prelude.html#t:Ord">Ord</a> m, <a href="Prelude.html#t:Ord">Ord</a> n, <a href="Prelude.html#t:Ord">Ord</a> o) =&gt; <a href="Prelude.html#t:Ord">Ord</a> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Enum" class="def">Enum</a> a  <span class="keyword">where</span><a href="../base-4.5.1.0/src/GHC-Enum.html#Enum" class="link">Source</a></p><div class="doc"><p>Class <code><a href="Prelude.html#t:Enum">Enum</a></code> defines operations on sequentially ordered types.
</p><p>The <code>enumFrom</code>... methods are used in Haskell's translation of
 arithmetic sequences.
</p><p>Instances of <code><a href="Prelude.html#t:Enum">Enum</a></code> may be derived for any enumeration type (types
 whose constructors have no fields).  The nullary constructors are
 assumed to be numbered left-to-right by <code><a href="Prelude.html#v:fromEnum">fromEnum</a></code> from <code>0</code> through <code>n-1</code>.
 See Chapter 10 of the <em>Haskell Report</em> for more details.
</p><p>For any type that is an instance of class <code><a href="Prelude.html#t:Bounded">Bounded</a></code> as well as <code><a href="Prelude.html#t:Enum">Enum</a></code>,
 the following should hold:
</p><ul><li> The calls <code><code><a href="Prelude.html#v:succ">succ</a></code> <code><a href="Prelude.html#v:maxBound">maxBound</a></code></code> and <code><code><a href="Prelude.html#v:pred">pred</a></code> <code><a href="Prelude.html#v:minBound">minBound</a></code></code> should result in
   a runtime error.
</li><li> <code><a href="Prelude.html#v:fromEnum">fromEnum</a></code> and <code><a href="Prelude.html#v:toEnum">toEnum</a></code> should give a runtime error if the 
   result value is not representable in the result type.
   For example, <code><code><a href="Prelude.html#v:toEnum">toEnum</a></code> 7 :: <code><a href="Prelude.html#t:Bool">Bool</a></code></code> is an error.
</li><li> <code><a href="Prelude.html#v:enumFrom">enumFrom</a></code> and <code><a href="Prelude.html#v:enumFromThen">enumFromThen</a></code> should be defined with an implicit bound,
   thus:
</li></ul><pre>    enumFrom     x   = enumFromTo     x maxBound
    enumFromThen x y = enumFromThenTo x y bound
      where
        bound | fromEnum y &gt;= fromEnum x = maxBound
              | otherwise                = minBound
</pre></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:succ" class="def">succ</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Enum.html#succ" class="link">Source</a></p><div class="doc"><p>the successor of a value.  For numeric types, <code><a href="Prelude.html#v:succ">succ</a></code> adds 1.
</p></div><p class="src"><a name="v:pred" class="def">pred</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Enum.html#pred" class="link">Source</a></p><div class="doc"><p>the predecessor of a value.  For numeric types, <code><a href="Prelude.html#v:pred">pred</a></code> subtracts 1.
</p></div><p class="src"><a name="v:toEnum" class="def">toEnum</a> :: <a href="Prelude.html#t:Int">Int</a> -&gt; a<a href="../base-4.5.1.0/src/GHC-Enum.html#toEnum" class="link">Source</a></p><div class="doc"><p>Convert from an <code><a href="Prelude.html#t:Int">Int</a></code>.
</p></div><p class="src"><a name="v:fromEnum" class="def">fromEnum</a> :: a -&gt; <a href="Prelude.html#t:Int">Int</a><a href="../base-4.5.1.0/src/GHC-Enum.html#fromEnum" class="link">Source</a></p><div class="doc"><p>Convert to an <code><a href="Prelude.html#t:Int">Int</a></code>.
 It is implementation-dependent what <code><a href="Prelude.html#v:fromEnum">fromEnum</a></code> returns when
 applied to a value that is too large to fit in an <code><a href="Prelude.html#t:Int">Int</a></code>.
</p></div><p class="src"><a name="v:enumFrom" class="def">enumFrom</a> :: a -&gt; [a]<a href="../base-4.5.1.0/src/GHC-Enum.html#enumFrom" class="link">Source</a></p><div class="doc"><p>Used in Haskell's translation of <code>[n..]</code>.
</p></div><p class="src"><a name="v:enumFromThen" class="def">enumFromThen</a> :: a -&gt; a -&gt; [a]<a href="../base-4.5.1.0/src/GHC-Enum.html#enumFromThen" class="link">Source</a></p><div class="doc"><p>Used in Haskell's translation of <code>[n,n'..]</code>.
</p></div><p class="src"><a name="v:enumFromTo" class="def">enumFromTo</a> :: a -&gt; a -&gt; [a]<a href="../base-4.5.1.0/src/GHC-Enum.html#enumFromTo" class="link">Source</a></p><div class="doc"><p>Used in Haskell's translation of <code>[n..m]</code>.
</p></div><p class="src"><a name="v:enumFromThenTo" class="def">enumFromThenTo</a> :: a -&gt; a -&gt; a -&gt; [a]<a href="../base-4.5.1.0/src/GHC-Enum.html#enumFromThenTo" class="link">Source</a></p><div class="doc"><p>Used in Haskell's translation of <code>[n,n'..m]</code>.
</p></div></div><div class="subs instances"><p id="control.i:Enum" class="caption collapser" onclick="toggleSection('i:Enum')">Instances</p><div id="section.i:Enum" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int8">Int8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int16">Int16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int32">Int32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int64">Int64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> ()</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:WordPtr">WordPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:IntPtr">IntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Data-Char.html#t:GeneralCategory">GeneralCategory</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CChar">CChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSChar">CSChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUChar">CUChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CShort">CShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUShort">CUShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CInt">CInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUInt">CUInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLong">CLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULong">CULong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLLong">CLLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULLong">CULLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CFloat">CFloat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CDouble">CDouble</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CPtrdiff">CPtrdiff</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSize">CSize</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CWchar">CWchar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSigAtomic">CSigAtomic</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CClock">CClock</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CTime">CTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUSeconds">CUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSUSeconds">CSUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntPtr">CIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntPtr">CUIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntMax">CIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntMax">CUIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="IO.html#t:SeekMode">SeekMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="IO.html#t:IOMode">IOMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Time.html#t:Month">Month</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Time.html#t:Day">Day</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../time-1.4/Data-Time-Clock.html#t:NominalDiffTime">NominalDiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="../time-1.4/Data-Time-Clock.html#t:DiffTime">DiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Prelude.html#t:Enum">Enum</a> (<a href="Ratio.html#t:Ratio">Ratio</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Bounded" class="def">Bounded</a> a  <span class="keyword">where</span><a href="../base-4.5.1.0/src/GHC-Enum.html#Bounded" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#t:Bounded">Bounded</a></code> class is used to name the upper and lower limits of a
 type.  <code><a href="Prelude.html#t:Ord">Ord</a></code> is not a superclass of <code><a href="Prelude.html#t:Bounded">Bounded</a></code> since types that are not
 totally ordered may also have upper and lower bounds.
</p><p>The <code><a href="Prelude.html#t:Bounded">Bounded</a></code> class may be derived for any enumeration type;
 <code><a href="Prelude.html#v:minBound">minBound</a></code> is the first constructor listed in the <code>data</code> declaration
 and <code><a href="Prelude.html#v:maxBound">maxBound</a></code> is the last.
 <code><a href="Prelude.html#t:Bounded">Bounded</a></code> may also be derived for single-constructor datatypes whose
 constituent types are in <code><a href="Prelude.html#t:Bounded">Bounded</a></code>.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:minBound" class="def">minBound</a> :: a<a href="../base-4.5.1.0/src/GHC-Enum.html#minBound" class="link">Source</a></p><p class="src"><a name="v:maxBound" class="def">maxBound</a> :: a<a href="../base-4.5.1.0/src/GHC-Enum.html#maxBound" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:Bounded" class="caption collapser" onclick="toggleSection('i:Bounded')">Instances</p><div id="section.i:Bounded" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int8">Int8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int16">Int16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int32">Int32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int64">Int64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> ()</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:WordPtr">WordPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:IntPtr">IntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Data-Char.html#t:GeneralCategory">GeneralCategory</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CChar">CChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSChar">CSChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUChar">CUChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CShort">CShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUShort">CUShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CInt">CInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUInt">CUInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLong">CLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULong">CULong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLLong">CLLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULLong">CULLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CPtrdiff">CPtrdiff</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSize">CSize</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CWchar">CWchar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSigAtomic">CSigAtomic</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntPtr">CIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntPtr">CUIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntMax">CIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntMax">CUIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Time.html#t:Month">Month</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Time.html#t:Day">Day</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b, <a href="Prelude.html#t:Bounded">Bounded</a> c) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b, c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b, <a href="Prelude.html#t:Bounded">Bounded</a> c, <a href="Prelude.html#t:Bounded">Bounded</a> d) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b, c, d)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b, <a href="Prelude.html#t:Bounded">Bounded</a> c, <a href="Prelude.html#t:Bounded">Bounded</a> d, <a href="Prelude.html#t:Bounded">Bounded</a> e) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b, c, d, e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b, <a href="Prelude.html#t:Bounded">Bounded</a> c, <a href="Prelude.html#t:Bounded">Bounded</a> d, <a href="Prelude.html#t:Bounded">Bounded</a> e, <a href="Prelude.html#t:Bounded">Bounded</a> f) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b, c, d, e, f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b, <a href="Prelude.html#t:Bounded">Bounded</a> c, <a href="Prelude.html#t:Bounded">Bounded</a> d, <a href="Prelude.html#t:Bounded">Bounded</a> e, <a href="Prelude.html#t:Bounded">Bounded</a> f, <a href="Prelude.html#t:Bounded">Bounded</a> g) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b, c, d, e, f, g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b, <a href="Prelude.html#t:Bounded">Bounded</a> c, <a href="Prelude.html#t:Bounded">Bounded</a> d, <a href="Prelude.html#t:Bounded">Bounded</a> e, <a href="Prelude.html#t:Bounded">Bounded</a> f, <a href="Prelude.html#t:Bounded">Bounded</a> g, <a href="Prelude.html#t:Bounded">Bounded</a> h) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b, c, d, e, f, g, h)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b, <a href="Prelude.html#t:Bounded">Bounded</a> c, <a href="Prelude.html#t:Bounded">Bounded</a> d, <a href="Prelude.html#t:Bounded">Bounded</a> e, <a href="Prelude.html#t:Bounded">Bounded</a> f, <a href="Prelude.html#t:Bounded">Bounded</a> g, <a href="Prelude.html#t:Bounded">Bounded</a> h, <a href="Prelude.html#t:Bounded">Bounded</a> i) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b, c, d, e, f, g, h, i)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b, <a href="Prelude.html#t:Bounded">Bounded</a> c, <a href="Prelude.html#t:Bounded">Bounded</a> d, <a href="Prelude.html#t:Bounded">Bounded</a> e, <a href="Prelude.html#t:Bounded">Bounded</a> f, <a href="Prelude.html#t:Bounded">Bounded</a> g, <a href="Prelude.html#t:Bounded">Bounded</a> h, <a href="Prelude.html#t:Bounded">Bounded</a> i, <a href="Prelude.html#t:Bounded">Bounded</a> j) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b, c, d, e, f, g, h, i, j)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b, <a href="Prelude.html#t:Bounded">Bounded</a> c, <a href="Prelude.html#t:Bounded">Bounded</a> d, <a href="Prelude.html#t:Bounded">Bounded</a> e, <a href="Prelude.html#t:Bounded">Bounded</a> f, <a href="Prelude.html#t:Bounded">Bounded</a> g, <a href="Prelude.html#t:Bounded">Bounded</a> h, <a href="Prelude.html#t:Bounded">Bounded</a> i, <a href="Prelude.html#t:Bounded">Bounded</a> j, <a href="Prelude.html#t:Bounded">Bounded</a> k) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b, c, d, e, f, g, h, i, j, k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b, <a href="Prelude.html#t:Bounded">Bounded</a> c, <a href="Prelude.html#t:Bounded">Bounded</a> d, <a href="Prelude.html#t:Bounded">Bounded</a> e, <a href="Prelude.html#t:Bounded">Bounded</a> f, <a href="Prelude.html#t:Bounded">Bounded</a> g, <a href="Prelude.html#t:Bounded">Bounded</a> h, <a href="Prelude.html#t:Bounded">Bounded</a> i, <a href="Prelude.html#t:Bounded">Bounded</a> j, <a href="Prelude.html#t:Bounded">Bounded</a> k, <a href="Prelude.html#t:Bounded">Bounded</a> l) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b, c, d, e, f, g, h, i, j, k, l)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b, <a href="Prelude.html#t:Bounded">Bounded</a> c, <a href="Prelude.html#t:Bounded">Bounded</a> d, <a href="Prelude.html#t:Bounded">Bounded</a> e, <a href="Prelude.html#t:Bounded">Bounded</a> f, <a href="Prelude.html#t:Bounded">Bounded</a> g, <a href="Prelude.html#t:Bounded">Bounded</a> h, <a href="Prelude.html#t:Bounded">Bounded</a> i, <a href="Prelude.html#t:Bounded">Bounded</a> j, <a href="Prelude.html#t:Bounded">Bounded</a> k, <a href="Prelude.html#t:Bounded">Bounded</a> l, <a href="Prelude.html#t:Bounded">Bounded</a> m) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b, c, d, e, f, g, h, i, j, k, l, m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b, <a href="Prelude.html#t:Bounded">Bounded</a> c, <a href="Prelude.html#t:Bounded">Bounded</a> d, <a href="Prelude.html#t:Bounded">Bounded</a> e, <a href="Prelude.html#t:Bounded">Bounded</a> f, <a href="Prelude.html#t:Bounded">Bounded</a> g, <a href="Prelude.html#t:Bounded">Bounded</a> h, <a href="Prelude.html#t:Bounded">Bounded</a> i, <a href="Prelude.html#t:Bounded">Bounded</a> j, <a href="Prelude.html#t:Bounded">Bounded</a> k, <a href="Prelude.html#t:Bounded">Bounded</a> l, <a href="Prelude.html#t:Bounded">Bounded</a> m, <a href="Prelude.html#t:Bounded">Bounded</a> n) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b, c, d, e, f, g, h, i, j, k, l, m, n)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Bounded">Bounded</a> a, <a href="Prelude.html#t:Bounded">Bounded</a> b, <a href="Prelude.html#t:Bounded">Bounded</a> c, <a href="Prelude.html#t:Bounded">Bounded</a> d, <a href="Prelude.html#t:Bounded">Bounded</a> e, <a href="Prelude.html#t:Bounded">Bounded</a> f, <a href="Prelude.html#t:Bounded">Bounded</a> g, <a href="Prelude.html#t:Bounded">Bounded</a> h, <a href="Prelude.html#t:Bounded">Bounded</a> i, <a href="Prelude.html#t:Bounded">Bounded</a> j, <a href="Prelude.html#t:Bounded">Bounded</a> k, <a href="Prelude.html#t:Bounded">Bounded</a> l, <a href="Prelude.html#t:Bounded">Bounded</a> m, <a href="Prelude.html#t:Bounded">Bounded</a> n, <a href="Prelude.html#t:Bounded">Bounded</a> o) =&gt; <a href="Prelude.html#t:Bounded">Bounded</a> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h2 id="g:5">Numbers
</h2><h3 id="g:6">Numeric types
</h3><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Int" class="def">Int</a>  </p><div class="subs instances"><p id="control.i:Int" class="caption collapser" onclick="toggleSection('i:Int')">Instances</p><div id="section.i:Int" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Ix.html#t:Ix">Ix</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Generic <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Foreign-Storable.html#t:Storable">Storable</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Bits.html#t:Bits">Bits</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Random.html#t:Random">Random</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Integer" class="def">Integer</a>  </p><div class="subs instances"><p id="control.i:Integer" class="caption collapser" onclick="toggleSection('i:Integer')">Instances</p><div id="section.i:Integer" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Ix.html#t:Ix">Ix</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Bits.html#t:Bits">Bits</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Random.html#t:Random">Random</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Float" class="def">Float</a>  </p><div class="subs instances"><p id="control.i:Float" class="caption collapser" onclick="toggleSection('i:Float')">Instances</p><div id="section.i:Float" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Floating">Floating</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Fractional">Fractional</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFloat">RealFloat</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFrac">RealFrac</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Generic <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Foreign-Storable.html#t:Storable">Storable</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Random.html#t:Random">Random</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Double" class="def">Double</a>  </p><div class="subs instances"><p id="control.i:Double" class="caption collapser" onclick="toggleSection('i:Double')">Instances</p><div id="section.i:Double" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Floating">Floating</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Fractional">Fractional</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFloat">RealFloat</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFrac">RealFrac</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Generic <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Foreign-Storable.html#t:Storable">Storable</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Random.html#t:Random">Random</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Rational" class="def">Rational</a> = <a href="Ratio.html#t:Ratio">Ratio</a> <a href="Prelude.html#t:Integer">Integer</a><a href="../base-4.5.1.0/src/GHC-Real.html#Rational" class="link">Source</a></p><div class="doc"><p>Arbitrary-precision rational numbers, represented as a ratio of
 two <code><a href="Prelude.html#t:Integer">Integer</a></code> values.  A rational number may be constructed using
 the <code><a href="Ratio.html#v:-37-">%</a></code> operator.
</p></div></div><h3 id="g:7">Numeric type classes
</h3><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Num" class="def">Num</a> a  <span class="keyword">where</span><a href="../base-4.5.1.0/src/GHC-Num.html#Num" class="link">Source</a></p><div class="doc"><p>Basic numeric class.
</p><p>Minimal complete definition: all except <code><a href="Prelude.html#v:negate">negate</a></code> or <code>(-)</code>
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:-43-" class="def">(+)</a> :: a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Num.html#%2B" class="link">Source</a></p><p class="src"><a name="v:-42-" class="def">(*)</a> :: a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Num.html#%2A" class="link">Source</a></p><p class="src"><a name="v:-45-" class="def">(-)</a> :: a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Num.html#-" class="link">Source</a></p><p class="src"><a name="v:negate" class="def">negate</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Num.html#negate" class="link">Source</a></p><div class="doc"><p>Unary negation.
</p></div><p class="src"><a name="v:abs" class="def">abs</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Num.html#abs" class="link">Source</a></p><div class="doc"><p>Absolute value.
</p></div><p class="src"><a name="v:signum" class="def">signum</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Num.html#signum" class="link">Source</a></p><div class="doc"><p>Sign of a number.
 The functions <code><a href="Prelude.html#v:abs">abs</a></code> and <code><a href="Prelude.html#v:signum">signum</a></code> should satisfy the law:
</p><pre> abs x * signum x == x
</pre><p>For real numbers, the <code><a href="Prelude.html#v:signum">signum</a></code> is either <code>-1</code> (negative), <code>0</code> (zero)
 or <code>1</code> (positive).
</p></div><p class="src"><a name="v:fromInteger" class="def">fromInteger</a> :: <a href="Prelude.html#t:Integer">Integer</a> -&gt; a<a href="../base-4.5.1.0/src/GHC-Num.html#fromInteger" class="link">Source</a></p><div class="doc"><p>Conversion from an <code><a href="Prelude.html#t:Integer">Integer</a></code>.
 An integer literal represents the application of the function
 <code><a href="Prelude.html#v:fromInteger">fromInteger</a></code> to the appropriate value of type <code><a href="Prelude.html#t:Integer">Integer</a></code>,
 so such literals have type <code>(<code><a href="Prelude.html#t:Num">Num</a></code> a) =&gt; a</code>.
</p></div></div><div class="subs instances"><p id="control.i:Num" class="caption collapser" onclick="toggleSection('i:Num')">Instances</p><div id="section.i:Num" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int8">Int8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int16">Int16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int32">Int32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int64">Int64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:WordPtr">WordPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:IntPtr">IntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CChar">CChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSChar">CSChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUChar">CUChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CShort">CShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUShort">CUShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CInt">CInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUInt">CUInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLong">CLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULong">CULong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLLong">CLLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULLong">CULLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CFloat">CFloat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CDouble">CDouble</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CPtrdiff">CPtrdiff</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSize">CSize</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CWchar">CWchar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSigAtomic">CSigAtomic</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CClock">CClock</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CTime">CTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUSeconds">CUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSUSeconds">CSUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntPtr">CIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntPtr">CUIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntMax">CIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntMax">CUIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../time-1.4/Data-Time-Clock.html#t:NominalDiffTime">NominalDiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="../time-1.4/Data-Time-Clock.html#t:DiffTime">DiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Prelude.html#t:Num">Num</a> (<a href="Ratio.html#t:Ratio">Ratio</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFloat">RealFloat</a> a =&gt; <a href="Prelude.html#t:Num">Num</a> (<a href="Complex.html#t:Complex">Complex</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Prelude.html#t:Num">Num</a> a, <a href="Prelude.html#t:Ord">Ord</a> a) =&gt; <a name="t:Real" class="def">Real</a> a  <span class="keyword">where</span><a href="../base-4.5.1.0/src/GHC-Real.html#Real" class="link">Source</a></p><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:toRational" class="def">toRational</a> :: a -&gt; <a href="Prelude.html#t:Rational">Rational</a><a href="../base-4.5.1.0/src/GHC-Real.html#toRational" class="link">Source</a></p><div class="doc"><p>the rational equivalent of its real argument with full precision
</p></div></div><div class="subs instances"><p id="control.i:Real" class="caption collapser" onclick="toggleSection('i:Real')">Instances</p><div id="section.i:Real" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int8">Int8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int16">Int16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int32">Int32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int64">Int64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:WordPtr">WordPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:IntPtr">IntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CChar">CChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSChar">CSChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUChar">CUChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CShort">CShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUShort">CUShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CInt">CInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUInt">CUInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLong">CLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULong">CULong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLLong">CLLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULLong">CULLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CFloat">CFloat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CDouble">CDouble</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CPtrdiff">CPtrdiff</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSize">CSize</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CWchar">CWchar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSigAtomic">CSigAtomic</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CClock">CClock</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CTime">CTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUSeconds">CUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSUSeconds">CSUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntPtr">CIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntPtr">CUIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntMax">CIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntMax">CUIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../time-1.4/Data-Time-Clock.html#t:NominalDiffTime">NominalDiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="../time-1.4/Data-Time-Clock.html#t:DiffTime">DiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Prelude.html#t:Real">Real</a> (<a href="Ratio.html#t:Ratio">Ratio</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Prelude.html#t:Real">Real</a> a, <a href="Prelude.html#t:Enum">Enum</a> a) =&gt; <a name="t:Integral" class="def">Integral</a> a  <span class="keyword">where</span><a href="../base-4.5.1.0/src/GHC-Real.html#Integral" class="link">Source</a></p><div class="doc"><p>Integral numbers, supporting integer division.
</p><p>Minimal complete definition: <code><a href="Prelude.html#v:quotRem">quotRem</a></code> and <code><a href="Prelude.html#v:toInteger">toInteger</a></code>
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:quot" class="def">quot</a> :: a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Real.html#quot" class="link">Source</a></p><div class="doc"><p>integer division truncated toward zero
</p></div><p class="src"><a name="v:rem" class="def">rem</a> :: a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Real.html#rem" class="link">Source</a></p><div class="doc"><p>integer remainder, satisfying
</p><pre> (x `quot` y)*y + (x `rem` y) == x
</pre></div><p class="src"><a name="v:div" class="def">div</a> :: a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Real.html#div" class="link">Source</a></p><div class="doc"><p>integer division truncated toward negative infinity
</p></div><p class="src"><a name="v:mod" class="def">mod</a> :: a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Real.html#mod" class="link">Source</a></p><div class="doc"><p>integer modulus, satisfying
</p><pre> (x `div` y)*y + (x `mod` y) == x
</pre></div><p class="src"><a name="v:quotRem" class="def">quotRem</a> :: a -&gt; a -&gt; (a, a)<a href="../base-4.5.1.0/src/GHC-Real.html#quotRem" class="link">Source</a></p><div class="doc"><p>simultaneous <code><a href="Prelude.html#v:quot">quot</a></code> and <code><a href="Prelude.html#v:rem">rem</a></code>
</p></div><p class="src"><a name="v:divMod" class="def">divMod</a> :: a -&gt; a -&gt; (a, a)<a href="../base-4.5.1.0/src/GHC-Real.html#divMod" class="link">Source</a></p><div class="doc"><p>simultaneous <code><a href="Prelude.html#v:div">div</a></code> and <code><a href="Prelude.html#v:mod">mod</a></code>
</p></div><p class="src"><a name="v:toInteger" class="def">toInteger</a> :: a -&gt; <a href="Prelude.html#t:Integer">Integer</a><a href="../base-4.5.1.0/src/GHC-Real.html#toInteger" class="link">Source</a></p><div class="doc"><p>conversion to <code><a href="Prelude.html#t:Integer">Integer</a></code>
</p></div></div><div class="subs instances"><p id="control.i:Integral" class="caption collapser" onclick="toggleSection('i:Integral')">Instances</p><div id="section.i:Integral" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int8">Int8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int16">Int16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int32">Int32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int64">Int64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:WordPtr">WordPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:IntPtr">IntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CChar">CChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSChar">CSChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUChar">CUChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CShort">CShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUShort">CUShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CInt">CInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUInt">CUInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLong">CLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULong">CULong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLLong">CLLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULLong">CULLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CPtrdiff">CPtrdiff</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSize">CSize</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CWchar">CWchar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSigAtomic">CSigAtomic</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntPtr">CIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntPtr">CUIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntMax">CIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntMax">CUIntMax</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="Prelude.html#t:Num">Num</a> a =&gt; <a name="t:Fractional" class="def">Fractional</a> a  <span class="keyword">where</span><a href="../base-4.5.1.0/src/GHC-Real.html#Fractional" class="link">Source</a></p><div class="doc"><p>Fractional numbers, supporting real division.
</p><p>Minimal complete definition: <code><a href="Prelude.html#v:fromRational">fromRational</a></code> and (<code><a href="Prelude.html#v:recip">recip</a></code> or <code>(<code><a href="Prelude.html#v:-47-">/</a></code>)</code>)
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:-47-" class="def">(/)</a> :: a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Real.html#%2F" class="link">Source</a></p><div class="doc"><p>fractional division
</p></div><p class="src"><a name="v:recip" class="def">recip</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Real.html#recip" class="link">Source</a></p><div class="doc"><p>reciprocal fraction
</p></div><p class="src"><a name="v:fromRational" class="def">fromRational</a> :: <a href="Prelude.html#t:Rational">Rational</a> -&gt; a<a href="../base-4.5.1.0/src/GHC-Real.html#fromRational" class="link">Source</a></p><div class="doc"><p>Conversion from a <code><a href="Prelude.html#t:Rational">Rational</a></code> (that is <code><code><a href="Ratio.html#t:Ratio">Ratio</a></code> <code><a href="Prelude.html#t:Integer">Integer</a></code></code>).
 A floating literal stands for an application of <code><a href="Prelude.html#v:fromRational">fromRational</a></code>
 to a value of type <code><a href="Prelude.html#t:Rational">Rational</a></code>, so such literals have type
 <code>(<code><a href="Prelude.html#t:Fractional">Fractional</a></code> a) =&gt; a</code>.
</p></div></div><div class="subs instances"><p id="control.i:Fractional" class="caption collapser" onclick="toggleSection('i:Fractional')">Instances</p><div id="section.i:Fractional" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Fractional">Fractional</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Fractional">Fractional</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Fractional">Fractional</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CFloat">CFloat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Fractional">Fractional</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CDouble">CDouble</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Fractional">Fractional</a> <a href="../time-1.4/Data-Time-Clock.html#t:NominalDiffTime">NominalDiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Fractional">Fractional</a> <a href="../time-1.4/Data-Time-Clock.html#t:DiffTime">DiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Prelude.html#t:Fractional">Fractional</a> (<a href="Ratio.html#t:Ratio">Ratio</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFloat">RealFloat</a> a =&gt; <a href="Prelude.html#t:Fractional">Fractional</a> (<a href="Complex.html#t:Complex">Complex</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="Prelude.html#t:Fractional">Fractional</a> a =&gt; <a name="t:Floating" class="def">Floating</a> a  <span class="keyword">where</span><a href="../base-4.5.1.0/src/GHC-Float.html#Floating" class="link">Source</a></p><div class="doc"><p>Trigonometric and hyperbolic functions and related functions.
</p><p>Minimal complete definition:
      <code><a href="Prelude.html#v:pi">pi</a></code>, <code><a href="Prelude.html#v:exp">exp</a></code>, <code><a href="Prelude.html#v:log">log</a></code>, <code><a href="Prelude.html#v:sin">sin</a></code>, <code><a href="Prelude.html#v:cos">cos</a></code>, <code><a href="Prelude.html#v:sinh">sinh</a></code>, <code><a href="Prelude.html#v:cosh">cosh</a></code>,
      <code><a href="Prelude.html#v:asin">asin</a></code>, <code><a href="Prelude.html#v:acos">acos</a></code>, <code><a href="Prelude.html#v:atan">atan</a></code>, <code><a href="Prelude.html#v:asinh">asinh</a></code>, <code><a href="Prelude.html#v:acosh">acosh</a></code> and <code><a href="Prelude.html#v:atanh">atanh</a></code>
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:pi" class="def">pi</a> :: a<a href="../base-4.5.1.0/src/GHC-Float.html#pi" class="link">Source</a></p><p class="src"><a name="v:exp" class="def">exp</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#exp" class="link">Source</a></p><p class="src"><a name="v:sqrt" class="def">sqrt</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#sqrt" class="link">Source</a></p><p class="src"><a name="v:log" class="def">log</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#log" class="link">Source</a></p><p class="src"><a name="v:-42--42-" class="def">(**)</a> :: a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#%2A%2A" class="link">Source</a></p><p class="src"><a name="v:logBase" class="def">logBase</a> :: a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#logBase" class="link">Source</a></p><p class="src"><a name="v:sin" class="def">sin</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#sin" class="link">Source</a></p><p class="src"><a name="v:tan" class="def">tan</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#tan" class="link">Source</a></p><p class="src"><a name="v:cos" class="def">cos</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#cos" class="link">Source</a></p><p class="src"><a name="v:asin" class="def">asin</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#asin" class="link">Source</a></p><p class="src"><a name="v:atan" class="def">atan</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#atan" class="link">Source</a></p><p class="src"><a name="v:acos" class="def">acos</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#acos" class="link">Source</a></p><p class="src"><a name="v:sinh" class="def">sinh</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#sinh" class="link">Source</a></p><p class="src"><a name="v:tanh" class="def">tanh</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#tanh" class="link">Source</a></p><p class="src"><a name="v:cosh" class="def">cosh</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#cosh" class="link">Source</a></p><p class="src"><a name="v:asinh" class="def">asinh</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#asinh" class="link">Source</a></p><p class="src"><a name="v:atanh" class="def">atanh</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#atanh" class="link">Source</a></p><p class="src"><a name="v:acosh" class="def">acosh</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#acosh" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:Floating" class="caption collapser" onclick="toggleSection('i:Floating')">Instances</p><div id="section.i:Floating" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Floating">Floating</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Floating">Floating</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Floating">Floating</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CFloat">CFloat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Floating">Floating</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CDouble">CDouble</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFloat">RealFloat</a> a =&gt; <a href="Prelude.html#t:Floating">Floating</a> (<a href="Complex.html#t:Complex">Complex</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Prelude.html#t:Real">Real</a> a, <a href="Prelude.html#t:Fractional">Fractional</a> a) =&gt; <a name="t:RealFrac" class="def">RealFrac</a> a  <span class="keyword">where</span><a href="../base-4.5.1.0/src/GHC-Real.html#RealFrac" class="link">Source</a></p><div class="doc"><p>Extracting components of fractions.
</p><p>Minimal complete definition: <code><a href="Prelude.html#v:properFraction">properFraction</a></code>
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:properFraction" class="def">properFraction</a> :: <a href="Prelude.html#t:Integral">Integral</a> b =&gt; a -&gt; (b, a)<a href="../base-4.5.1.0/src/GHC-Real.html#properFraction" class="link">Source</a></p><div class="doc"><p>The function <code><a href="Prelude.html#v:properFraction">properFraction</a></code> takes a real fractional number <code>x</code>
 and returns a pair <code>(n,f)</code> such that <code>x = n+f</code>, and:
</p><ul><li> <code>n</code> is an integral number with the same sign as <code>x</code>; and
</li><li> <code>f</code> is a fraction with the same type and sign as <code>x</code>,
   and with absolute value less than <code>1</code>.
</li></ul><p>The default definitions of the <code><a href="Prelude.html#v:ceiling">ceiling</a></code>, <code><a href="Prelude.html#v:floor">floor</a></code>, <code><a href="Prelude.html#v:truncate">truncate</a></code>
 and <code><a href="Prelude.html#v:round">round</a></code> functions are in terms of <code><a href="Prelude.html#v:properFraction">properFraction</a></code>.
</p></div><p class="src"><a name="v:truncate" class="def">truncate</a> :: <a href="Prelude.html#t:Integral">Integral</a> b =&gt; a -&gt; b<a href="../base-4.5.1.0/src/GHC-Real.html#truncate" class="link">Source</a></p><div class="doc"><p><code><code><a href="Prelude.html#v:truncate">truncate</a></code> x</code> returns the integer nearest <code>x</code> between zero and <code>x</code>
</p></div><p class="src"><a name="v:round" class="def">round</a> :: <a href="Prelude.html#t:Integral">Integral</a> b =&gt; a -&gt; b<a href="../base-4.5.1.0/src/GHC-Real.html#round" class="link">Source</a></p><div class="doc"><p><code><code><a href="Prelude.html#v:round">round</a></code> x</code> returns the nearest integer to <code>x</code>;
   the even integer if <code>x</code> is equidistant between two integers
</p></div><p class="src"><a name="v:ceiling" class="def">ceiling</a> :: <a href="Prelude.html#t:Integral">Integral</a> b =&gt; a -&gt; b<a href="../base-4.5.1.0/src/GHC-Real.html#ceiling" class="link">Source</a></p><div class="doc"><p><code><code><a href="Prelude.html#v:ceiling">ceiling</a></code> x</code> returns the least integer not less than <code>x</code>
</p></div><p class="src"><a name="v:floor" class="def">floor</a> :: <a href="Prelude.html#t:Integral">Integral</a> b =&gt; a -&gt; b<a href="../base-4.5.1.0/src/GHC-Real.html#floor" class="link">Source</a></p><div class="doc"><p><code><code><a href="Prelude.html#v:floor">floor</a></code> x</code> returns the greatest integer not greater than <code>x</code>
</p></div></div><div class="subs instances"><p id="control.i:RealFrac" class="caption collapser" onclick="toggleSection('i:RealFrac')">Instances</p><div id="section.i:RealFrac" class="show"><table><tr><td class="src"><a href="Prelude.html#t:RealFrac">RealFrac</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFrac">RealFrac</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFrac">RealFrac</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CFloat">CFloat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFrac">RealFrac</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CDouble">CDouble</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFrac">RealFrac</a> <a href="../time-1.4/Data-Time-Clock.html#t:NominalDiffTime">NominalDiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFrac">RealFrac</a> <a href="../time-1.4/Data-Time-Clock.html#t:DiffTime">DiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Prelude.html#t:RealFrac">RealFrac</a> (<a href="Ratio.html#t:Ratio">Ratio</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Prelude.html#t:RealFrac">RealFrac</a> a, <a href="Prelude.html#t:Floating">Floating</a> a) =&gt; <a name="t:RealFloat" class="def">RealFloat</a> a  <span class="keyword">where</span><a href="../base-4.5.1.0/src/GHC-Float.html#RealFloat" class="link">Source</a></p><div class="doc"><p>Efficient, machine-independent access to the components of a
 floating-point number.
</p><p>Minimal complete definition:
      all except <code><a href="Prelude.html#v:exponent">exponent</a></code>, <code><a href="Prelude.html#v:significand">significand</a></code>, <code><a href="Prelude.html#v:scaleFloat">scaleFloat</a></code> and <code><a href="Prelude.html#v:atan2">atan2</a></code>
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:floatRadix" class="def">floatRadix</a> :: a -&gt; <a href="Prelude.html#t:Integer">Integer</a><a href="../base-4.5.1.0/src/GHC-Float.html#floatRadix" class="link">Source</a></p><div class="doc"><p>a constant function, returning the radix of the representation
 (often <code>2</code>)
</p></div><p class="src"><a name="v:floatDigits" class="def">floatDigits</a> :: a -&gt; <a href="Prelude.html#t:Int">Int</a><a href="../base-4.5.1.0/src/GHC-Float.html#floatDigits" class="link">Source</a></p><div class="doc"><p>a constant function, returning the number of digits of
 <code><a href="Prelude.html#v:floatRadix">floatRadix</a></code> in the significand
</p></div><p class="src"><a name="v:floatRange" class="def">floatRange</a> :: a -&gt; (<a href="Prelude.html#t:Int">Int</a>, <a href="Prelude.html#t:Int">Int</a>)<a href="../base-4.5.1.0/src/GHC-Float.html#floatRange" class="link">Source</a></p><div class="doc"><p>a constant function, returning the lowest and highest values
 the exponent may assume
</p></div><p class="src"><a name="v:decodeFloat" class="def">decodeFloat</a> :: a -&gt; (<a href="Prelude.html#t:Integer">Integer</a>, <a href="Prelude.html#t:Int">Int</a>)<a href="../base-4.5.1.0/src/GHC-Float.html#decodeFloat" class="link">Source</a></p><div class="doc"><p>The function <code><a href="Prelude.html#v:decodeFloat">decodeFloat</a></code> applied to a real floating-point
 number returns the significand expressed as an <code><a href="Prelude.html#t:Integer">Integer</a></code> and an
 appropriately scaled exponent (an <code><a href="Prelude.html#t:Int">Int</a></code>).  If <code><code><a href="Prelude.html#v:decodeFloat">decodeFloat</a></code> x</code>
 yields <code>(m,n)</code>, then <code>x</code> is equal in value to <code>m*b^^n</code>, where <code>b</code>
 is the floating-point radix, and furthermore, either <code>m</code> and <code>n</code>
 are both zero or else <code>b^(d-1) &lt;= <code><a href="Prelude.html#v:abs">abs</a></code> m &lt; b^d</code>, where <code>d</code> is
 the value of <code><code><a href="Prelude.html#v:floatDigits">floatDigits</a></code> x</code>.
 In particular, <code><code><a href="Prelude.html#v:decodeFloat">decodeFloat</a></code> 0 = (0,0)</code>. If the type
 contains a negative zero, also <code><code><a href="Prelude.html#v:decodeFloat">decodeFloat</a></code> (-0.0) = (0,0)</code>.
 <em>The result of</em> <code><code><a href="Prelude.html#v:decodeFloat">decodeFloat</a></code> x</code> <em>is unspecified if either of</em>
 <code><code><a href="Prelude.html#v:isNaN">isNaN</a></code> x</code> <em>or</em> <code><code><a href="Prelude.html#v:isInfinite">isInfinite</a></code> x</code> <em>is</em> <code><a href="Prelude.html#v:True">True</a></code>.
</p></div><p class="src"><a name="v:encodeFloat" class="def">encodeFloat</a> :: <a href="Prelude.html#t:Integer">Integer</a> -&gt; <a href="Prelude.html#t:Int">Int</a> -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#encodeFloat" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:encodeFloat">encodeFloat</a></code> performs the inverse of <code><a href="Prelude.html#v:decodeFloat">decodeFloat</a></code> in the
 sense that for finite <code>x</code> with the exception of <code>-0.0</code>,
 <code><code>uncurry</code> <code><a href="Prelude.html#v:encodeFloat">encodeFloat</a></code> (<code><a href="Prelude.html#v:decodeFloat">decodeFloat</a></code> x) = x</code>.
 <code><code><a href="Prelude.html#v:encodeFloat">encodeFloat</a></code> m n</code> is one of the two closest representable
 floating-point numbers to <code>m*b^^n</code> (or <code>&#177;Infinity</code> if overflow
 occurs); usually the closer, but if <code>m</code> contains too many bits,
 the result may be rounded in the wrong direction.
</p></div><p class="src"><a name="v:exponent" class="def">exponent</a> :: a -&gt; <a href="Prelude.html#t:Int">Int</a><a href="../base-4.5.1.0/src/GHC-Float.html#exponent" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:exponent">exponent</a></code> corresponds to the second component of <code><a href="Prelude.html#v:decodeFloat">decodeFloat</a></code>.
 <code><code><a href="Prelude.html#v:exponent">exponent</a></code> 0 = 0</code> and for finite nonzero <code>x</code>,
 <code><code><a href="Prelude.html#v:exponent">exponent</a></code> x = snd (<code><a href="Prelude.html#v:decodeFloat">decodeFloat</a></code> x) + <code><a href="Prelude.html#v:floatDigits">floatDigits</a></code> x</code>.
 If <code>x</code> is a finite floating-point number, it is equal in value to
 <code><code><a href="Prelude.html#v:significand">significand</a></code> x * b ^^ <code><a href="Prelude.html#v:exponent">exponent</a></code> x</code>, where <code>b</code> is the
 floating-point radix.
 The behaviour is unspecified on infinite or <code>NaN</code> values.
</p></div><p class="src"><a name="v:significand" class="def">significand</a> :: a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#significand" class="link">Source</a></p><div class="doc"><p>The first component of <code><a href="Prelude.html#v:decodeFloat">decodeFloat</a></code>, scaled to lie in the open
 interval (<code>-1</code>,<code>1</code>), either <code>0.0</code> or of absolute value <code>&gt;= 1/b</code>,
 where <code>b</code> is the floating-point radix.
 The behaviour is unspecified on infinite or <code>NaN</code> values.
</p></div><p class="src"><a name="v:scaleFloat" class="def">scaleFloat</a> :: <a href="Prelude.html#t:Int">Int</a> -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#scaleFloat" class="link">Source</a></p><div class="doc"><p>multiplies a floating-point number by an integer power of the radix
</p></div><p class="src"><a name="v:isNaN" class="def">isNaN</a> :: a -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-Float.html#isNaN" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:True">True</a></code> if the argument is an IEEE &quot;not-a-number&quot; (NaN) value
</p></div><p class="src"><a name="v:isInfinite" class="def">isInfinite</a> :: a -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-Float.html#isInfinite" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:True">True</a></code> if the argument is an IEEE infinity or negative infinity
</p></div><p class="src"><a name="v:isDenormalized" class="def">isDenormalized</a> :: a -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-Float.html#isDenormalized" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:True">True</a></code> if the argument is too small to be represented in
 normalized format
</p></div><p class="src"><a name="v:isNegativeZero" class="def">isNegativeZero</a> :: a -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-Float.html#isNegativeZero" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:True">True</a></code> if the argument is an IEEE negative zero
</p></div><p class="src"><a name="v:isIEEE" class="def">isIEEE</a> :: a -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-Float.html#isIEEE" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:True">True</a></code> if the argument is an IEEE floating point number
</p></div><p class="src"><a name="v:atan2" class="def">atan2</a> :: a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Float.html#atan2" class="link">Source</a></p><div class="doc"><p>a version of arctangent taking two real floating-point arguments.
 For real floating <code>x</code> and <code>y</code>, <code><code><a href="Prelude.html#v:atan2">atan2</a></code> y x</code> computes the angle
 (from the positive x-axis) of the vector from the origin to the
 point <code>(x,y)</code>.  <code><code><a href="Prelude.html#v:atan2">atan2</a></code> y x</code> returns a value in the range [<code>-pi</code>,
 <code>pi</code>].  It follows the Common Lisp semantics for the origin when
 signed zeroes are supported.  <code><code><a href="Prelude.html#v:atan2">atan2</a></code> y 1</code>, with <code>y</code> in a type
 that is <code><a href="Prelude.html#t:RealFloat">RealFloat</a></code>, should return the same value as <code><code><a href="Prelude.html#v:atan">atan</a></code> y</code>.
 A default definition of <code><a href="Prelude.html#v:atan2">atan2</a></code> is provided, but implementors
 can provide a more accurate implementation.
</p></div></div><div class="subs instances"><p id="control.i:RealFloat" class="caption collapser" onclick="toggleSection('i:RealFloat')">Instances</p><div id="section.i:RealFloat" class="show"><table><tr><td class="src"><a href="Prelude.html#t:RealFloat">RealFloat</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFloat">RealFloat</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFloat">RealFloat</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CFloat">CFloat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:RealFloat">RealFloat</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CDouble">CDouble</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h3 id="g:8">Numeric functions
</h3><div class="top"><p class="src"><a name="v:subtract" class="def">subtract</a> :: <a href="Prelude.html#t:Num">Num</a> a =&gt; a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Num.html#subtract" class="link">Source</a></p><div class="doc"><p>the same as <code><code><a href="Prelude.html#v:flip">flip</a></code> (<code><a href="Prelude.html#v:-45-">-</a></code>)</code>.
</p><p>Because <code>-</code> is treated specially in the Haskell grammar,
 <code>(-</code> <em>e</em><code>)</code> is not a section, but an application of prefix negation.
 However, <code>(<code><a href="Prelude.html#v:subtract">subtract</a></code></code> <em>exp</em><code>)</code> is equivalent to the disallowed section.
</p></div></div><div class="top"><p class="src"><a name="v:even" class="def">even</a> :: <a href="Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-Real.html#even" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:odd" class="def">odd</a> :: <a href="Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-Real.html#odd" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:gcd" class="def">gcd</a> :: <a href="Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; a -&gt; a</p><div class="doc"><p><code><code><a href="Prelude.html#v:gcd">gcd</a></code> x y</code> is the greatest (positive) integer that divides both <code>x</code>
 and <code>y</code>; for example <code><code><a href="Prelude.html#v:gcd">gcd</a></code> (-3) 6</code> = <code>3</code>, <code><code><a href="Prelude.html#v:gcd">gcd</a></code> (-3) (-6)</code> = <code>3</code>,
 <code><code><a href="Prelude.html#v:gcd">gcd</a></code> 0 4</code> = <code>4</code>.  <code><code><a href="Prelude.html#v:gcd">gcd</a></code> 0 0</code> raises a runtime error.
</p></div></div><div class="top"><p class="src"><a name="v:lcm" class="def">lcm</a> :: <a href="Prelude.html#t:Integral">Integral</a> a =&gt; a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Real.html#lcm" class="link">Source</a></p><div class="doc"><p><code><code><a href="Prelude.html#v:lcm">lcm</a></code> x y</code> is the smallest positive integer that both <code>x</code> and <code>y</code> divide.
</p></div></div><div class="top"><p class="src"><a name="v:-94-" class="def">(^)</a> :: (<a href="Prelude.html#t:Num">Num</a> a, <a href="Prelude.html#t:Integral">Integral</a> b) =&gt; a -&gt; b -&gt; a<a href="../base-4.5.1.0/src/GHC-Real.html#%5E" class="link">Source</a></p><div class="doc"><p>raise a number to a non-negative integral power
</p></div></div><div class="top"><p class="src"><a name="v:-94--94-" class="def">(^^)</a> :: (<a href="Prelude.html#t:Fractional">Fractional</a> a, <a href="Prelude.html#t:Integral">Integral</a> b) =&gt; a -&gt; b -&gt; a<a href="../base-4.5.1.0/src/GHC-Real.html#%5E%5E" class="link">Source</a></p><div class="doc"><p>raise a number to an integral power
</p></div></div><div class="top"><p class="src"><a name="v:fromIntegral" class="def">fromIntegral</a> :: (<a href="Prelude.html#t:Integral">Integral</a> a, <a href="Prelude.html#t:Num">Num</a> b) =&gt; a -&gt; b<a href="../base-4.5.1.0/src/GHC-Real.html#fromIntegral" class="link">Source</a></p><div class="doc"><p>general coercion from integral types
</p></div></div><div class="top"><p class="src"><a name="v:realToFrac" class="def">realToFrac</a> :: (<a href="Prelude.html#t:Real">Real</a> a, <a href="Prelude.html#t:Fractional">Fractional</a> b) =&gt; a -&gt; b<a href="../base-4.5.1.0/src/GHC-Real.html#realToFrac" class="link">Source</a></p><div class="doc"><p>general coercion to fractional types
</p></div></div><h2 id="g:9">Monads and functors
</h2><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Monad" class="def">Monad</a> m  <span class="keyword">where</span><a href="../base-4.5.1.0/src/GHC-Base.html#Monad" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#t:Monad">Monad</a></code> class defines the basic operations over a <em>monad</em>,
a concept from a branch of mathematics known as <em>category theory</em>.
From the perspective of a Haskell programmer, however, it is best to
think of a monad as an <em>abstract datatype</em> of actions.
Haskell's <code>do</code> expressions provide a convenient syntax for writing
monadic expressions.
</p><p>Minimal complete definition: <code><a href="Prelude.html#v:-62--62--61-">&gt;&gt;=</a></code> and <code><a href="Prelude.html#v:return">return</a></code>.
</p><p>Instances of <code><a href="Prelude.html#t:Monad">Monad</a></code> should satisfy the following laws:
</p><pre> return a &gt;&gt;= k  ==  k a
 m &gt;&gt;= return  ==  m
 m &gt;&gt;= (\x -&gt; k x &gt;&gt;= h)  ==  (m &gt;&gt;= k) &gt;&gt;= h
</pre><p>Instances of both <code><a href="Prelude.html#t:Monad">Monad</a></code> and <code><a href="Prelude.html#t:Functor">Functor</a></code> should additionally satisfy the law:
</p><pre> fmap f xs  ==  xs &gt;&gt;= return . f
</pre><p>The instances of <code><a href="Prelude.html#t:Monad">Monad</a></code> for lists, <code><a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a></code> and <code><a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a></code>
defined in the <a href="../base-4.5.1.0/Prelude.html">Prelude</a> satisfy these laws.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:-62--62--61-" class="def">(&gt;&gt;=)</a> ::  m a -&gt; (a -&gt; m b) -&gt; m b<a href="../base-4.5.1.0/src/GHC-Base.html#%3E%3E%3D" class="link">Source</a></p><div class="doc"><p>Sequentially compose two actions, passing any value produced
 by the first as an argument to the second.
</p></div><p class="src"><a name="v:-62--62-" class="def">(&gt;&gt;)</a> ::  m a -&gt; m b -&gt; m b<a href="../base-4.5.1.0/src/GHC-Base.html#%3E%3E" class="link">Source</a></p><div class="doc"><p>Sequentially compose two actions, discarding any value produced
 by the first, like sequencing operators (such as the semicolon)
 in imperative languages.
</p></div><p class="src"><a name="v:return" class="def">return</a> ::  a -&gt; m a<a href="../base-4.5.1.0/src/GHC-Base.html#return" class="link">Source</a></p><div class="doc"><p>Inject a value into the monadic type.
</p></div><p class="src"><a name="v:fail" class="def">fail</a> ::  <a href="Prelude.html#t:String">String</a> -&gt; m a<a href="../base-4.5.1.0/src/GHC-Base.html#fail" class="link">Source</a></p><div class="doc"><p>Fail with a message.  This operation is not part of the
 mathematical definition of a monad, but is invoked on pattern-match
 failure in a <code>do</code> expression.
</p></div></div><div class="subs instances"><p id="control.i:Monad" class="caption collapser" onclick="toggleSection('i:Monad')">Instances</p><div id="section.i:Monad" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Monad">Monad</a> []</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Monad">Monad</a> <a href="Prelude.html#t:IO">IO</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Monad">Monad</a> P</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Monad">Monad</a> <a href="../base-4.5.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Monad">Monad</a> <a href="../base-4.5.1.0/Text-ParserCombinators-ReadP.html#t:ReadP">ReadP</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Monad">Monad</a> <a href="Prelude.html#t:Maybe">Maybe</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Functor" class="def">Functor</a> f  <span class="keyword">where</span><a href="../base-4.5.1.0/src/GHC-Base.html#Functor" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#t:Functor">Functor</a></code> class is used for types that can be mapped over.
Instances of <code><a href="Prelude.html#t:Functor">Functor</a></code> should satisfy the following laws:
</p><pre> fmap id  ==  id
 fmap (f . g)  ==  fmap f . fmap g
</pre><p>The instances of <code><a href="Prelude.html#t:Functor">Functor</a></code> for lists, <code><a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a></code> and <code><a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a></code>
satisfy these laws.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:fmap" class="def">fmap</a> ::  (a -&gt; b) -&gt; f a -&gt; f b<a href="../base-4.5.1.0/src/GHC-Base.html#fmap" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:Functor" class="caption collapser" onclick="toggleSection('i:Functor')">Instances</p><div id="section.i:Functor" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Functor">Functor</a> []</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Functor">Functor</a> <a href="Prelude.html#t:IO">IO</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Functor">Functor</a> <a href="../base-4.5.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Functor">Functor</a> <a href="../base-4.5.1.0/Text-ParserCombinators-ReadP.html#t:ReadP">ReadP</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Functor">Functor</a> <a href="Prelude.html#t:Maybe">Maybe</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Ix.html#t:Ix">Ix</a> i =&gt; <a href="Prelude.html#t:Functor">Functor</a> (<a href="Array.html#t:Array">Array</a> i)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:mapM" class="def">mapM</a> :: <a href="Prelude.html#t:Monad">Monad</a> m =&gt; (a -&gt; m b) -&gt; [a] -&gt; m [b]<a href="../base-4.5.1.0/src/Control-Monad.html#mapM" class="link">Source</a></p><div class="doc"><p><code><code><a href="Prelude.html#v:mapM">mapM</a></code> f</code> is equivalent to <code><code><a href="Prelude.html#v:sequence">sequence</a></code> . <code><a href="Prelude.html#v:map">map</a></code> f</code>.
</p></div></div><div class="top"><p class="src"><a name="v:mapM_" class="def">mapM_</a> :: <a href="Prelude.html#t:Monad">Monad</a> m =&gt; (a -&gt; m b) -&gt; [a] -&gt; m ()<a href="../base-4.5.1.0/src/Control-Monad.html#mapM_" class="link">Source</a></p><div class="doc"><p><code><code><a href="Prelude.html#v:mapM_">mapM_</a></code> f</code> is equivalent to <code><code><a href="Prelude.html#v:sequence_">sequence_</a></code> . <code><a href="Prelude.html#v:map">map</a></code> f</code>.
</p></div></div><div class="top"><p class="src"><a name="v:sequence" class="def">sequence</a> :: <a href="Prelude.html#t:Monad">Monad</a> m =&gt; [m a] -&gt; m [a]<a href="../base-4.5.1.0/src/Control-Monad.html#sequence" class="link">Source</a></p><div class="doc"><p>Evaluate each action in the sequence from left to right,
 and collect the results.
</p></div></div><div class="top"><p class="src"><a name="v:sequence_" class="def">sequence_</a> :: <a href="Prelude.html#t:Monad">Monad</a> m =&gt; [m a] -&gt; m ()<a href="../base-4.5.1.0/src/Control-Monad.html#sequence_" class="link">Source</a></p><div class="doc"><p>Evaluate each action in the sequence from left to right,
 and ignore the results.
</p></div></div><div class="top"><p class="src"><a name="v:-61--60--60-" class="def">(=&lt;&lt;)</a> :: <a href="Prelude.html#t:Monad">Monad</a> m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b<a href="../base-4.5.1.0/src/Control-Monad.html#%3D%3C%3C" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Prelude.html#v:-62--62--61-">&gt;&gt;=</a></code>, but with the arguments interchanged.
</p></div></div><h2 id="g:10">Miscellaneous functions
</h2><div class="top"><p class="src"><a name="v:id" class="def">id</a> ::  a -&gt; a<a href="../base-4.5.1.0/src/GHC-Base.html#id" class="link">Source</a></p><div class="doc"><p>Identity function.
</p></div></div><div class="top"><p class="src"><a name="v:const" class="def">const</a> ::  a -&gt; b -&gt; a<a href="../base-4.5.1.0/src/GHC-Base.html#const" class="link">Source</a></p><div class="doc"><p>Constant function.
</p></div></div><div class="top"><p class="src"><a name="v:." class="def">(.)</a> ::  (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c<a href="../base-4.5.1.0/src/GHC-Base.html#." class="link">Source</a></p><div class="doc"><p>Function composition.
</p></div></div><div class="top"><p class="src"><a name="v:flip" class="def">flip</a> ::  (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c<a href="../base-4.5.1.0/src/GHC-Base.html#flip" class="link">Source</a></p><div class="doc"><p><code><code><a href="Prelude.html#v:flip">flip</a></code> f</code> takes its (first) two arguments in the reverse order of <code>f</code>.
</p></div></div><div class="top"><p class="src"><a name="v:-36-" class="def">($)</a> ::  (a -&gt; b) -&gt; a -&gt; b<a href="../base-4.5.1.0/src/GHC-Base.html#%24" class="link">Source</a></p><div class="doc"><p>Application operator.  This operator is redundant, since ordinary
 application <code>(f x)</code> means the same as <code>(f <code><a href="Prelude.html#v:-36-">$</a></code> x)</code>. However, <code><a href="Prelude.html#v:-36-">$</a></code> has
 low, right-associative binding precedence, so it sometimes allows
 parentheses to be omitted; for example:
</p><pre>     f $ g $ h x  =  f (g (h x))
</pre><p>It is also useful in higher-order situations, such as <code><code><a href="Prelude.html#v:map">map</a></code> (<code><a href="Prelude.html#v:-36-">$</a></code> 0) xs</code>,
 or <code><code><a href="../base-4.5.1.0/Data-List.html#v:zipWith">zipWith</a></code> (<code><a href="Prelude.html#v:-36-">$</a></code>) fs xs</code>.
</p></div></div><div class="top"><p class="src"><a name="v:until" class="def">until</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; (a -&gt; a) -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Base.html#until" class="link">Source</a></p><div class="doc"><p><code><code><a href="Prelude.html#v:until">until</a></code> p f</code> yields the result of applying <code>f</code> until <code>p</code> holds.
</p></div></div><div class="top"><p class="src"><a name="v:asTypeOf" class="def">asTypeOf</a> ::  a -&gt; a -&gt; a<a href="../base-4.5.1.0/src/GHC-Base.html#asTypeOf" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:asTypeOf">asTypeOf</a></code> is a type-restricted version of <code><a href="Prelude.html#v:const">const</a></code>.  It is usually
 used as an infix operator, and its typing forces its first argument
 (which is usually overloaded) to have the same type as the second.
</p></div></div><div class="top"><p class="src"><a name="v:error" class="def">error</a> ::  [<a href="Prelude.html#t:Char">Char</a>] -&gt; a<a href="../base-4.5.1.0/src/GHC-Err.html#error" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:error">error</a></code> stops execution and displays an error message.
</p></div></div><div class="top"><p class="src"><a name="v:undefined" class="def">undefined</a> ::  a<a href="../base-4.5.1.0/src/GHC-Err.html#undefined" class="link">Source</a></p><div class="doc"><p>A special case of <code><a href="Prelude.html#v:error">error</a></code>.
 It is expected that compilers will recognize this and insert error
 messages which are more appropriate to the context in which <code><a href="Prelude.html#v:undefined">undefined</a></code>
 appears. 
</p></div></div><div class="top"><p class="src"><a name="v:seq" class="def">seq</a> ::  a -&gt; b -&gt; b</p></div><div class="top"><p class="src"><a name="v:-36--33-" class="def">($!)</a> ::  (a -&gt; b) -&gt; a -&gt; b</p><div class="doc"><p>Strict (call-by-value) application, defined in terms of <code><a href="Prelude.html#v:seq">seq</a></code>.
</p></div></div><h1 id="g:11">List operations
</h1><div class="top"><p class="src"><a name="v:map" class="def">map</a> ::  (a -&gt; b) -&gt; [a] -&gt; [b]<a href="../base-4.5.1.0/src/GHC-Base.html#map" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:map">map</a></code> <code>f xs</code> is the list obtained by applying <code>f</code> to each element
 of <code>xs</code>, i.e.,
</p><pre> map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
 map f [x1, x2, ...] == [f x1, f x2, ...]
</pre></div></div><div class="top"><p class="src"><a name="v:-43--43-" class="def">(++)</a> ::  [a] -&gt; [a] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-Base.html#%2B%2B" class="link">Source</a></p><div class="doc"><p>Append two lists, i.e.,
</p><pre> [x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
 [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
</pre><p>If the first list is not finite, the result is the first list.
</p></div></div><div class="top"><p class="src"><a name="v:filter" class="def">filter</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#filter" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:filter">filter</a></code>, applied to a predicate and a list, returns the list of
 those elements that satisfy the predicate; i.e.,
</p><pre> filter p xs = [ x | x &lt;- xs, p x]
</pre></div></div><div class="top"><p class="src"><a name="v:head" class="def">head</a> ::  [a] -&gt; a<a href="../base-4.5.1.0/src/GHC-List.html#head" class="link">Source</a></p><div class="doc"><p>Extract the first element of a list, which must be non-empty.
</p></div></div><div class="top"><p class="src"><a name="v:last" class="def">last</a> ::  [a] -&gt; a<a href="../base-4.5.1.0/src/GHC-List.html#last" class="link">Source</a></p><div class="doc"><p>Extract the last element of a list, which must be finite and non-empty.
</p></div></div><div class="top"><p class="src"><a name="v:tail" class="def">tail</a> ::  [a] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#tail" class="link">Source</a></p><div class="doc"><p>Extract the elements after the head of a list, which must be non-empty.
</p></div></div><div class="top"><p class="src"><a name="v:init" class="def">init</a> ::  [a] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#init" class="link">Source</a></p><div class="doc"><p>Return all the elements of a list except the last one.
 The list must be non-empty.
</p></div></div><div class="top"><p class="src"><a name="v:null" class="def">null</a> ::  [a] -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-List.html#null" class="link">Source</a></p><div class="doc"><p>Test whether a list is empty.
</p></div></div><div class="top"><p class="src"><a name="v:length" class="def">length</a> ::  [a] -&gt; <a href="Prelude.html#t:Int">Int</a><a href="../base-4.5.1.0/src/GHC-List.html#length" class="link">Source</a></p><div class="doc"><p><em>O(n)</em>. <code><a href="Prelude.html#v:length">length</a></code> returns the length of a finite list as an <code><a href="Prelude.html#t:Int">Int</a></code>.
 It is an instance of the more general <code><a href="../base-4.5.1.0/Data-List.html#v:genericLength">genericLength</a></code>,
 the result type of which may be any kind of number.
</p></div></div><div class="top"><p class="src"><a name="v:-33--33-" class="def">(!!)</a> ::  [a] -&gt; <a href="Prelude.html#t:Int">Int</a> -&gt; a<a href="../base-4.5.1.0/src/GHC-List.html#%21%21" class="link">Source</a></p><div class="doc"><p>List index (subscript) operator, starting from 0.
 It is an instance of the more general <code><a href="../base-4.5.1.0/Data-List.html#v:genericIndex">genericIndex</a></code>,
 which takes an index of any integral type.
</p></div></div><div class="top"><p class="src"><a name="v:reverse" class="def">reverse</a> ::  [a] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#reverse" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:reverse">reverse</a></code> <code>xs</code> returns the elements of <code>xs</code> in reverse order.
 <code>xs</code> must be finite.
</p></div></div><h2 id="g:12">Reducing lists (folds)
</h2><div class="top"><p class="src"><a name="v:foldl" class="def">foldl</a> ::  (a -&gt; b -&gt; a) -&gt; a -&gt; [b] -&gt; a<a href="../base-4.5.1.0/src/GHC-List.html#foldl" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:foldl">foldl</a></code>, applied to a binary operator, a starting value (typically
 the left-identity of the operator), and a list, reduces the list
 using the binary operator, from left to right:
</p><pre> foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn
</pre><p>The list must be finite.
</p></div></div><div class="top"><p class="src"><a name="v:foldl1" class="def">foldl1</a> ::  (a -&gt; a -&gt; a) -&gt; [a] -&gt; a<a href="../base-4.5.1.0/src/Data-List.html#foldl1" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:foldl1">foldl1</a></code> is a variant of <code><a href="Prelude.html#v:foldl">foldl</a></code> that has no starting value argument,
 and thus must be applied to non-empty lists.
</p></div></div><div class="top"><p class="src"><a name="v:foldr" class="def">foldr</a> ::  (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; b<a href="../base-4.5.1.0/src/GHC-Base.html#foldr" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:foldr">foldr</a></code>, applied to a binary operator, a starting value (typically
 the right-identity of the operator), and a list, reduces the list
 using the binary operator, from right to left:
</p><pre> foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)
</pre></div></div><div class="top"><p class="src"><a name="v:foldr1" class="def">foldr1</a> ::  (a -&gt; a -&gt; a) -&gt; [a] -&gt; a<a href="../base-4.5.1.0/src/GHC-List.html#foldr1" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:foldr1">foldr1</a></code> is a variant of <code><a href="Prelude.html#v:foldr">foldr</a></code> that has no starting value argument,
 and thus must be applied to non-empty lists.
</p></div></div><h3 id="g:13">Special folds
</h3><div class="top"><p class="src"><a name="v:and" class="def">and</a> :: [<a href="Prelude.html#t:Bool">Bool</a>] -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-List.html#and" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:and">and</a></code> returns the conjunction of a Boolean list.  For the result to be
 <code><a href="Prelude.html#v:True">True</a></code>, the list must be finite; <code><a href="Prelude.html#v:False">False</a></code>, however, results from a <code><a href="Prelude.html#v:False">False</a></code>
 value at a finite index of a finite or infinite list.
</p></div></div><div class="top"><p class="src"><a name="v:or" class="def">or</a> :: [<a href="Prelude.html#t:Bool">Bool</a>] -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-List.html#or" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:or">or</a></code> returns the disjunction of a Boolean list.  For the result to be
 <code><a href="Prelude.html#v:False">False</a></code>, the list must be finite; <code><a href="Prelude.html#v:True">True</a></code>, however, results from a <code><a href="Prelude.html#v:True">True</a></code>
 value at a finite index of a finite or infinite list.
</p></div></div><div class="top"><p class="src"><a name="v:any" class="def">any</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-List.html#any" class="link">Source</a></p><div class="doc"><p>Applied to a predicate and a list, <code><a href="Prelude.html#v:any">any</a></code> determines if any element
 of the list satisfies the predicate.  For the result to be
 <code><a href="Prelude.html#v:False">False</a></code>, the list must be finite; <code><a href="Prelude.html#v:True">True</a></code>, however, results from a <code><a href="Prelude.html#v:True">True</a></code>
 value for the predicate applied to an element at a finite index of a finite or infinite list.
</p></div></div><div class="top"><p class="src"><a name="v:all" class="def">all</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-List.html#all" class="link">Source</a></p><div class="doc"><p>Applied to a predicate and a list, <code><a href="Prelude.html#v:all">all</a></code> determines if all elements
 of the list satisfy the predicate. For the result to be
 <code><a href="Prelude.html#v:True">True</a></code>, the list must be finite; <code><a href="Prelude.html#v:False">False</a></code>, however, results from a <code><a href="Prelude.html#v:False">False</a></code>
 value for the predicate applied to an element at a finite index of a finite or infinite list.
</p></div></div><div class="top"><p class="src"><a name="v:sum" class="def">sum</a> :: <a href="Prelude.html#t:Num">Num</a> a =&gt; [a] -&gt; a<a href="../base-4.5.1.0/src/Data-List.html#sum" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#v:sum">sum</a></code> function computes the sum of a finite list of numbers.
</p></div></div><div class="top"><p class="src"><a name="v:product" class="def">product</a> :: <a href="Prelude.html#t:Num">Num</a> a =&gt; [a] -&gt; a<a href="../base-4.5.1.0/src/Data-List.html#product" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#v:product">product</a></code> function computes the product of a finite list of numbers.
</p></div></div><div class="top"><p class="src"><a name="v:concat" class="def">concat</a> ::  [[a]] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#concat" class="link">Source</a></p><div class="doc"><p>Concatenate a list of lists.
</p></div></div><div class="top"><p class="src"><a name="v:concatMap" class="def">concatMap</a> ::  (a -&gt; [b]) -&gt; [a] -&gt; [b]<a href="../base-4.5.1.0/src/GHC-List.html#concatMap" class="link">Source</a></p><div class="doc"><p>Map a function over a list and concatenate the results.
</p></div></div><div class="top"><p class="src"><a name="v:maximum" class="def">maximum</a> :: <a href="Prelude.html#t:Ord">Ord</a> a =&gt; [a] -&gt; a<a href="../base-4.5.1.0/src/Data-List.html#maximum" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:maximum">maximum</a></code> returns the maximum value from a list,
 which must be non-empty, finite, and of an ordered type.
 It is a special case of <code><a href="List.html#v:maximumBy">maximumBy</a></code>, which allows the
 programmer to supply their own comparison function.
</p></div></div><div class="top"><p class="src"><a name="v:minimum" class="def">minimum</a> :: <a href="Prelude.html#t:Ord">Ord</a> a =&gt; [a] -&gt; a<a href="../base-4.5.1.0/src/Data-List.html#minimum" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:minimum">minimum</a></code> returns the minimum value from a list,
 which must be non-empty, finite, and of an ordered type.
 It is a special case of <code><a href="List.html#v:minimumBy">minimumBy</a></code>, which allows the
 programmer to supply their own comparison function.
</p></div></div><h2 id="g:14">Building lists
</h2><h3 id="g:15">Scans
</h3><div class="top"><p class="src"><a name="v:scanl" class="def">scanl</a> ::  (a -&gt; b -&gt; a) -&gt; a -&gt; [b] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#scanl" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:scanl">scanl</a></code> is similar to <code><a href="Prelude.html#v:foldl">foldl</a></code>, but returns a list of successive
 reduced values from the left:
</p><pre> scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]
</pre><p>Note that
</p><pre> last (scanl f z xs) == foldl f z xs.
</pre></div></div><div class="top"><p class="src"><a name="v:scanl1" class="def">scanl1</a> ::  (a -&gt; a -&gt; a) -&gt; [a] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#scanl1" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:scanl1">scanl1</a></code> is a variant of <code><a href="Prelude.html#v:scanl">scanl</a></code> that has no starting value argument:
</p><pre> scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]
</pre></div></div><div class="top"><p class="src"><a name="v:scanr" class="def">scanr</a> ::  (a -&gt; b -&gt; b) -&gt; b -&gt; [a] -&gt; [b]<a href="../base-4.5.1.0/src/GHC-List.html#scanr" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:scanr">scanr</a></code> is the right-to-left dual of <code><a href="Prelude.html#v:scanl">scanl</a></code>.
 Note that
</p><pre> head (scanr f z xs) == foldr f z xs.
</pre></div></div><div class="top"><p class="src"><a name="v:scanr1" class="def">scanr1</a> ::  (a -&gt; a -&gt; a) -&gt; [a] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#scanr1" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:scanr1">scanr1</a></code> is a variant of <code><a href="Prelude.html#v:scanr">scanr</a></code> that has no starting value argument.
</p></div></div><h3 id="g:16">Infinite lists
</h3><div class="top"><p class="src"><a name="v:iterate" class="def">iterate</a> ::  (a -&gt; a) -&gt; a -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#iterate" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:iterate">iterate</a></code> <code>f x</code> returns an infinite list of repeated applications
 of <code>f</code> to <code>x</code>:
</p><pre> iterate f x == [x, f x, f (f x), ...]
</pre></div></div><div class="top"><p class="src"><a name="v:repeat" class="def">repeat</a> ::  a -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#repeat" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:repeat">repeat</a></code> <code>x</code> is an infinite list, with <code>x</code> the value of every element.
</p></div></div><div class="top"><p class="src"><a name="v:replicate" class="def">replicate</a> ::  <a href="Prelude.html#t:Int">Int</a> -&gt; a -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#replicate" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:replicate">replicate</a></code> <code>n x</code> is a list of length <code>n</code> with <code>x</code> the value of
 every element.
 It is an instance of the more general <code><a href="../base-4.5.1.0/Data-List.html#v:genericReplicate">genericReplicate</a></code>,
 in which <code>n</code> may be of any integral type.
</p></div></div><div class="top"><p class="src"><a name="v:cycle" class="def">cycle</a> ::  [a] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#cycle" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:cycle">cycle</a></code> ties a finite list into a circular one, or equivalently,
 the infinite repetition of the original list.  It is the identity
 on infinite lists.
</p></div></div><h2 id="g:17">Sublists
</h2><div class="top"><p class="src"><a name="v:take" class="def">take</a> ::  <a href="Prelude.html#t:Int">Int</a> -&gt; [a] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#take" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:take">take</a></code> <code>n</code>, applied to a list <code>xs</code>, returns the prefix of <code>xs</code>
 of length <code>n</code>, or <code>xs</code> itself if <code>n &gt; <code><a href="Prelude.html#v:length">length</a></code> xs</code>:
</p><pre> take 5 &quot;Hello World!&quot; == &quot;Hello&quot;
 take 3 [1,2,3,4,5] == [1,2,3]
 take 3 [1,2] == [1,2]
 take 3 [] == []
 take (-1) [1,2] == []
 take 0 [1,2] == []
</pre><p>It is an instance of the more general <code><a href="../base-4.5.1.0/Data-List.html#v:genericTake">genericTake</a></code>,
 in which <code>n</code> may be of any integral type.
</p></div></div><div class="top"><p class="src"><a name="v:drop" class="def">drop</a> ::  <a href="Prelude.html#t:Int">Int</a> -&gt; [a] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#drop" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:drop">drop</a></code> <code>n xs</code> returns the suffix of <code>xs</code>
 after the first <code>n</code> elements, or <code>[]</code> if <code>n &gt; <code><a href="Prelude.html#v:length">length</a></code> xs</code>:
</p><pre> drop 6 &quot;Hello World!&quot; == &quot;World!&quot;
 drop 3 [1,2,3,4,5] == [4,5]
 drop 3 [1,2] == []
 drop 3 [] == []
 drop (-1) [1,2] == [1,2]
 drop 0 [1,2] == [1,2]
</pre><p>It is an instance of the more general <code><a href="../base-4.5.1.0/Data-List.html#v:genericDrop">genericDrop</a></code>,
 in which <code>n</code> may be of any integral type.
</p></div></div><div class="top"><p class="src"><a name="v:splitAt" class="def">splitAt</a> ::  <a href="Prelude.html#t:Int">Int</a> -&gt; [a] -&gt; ([a], [a])</p><div class="doc"><p><code><a href="Prelude.html#v:splitAt">splitAt</a></code> <code>n xs</code> returns a tuple where first element is <code>xs</code> prefix of
 length <code>n</code> and second element is the remainder of the list:
</p><pre> splitAt 6 &quot;Hello World!&quot; == (&quot;Hello &quot;,&quot;World!&quot;)
 splitAt 3 [1,2,3,4,5] == ([1,2,3],[4,5])
 splitAt 1 [1,2,3] == ([1],[2,3])
 splitAt 3 [1,2,3] == ([1,2,3],[])
 splitAt 4 [1,2,3] == ([1,2,3],[])
 splitAt 0 [1,2,3] == ([],[1,2,3])
 splitAt (-1) [1,2,3] == ([],[1,2,3])
</pre><p>It is equivalent to <code>(<code><a href="Prelude.html#v:take">take</a></code> n xs, <code><a href="Prelude.html#v:drop">drop</a></code> n xs)</code>.
 <code><a href="Prelude.html#v:splitAt">splitAt</a></code> is an instance of the more general <code><a href="List.html#v:genericSplitAt">genericSplitAt</a></code>,
 in which <code>n</code> may be of any integral type.
</p></div></div><div class="top"><p class="src"><a name="v:takeWhile" class="def">takeWhile</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#takeWhile" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:takeWhile">takeWhile</a></code>, applied to a predicate <code>p</code> and a list <code>xs</code>, returns the
 longest prefix (possibly empty) of <code>xs</code> of elements that satisfy <code>p</code>:
</p><pre> takeWhile (&lt; 3) [1,2,3,4,1,2,3,4] == [1,2]
 takeWhile (&lt; 9) [1,2,3] == [1,2,3]
 takeWhile (&lt; 0) [1,2,3] == []
</pre></div></div><div class="top"><p class="src"><a name="v:dropWhile" class="def">dropWhile</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; [a]<a href="../base-4.5.1.0/src/GHC-List.html#dropWhile" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:dropWhile">dropWhile</a></code> <code>p xs</code> returns the suffix remaining after <code><a href="Prelude.html#v:takeWhile">takeWhile</a></code> <code>p xs</code>:
</p><pre> dropWhile (&lt; 3) [1,2,3,4,5,1,2,3] == [3,4,5,1,2,3]
 dropWhile (&lt; 9) [1,2,3] == []
 dropWhile (&lt; 0) [1,2,3] == [1,2,3]
</pre></div></div><div class="top"><p class="src"><a name="v:span" class="def">span</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; ([a], [a])<a href="../base-4.5.1.0/src/GHC-List.html#span" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:span">span</a></code>, applied to a predicate <code>p</code> and a list <code>xs</code>, returns a tuple where
 first element is longest prefix (possibly empty) of <code>xs</code> of elements that
 satisfy <code>p</code> and second element is the remainder of the list:
</p><pre> span (&lt; 3) [1,2,3,4,1,2,3,4] == ([1,2],[3,4,1,2,3,4])
 span (&lt; 9) [1,2,3] == ([1,2,3],[])
 span (&lt; 0) [1,2,3] == ([],[1,2,3])
</pre><p><code><a href="Prelude.html#v:span">span</a></code> <code>p xs</code> is equivalent to <code>(<code><a href="Prelude.html#v:takeWhile">takeWhile</a></code> p xs, <code><a href="Prelude.html#v:dropWhile">dropWhile</a></code> p xs)</code>
</p></div></div><div class="top"><p class="src"><a name="v:break" class="def">break</a> ::  (a -&gt; <a href="Prelude.html#t:Bool">Bool</a>) -&gt; [a] -&gt; ([a], [a])<a href="../base-4.5.1.0/src/GHC-List.html#break" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:break">break</a></code>, applied to a predicate <code>p</code> and a list <code>xs</code>, returns a tuple where
 first element is longest prefix (possibly empty) of <code>xs</code> of elements that
 <em>do not satisfy</em> <code>p</code> and second element is the remainder of the list:
</p><pre> break (&gt; 3) [1,2,3,4,1,2,3,4] == ([1,2,3],[4,1,2,3,4])
 break (&lt; 9) [1,2,3] == ([],[1,2,3])
 break (&gt; 9) [1,2,3] == ([1,2,3],[])
</pre><p><code><a href="Prelude.html#v:break">break</a></code> <code>p</code> is equivalent to <code><code><a href="Prelude.html#v:span">span</a></code> (<code><a href="Prelude.html#v:not">not</a></code> . p)</code>.
</p></div></div><h2 id="g:18">Searching lists
</h2><div class="top"><p class="src"><a name="v:elem" class="def">elem</a> :: <a href="Prelude.html#t:Eq">Eq</a> a =&gt; a -&gt; [a] -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-List.html#elem" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:elem">elem</a></code> is the list membership predicate, usually written in infix form,
 e.g., <code>x `elem` xs</code>.  For the result to be
 <code><a href="Prelude.html#v:False">False</a></code>, the list must be finite; <code><a href="Prelude.html#v:True">True</a></code>, however, results from an element equal to <code>x</code> found at a finite index of a finite or infinite list.
</p></div></div><div class="top"><p class="src"><a name="v:notElem" class="def">notElem</a> :: <a href="Prelude.html#t:Eq">Eq</a> a =&gt; a -&gt; [a] -&gt; <a href="Prelude.html#t:Bool">Bool</a><a href="../base-4.5.1.0/src/GHC-List.html#notElem" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:notElem">notElem</a></code> is the negation of <code><a href="Prelude.html#v:elem">elem</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:lookup" class="def">lookup</a> :: <a href="Prelude.html#t:Eq">Eq</a> a =&gt; a -&gt; [(a, b)] -&gt; <a href="Prelude.html#t:Maybe">Maybe</a> b<a href="../base-4.5.1.0/src/GHC-List.html#lookup" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:lookup">lookup</a></code> <code>key assocs</code> looks up a key in an association list.
</p></div></div><h2 id="g:19">Zipping and unzipping lists
</h2><div class="top"><p class="src"><a name="v:zip" class="def">zip</a> ::  [a] -&gt; [b] -&gt; [(a, b)]<a href="../base-4.5.1.0/src/GHC-List.html#zip" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:zip">zip</a></code> takes two lists and returns a list of corresponding pairs.
 If one input list is short, excess elements of the longer list are
 discarded.
</p></div></div><div class="top"><p class="src"><a name="v:zip3" class="def">zip3</a> ::  [a] -&gt; [b] -&gt; [c] -&gt; [(a, b, c)]<a href="../base-4.5.1.0/src/GHC-List.html#zip3" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:zip3">zip3</a></code> takes three lists and returns a list of triples, analogous to
 <code><a href="Prelude.html#v:zip">zip</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:zipWith" class="def">zipWith</a> ::  (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]<a href="../base-4.5.1.0/src/GHC-List.html#zipWith" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:zipWith">zipWith</a></code> generalises <code><a href="Prelude.html#v:zip">zip</a></code> by zipping with the function given
 as the first argument, instead of a tupling function.
 For example, <code><code><a href="Prelude.html#v:zipWith">zipWith</a></code> (+)</code> is applied to two lists to produce the
 list of corresponding sums.
</p></div></div><div class="top"><p class="src"><a name="v:zipWith3" class="def">zipWith3</a> ::  (a -&gt; b -&gt; c -&gt; d) -&gt; [a] -&gt; [b] -&gt; [c] -&gt; [d]<a href="../base-4.5.1.0/src/GHC-List.html#zipWith3" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#v:zipWith3">zipWith3</a></code> function takes a function which combines three
 elements, as well as three lists and returns a list of their point-wise
 combination, analogous to <code><a href="Prelude.html#v:zipWith">zipWith</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:unzip" class="def">unzip</a> ::  [(a, b)] -&gt; ([a], [b])<a href="../base-4.5.1.0/src/GHC-List.html#unzip" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:unzip">unzip</a></code> transforms a list of pairs into a list of first components
 and a list of second components.
</p></div></div><div class="top"><p class="src"><a name="v:unzip3" class="def">unzip3</a> ::  [(a, b, c)] -&gt; ([a], [b], [c])<a href="../base-4.5.1.0/src/GHC-List.html#unzip3" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#v:unzip3">unzip3</a></code> function takes a list of triples and returns three
 lists, analogous to <code><a href="Prelude.html#v:unzip">unzip</a></code>.
</p></div></div><h2 id="g:20">Functions on strings
</h2><div class="top"><p class="src"><a name="v:lines" class="def">lines</a> :: <a href="Prelude.html#t:String">String</a> -&gt; [<a href="Prelude.html#t:String">String</a>]<a href="../base-4.5.1.0/src/Data-List.html#lines" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:lines">lines</a></code> breaks a string up into a list of strings at newline
 characters.  The resulting strings do not contain newlines.
</p></div></div><div class="top"><p class="src"><a name="v:words" class="def">words</a> :: <a href="Prelude.html#t:String">String</a> -&gt; [<a href="Prelude.html#t:String">String</a>]<a href="../base-4.5.1.0/src/Data-List.html#words" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:words">words</a></code> breaks a string up into a list of words, which were delimited
 by white space.
</p></div></div><div class="top"><p class="src"><a name="v:unlines" class="def">unlines</a> :: [<a href="Prelude.html#t:String">String</a>] -&gt; <a href="Prelude.html#t:String">String</a><a href="../base-4.5.1.0/src/Data-List.html#unlines" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:unlines">unlines</a></code> is an inverse operation to <code><a href="Prelude.html#v:lines">lines</a></code>.
 It joins lines, after appending a terminating newline to each.
</p></div></div><div class="top"><p class="src"><a name="v:unwords" class="def">unwords</a> :: [<a href="Prelude.html#t:String">String</a>] -&gt; <a href="Prelude.html#t:String">String</a><a href="../base-4.5.1.0/src/Data-List.html#unwords" class="link">Source</a></p><div class="doc"><p><code><a href="Prelude.html#v:unwords">unwords</a></code> is an inverse operation to <code><a href="Prelude.html#v:words">words</a></code>.
 It joins words with separating spaces.
</p></div></div><h1 id="g:21">Converting to and from <code>String</code>
</h1><h2 id="g:22">Converting to <code>String</code>
</h2><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ShowS" class="def">ShowS</a> = <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:String">String</a><a href="../base-4.5.1.0/src/GHC-Show.html#ShowS" class="link">Source</a></p><div class="doc"><p>The <code>shows</code> functions return a function that prepends the
 output <code><a href="Prelude.html#t:String">String</a></code> to an existing <code><a href="Prelude.html#t:String">String</a></code>.  This allows constant-time
 concatenation of results using function composition.
</p></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Show" class="def">Show</a> a  <span class="keyword">where</span><a href="../base-4.5.1.0/src/GHC-Show.html#Show" class="link">Source</a></p><div class="doc"><p>Conversion of values to readable <code><a href="Prelude.html#t:String">String</a></code>s.
</p><p>Minimal complete definition: <code><a href="Prelude.html#v:showsPrec">showsPrec</a></code> or <code><a href="Prelude.html#v:show">show</a></code>.
</p><p>Derived instances of <code><a href="Prelude.html#t:Show">Show</a></code> have the following properties, which
 are compatible with derived instances of <code><a href="../base-4.5.1.0/Text-Read.html#t:Read">Read</a></code>:
</p><ul><li> The result of <code><a href="Prelude.html#v:show">show</a></code> is a syntactically correct Haskell
   expression containing only constants, given the fixity
   declarations in force at the point where the type is declared.
   It contains only the constructor names defined in the data type,
   parentheses, and spaces.  When labelled constructor fields are
   used, braces, commas, field names, and equal signs are also used.
</li><li> If the constructor is defined to be an infix operator, then
   <code><a href="Prelude.html#v:showsPrec">showsPrec</a></code> will produce infix applications of the constructor.
</li><li> the representation will be enclosed in parentheses if the
   precedence of the top-level constructor in <code>x</code> is less than <code>d</code>
   (associativity is ignored).  Thus, if <code>d</code> is <code>0</code> then the result
   is never surrounded in parentheses; if <code>d</code> is <code>11</code> it is always
   surrounded in parentheses, unless it is an atomic expression.
</li><li> If the constructor is defined using record syntax, then <code><a href="Prelude.html#v:show">show</a></code>
   will produce the record-syntax form, with the fields given in the
   same order as the original declaration.
</li></ul><p>For example, given the declarations
</p><pre> infixr 5 :^:
 data Tree a =  Leaf a  |  Tree a :^: Tree a
</pre><p>the derived instance of <code><a href="Prelude.html#t:Show">Show</a></code> is equivalent to
</p><pre> instance (Show a) =&gt; Show (Tree a) where

        showsPrec d (Leaf m) = showParen (d &gt; app_prec) $
             showString &quot;Leaf &quot; . showsPrec (app_prec+1) m
          where app_prec = 10

        showsPrec d (u :^: v) = showParen (d &gt; up_prec) $
             showsPrec (up_prec+1) u .
             showString &quot; :^: &quot;      .
             showsPrec (up_prec+1) v
          where up_prec = 5
</pre><p>Note that right-associativity of <code>:^:</code> is ignored.  For example,
</p><ul><li> <code><code><a href="Prelude.html#v:show">show</a></code> (Leaf 1 :^: Leaf 2 :^: Leaf 3)</code> produces the string
   <code>&quot;Leaf 1 :^: (Leaf 2 :^: Leaf 3)&quot;</code>.
</li></ul></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:showsPrec" class="def">showsPrec</a><a href="../base-4.5.1.0/src/GHC-Show.html#showsPrec" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Prelude.html#t:Int">Int</a></td><td class="doc"><p>the operator precedence of the enclosing
 context (a number from <code>0</code> to <code>11</code>).
 Function application has precedence <code>10</code>.
</p></td></tr><tr><td class="src">-&gt; a</td><td class="doc"><p>the value to be converted to a <code><a href="Prelude.html#t:String">String</a></code>
</p></td></tr><tr><td class="src">-&gt; <a href="Prelude.html#t:ShowS">ShowS</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Convert a value to a readable <code><a href="Prelude.html#t:String">String</a></code>.
</p><p><code><a href="Prelude.html#v:showsPrec">showsPrec</a></code> should satisfy the law
</p><pre> showsPrec d x r ++ s  ==  showsPrec d x (r ++ s)
</pre><p>Derived instances of <code><a href="../base-4.5.1.0/Text-Read.html#t:Read">Read</a></code> and <code><a href="Prelude.html#t:Show">Show</a></code> satisfy the following:
</p><ul><li> <code>(x,&quot;&quot;)</code> is an element of
   <code>(<code><a href="../base-4.5.1.0/Text-Read.html#v:readsPrec">readsPrec</a></code> d (<code><a href="Prelude.html#v:showsPrec">showsPrec</a></code> d x &quot;&quot;))</code>.
</li></ul><p>That is, <code><a href="../base-4.5.1.0/Text-Read.html#v:readsPrec">readsPrec</a></code> parses the string produced by
 <code><a href="Prelude.html#v:showsPrec">showsPrec</a></code>, and delivers the value that <code><a href="Prelude.html#v:showsPrec">showsPrec</a></code> started with.
</p></div><p class="src"><a name="v:show" class="def">show</a> :: a -&gt; <a href="Prelude.html#t:String">String</a><a href="../base-4.5.1.0/src/GHC-Show.html#show" class="link">Source</a></p><div class="doc"><p>A specialised variant of <code><a href="Prelude.html#v:showsPrec">showsPrec</a></code>, using precedence context
 zero, and returning an ordinary <code><a href="Prelude.html#t:String">String</a></code>.
</p></div><p class="src"><a name="v:showList" class="def">showList</a> :: [a] -&gt; <a href="Prelude.html#t:ShowS">ShowS</a><a href="../base-4.5.1.0/src/GHC-Show.html#showList" class="link">Source</a></p><div class="doc"><p>The method <code><a href="Prelude.html#v:showList">showList</a></code> is provided to allow the programmer to
 give a specialised way of showing lists of values.
 For example, this is used by the predefined <code><a href="Prelude.html#t:Show">Show</a></code> instance of
 the <code><a href="Prelude.html#t:Char">Char</a></code> type, where values of type <code><a href="Prelude.html#t:String">String</a></code> should be shown
 in double quotes, rather than between square brackets.
</p></div></div><div class="subs instances"><p id="control.i:Show" class="caption collapser" onclick="toggleSection('i:Show')">Instances</p><div id="section.i:Show" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int8">Int8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int16">Int16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int32">Int32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int64">Int64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> ()</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="IO.html#t:Handle">Handle</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> HandleType</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> Number</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="IO.html#t:HandlePosn">HandlePosn</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:PatternMatchFail">PatternMatchFail</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:RecSelError">RecSelError</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:RecConError">RecConError</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:RecUpdError">RecUpdError</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:NoMethodError">NoMethodError</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:NonTermination">NonTermination</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:NestedAtomically">NestedAtomically</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:BlockedIndefinitelyOnMVar">BlockedIndefinitelyOnMVar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:BlockedIndefinitelyOnSTM">BlockedIndefinitelyOnSTM</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:Deadlock">Deadlock</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:AssertionFailed">AssertionFailed</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:AsyncException">AsyncException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:ArrayException">ArrayException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="System.html#t:ExitCode">ExitCode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="MarshalError.html#t:IOErrorType">IOErrorType</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="IO.html#t:BufferMode">BufferMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/GHC-IO-Handle.html#t:Newline">Newline</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/GHC-IO-Handle.html#t:NewlineMode">NewlineMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:WordPtr">WordPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:IntPtr">IntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Data-Char.html#t:GeneralCategory">GeneralCategory</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CChar">CChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSChar">CSChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUChar">CUChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CShort">CShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUShort">CUShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CInt">CInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUInt">CUInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLong">CLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULong">CULong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLLong">CLLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULLong">CULLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CFloat">CFloat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CDouble">CDouble</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CPtrdiff">CPtrdiff</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSize">CSize</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CWchar">CWchar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSigAtomic">CSigAtomic</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CClock">CClock</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CTime">CTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUSeconds">CUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSUSeconds">CSUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntPtr">CIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntPtr">CUIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntMax">CIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntMax">CUIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="IO.html#t:SeekMode">SeekMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="IO.html#t:IOMode">IOMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Text-Read-Lex.html#t:Lexeme">Lexeme</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Text-Read-Lex.html#t:Lexeme-39-">Lexeme'</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:MaskingState">MaskingState</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:IOException">IOException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:SomeException">SomeException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:ErrorCall">ErrorCall</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Control-Exception-Base.html#t:ArithException">ArithException</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:TypeRep">TypeRep</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:TyCon">TyCon</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../directory-1.1.0.2/System-Directory.html#t:Permissions">Permissions</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Locale.html#t:TimeLocale">TimeLocale</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Time.html#t:Month">Month</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Time.html#t:Day">Day</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Time.html#t:ClockTime">ClockTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Time.html#t:CalendarTime">CalendarTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Time.html#t:TimeDiff">TimeDiff</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> Padding</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> DateFormatSpec</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../time-1.4/Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../time-1.4/Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../time-1.4/Data-Time-Clock.html#t:UTCTime">UTCTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../time-1.4/Data-Time-Clock.html#t:NominalDiffTime">NominalDiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../time-1.4/Data-Time-Calendar.html#t:Day">Day</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="../time-1.4/Data-Time-Clock.html#t:DiffTime">DiffTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> Fixity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> Associativity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> Arity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Directory.html#t:Permissions">Permissions</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Random.html#t:StdGen">StdGen</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> a =&gt; <a href="Prelude.html#t:Show">Show</a> [a]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Integral">Integral</a> a, <a href="Prelude.html#t:Show">Show</a> a) =&gt; <a href="Prelude.html#t:Show">Show</a> (<a href="Ratio.html#t:Ratio">Ratio</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> a =&gt; <a href="Prelude.html#t:Show">Show</a> (<a href="Complex.html#t:Complex">Complex</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> a =&gt; <a href="Prelude.html#t:Show">Show</a> (<a href="Prelude.html#t:Maybe">Maybe</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b) =&gt; <a href="Prelude.html#t:Show">Show</a> (<a href="Prelude.html#t:Either">Either</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Ix.html#t:Ix">Ix</a> a, <a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b) =&gt; <a href="Prelude.html#t:Show">Show</a> (<a href="Array.html#t:Array">Array</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b, <a href="Prelude.html#t:Show">Show</a> c) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b, c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b, <a href="Prelude.html#t:Show">Show</a> c, <a href="Prelude.html#t:Show">Show</a> d) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b, c, d)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b, <a href="Prelude.html#t:Show">Show</a> c, <a href="Prelude.html#t:Show">Show</a> d, <a href="Prelude.html#t:Show">Show</a> e) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b, c, d, e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b, <a href="Prelude.html#t:Show">Show</a> c, <a href="Prelude.html#t:Show">Show</a> d, <a href="Prelude.html#t:Show">Show</a> e, <a href="Prelude.html#t:Show">Show</a> f) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b, c, d, e, f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b, <a href="Prelude.html#t:Show">Show</a> c, <a href="Prelude.html#t:Show">Show</a> d, <a href="Prelude.html#t:Show">Show</a> e, <a href="Prelude.html#t:Show">Show</a> f, <a href="Prelude.html#t:Show">Show</a> g) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b, c, d, e, f, g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b, <a href="Prelude.html#t:Show">Show</a> c, <a href="Prelude.html#t:Show">Show</a> d, <a href="Prelude.html#t:Show">Show</a> e, <a href="Prelude.html#t:Show">Show</a> f, <a href="Prelude.html#t:Show">Show</a> g, <a href="Prelude.html#t:Show">Show</a> h) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b, c, d, e, f, g, h)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b, <a href="Prelude.html#t:Show">Show</a> c, <a href="Prelude.html#t:Show">Show</a> d, <a href="Prelude.html#t:Show">Show</a> e, <a href="Prelude.html#t:Show">Show</a> f, <a href="Prelude.html#t:Show">Show</a> g, <a href="Prelude.html#t:Show">Show</a> h, <a href="Prelude.html#t:Show">Show</a> i) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b, c, d, e, f, g, h, i)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b, <a href="Prelude.html#t:Show">Show</a> c, <a href="Prelude.html#t:Show">Show</a> d, <a href="Prelude.html#t:Show">Show</a> e, <a href="Prelude.html#t:Show">Show</a> f, <a href="Prelude.html#t:Show">Show</a> g, <a href="Prelude.html#t:Show">Show</a> h, <a href="Prelude.html#t:Show">Show</a> i, <a href="Prelude.html#t:Show">Show</a> j) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b, c, d, e, f, g, h, i, j)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b, <a href="Prelude.html#t:Show">Show</a> c, <a href="Prelude.html#t:Show">Show</a> d, <a href="Prelude.html#t:Show">Show</a> e, <a href="Prelude.html#t:Show">Show</a> f, <a href="Prelude.html#t:Show">Show</a> g, <a href="Prelude.html#t:Show">Show</a> h, <a href="Prelude.html#t:Show">Show</a> i, <a href="Prelude.html#t:Show">Show</a> j, <a href="Prelude.html#t:Show">Show</a> k) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b, c, d, e, f, g, h, i, j, k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b, <a href="Prelude.html#t:Show">Show</a> c, <a href="Prelude.html#t:Show">Show</a> d, <a href="Prelude.html#t:Show">Show</a> e, <a href="Prelude.html#t:Show">Show</a> f, <a href="Prelude.html#t:Show">Show</a> g, <a href="Prelude.html#t:Show">Show</a> h, <a href="Prelude.html#t:Show">Show</a> i, <a href="Prelude.html#t:Show">Show</a> j, <a href="Prelude.html#t:Show">Show</a> k, <a href="Prelude.html#t:Show">Show</a> l) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b, c, d, e, f, g, h, i, j, k, l)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b, <a href="Prelude.html#t:Show">Show</a> c, <a href="Prelude.html#t:Show">Show</a> d, <a href="Prelude.html#t:Show">Show</a> e, <a href="Prelude.html#t:Show">Show</a> f, <a href="Prelude.html#t:Show">Show</a> g, <a href="Prelude.html#t:Show">Show</a> h, <a href="Prelude.html#t:Show">Show</a> i, <a href="Prelude.html#t:Show">Show</a> j, <a href="Prelude.html#t:Show">Show</a> k, <a href="Prelude.html#t:Show">Show</a> l, <a href="Prelude.html#t:Show">Show</a> m) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b, c, d, e, f, g, h, i, j, k, l, m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b, <a href="Prelude.html#t:Show">Show</a> c, <a href="Prelude.html#t:Show">Show</a> d, <a href="Prelude.html#t:Show">Show</a> e, <a href="Prelude.html#t:Show">Show</a> f, <a href="Prelude.html#t:Show">Show</a> g, <a href="Prelude.html#t:Show">Show</a> h, <a href="Prelude.html#t:Show">Show</a> i, <a href="Prelude.html#t:Show">Show</a> j, <a href="Prelude.html#t:Show">Show</a> k, <a href="Prelude.html#t:Show">Show</a> l, <a href="Prelude.html#t:Show">Show</a> m, <a href="Prelude.html#t:Show">Show</a> n) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b, c, d, e, f, g, h, i, j, k, l, m, n)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Show">Show</a> a, <a href="Prelude.html#t:Show">Show</a> b, <a href="Prelude.html#t:Show">Show</a> c, <a href="Prelude.html#t:Show">Show</a> d, <a href="Prelude.html#t:Show">Show</a> e, <a href="Prelude.html#t:Show">Show</a> f, <a href="Prelude.html#t:Show">Show</a> g, <a href="Prelude.html#t:Show">Show</a> h, <a href="Prelude.html#t:Show">Show</a> i, <a href="Prelude.html#t:Show">Show</a> j, <a href="Prelude.html#t:Show">Show</a> k, <a href="Prelude.html#t:Show">Show</a> l, <a href="Prelude.html#t:Show">Show</a> m, <a href="Prelude.html#t:Show">Show</a> n, <a href="Prelude.html#t:Show">Show</a> o) =&gt; <a href="Prelude.html#t:Show">Show</a> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:shows" class="def">shows</a> :: <a href="Prelude.html#t:Show">Show</a> a =&gt; a -&gt; <a href="Prelude.html#t:ShowS">ShowS</a><a href="../base-4.5.1.0/src/GHC-Show.html#shows" class="link">Source</a></p><div class="doc"><p>equivalent to <code><a href="Prelude.html#v:showsPrec">showsPrec</a></code> with a precedence of 0.
</p></div></div><div class="top"><p class="src"><a name="v:showChar" class="def">showChar</a> :: <a href="Prelude.html#t:Char">Char</a> -&gt; <a href="Prelude.html#t:ShowS">ShowS</a><a href="../base-4.5.1.0/src/GHC-Show.html#showChar" class="link">Source</a></p><div class="doc"><p>utility function converting a <code><a href="Prelude.html#t:Char">Char</a></code> to a show function that
 simply prepends the character unchanged.
</p></div></div><div class="top"><p class="src"><a name="v:showString" class="def">showString</a> :: <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:ShowS">ShowS</a><a href="../base-4.5.1.0/src/GHC-Show.html#showString" class="link">Source</a></p><div class="doc"><p>utility function converting a <code><a href="Prelude.html#t:String">String</a></code> to a show function that
 simply prepends the string unchanged.
</p></div></div><div class="top"><p class="src"><a name="v:showParen" class="def">showParen</a> :: <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:ShowS">ShowS</a> -&gt; <a href="Prelude.html#t:ShowS">ShowS</a><a href="../base-4.5.1.0/src/GHC-Show.html#showParen" class="link">Source</a></p><div class="doc"><p>utility function that surrounds the inner show function with
 parentheses when the <code><a href="Prelude.html#t:Bool">Bool</a></code> parameter is <code><a href="Prelude.html#v:True">True</a></code>.
</p></div></div><h2 id="g:23">Converting from <code>String</code>
</h2><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ReadS" class="def">ReadS</a> a = <a href="Prelude.html#t:String">String</a> -&gt; [(a, <a href="Prelude.html#t:String">String</a>)]<a href="../base-4.5.1.0/src/Text-ParserCombinators-ReadP.html#ReadS" class="link">Source</a></p><div class="doc"><p>A parser for a type <code>a</code>, represented as a function that takes a
 <code><a href="Prelude.html#t:String">String</a></code> and returns a list of possible parses as <code>(a,<code><a href="Prelude.html#t:String">String</a></code>)</code> pairs.
</p><p>Note that this kind of backtracking parser is very inefficient;
 reading a large structure may be quite slow (cf <code><a href="../base-4.5.1.0/Text-ParserCombinators-ReadP.html#t:ReadP">ReadP</a></code>).
</p></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Read" class="def">Read</a> a  <span class="keyword">where</span><a href="../base-4.5.1.0/src/GHC-Read.html#Read" class="link">Source</a></p><div class="doc"><p>Parsing of <code><a href="Prelude.html#t:String">String</a></code>s, producing values.
</p><p>Minimal complete definition: <code><a href="Prelude.html#v:readsPrec">readsPrec</a></code> (or, for GHC only, <code><a href="../base-4.5.1.0/Text-Read.html#v:readPrec">readPrec</a></code>)
</p><p>Derived instances of <code><a href="Prelude.html#t:Read">Read</a></code> make the following assumptions, which
 derived instances of <code><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a></code> obey:
</p><ul><li> If the constructor is defined to be an infix operator, then the
   derived <code><a href="Prelude.html#t:Read">Read</a></code> instance will parse only infix applications of
   the constructor (not the prefix form).
</li><li> Associativity is not used to reduce the occurrence of parentheses,
   although precedence may be.
</li><li> If the constructor is defined using record syntax, the derived <code><a href="Prelude.html#t:Read">Read</a></code>
   will parse only the record-syntax form, and furthermore, the fields
   must be given in the same order as the original declaration.
</li><li> The derived <code><a href="Prelude.html#t:Read">Read</a></code> instance allows arbitrary Haskell whitespace
   between tokens of the input string.  Extra parentheses are also
   allowed.
</li></ul><p>For example, given the declarations
</p><pre> infixr 5 :^:
 data Tree a =  Leaf a  |  Tree a :^: Tree a
</pre><p>the derived instance of <code><a href="Prelude.html#t:Read">Read</a></code> in Haskell 98 is equivalent to
</p><pre> instance (Read a) =&gt; Read (Tree a) where

         readsPrec d r =  readParen (d &gt; app_prec)
                          (\r -&gt; [(Leaf m,t) |
                                  (&quot;Leaf&quot;,s) &lt;- lex r,
                                  (m,t) &lt;- readsPrec (app_prec+1) s]) r

                       ++ readParen (d &gt; up_prec)
                          (\r -&gt; [(u:^:v,w) |
                                  (u,s) &lt;- readsPrec (up_prec+1) r,
                                  (&quot;:^:&quot;,t) &lt;- lex s,
                                  (v,w) &lt;- readsPrec (up_prec+1) t]) r

           where app_prec = 10
                 up_prec = 5
</pre><p>Note that right-associativity of <code>:^:</code> is unused.
</p><p>The derived instance in GHC is equivalent to
</p><pre> instance (Read a) =&gt; Read (Tree a) where

         readPrec = parens $ (prec app_prec $ do
                                  Ident &quot;Leaf&quot; &lt;- lexP
                                  m &lt;- step readPrec
                                  return (Leaf m))

                      +++ (prec up_prec $ do
                                  u &lt;- step readPrec
                                  Symbol &quot;:^:&quot; &lt;- lexP
                                  v &lt;- step readPrec
                                  return (u :^: v))

           where app_prec = 10
                 up_prec = 5

         readListPrec = readListPrecDefault
</pre></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:readsPrec" class="def">readsPrec</a><a href="../base-4.5.1.0/src/GHC-Read.html#readsPrec" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Prelude.html#t:Int">Int</a></td><td class="doc"><p>the operator precedence of the enclosing
 context (a number from <code>0</code> to <code>11</code>).
 Function application has precedence <code>10</code>.
</p></td></tr><tr><td class="src">-&gt; <a href="Prelude.html#t:ReadS">ReadS</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>attempts to parse a value from the front of the string, returning
 a list of (parsed value, remaining string) pairs.  If there is no
 successful parse, the returned list is empty.
</p><p>Derived instances of <code><a href="Prelude.html#t:Read">Read</a></code> and <code><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a></code> satisfy the following:
</p><ul><li> <code>(x,&quot;&quot;)</code> is an element of
   <code>(<code><a href="Prelude.html#v:readsPrec">readsPrec</a></code> d (<code><a href="../base-4.5.1.0/Text-Show.html#v:showsPrec">showsPrec</a></code> d x &quot;&quot;))</code>.
</li></ul><p>That is, <code><a href="Prelude.html#v:readsPrec">readsPrec</a></code> parses the string produced by
 <code><a href="../base-4.5.1.0/Text-Show.html#v:showsPrec">showsPrec</a></code>, and delivers the value that
 <code><a href="../base-4.5.1.0/Text-Show.html#v:showsPrec">showsPrec</a></code> started with.
</p></div><p class="src"><a name="v:readList" class="def">readList</a> :: <a href="Prelude.html#t:ReadS">ReadS</a> [a]<a href="../base-4.5.1.0/src/GHC-Read.html#readList" class="link">Source</a></p><div class="doc"><p>The method <code><a href="Prelude.html#v:readList">readList</a></code> is provided to allow the programmer to
 give a specialised way of parsing lists of values.
 For example, this is used by the predefined <code><a href="Prelude.html#t:Read">Read</a></code> instance of
 the <code><a href="Prelude.html#t:Char">Char</a></code> type, where values of type <code><a href="Prelude.html#t:String">String</a></code> should be are
 expected to use double quotes, rather than square brackets.
</p></div></div><div class="subs instances"><p id="control.i:Read" class="caption collapser" onclick="toggleSection('i:Read')">Instances</p><div id="section.i:Read" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int8">Int8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int16">Int16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int32">Int32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int64">Int64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Prelude.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> ()</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="System.html#t:ExitCode">ExitCode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="IO.html#t:BufferMode">BufferMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/GHC-IO-Handle.html#t:Newline">Newline</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/GHC-IO-Handle.html#t:NewlineMode">NewlineMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:WordPtr">WordPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-Ptr.html#t:IntPtr">IntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Data-Char.html#t:GeneralCategory">GeneralCategory</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CChar">CChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSChar">CSChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUChar">CUChar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CShort">CShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUShort">CUShort</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CInt">CInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUInt">CUInt</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLong">CLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULong">CULong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CLLong">CLLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CULLong">CULLong</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CFloat">CFloat</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CDouble">CDouble</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CPtrdiff">CPtrdiff</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSize">CSize</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CWchar">CWchar</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSigAtomic">CSigAtomic</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CClock">CClock</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CTime">CTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUSeconds">CUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CSUSeconds">CSUSeconds</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntPtr">CIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntPtr">CUIntPtr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CIntMax">CIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Foreign-C-Types.html#t:CUIntMax">CUIntMax</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="IO.html#t:SeekMode">SeekMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="IO.html#t:IOMode">IOMode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../base-4.5.1.0/Text-Read-Lex.html#t:Lexeme">Lexeme</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../directory-1.1.0.2/System-Directory.html#t:Permissions">Permissions</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Time.html#t:Month">Month</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Time.html#t:Day">Day</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Time.html#t:CalendarTime">CalendarTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Time.html#t:TimeDiff">TimeDiff</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../time-1.4/Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../time-1.4/Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../time-1.4/Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../time-1.4/Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../time-1.4/Data-Time-Clock.html#t:UTCTime">UTCTime</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="../time-1.4/Data-Time-Calendar.html#t:Day">Day</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> Fixity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> Associativity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> Arity</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Directory.html#t:Permissions">Permissions</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Random.html#t:StdGen">StdGen</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> a =&gt; <a href="Prelude.html#t:Read">Read</a> [a]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Integral">Integral</a> a, <a href="Prelude.html#t:Read">Read</a> a) =&gt; <a href="Prelude.html#t:Read">Read</a> (<a href="Ratio.html#t:Ratio">Ratio</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> a =&gt; <a href="Prelude.html#t:Read">Read</a> (<a href="Complex.html#t:Complex">Complex</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> a =&gt; <a href="Prelude.html#t:Read">Read</a> (<a href="Prelude.html#t:Maybe">Maybe</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b) =&gt; <a href="Prelude.html#t:Read">Read</a> (<a href="Prelude.html#t:Either">Either</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Ix.html#t:Ix">Ix</a> a, <a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b) =&gt; <a href="Prelude.html#t:Read">Read</a> (<a href="Array.html#t:Array">Array</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b, <a href="Prelude.html#t:Read">Read</a> c) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b, c)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b, <a href="Prelude.html#t:Read">Read</a> c, <a href="Prelude.html#t:Read">Read</a> d) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b, c, d)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b, <a href="Prelude.html#t:Read">Read</a> c, <a href="Prelude.html#t:Read">Read</a> d, <a href="Prelude.html#t:Read">Read</a> e) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b, c, d, e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b, <a href="Prelude.html#t:Read">Read</a> c, <a href="Prelude.html#t:Read">Read</a> d, <a href="Prelude.html#t:Read">Read</a> e, <a href="Prelude.html#t:Read">Read</a> f) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b, c, d, e, f)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b, <a href="Prelude.html#t:Read">Read</a> c, <a href="Prelude.html#t:Read">Read</a> d, <a href="Prelude.html#t:Read">Read</a> e, <a href="Prelude.html#t:Read">Read</a> f, <a href="Prelude.html#t:Read">Read</a> g) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b, c, d, e, f, g)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b, <a href="Prelude.html#t:Read">Read</a> c, <a href="Prelude.html#t:Read">Read</a> d, <a href="Prelude.html#t:Read">Read</a> e, <a href="Prelude.html#t:Read">Read</a> f, <a href="Prelude.html#t:Read">Read</a> g, <a href="Prelude.html#t:Read">Read</a> h) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b, c, d, e, f, g, h)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b, <a href="Prelude.html#t:Read">Read</a> c, <a href="Prelude.html#t:Read">Read</a> d, <a href="Prelude.html#t:Read">Read</a> e, <a href="Prelude.html#t:Read">Read</a> f, <a href="Prelude.html#t:Read">Read</a> g, <a href="Prelude.html#t:Read">Read</a> h, <a href="Prelude.html#t:Read">Read</a> i) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b, c, d, e, f, g, h, i)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b, <a href="Prelude.html#t:Read">Read</a> c, <a href="Prelude.html#t:Read">Read</a> d, <a href="Prelude.html#t:Read">Read</a> e, <a href="Prelude.html#t:Read">Read</a> f, <a href="Prelude.html#t:Read">Read</a> g, <a href="Prelude.html#t:Read">Read</a> h, <a href="Prelude.html#t:Read">Read</a> i, <a href="Prelude.html#t:Read">Read</a> j) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b, c, d, e, f, g, h, i, j)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b, <a href="Prelude.html#t:Read">Read</a> c, <a href="Prelude.html#t:Read">Read</a> d, <a href="Prelude.html#t:Read">Read</a> e, <a href="Prelude.html#t:Read">Read</a> f, <a href="Prelude.html#t:Read">Read</a> g, <a href="Prelude.html#t:Read">Read</a> h, <a href="Prelude.html#t:Read">Read</a> i, <a href="Prelude.html#t:Read">Read</a> j, <a href="Prelude.html#t:Read">Read</a> k) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b, c, d, e, f, g, h, i, j, k)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b, <a href="Prelude.html#t:Read">Read</a> c, <a href="Prelude.html#t:Read">Read</a> d, <a href="Prelude.html#t:Read">Read</a> e, <a href="Prelude.html#t:Read">Read</a> f, <a href="Prelude.html#t:Read">Read</a> g, <a href="Prelude.html#t:Read">Read</a> h, <a href="Prelude.html#t:Read">Read</a> i, <a href="Prelude.html#t:Read">Read</a> j, <a href="Prelude.html#t:Read">Read</a> k, <a href="Prelude.html#t:Read">Read</a> l) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b, c, d, e, f, g, h, i, j, k, l)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b, <a href="Prelude.html#t:Read">Read</a> c, <a href="Prelude.html#t:Read">Read</a> d, <a href="Prelude.html#t:Read">Read</a> e, <a href="Prelude.html#t:Read">Read</a> f, <a href="Prelude.html#t:Read">Read</a> g, <a href="Prelude.html#t:Read">Read</a> h, <a href="Prelude.html#t:Read">Read</a> i, <a href="Prelude.html#t:Read">Read</a> j, <a href="Prelude.html#t:Read">Read</a> k, <a href="Prelude.html#t:Read">Read</a> l, <a href="Prelude.html#t:Read">Read</a> m) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b, c, d, e, f, g, h, i, j, k, l, m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b, <a href="Prelude.html#t:Read">Read</a> c, <a href="Prelude.html#t:Read">Read</a> d, <a href="Prelude.html#t:Read">Read</a> e, <a href="Prelude.html#t:Read">Read</a> f, <a href="Prelude.html#t:Read">Read</a> g, <a href="Prelude.html#t:Read">Read</a> h, <a href="Prelude.html#t:Read">Read</a> i, <a href="Prelude.html#t:Read">Read</a> j, <a href="Prelude.html#t:Read">Read</a> k, <a href="Prelude.html#t:Read">Read</a> l, <a href="Prelude.html#t:Read">Read</a> m, <a href="Prelude.html#t:Read">Read</a> n) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b, c, d, e, f, g, h, i, j, k, l, m, n)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Prelude.html#t:Read">Read</a> a, <a href="Prelude.html#t:Read">Read</a> b, <a href="Prelude.html#t:Read">Read</a> c, <a href="Prelude.html#t:Read">Read</a> d, <a href="Prelude.html#t:Read">Read</a> e, <a href="Prelude.html#t:Read">Read</a> f, <a href="Prelude.html#t:Read">Read</a> g, <a href="Prelude.html#t:Read">Read</a> h, <a href="Prelude.html#t:Read">Read</a> i, <a href="Prelude.html#t:Read">Read</a> j, <a href="Prelude.html#t:Read">Read</a> k, <a href="Prelude.html#t:Read">Read</a> l, <a href="Prelude.html#t:Read">Read</a> m, <a href="Prelude.html#t:Read">Read</a> n, <a href="Prelude.html#t:Read">Read</a> o) =&gt; <a href="Prelude.html#t:Read">Read</a> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:reads" class="def">reads</a> :: <a href="Prelude.html#t:Read">Read</a> a =&gt; <a href="Prelude.html#t:ReadS">ReadS</a> a<a href="../base-4.5.1.0/src/Text-Read.html#reads" class="link">Source</a></p><div class="doc"><p>equivalent to <code><a href="Prelude.html#v:readsPrec">readsPrec</a></code> with a precedence of 0.
</p></div></div><div class="top"><p class="src"><a name="v:readParen" class="def">readParen</a> ::  <a href="Prelude.html#t:Bool">Bool</a> -&gt; <a href="Prelude.html#t:ReadS">ReadS</a> a -&gt; <a href="Prelude.html#t:ReadS">ReadS</a> a<a href="../base-4.5.1.0/src/GHC-Read.html#readParen" class="link">Source</a></p><div class="doc"><p><code><code><a href="Prelude.html#v:readParen">readParen</a></code> <code><a href="Prelude.html#v:True">True</a></code> p</code> parses what <code>p</code> parses, but surrounded with
 parentheses.
</p><p><code><code><a href="Prelude.html#v:readParen">readParen</a></code> <code><a href="Prelude.html#v:False">False</a></code> p</code> parses what <code>p</code> parses, but optionally
 surrounded with parentheses.
</p></div></div><div class="top"><p class="src"><a name="v:read" class="def">read</a> :: <a href="Prelude.html#t:Read">Read</a> a =&gt; <a href="Prelude.html#t:String">String</a> -&gt; a<a href="../base-4.5.1.0/src/Text-Read.html#read" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#v:read">read</a></code> function reads input from a string, which must be
 completely consumed by the input process.
</p></div></div><div class="top"><p class="src"><a name="v:lex" class="def">lex</a> :: <a href="Prelude.html#t:ReadS">ReadS</a> <a href="Prelude.html#t:String">String</a><a href="../base-4.5.1.0/src/GHC-Read.html#lex" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#v:lex">lex</a></code> function reads a single lexeme from the input, discarding
 initial white space, and returning the characters that constitute the
 lexeme.  If the input string contains only white space, <code><a href="Prelude.html#v:lex">lex</a></code> returns a
 single successful `lexeme' consisting of the empty string.  (Thus
 <code><code><a href="Prelude.html#v:lex">lex</a></code> &quot;&quot; = [(&quot;&quot;,&quot;&quot;)]</code>.)  If there is no legal lexeme at the
 beginning of the input string, <code><a href="Prelude.html#v:lex">lex</a></code> fails (i.e. returns <code>[]</code>).
</p><p>This lexer is not completely faithful to the Haskell lexical syntax
 in the following respects:
</p><ul><li> Qualified names are not handled properly
</li><li> Octal and hexadecimal numerics are not recognized as a single token
</li><li> Comments are not treated properly
</li></ul></div></div><h1 id="g:24">Basic Input and output
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:IO" class="def">IO</a> a </p><div class="subs instances"><p id="control.i:IO" class="caption collapser" onclick="toggleSection('i:IO')">Instances</p><div id="section.i:IO" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Monad">Monad</a> <a href="Prelude.html#t:IO">IO</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Functor">Functor</a> <a href="Prelude.html#t:IO">IO</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable1">Typeable1</a> <a href="Prelude.html#t:IO">IO</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h2 id="g:25">Simple I/O operations
</h2><h3 id="g:26">Output functions
</h3><div class="top"><p class="src"><a name="v:putChar" class="def">putChar</a> :: <a href="Prelude.html#t:Char">Char</a> -&gt; <a href="Prelude.html#t:IO">IO</a> ()<a href="../base-4.5.1.0/src/System-IO.html#putChar" class="link">Source</a></p><div class="doc"><p>Write a character to the standard output device
 (same as <code><a href="IO.html#v:hPutChar">hPutChar</a></code> <code><a href="IO.html#v:stdout">stdout</a></code>).
</p></div></div><div class="top"><p class="src"><a name="v:putStr" class="def">putStr</a> :: <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:IO">IO</a> ()<a href="../base-4.5.1.0/src/System-IO.html#putStr" class="link">Source</a></p><div class="doc"><p>Write a string to the standard output device
 (same as <code><a href="IO.html#v:hPutStr">hPutStr</a></code> <code><a href="IO.html#v:stdout">stdout</a></code>).
</p></div></div><div class="top"><p class="src"><a name="v:putStrLn" class="def">putStrLn</a> :: <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:IO">IO</a> ()<a href="../base-4.5.1.0/src/System-IO.html#putStrLn" class="link">Source</a></p><div class="doc"><p>The same as <code><a href="Prelude.html#v:putStr">putStr</a></code>, but adds a newline character.
</p></div></div><div class="top"><p class="src"><a name="v:print" class="def">print</a> :: <a href="Prelude.html#t:Show">Show</a> a =&gt; a -&gt; <a href="Prelude.html#t:IO">IO</a> ()<a href="../base-4.5.1.0/src/System-IO.html#print" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#v:print">print</a></code> function outputs a value of any printable type to the
 standard output device.
 Printable types are those that are instances of class <code><a href="Prelude.html#t:Show">Show</a></code>; <code><a href="Prelude.html#v:print">print</a></code>
 converts values to strings for output using the <code><a href="Prelude.html#v:show">show</a></code> operation and
 adds a newline.
</p><p>For example, a program to print the first 20 integers and their
 powers of 2 could be written as:
</p><pre> main = print ([(n, 2^n) | n &lt;- [0..19]])
</pre></div></div><h3 id="g:27">Input functions
</h3><div class="top"><p class="src"><a name="v:getChar" class="def">getChar</a> :: <a href="Prelude.html#t:IO">IO</a> <a href="Prelude.html#t:Char">Char</a><a href="../base-4.5.1.0/src/System-IO.html#getChar" class="link">Source</a></p><div class="doc"><p>Read a character from the standard input device
 (same as <code><a href="IO.html#v:hGetChar">hGetChar</a></code> <code><a href="IO.html#v:stdin">stdin</a></code>).
</p></div></div><div class="top"><p class="src"><a name="v:getLine" class="def">getLine</a> :: <a href="Prelude.html#t:IO">IO</a> <a href="Prelude.html#t:String">String</a><a href="../base-4.5.1.0/src/System-IO.html#getLine" class="link">Source</a></p><div class="doc"><p>Read a line from the standard input device
 (same as <code><a href="IO.html#v:hGetLine">hGetLine</a></code> <code><a href="IO.html#v:stdin">stdin</a></code>).
</p></div></div><div class="top"><p class="src"><a name="v:getContents" class="def">getContents</a> :: <a href="Prelude.html#t:IO">IO</a> <a href="Prelude.html#t:String">String</a><a href="../base-4.5.1.0/src/System-IO.html#getContents" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#v:getContents">getContents</a></code> operation returns all user input as a single string,
 which is read lazily as it is needed
 (same as <code><a href="IO.html#v:hGetContents">hGetContents</a></code> <code><a href="IO.html#v:stdin">stdin</a></code>).
</p></div></div><div class="top"><p class="src"><a name="v:interact" class="def">interact</a> :: (<a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:String">String</a>) -&gt; <a href="Prelude.html#t:IO">IO</a> ()<a href="../base-4.5.1.0/src/System-IO.html#interact" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#v:interact">interact</a></code> function takes a function of type <code>String-&gt;String</code>
 as its argument.  The entire input from the standard input device is
 passed to this function as its argument, and the resulting string is
 output on the standard output device.
</p></div></div><h3 id="g:28">Files
</h3><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:FilePath" class="def">FilePath</a> = <a href="Prelude.html#t:String">String</a><a href="../base-4.5.1.0/src/GHC-IO.html#FilePath" class="link">Source</a></p><div class="doc"><p>File and directory names are values of type <code><a href="Prelude.html#t:String">String</a></code>, whose precise
 meaning is operating system dependent. Files can be opened, yielding a
 handle which can then be used to operate on the contents of that file.
</p></div></div><div class="top"><p class="src"><a name="v:readFile" class="def">readFile</a> :: <a href="Prelude.html#t:FilePath">FilePath</a> -&gt; <a href="Prelude.html#t:IO">IO</a> <a href="Prelude.html#t:String">String</a><a href="../base-4.5.1.0/src/System-IO.html#readFile" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#v:readFile">readFile</a></code> function reads a file and
 returns the contents of the file as a string.
 The file is read lazily, on demand, as with <code><a href="Prelude.html#v:getContents">getContents</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:writeFile" class="def">writeFile</a> :: <a href="Prelude.html#t:FilePath">FilePath</a> -&gt; <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:IO">IO</a> ()<a href="../base-4.5.1.0/src/System-IO.html#writeFile" class="link">Source</a></p><div class="doc"><p>The computation <code><a href="Prelude.html#v:writeFile">writeFile</a></code> <code>file str</code> function writes the string <code>str</code>,
 to the file <code>file</code>.
</p></div></div><div class="top"><p class="src"><a name="v:appendFile" class="def">appendFile</a> :: <a href="Prelude.html#t:FilePath">FilePath</a> -&gt; <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:IO">IO</a> ()<a href="../base-4.5.1.0/src/System-IO.html#appendFile" class="link">Source</a></p><div class="doc"><p>The computation <code><a href="Prelude.html#v:appendFile">appendFile</a></code> <code>file str</code> function appends the string <code>str</code>,
 to the file <code>file</code>.
</p><p>Note that <code><a href="Prelude.html#v:writeFile">writeFile</a></code> and <code><a href="Prelude.html#v:appendFile">appendFile</a></code> write a literal string
 to a file.  To write a value of any printable type, as with <code><a href="Prelude.html#v:print">print</a></code>,
 use the <code><a href="Prelude.html#v:show">show</a></code> function to convert the value to a string first.
</p><pre> main = appendFile &quot;squares&quot; (show [(x,x*x) | x &lt;- [0,0.1..2]])
</pre></div></div><div class="top"><p class="src"><a name="v:readIO" class="def">readIO</a> :: <a href="Prelude.html#t:Read">Read</a> a =&gt; <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:IO">IO</a> a<a href="../base-4.5.1.0/src/System-IO.html#readIO" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#v:readIO">readIO</a></code> function is similar to <code><a href="Prelude.html#v:read">read</a></code> except that it signals
 parse failure to the <code><a href="Prelude.html#t:IO">IO</a></code> monad instead of terminating the program.
</p></div></div><div class="top"><p class="src"><a name="v:readLn" class="def">readLn</a> :: <a href="Prelude.html#t:Read">Read</a> a =&gt; <a href="Prelude.html#t:IO">IO</a> a<a href="../base-4.5.1.0/src/System-IO.html#readLn" class="link">Source</a></p><div class="doc"><p>The <code><a href="Prelude.html#v:readLn">readLn</a></code> function combines <code><a href="Prelude.html#v:getLine">getLine</a></code> and <code><a href="Prelude.html#v:readIO">readIO</a></code>.
</p></div></div><h2 id="g:29">Exception handling in the I/O monad
</h2><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:IOError" class="def">IOError</a> = <a href="../base-4.5.1.0/Control-Exception-Base.html#t:IOException">IOException</a><a href="../base-4.5.1.0/src/GHC-IO-Exception.html#IOError" class="link">Source</a></p><div class="doc"><p>The Haskell 98 type for exceptions in the <code><a href="Prelude.html#t:IO">IO</a></code> monad.
 Any I/O operation may raise an <code><a href="Prelude.html#t:IOError">IOError</a></code> instead of returning a result.
 For a more general type of exception, including also those that arise
 in pure code, see <a href="Control-Exception-Exception.html">Control.Exception.Exception</a>.
</p><p>In Haskell 98, this is an opaque type.
</p></div></div><div class="top"><p class="src"><a name="v:ioError" class="def">ioError</a> ::  <a href="Prelude.html#t:IOError">IOError</a> -&gt; <a href="Prelude.html#t:IO">IO</a> a<a href="../base-4.5.1.0/src/GHC-IO-Exception.html#ioError" class="link">Source</a></p><div class="doc"><p>Raise an <code><a href="Prelude.html#t:IOError">IOError</a></code> in the <code><a href="Prelude.html#t:IO">IO</a></code> monad.
</p></div></div><div class="top"><p class="src"><a name="v:userError" class="def">userError</a> :: <a href="Prelude.html#t:String">String</a> -&gt; <a href="Prelude.html#t:IOError">IOError</a><a href="../base-4.5.1.0/src/GHC-IO-Exception.html#userError" class="link">Source</a></p><div class="doc"><p>Construct an <code><a href="Prelude.html#t:IOError">IOError</a></code> value with a string describing the error.
 The <code><a href="Prelude.html#v:fail">fail</a></code> method of the <code><a href="Prelude.html#t:IO">IO</a></code> instance of the <code><a href="Prelude.html#t:Monad">Monad</a></code> class raises a
 <code><a href="Prelude.html#v:userError">userError</a></code>, thus:
</p><pre> instance Monad IO where 
   ...
   fail s = ioError (userError s)
</pre></div></div><div class="top"><p class="src"><a name="v:catch" class="def">catch</a> ::  <a href="Prelude.html#t:IO">IO</a> a -&gt; (<a href="Prelude.html#t:IOError">IOError</a> -&gt; <a href="Prelude.html#t:IO">IO</a> a) -&gt; <a href="Prelude.html#t:IO">IO</a> a</p><div class="doc"><p>The <code><a href="Prelude.html#v:catch">catch</a></code> function establishes a handler that receives any
 <code><a href="Prelude.html#t:IOError">IOError</a></code> raised in the action protected by <code><a href="Prelude.html#v:catch">catch</a></code>.
 An <code><a href="Prelude.html#t:IOError">IOError</a></code> is caught by
 the most recent handler established by one of the exception handling
 functions.  These handlers are
 not selective: all <code><a href="Prelude.html#t:IOError">IOError</a></code>s are caught.  Exception propagation
 must be explicitly provided in a handler by re-raising any unwanted
 exceptions.  For example, in
</p><pre> f = catch g (\e -&gt; if IO.isEOFError e then return [] else ioError e)
</pre><p>the function <code>f</code> returns <code>[]</code> when an end-of-file exception
 (cf. <code><a href="../base-4.5.1.0/System-IO-Error.html#v:isEOFError">isEOFError</a></code>) occurs in <code>g</code>; otherwise, the
 exception is propagated to the next outer handler.
</p><p>When an exception propagates outside the main program, the Haskell
 system prints the associated <code><a href="Prelude.html#t:IOError">IOError</a></code> value and exits the program.
</p><p>Non-I/O exceptions are not caught by this variant; to catch all
 exceptions, use <code><a href="../base-4.5.1.0/Control-Exception.html#v:catch">catch</a></code> from <a href="../base-4.5.1.0/Control-Exception.html">Control.Exception</a>.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>