Sophie

Sophie

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

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>Data.Word</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-Word.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">haskell2010-1.1.0.1: Compatibility with Haskell 2010</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">Data.Word</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Unsigned integral types
</a></li></ul></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:Word">Word</a> </li><li class="src short"><span class="keyword">data</span>  <a href="#t:Word8">Word8</a> </li><li class="src short"><span class="keyword">data</span>  <a href="#t:Word16">Word16</a> </li><li class="src short"><span class="keyword">data</span>  <a href="#t:Word32">Word32</a> </li><li class="src short"><span class="keyword">data</span>  <a href="#t:Word64">Word64</a> </li></ul></div><div id="interface"><h1 id="g:1">Unsigned integral types
</h1><div class="doc"><p>This module provides unsigned integer types of unspecified width (<code><a href="Data-Word.html#t:Word">Word</a></code>)
and fixed widths (<code><a href="Data-Word.html#t:Word8">Word8</a></code>, <code><a href="Data-Word.html#t:Word16">Word16</a></code>, <code><a href="Data-Word.html#t:Word32">Word32</a></code> and <code><a href="Data-Word.html#t:Word64">Word64</a></code>).  All
arithmetic is performed modulo 2^n, where <code>n</code> is the number of bits in
the type.
</p><p>For coercing between any two integer types, use
<code><a href="Prelude.html#v:fromIntegral">fromIntegral</a></code>.  Coercing word types to and from integer
types preserves representation, not sign.
</p><p>The rules that hold for <code><a href="Prelude.html#t:Enum">Enum</a></code> instances over a bounded type
such as <code><a href="Prelude.html#t:Int">Int</a></code> (see the section of the Haskell language report dealing
with arithmetic sequences) also hold for the <code><a href="Prelude.html#t:Enum">Enum</a></code> instances
over the various <code><a href="Data-Word.html#t:Word">Word</a></code> types defined here.
</p><p>Right and left shifts by amounts greater than or equal to the width of
the type result in a zero result.  This is contrary to the behaviour
in C, which is undefined; a common interpretation is to truncate the
shift count to the width of the type, for example <code>1 &lt;&lt; 32 == 1</code> in
some C implementations.
</p></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Word" class="def">Word</a>  <a href="../base-4.5.1.0/src/GHC-Word.html#Word" class="link">Source</a></p><div class="doc"><p>A <code><a href="Data-Word.html#t:Word">Word</a></code> is an unsigned integral type, with the same size as <code><a href="Prelude.html#t:Int">Int</a></code>.
</p></div><div class="subs instances"><p id="control.i:Word" class="caption collapser" onclick="toggleSection('i:Word')">Instances</p><div id="section.i:Word" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Ix.html#t:Ix">Ix</a> <a href="Data-Word.html#t:Word">Word</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="Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Foreign-Storable.html#t:Storable">Storable</a> <a href="Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Bits.html#t:Bits">Bits</a> <a href="Data-Word.html#t:Word">Word</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:Word8" class="def">Word8</a>  <a href="../base-4.5.1.0/src/GHC-Word.html#Word8" class="link">Source</a></p><div class="doc"><p>8-bit unsigned integer type
</p></div><div class="subs instances"><p id="control.i:Word8" class="caption collapser" onclick="toggleSection('i:Word8')">Instances</p><div id="section.i:Word8" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Ix.html#t:Ix">Ix</a> <a href="Data-Word.html#t:Word8">Word8</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="Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Foreign-Storable.html#t:Storable">Storable</a> <a href="Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Bits.html#t:Bits">Bits</a> <a href="Data-Word.html#t:Word8">Word8</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:Word16" class="def">Word16</a>  <a href="../base-4.5.1.0/src/GHC-Word.html#Word16" class="link">Source</a></p><div class="doc"><p>16-bit unsigned integer type
</p></div><div class="subs instances"><p id="control.i:Word16" class="caption collapser" onclick="toggleSection('i:Word16')">Instances</p><div id="section.i:Word16" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Ix.html#t:Ix">Ix</a> <a href="Data-Word.html#t:Word16">Word16</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="Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Foreign-Storable.html#t:Storable">Storable</a> <a href="Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Bits.html#t:Bits">Bits</a> <a href="Data-Word.html#t:Word16">Word16</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:Word32" class="def">Word32</a>  <a href="../base-4.5.1.0/src/GHC-Word.html#Word32" class="link">Source</a></p><div class="doc"><p>32-bit unsigned integer type
</p></div><div class="subs instances"><p id="control.i:Word32" class="caption collapser" onclick="toggleSection('i:Word32')">Instances</p><div id="section.i:Word32" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Ix.html#t:Ix">Ix</a> <a href="Data-Word.html#t:Word32">Word32</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="Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Foreign-Storable.html#t:Storable">Storable</a> <a href="Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Bits.html#t:Bits">Bits</a> <a href="Data-Word.html#t:Word32">Word32</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:Word64" class="def">Word64</a>  <a href="../base-4.5.1.0/src/GHC-Word.html#Word64" class="link">Source</a></p><div class="doc"><p>64-bit unsigned integer type
</p></div><div class="subs instances"><p id="control.i:Word64" class="caption collapser" onclick="toggleSection('i:Word64')">Instances</p><div id="section.i:Word64" class="show"><table><tr><td class="src"><a href="Prelude.html#t:Bounded">Bounded</a> <a href="Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Enum">Enum</a> <a href="Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Eq">Eq</a> <a href="Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Integral">Integral</a> <a href="Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Num">Num</a> <a href="Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Ord">Ord</a> <a href="Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Read">Read</a> <a href="Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Real">Real</a> <a href="Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Prelude.html#t:Show">Show</a> <a href="Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Ix.html#t:Ix">Ix</a> <a href="Data-Word.html#t:Word64">Word64</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="Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Foreign-Storable.html#t:Storable">Storable</a> <a href="Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Bits.html#t:Bits">Bits</a> <a href="Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr></table></div></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>