Sophie

Sophie

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

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>GHC.Types</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_GHC-Types.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">ghc-prim-0.2.0.0: GHC primitives</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable (GHC Extensions)</td></tr><tr><th>Stability</th><td>internal</td></tr><tr><th>Maintainer</th><td>cvs-ghc@haskell.org</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">GHC.Types</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>GHC type definitions.
 Use GHC.Exts from the base package instead of importing this
 module directly.
</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"><span class="keyword">data</span>  <a href="#t:Char">Char</a>  = <a href="#v:C-35-">C#</a> <a href="GHC-Prim.html#t:Char-35-">Char#</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Int">Int</a>  = <a href="#v:I-35-">I#</a> <a href="GHC-Prim.html#t:Int-35-">Int#</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Float">Float</a>  = <a href="#v:F-35-">F#</a> <a href="GHC-Prim.html#t:Float-35-">Float#</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Double">Double</a>  = <a href="#v:D-35-">D#</a> <a href="GHC-Prim.html#t:Double-35-">Double#</a></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">newtype</span>  <a href="#t:IO">IO</a> a = <a href="#v:IO">IO</a> (<a href="GHC-Prim.html#t:State-35-">State#</a> <a href="GHC-Prim.html#t:RealWorld">RealWorld</a> -&gt; (#<a href="GHC-Prim.html#t:State-35-">State#</a> <a href="GHC-Prim.html#t:RealWorld">RealWorld</a>, a#))</li></ul></div><div id="interface"><h1>Documentation</h1><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">Eq <a href="GHC-Types.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Ord <a href="GHC-Types.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="GHC-Generics.html#t:Generic">Generic</a> <a href="GHC-Types.html#t:Bool">Bool</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="doc"><p>The character type <code><a href="GHC-Types.html#t:Char">Char</a></code> is an enumeration whose values represent
Unicode (or equivalently ISO/IEC 10646) characters (see
<a href="http://www.unicode.org/">http://www.unicode.org/</a> for details).  This set extends the ISO 8859-1
(Latin-1) character set (the first 256 characters), which is itself an extension
of the ASCII character set (the first 128 characters).  A character literal in
Haskell has type <code><a href="GHC-Types.html#t:Char">Char</a></code>.
</p><p>To convert a <code><a href="GHC-Types.html#t:Char">Char</a></code> to or from the corresponding <code><a href="GHC-Types.html#t:Int">Int</a></code> value defined
by Unicode, use <code><a href="Prelude.html#v:toEnum">toEnum</a></code> and <code><a href="Prelude.html#v:fromEnum">fromEnum</a></code> from the
<code><a href="Prelude.html#t:Enum">Enum</a></code> class respectively (or equivalently <code>ord</code> and <code>chr</code>).
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:C-35-" class="def">C#</a> <a href="GHC-Prim.html#t:Char-35-">Char#</a></td><td class="doc empty">&nbsp;</td></tr></table></div><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">Eq <a href="GHC-Types.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Ord <a href="GHC-Types.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="GHC-Generics.html#t:Generic">Generic</a> <a href="GHC-Types.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">data</span>  <a name="t:Int" class="def">Int</a>  </p><div class="doc"><p>A fixed-precision integer type with at least the range <code>[-2^29 .. 2^29-1]</code>.
 The exact range for a given implementation can be determined by using
 <code><a href="Prelude.html#v:minBound">minBound</a></code> and <code><a href="Prelude.html#v:maxBound">maxBound</a></code> from the <code><a href="Prelude.html#t:Bounded">Bounded</a></code> class.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:I-35-" class="def">I#</a> <a href="GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc empty">&nbsp;</td></tr></table></div><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">Eq <a href="GHC-Types.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Ord <a href="GHC-Types.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="GHC-Generics.html#t:Generic">Generic</a> <a href="GHC-Types.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:Float" class="def">Float</a>  </p><div class="doc"><p>Single-precision floating point numbers.
 It is desirable that this type be at least equal in range and precision
 to the IEEE single-precision type.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:F-35-" class="def">F#</a> <a href="GHC-Prim.html#t:Float-35-">Float#</a></td><td class="doc empty">&nbsp;</td></tr></table></div><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">Eq <a href="GHC-Types.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Ord <a href="GHC-Types.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="GHC-Generics.html#t:Generic">Generic</a> <a href="GHC-Types.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="doc"><p>Double-precision floating point numbers.
 It is desirable that this type be at least equal in range and precision
 to the IEEE double-precision type.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:D-35-" class="def">D#</a> <a href="GHC-Prim.html#t:Double-35-">Double#</a></td><td class="doc empty">&nbsp;</td></tr></table></div><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">Eq <a href="GHC-Types.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Ord <a href="GHC-Types.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="GHC-Generics.html#t:Generic">Generic</a> <a href="GHC-Types.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">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">Eq <a href="GHC-Types.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Ord <a href="GHC-Types.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="GHC-Generics.html#t:Generic">Generic</a> <a href="GHC-Types.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">newtype</span>  <a name="t:IO" class="def">IO</a> a </p><div class="doc"><p>A value of type <code><code><a href="GHC-Types.html#t:IO">IO</a></code> a</code> is a computation which, when performed,
does some I/O before returning a value of type <code>a</code>.
</p><p>There is really only one way to &quot;perform&quot; an I/O action: bind it to
<code>Main.main</code> in your program.  When your program is run, the I/O will
be performed.  It isn't possible to perform I/O from an arbitrary
function, unless that function is itself in the <code><a href="GHC-Types.html#t:IO">IO</a></code> monad and called
at some point, directly or indirectly, from <code>Main.main</code>.
</p><p><code><a href="GHC-Types.html#t:IO">IO</a></code> is a monad, so <code><a href="GHC-Types.html#t:IO">IO</a></code> actions can be combined using either the do-notation
or the <code>&gt;&gt;</code> and <code>&gt;&gt;=</code> operations from the <code>Monad</code> class.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:IO" class="def">IO</a> (<a href="GHC-Prim.html#t:State-35-">State#</a> <a href="GHC-Prim.html#t:RealWorld">RealWorld</a> -&gt; (#<a href="GHC-Prim.html#t:State-35-">State#</a> <a href="GHC-Prim.html#t:RealWorld">RealWorld</a>, a#))</td><td class="doc empty">&nbsp;</td></tr></table></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>