1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
<HTML>
<HEAD>
<TITLE>The Hugs-GHC Extension Libraries: Int </TITLE>
</HEAD>
<BODY>
<A HREF="libs-5.html">Previous</A>
<A HREF="libs-7.html">Next</A>
<A HREF="libs.html#toc6">Table of Contents</A>
<HR>
<H2><A NAME="s6">6. Int </A></H2>
<P>This library provides signed integers of various sizes. The types
supported are as follows:</P>
<P>
<BR>
type number of bits <BR>
<HR>
Int8 8 <BR>
Int16 16 <BR>
Int32 32 <BR>
Int64 64 <BR>
<HR>
</P>
<P>For each type <I>I</I> above, we provide the following instances.</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
data I -- Signed Ints
iToInt :: I -> Int -- not provided for Int64
intToi :: Int -> I -- not provided for Int64
instance Eq I
instance Ord I
instance Show I
instance Read I
instance Bounded I
instance Num I
instance Real I
instance Integral I
instance Enum I
instance Ix I
instance Bits I
</PRE>
</CODE></BLOCKQUOTE>
Plus
<BLOCKQUOTE><CODE>
<PRE>
int8ToInt :: Int8 -> Int
intToInt8 :: Int -> Int8
int16ToInt :: Int16 -> Int
intToInt16 :: Int -> Int16
int32ToInt :: Int32 -> Int
intToInt32 :: Int -> Int32
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>
<UL>
<LI>Hugs does not provide <CODE>Int64</CODE> at the moment.
</LI>
<LI>ToDo: complete the set of coercion functions.
</LI>
</UL>
</P>
<HR>
<A HREF="libs-5.html">Previous</A>
<A HREF="libs-7.html">Next</A>
<A HREF="libs.html#toc6">Table of Contents</A>
</BODY>
</HTML>
|