[project @ 1999-09-16 17:23:38 by sof]
authorsof <unknown>
Thu, 16 Sep 1999 17:23:38 +0000 (17:23 +0000)
committersof <unknown>
Thu, 16 Sep 1999 17:23:38 +0000 (17:23 +0000)
Doc'ed the (retirement?) home of fromInt and toInt

ghc/docs/libraries/Int.sgml

index b26cfe2..574f555 100644 (file)
@@ -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.)
+