summaryrefslogtreecommitdiff
path: root/libraries/integer-gmp
diff options
context:
space:
mode:
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 3434df29c4..8a1a574542 100644
--- a/libraries/integer-gmp/src/GHC/Integer/Type.hs
+++ b/libraries/integer-gmp/src/GHC/Integer/Type.hs
@@ -136,13 +136,17 @@ instance Eq BigNat where
instance Ord BigNat where
compare = compareBigNat
--- | Invariant: 'Jn#' and 'Jp#' are used iff value doesn't fit in 'S#'
+-- [Implementation notes]
+--
+-- Invariant: 'Jn#' and 'Jp#' are used iff value doesn't fit in 'S#'
--
-- Useful properties resulting from the invariants:
--
-- - @abs ('S#' _) <= abs ('Jp#' _)@
-- - @abs ('S#' _) < abs ('Jn#' _)@
---
+
+-- | Arbitrary precision integers. For more information about this datatype,
+-- see the comments in its implementation.
data Integer = S# !Int#
-- ^ iff value in @[minBound::'Int', maxBound::'Int']@ range
| Jp# {-# UNPACK #-} !BigNat