Skip to content
Snippets Groups Projects
Commit d6b6919a authored by sof's avatar sof
Browse files

[project @ 1999-09-16 17:23:38 by sof]

Doc'ed the (retirement?) home of fromInt and toInt
parent 63d09d2b
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,8 @@
<label id="sec:Int">
<p>
This library provides signed integers of various sizes. The types
supported are as follows:
This interface provides a collection of sized, signed integers. The
types supported are as follows:
<tabular ca="ll">
type | number of bits @
......@@ -94,3 +94,19 @@ C implementations.
Hugs does not provide <tt/Int64/ at the moment.
</itemize>
The <tt/Int/ module also exports the overloaded operations for
converting to and from Haskell <tt/Int/s:
<tscreen><verb>
toInt :: (Integral a) => a -> Int
fromInt :: (Num a) => Int -> a
</verb></tscreen>
Portability note: both Hugs98 and all releases of GHC prior to
ghc-4.05 also exports these two via the Prelude. So, to have code
that uses <tt>toInt</tt> and <tt>fromInt</tt> be maximally portable,
make sure you add an import on <tt>Int</tt> (even if the version
of Hugs or GHC you're currently using may not export these two
from there.)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment