From 3364def0a28d8b888f558cb9fdab379685636854 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Tue, 2 Apr 2019 16:59:29 -0400 Subject: integer-gmp: Write friendlier documentation for Integer --- libraries/integer-gmp/src/GHC/Integer/Type.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libraries') 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 -- cgit v1.2.1