581 lines
29 KiB
HTML
581 lines
29 KiB
HTML
<?xml version="1.0" encoding="iso-8859-1" ?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<!--http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd-->
|
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
>
|
|
<head><title>37 Foreign.Storable</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)" />
|
|
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)" />
|
|
<!-- 2,html,xhtml -->
|
|
<meta name="src" content="haskell.tex" />
|
|
<meta name="date" content="2010-07-20 13:11:00" />
|
|
<link rel="stylesheet" type="text/css" href="haskell.css" />
|
|
</head><body
|
|
>
|
|
<!--l. 1--><div class="crosslinks"><p class="noindent">[<a
|
|
href="haskellch38.html" >next</a>] [<a
|
|
href="haskellch36.html" >prev</a>] [<a
|
|
href="haskellch36.html#tailhaskellch36.html" >prev-tail</a>] [<a
|
|
href="#tailhaskellch37.html">tail</a>] [<a
|
|
href="haskellpa2.html#haskellch37.html" >up</a>] </p></div>
|
|
<h2 class="chapterHead"><span class="titlemark">Chapter 37</span><br /><a
|
|
id="x45-31300037"></a><span
|
|
class="pcrr7t-">Foreign.Storable</span></h2>
|
|
<div class="quote">
|
|
|
|
|
|
|
|
<div class="verbatim" id="verbatim-457">
|
|
module Foreign.Storable (
|
|
 <br />    Storable(sizeOf,
|
|
 <br />             alignment,
|
|
 <br />             peekElemOff,
|
|
 <br />             pokeElemOff,
|
|
 <br />             peekByteOff,
|
|
 <br />             pokeByteOff,
|
|
 <br />             peek,
|
|
 <br />             poke)
|
|
 <br />  ) where
|
|
</div>
|
|
<p class="noindent"></div>
|
|
<dl><dt class="haddockdesc">
|
|
<!--tex4ht:inline--><div class="tabular"> <table id="TBL-598" class="tabular"
|
|
cellspacing="0" cellpadding="0" rules="groups"
|
|
><colgroup id="TBL-598-1g"><col
|
|
id="TBL-598-1" /></colgroup><tr
|
|
style="vertical-align:baseline;" id="TBL-598-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-598-1-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">class</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> a</span><span
|
|
class="pcrb7t-"> where </span></td></tr></table> </div> <dd class="haddockdesc">
|
|
The member functions of this class facilitate writing values of primitive types to raw memory (which
|
|
may have been allocated with the above mentioned routines) and reading values from blocks of
|
|
raw memory. The class, furthermore, includes support for computing the storage requirements and
|
|
alignment restrictions of storable types.
|
|
<p class="noindent"> Memory addresses are represented as values of type <span
|
|
class="pcrr7t-">Ptr</span><span
|
|
class="pcrr7t-"> a</span>, for some <span
|
|
class="pcrr7t-">a </span>which is an instance of class
|
|
<span
|
|
class="pcrr7t-">Storable</span><a
|
|
id="dx45-313001"></a>. The type argument to <span
|
|
class="pcrr7t-">Ptr</span><a
|
|
id="dx45-313002"></a> helps provide some valuable type safety in FFI code (you can’t
|
|
mix pointers of different types without an explicit cast), while helping the Haskell type system figure
|
|
out which marshalling method is needed for a given pointer.
|
|
<p class="noindent"> All marshalling between Haskell and a foreign language ultimately boils down to translating Haskell
|
|
data structures into the binary representation of a corresponding data structure of the foreign language
|
|
and vice versa. To code this marshalling in Haskell, it is necessary to manipulate primitive data types
|
|
stored in unstructured memory blocks. The class <span
|
|
class="pcrr7t-">Storable</span><a
|
|
id="dx45-313003"></a> facilitates this manipulation on all types
|
|
for which it is instantiated, which are the standard basic types of Haskell, the fixed size <span
|
|
class="pcrr7t-">Int </span>types
|
|
(<span
|
|
class="pcrr7t-">Int8</span><a
|
|
id="dx45-313004"></a>, <span
|
|
class="pcrr7t-">Int16</span><a
|
|
id="dx45-313005"></a>, <span
|
|
class="pcrr7t-">Int32</span><a
|
|
id="dx45-313006"></a>, <span
|
|
class="pcrr7t-">Int64</span><a
|
|
id="dx45-313007"></a>), the fixed size <span
|
|
class="pcrr7t-">Word </span>types (<span
|
|
class="pcrr7t-">Word8</span><a
|
|
id="dx45-313008"></a>, <span
|
|
class="pcrr7t-">Word16</span><a
|
|
id="dx45-313009"></a>, <span
|
|
class="pcrr7t-">Word32</span><a
|
|
id="dx45-313010"></a>, <span
|
|
class="pcrr7t-">Word64</span><a
|
|
id="dx45-313011"></a>),
|
|
<span
|
|
class="pcrr7t-">StablePtr</span><a
|
|
id="dx45-313012"></a>, all types from <span
|
|
class="pcrr7t-">Foreign.C.Types</span>, as well as <span
|
|
class="pcrr7t-">Ptr</span><a
|
|
id="dx45-313013"></a>.
|
|
<p class="noindent"> Minimal complete definition: <span
|
|
class="pcrr7t-">sizeOf</span><a
|
|
id="dx45-313014"></a>, <span
|
|
class="pcrr7t-">alignment</span><a
|
|
id="dx45-313015"></a>, one of <span
|
|
class="pcrr7t-">peek</span><a
|
|
id="dx45-313016"></a>, <span
|
|
class="pcrr7t-">peekElemOff</span><a
|
|
id="dx45-313017"></a> and
|
|
<span
|
|
class="pcrr7t-">peekByteOff</span><a
|
|
id="dx45-313018"></a>, and one of <span
|
|
class="pcrr7t-">poke</span><a
|
|
id="dx45-313019"></a>, <span
|
|
class="pcrr7t-">pokeElemOff</span><a
|
|
id="dx45-313020"></a> and <span
|
|
class="pcrr7t-">pokeByteOff</span><a
|
|
id="dx45-313021"></a>.
|
|
<p class="noindent"> <span
|
|
class="ptmb7t-">Methods</span>
|
|
<dl> <dt class="haddockdesc">
|
|
<!--tex4ht:inline--><div class="tabular"> <table id="TBL-599" class="tabular"
|
|
cellspacing="0" cellpadding="0" rules="groups"
|
|
><colgroup id="TBL-599-1g"><col
|
|
id="TBL-599-1" /></colgroup><tr
|
|
style="vertical-align:baseline;" id="TBL-599-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-599-1-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">sizeOf</span><span
|
|
class="pcrb7t-"> ::</span><span
|
|
class="pcrb7t-"> a</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> Int </span></td></tr></table> </div> <dd class="haddockdesc">
|
|
Computes the storage requirements (in bytes) of the argument. The value of the argument is not
|
|
used.
|
|
</dl>
|
|
<dl> <dt class="haddockdesc">
|
|
<!--tex4ht:inline--><div class="tabular"> <table id="TBL-600" class="tabular"
|
|
cellspacing="0" cellpadding="0" rules="groups"
|
|
><colgroup id="TBL-600-1g"><col
|
|
id="TBL-600-1" /></colgroup><tr
|
|
style="vertical-align:baseline;" id="TBL-600-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-600-1-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">alignment</span><span
|
|
class="pcrb7t-"> ::</span><span
|
|
class="pcrb7t-"> a</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> Int </span></td></tr></table> </div> <dd class="haddockdesc">
|
|
Computes the alignment constraint of the argument. An alignment constraint <span
|
|
class="pcrr7t-">x </span>is fulfilled by any
|
|
address divisible by <span
|
|
class="pcrr7t-">x</span>. The value of the argument is not used.
|
|
</dl>
|
|
|
|
|
|
|
|
<dl> <dt class="haddockdesc">
|
|
<!--tex4ht:inline--><div class="tabular"> <table id="TBL-601" class="tabular"
|
|
cellspacing="0" cellpadding="0" rules="groups"
|
|
><colgroup id="TBL-601-1g"><col
|
|
id="TBL-601-1" /></colgroup><tr
|
|
style="vertical-align:baseline;" id="TBL-601-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-601-1-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">peekElemOff</span><span
|
|
class="pcrb7t-"> ::</span><span
|
|
class="pcrb7t-"> Ptr</span><span
|
|
class="pcrb7t-"> a</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> Int</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> IO</span><span
|
|
class="pcrb7t-"> a </span></td></tr></table> </div> <dd class="haddockdesc">
|
|
Read a value from a memory area regarded as an array of values of the same kind. The first
|
|
argument specifies the start address of the array and the second the index into the array (the first
|
|
element of the array has index <span
|
|
class="pcrr7t-">0</span>). The following equality holds,
|
|
<div class="quote">
|
|
|
|
|
|
|
|
<div class="verbatim" id="verbatim-458">
|
|
 peekElemOff addr idx = IOExts.fixIO $ \result ->
|
|
 <br />   peek (addr ‘plusPtr‘ (idx ⋆ sizeOf result))
|
|
</div>
|
|
<p class="noindent"></div>
|
|
<p class="noindent"> Note that this is only a specification, not necessarily the concrete implementation of the
|
|
function.
|
|
</dl>
|
|
<dl> <dt class="haddockdesc">
|
|
<!--tex4ht:inline--><div class="tabular"> <table id="TBL-602" class="tabular"
|
|
cellspacing="0" cellpadding="0" rules="groups"
|
|
><colgroup id="TBL-602-1g"><col
|
|
id="TBL-602-1" /></colgroup><tr
|
|
style="vertical-align:baseline;" id="TBL-602-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-602-1-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">pokeElemOff</span><span
|
|
class="pcrb7t-"> ::</span><span
|
|
class="pcrb7t-"> Ptr</span><span
|
|
class="pcrb7t-"> a</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> Int</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> a</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> IO</span><span
|
|
class="pcrb7t-"> () </span></td></tr></table> </div> <dd class="haddockdesc">
|
|
Write a value to a memory area regarded as an array of values of the same kind. The following
|
|
equality holds:
|
|
<div class="quote">
|
|
|
|
|
|
|
|
<div class="verbatim" id="verbatim-459">
|
|
 pokeElemOff addr idx x =
|
|
 <br />   poke (addr ‘plusPtr‘ (idx ⋆ sizeOf x)) x
|
|
</div>
|
|
<p class="noindent"></div>
|
|
</dl>
|
|
<dl><dt class="haddockdesc">
|
|
<!--tex4ht:inline--><div class="tabular"> <table id="TBL-603" class="tabular"
|
|
cellspacing="0" cellpadding="0" rules="groups"
|
|
><colgroup id="TBL-603-1g"><col
|
|
id="TBL-603-1" /></colgroup><tr
|
|
style="vertical-align:baseline;" id="TBL-603-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-603-1-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">peekByteOff</span><span
|
|
class="pcrb7t-"> ::</span><span
|
|
class="pcrb7t-"> Ptr</span><span
|
|
class="pcrb7t-"> b</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> Int</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> IO</span><span
|
|
class="pcrb7t-"> a </span></td></tr></table> </div> <dd class="haddockdesc">
|
|
Read a value from a memory location given by a base address and offset. The following equality
|
|
holds:
|
|
<div class="quote">
|
|
|
|
|
|
|
|
<div class="verbatim" id="verbatim-460">
|
|
 peekByteOff addr off = peek (addr ‘plusPtr‘ off)
|
|
</div>
|
|
<p class="noindent"></div>
|
|
</dl>
|
|
<dl><dt class="haddockdesc">
|
|
<!--tex4ht:inline--><div class="tabular"> <table id="TBL-604" class="tabular"
|
|
cellspacing="0" cellpadding="0" rules="groups"
|
|
><colgroup id="TBL-604-1g"><col
|
|
id="TBL-604-1" /></colgroup><tr
|
|
style="vertical-align:baseline;" id="TBL-604-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-604-1-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">pokeByteOff</span><span
|
|
class="pcrb7t-"> ::</span><span
|
|
class="pcrb7t-"> Ptr</span><span
|
|
class="pcrb7t-"> b</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> Int</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> a</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> IO</span><span
|
|
class="pcrb7t-"> () </span></td></tr></table> </div> <dd class="haddockdesc">
|
|
Write a value to a memory location given by a base address and offset. The following equality
|
|
holds:
|
|
<div class="quote">
|
|
|
|
|
|
|
|
<div class="verbatim" id="verbatim-461">
|
|
 pokeByteOff addr off x = poke (addr ‘plusPtr‘ off) x
|
|
</div>
|
|
<p class="noindent"></div>
|
|
</dl>
|
|
<dl><dt class="haddockdesc">
|
|
<!--tex4ht:inline--><div class="tabular"> <table id="TBL-605" class="tabular"
|
|
cellspacing="0" cellpadding="0" rules="groups"
|
|
><colgroup id="TBL-605-1g"><col
|
|
id="TBL-605-1" /></colgroup><tr
|
|
style="vertical-align:baseline;" id="TBL-605-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-605-1-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">peek</span><span
|
|
class="pcrb7t-"> ::</span><span
|
|
class="pcrb7t-"> Ptr</span><span
|
|
class="pcrb7t-"> a</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> IO</span><span
|
|
class="pcrb7t-"> a </span></td></tr></table> </div> <dd class="haddockdesc">
|
|
Read a value from the given memory location.
|
|
<p class="noindent"> Note that the peek and poke functions might require properly aligned addresses to function
|
|
correctly. This is architecture dependent; thus, portable code should ensure that when peeking
|
|
or poking values of some type <span
|
|
class="pcrr7t-">a</span>, the alignment constraint for <span
|
|
class="pcrr7t-">a</span>, as given by the function
|
|
<span
|
|
class="pcrr7t-">alignment</span><a
|
|
id="dx45-313022"></a> is fulfilled.
|
|
</dl>
|
|
<dl> <dt class="haddockdesc">
|
|
<!--tex4ht:inline--><div class="tabular"> <table id="TBL-606" class="tabular"
|
|
cellspacing="0" cellpadding="0" rules="groups"
|
|
><colgroup id="TBL-606-1g"><col
|
|
id="TBL-606-1" /></colgroup><tr
|
|
style="vertical-align:baseline;" id="TBL-606-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-606-1-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">poke</span><span
|
|
class="pcrb7t-"> ::</span><span
|
|
class="pcrb7t-"> Ptr</span><span
|
|
class="pcrb7t-"> a</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> a</span><span
|
|
class="pcrb7t-"> -></span><span
|
|
class="pcrb7t-"> IO</span><span
|
|
class="pcrb7t-"> () </span></td></tr></table> </div> <dd class="haddockdesc">
|
|
Write the given value to the given memory location. Alignment restrictions might apply; see
|
|
<span
|
|
class="pcrr7t-">peek</span><a
|
|
id="dx45-313023"></a>.
|
|
</dl>
|
|
</dl>
|
|
<dl> <dt class="haddockdesc">
|
|
<!--tex4ht:inline--><div class="tabular"> <table id="TBL-607" class="tabular"
|
|
cellspacing="0" cellpadding="0" rules="groups"
|
|
><colgroup id="TBL-607-1g"><col
|
|
id="TBL-607-1" /></colgroup><tr
|
|
style="vertical-align:baseline;" id="TBL-607-1-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-1-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Bool </span></td></tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-2-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-2-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Char</span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-3-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-3-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Double </span></td></tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-4-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-4-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Float</span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-5-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-5-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Int </span></td></tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-6-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-6-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Int8</span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-7-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-7-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Int16 </span></td></tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-8-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-8-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Int32</span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-9-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-9-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Int64 </span></td></tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-10-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-10-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Word</span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-11-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-11-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Word8 </span></td></tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-12-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-12-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Word16</span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-13-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-13-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Word32 </span></td></tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-14-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-14-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> Word64</span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-15-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-15-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> WordPtr </span></td></tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-16-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-16-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> IntPtr</span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-17-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-17-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CChar </span></td></tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-18-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-18-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CSChar</span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-19-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-19-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CUChar </span></td></tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-20-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-20-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CShort</span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-21-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-21-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CUShort </span></td></tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-22-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-22-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CInt</span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-23-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-23-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CUInt </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-24-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-24-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CLong </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-25-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-25-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CULong </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-26-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-26-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CLLong </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-27-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-27-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CULLong </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-28-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-28-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CFloat </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-29-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-29-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CDouble </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-30-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-30-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CPtrdiff </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-31-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-31-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CSize </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-32-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-32-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CWchar </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-33-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-33-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CSigAtomic </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-34-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-34-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CClock </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-35-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-35-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CTime </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-36-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-36-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CIntPtr </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-37-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-37-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CUIntPtr </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-38-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-38-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CIntMax </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-39-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-39-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> CUIntMax </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-40-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-40-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> (StablePtr</span><span
|
|
class="pcrb7t-"> a) </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-41-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-41-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> (Ptr</span><span
|
|
class="pcrb7t-"> a) </span></td>
|
|
</tr><tr
|
|
style="vertical-align:baseline;" id="TBL-607-42-"><td style="white-space:nowrap; text-align:left;" id="TBL-607-42-1"
|
|
class="td11"><span
|
|
class="pcrb7t-">instance</span><span
|
|
class="pcrb7t-"> Storable</span><span
|
|
class="pcrb7t-"> (FunPtr</span><span
|
|
class="pcrb7t-"> a) </span></td>
|
|
</tr></table> </div> <dd class="haddockdesc">
|
|
</dl>
|
|
<!--l. 1--><div class="crosslinks"><p class="noindent">[<a
|
|
href="haskellch38.html" >next</a>] [<a
|
|
href="haskellch36.html" >prev</a>] [<a
|
|
href="haskellch36.html#tailhaskellch36.html" >prev-tail</a>] [<a
|
|
href="haskellch37.html" >front</a>] [<a
|
|
href="haskellpa2.html#haskellch37.html" >up</a>] </p></div>
|
|
|
|
|
|
|
|
<p class="noindent"> <a
|
|
id="tailhaskellch37.html"></a>
|
|
</body></html>
|