-
Notifications
You must be signed in to change notification settings - Fork 0
/
Eta-Prelude-Types-Bool.html
10 lines (10 loc) · 17.8 KB
/
Eta-Prelude-Types-Bool.html
1
2
3
4
5
6
7
8
9
10
<!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>Eta.Prelude.Types.Bool</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Eta-Prelude-Types-Bool.html");};
//]]>
</script></head><body class="no-frame"><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 empty"> </p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr></table><p class="caption">Eta.Prelude.Types.Bool</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>The <code><a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></code> type and its operations</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-">(&&)</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:-124--124-">(||)</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:not">not</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:otherwise">otherwise</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Bool" class="def">Bool</a> :: * <a href="#t:Bool" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:False" class="def">False</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a id="v:True" class="def">True</a></td><td class="doc empty"> </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 clearfix"><span class="inst-left"><span id="control.i:id:Bool:Bounded:1" class="instance expander" onclick="toggleSection('i:id:Bool:Bounded:1')"></span> Bounded <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:Bounded:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:minBound">minBound</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p><p class="src"><a href="#v:maxBound">maxBound</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Bool:Enum:2" class="instance expander" onclick="toggleSection('i:id:Bool:Enum:2')"></span> Enum <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:Enum:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:succ">succ</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p><p class="src"><a href="#v:pred">pred</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p><p class="src"><a href="#v:toEnum">toEnum</a> :: Int -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p><p class="src"><a href="#v:fromEnum">fromEnum</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> Int</p><p class="src"><a href="#v:enumFrom">enumFrom</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> [<a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>]</p><p class="src"><a href="#v:enumFromThen">enumFromThen</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> [<a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>]</p><p class="src"><a href="#v:enumFromTo">enumFromTo</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> [<a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>]</p><p class="src"><a href="#v:enumFromThenTo">enumFromThenTo</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> [<a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>]</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Bool:Eq:3" class="instance expander" onclick="toggleSection('i:id:Bool:Eq:3')"></span> Eq <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:Eq:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Bool:Ord:4" class="instance expander" onclick="toggleSection('i:id:Bool:Ord:4')"></span> Ord <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:Ord:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> Ordering</p><p class="src"><a href="#v:-60-">(<)</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p><p class="src"><a href="#v:-60--61-">(<=)</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p><p class="src"><a href="#v:-62-">(>)</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p><p class="src"><a href="#v:-62--61-">(>=)</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Bool:Read:5" class="instance expander" onclick="toggleSection('i:id:Bool:Read:5')"></span> Read <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:Read:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: Int -> ReadS <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p><p class="src"><a href="#v:readList">readList</a> :: ReadS [<a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>]</p><p class="src"><a href="#v:readPrec">readPrec</a> :: ReadPrec <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: ReadPrec [<a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>]</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Bool:Show:6" class="instance expander" onclick="toggleSection('i:id:Bool:Show:6')"></span> Show <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:Show:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: Int -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> ShowS</p><p class="src"><a href="#v:show">show</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> String <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>] -> ShowS</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Bool:Generic:7" class="instance expander" onclick="toggleSection('i:id:Bool:Generic:7')"></span> Generic <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:Generic:7" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> Rep <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> :: * -> *</p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from">from</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> Rep <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> x</p><p class="src"><a href="#v:to">to</a> :: Rep <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> x -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Bool:SingI:8" class="instance expander" onclick="toggleSection('i:id:Bool:SingI:8')"></span> SingI <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> <a href="Eta-Prelude-Types-Bool.html#v:False">False</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:SingI:8" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:sing">sing</a> :: Sing <a href="Eta-Prelude-Types-Bool.html#v:False">False</a> a</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Bool:SingI:9" class="instance expander" onclick="toggleSection('i:id:Bool:SingI:9')"></span> SingI <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> <a href="Eta-Prelude-Types-Bool.html#v:True">True</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:SingI:9" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:sing">sing</a> :: Sing <a href="Eta-Prelude-Types-Bool.html#v:True">True</a> a</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Bool:SingKind:10" class="instance expander" onclick="toggleSection('i:id:Bool:SingKind:10')"></span> SingKind <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> (KProxy <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>)</span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:SingKind:10" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> DemoteRep (KProxy <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>) (kparam :: KProxy (KProxy <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>)) :: *</p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fromSing">fromSing</a> :: Sing (KProxy <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>) a -> DemoteRep (KProxy <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>) kparam</p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Bool:Rep:11" class="instance expander" onclick="toggleSection('i:id:Bool:Rep:11')"></span> <span class="keyword">type</span> Rep <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:Rep:11" class="inst-details hide"><div class="src"><span class="keyword">type</span> Rep <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> = D1 (MetaData "Bool" "GHC.Types" "ghc-prim" <a href="Eta-Prelude-Types-Bool.html#v:False">False</a>) ((:+:) (C1 (MetaCons "False" PrefixI <a href="Eta-Prelude-Types-Bool.html#v:False">False</a>) U1) (C1 (MetaCons "True" PrefixI <a href="Eta-Prelude-Types-Bool.html#v:False">False</a>) U1))</div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Bool:Sing:12" class="instance expander" onclick="toggleSection('i:id:Bool:Sing:12')"></span> <span class="keyword">data</span> Sing <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:Sing:12" class="inst-details hide"><div class="src"><span class="keyword">data</span> Sing <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> <span class="keyword">where</span><ul class="inst"><li class="inst"><a id="v:STrue" class="def">STrue</a> :: Sing <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> <a href="Eta-Prelude-Types-Bool.html#v:True">True</a></li><li class="inst"><a id="v:SFalse" class="def">SFalse</a> :: Sing <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> <a href="Eta-Prelude-Types-Bool.html#v:False">False</a></li></ul></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Bool:-61--61-:13" class="instance expander" onclick="toggleSection('i:id:Bool:-61--61-:13')"></span> <span class="keyword">type</span> (==) <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> a b</span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:-61--61-:13" class="inst-details hide"><div class="src"><span class="keyword">type</span> (==) <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> a b = EqBool a b</div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Bool:DemoteRep:14" class="instance expander" onclick="toggleSection('i:id:Bool:DemoteRep:14')"></span> <span class="keyword">type</span> DemoteRep <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> (KProxy <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>)</span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Bool:DemoteRep:14" class="inst-details hide"><div class="src"><span class="keyword">type</span> DemoteRep <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> (KProxy <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a>) = <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:-38--38-" class="def">(&&)</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> <a href="#v:-38--38-" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:-124--124-" class="def">(||)</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> <a href="#v:-124--124-" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:not" class="def">not</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> -> <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> <a href="#v:not" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:otherwise" class="def">otherwise</a> :: <a href="Eta-Prelude-Types-Bool.html#t:Bool">Bool</a> <a href="#v:otherwise" class="selflink">#</a></p><div class="doc"><p><code><a href="Eta-Prelude-Types-Bool.html#v:otherwise">otherwise</a></code> is defined as <code><a href="Eta-Prelude-Types-Bool.html#v:True">True</a></code>.</p><p>Used for guards:</p><pre>factorial :: Int -> Int
factorial n
| n == 0 = 1
| otherwise = n * factorial (n - 1)
</pre><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>factorial 3
</code></strong>6
</pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.4</p></div></body></html>