Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 40e401489b664c2e3ea50bf8afe9bf02 > files > 39

ghc-primitive-devel-0.3.1-2.fc15.i686.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.Primitive.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_Data-Primitive-Types.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Primitive-Types.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">primitive-0.3.1: Wrappers for primitive operations</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable</td></tr><tr><th>Maintainer</th><td>Roman Leshchinskiy &lt;rl@cse.unsw.edu.au&gt;</td></tr></table><p class="caption">Data.Primitive.Types</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Basic types and classes for primitive array 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">class</span>  <a href="#t:Prim">Prim</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:sizeOf-35-">sizeOf#</a> :: a -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a></li><li><a href="#v:alignment-35-">alignment#</a> :: a -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a></li><li><a href="#v:indexByteArray-35-">indexByteArray#</a> :: <a href="Data-Primitive-ByteArray.html#t:ByteArray-35-">ByteArray#</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; a</li><li><a href="#v:readByteArray-35-">readByteArray#</a> ::  <a href="Data-Primitive-ByteArray.html#t:MutableByteArray-35-">MutableByteArray#</a> s -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s -&gt; (#<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s, a#)</li><li><a href="#v:writeByteArray-35-">writeByteArray#</a> ::  <a href="Data-Primitive-ByteArray.html#t:MutableByteArray-35-">MutableByteArray#</a> s -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s</li><li><a href="#v:indexOffAddr-35-">indexOffAddr#</a> :: <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Addr-35-">Addr#</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; a</li><li><a href="#v:readOffAddr-35-">readOffAddr#</a> ::  <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Addr-35-">Addr#</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s -&gt; (#<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s, a#)</li><li><a href="#v:writeOffAddr-35-">writeOffAddr#</a> ::  <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Addr-35-">Addr#</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s</li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Addr">Addr</a>  = <a href="#v:Addr">Addr</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Addr-35-">Addr#</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Prim" class="def">Prim</a> a  <span class="keyword">where</span><a href="src/Data-Primitive-Types.html#Prim" class="link">Source</a></p><div class="doc"><p>Class of types supporting primitive array operations
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:sizeOf-35-" class="def">sizeOf#</a> :: a -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a><a href="src/Data-Primitive-Types.html#sizeOf%23" class="link">Source</a></p><div class="doc"><p>Size of values of type <code>a</code>. The argument is not used.
</p></div><p class="src"><a name="v:alignment-35-" class="def">alignment#</a> :: a -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a><a href="src/Data-Primitive-Types.html#alignment%23" class="link">Source</a></p><div class="doc"><p>Alignment of values of type <code>a</code>. The argument is not used.
</p></div><p class="src"><a name="v:indexByteArray-35-" class="def">indexByteArray#</a> :: <a href="Data-Primitive-ByteArray.html#t:ByteArray-35-">ByteArray#</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; a<a href="src/Data-Primitive-Types.html#indexByteArray%23" class="link">Source</a></p><div class="doc"><p>Read a value from the array. The offset is in elements of type
 <code>a</code> rather than in bytes.
</p></div><p class="src"><a name="v:readByteArray-35-" class="def">readByteArray#</a> ::  <a href="Data-Primitive-ByteArray.html#t:MutableByteArray-35-">MutableByteArray#</a> s -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s -&gt; (#<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s, a#)<a href="src/Data-Primitive-Types.html#readByteArray%23" class="link">Source</a></p><div class="doc"><p>Read a value from the mutable array. The offset is in elements of type
 <code>a</code> rather than in bytes.
</p></div><p class="src"><a name="v:writeByteArray-35-" class="def">writeByteArray#</a> ::  <a href="Data-Primitive-ByteArray.html#t:MutableByteArray-35-">MutableByteArray#</a> s -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s<a href="src/Data-Primitive-Types.html#writeByteArray%23" class="link">Source</a></p><div class="doc"><p>Write a value to the mutable array. The offset is in elements of type
 <code>a</code> rather than in bytes.
</p></div><p class="src"><a name="v:indexOffAddr-35-" class="def">indexOffAddr#</a> :: <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Addr-35-">Addr#</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; a<a href="src/Data-Primitive-Types.html#indexOffAddr%23" class="link">Source</a></p><div class="doc"><p>Read a value from a memory position given by an address and an offset.
 The memory block the address refers to must be immutable. The offset is in
 elements of type <code>a</code> rather than in bytes.
</p></div><p class="src"><a name="v:readOffAddr-35-" class="def">readOffAddr#</a> ::  <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Addr-35-">Addr#</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s -&gt; (#<a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s, a#)<a href="src/Data-Primitive-Types.html#readOffAddr%23" class="link">Source</a></p><div class="doc"><p>Read a value from a memory position given by an address and an offset.
 The offset is in elements of type <code>a</code> rather than in bytes.
</p></div><p class="src"><a name="v:writeOffAddr-35-" class="def">writeOffAddr#</a> ::  <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Addr-35-">Addr#</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s -&gt; <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:State-35-">State#</a> s<a href="src/Data-Primitive-Types.html#writeOffAddr%23" class="link">Source</a></p><div class="doc"><p>Write a value to a memory position given by an address and an offset.
 The offset is in elements of type <code>a</code> rather than in bytes.
</p></div></div><div class="subs instances"><p id="control.i:Prim" class="caption collapser" onclick="toggleSection('i:Prim')">Instances</p><div id="section.i:Prim" class="show"><table><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int8">Int8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int16">Int16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int32">Int32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int64">Int64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Word.html#t:Word">Word</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Word.html#t:Word8">Word8</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Word.html#t:Word16">Word16</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Word.html#t:Word32">Word32</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Word.html#t:Word64">Word64</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="Data-Primitive-Types.html#t:Addr">Addr</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:Addr" class="def">Addr</a>  <a href="src/Data-Primitive-Types.html#Addr" class="link">Source</a></p><div class="doc"><p>A machine address
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Addr" class="def">Addr</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Prim.html#t:Addr-35-">Addr#</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Addr" class="caption collapser" onclick="toggleSection('i:Addr')">Instances</p><div id="section.i:Addr" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Data-Primitive-Types.html#t:Addr">Addr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Data.html#t:Data">Data</a> <a href="Data-Primitive-Types.html#t:Addr">Addr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Data-Primitive-Types.html#t:Addr">Addr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Typeable.html#t:Typeable">Typeable</a> <a href="Data-Primitive-Types.html#t:Addr">Addr</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Primitive-Types.html#t:Prim">Prim</a> <a href="Data-Primitive-Types.html#t:Addr">Addr</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.9.2</p></div></body></html>