File: libs-6.html

package info (click to toggle)
hugs 1.4.199801-1
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 7,220 kB
  • ctags: 5,609
  • sloc: ansic: 32,083; haskell: 12,143; yacc: 949; perl: 823; sh: 602; makefile: 236
file content (73 lines) | stat: -rw-r--r-- 1,475 bytes parent folder | download
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 -&gt; Int  -- not provided for Int64
intToi            :: Int -&gt; 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  -&gt; Int
intToInt8  :: Int   -&gt; Int8
int16ToInt :: Int16 -&gt; Int
intToInt16 :: Int   -&gt; Int16
int32ToInt :: Int32 -&gt; Int
intToInt32 :: Int   -&gt; 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>