diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-04-02 16:59:29 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-04-03 00:41:05 -0400 |
commit | 3364def0a28d8b888f558cb9fdab379685636854 (patch) | |
tree | a848223e397b914453e6b253a5da3918175b0be0 /libraries | |
parent | 733f1b52448e5ddd5f3f0d218050f5f22a707b5e (diff) | |
download | haskell-3364def0a28d8b888f558cb9fdab379685636854.tar.gz |
integer-gmp: Write friendlier documentation for Integer
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/integer-gmp/src/GHC/Integer/Type.hs | 8 |
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 |