summaryrefslogtreecommitdiff
path: root/libraries/integer-gmp
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-04-02 16:59:29 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-04-03 00:41:05 -0400
commit3364def0a28d8b888f558cb9fdab379685636854 (patch)
treea848223e397b914453e6b253a5da3918175b0be0 /libraries/integer-gmp
parent733f1b52448e5ddd5f3f0d218050f5f22a707b5e (diff)
downloadhaskell-3364def0a28d8b888f558cb9fdab379685636854.tar.gz
integer-gmp: Write friendlier documentation for Integer
Diffstat (limited to 'libraries/integer-gmp')
-rw-r--r--libraries/integer-gmp/src/GHC/Integer/Type.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/libraries/integer-gmp/src/GHC/Integer/Type.hs b/libraries/integer-gmp/src/GHC/Integer/Type.hs
index 8a1a574542..521cd95a25 100644
--- a/libraries/integer-gmp/src/GHC/Integer/Type.hs
+++ b/libraries/integer-gmp/src/GHC/Integer/Type.hs
@@ -145,8 +145,12 @@ instance Ord BigNat where
-- - @abs ('S#' _) <= abs ('Jp#' _)@
-- - @abs ('S#' _) < abs ('Jn#' _)@
--- | Arbitrary precision integers. For more information about this datatype,
--- see the comments in its implementation.
+-- | Arbitrary precision integers. In contrast with fixed-size integral types
+-- such as 'Int', the 'Integer' type represents the entire infinite range of
+-- integers.
+--
+-- For more information about this type's representation, see the comments in
+-- its implementation.
data Integer = S# !Int#
-- ^ iff value in @[minBound::'Int', maxBound::'Int']@ range
| Jp# {-# UNPACK #-} !BigNat