diff options
author | Alexandre Baldé <alexandrer_b@outlook.com> | 2019-02-07 12:31:44 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-02-18 19:17:33 -0500 |
commit | 129a800dd01bff93f64c21bc22a4609cb26fc571 (patch) | |
tree | ec9088281951061a2ce338298219309e2362bb92 | |
parent | 2a431640d199b164ca5d233684d4f4bdaf5ca021 (diff) | |
download | haskell-129a800dd01bff93f64c21bc22a4609cb26fc571.tar.gz |
Fix Haddock comment for Integer datatype
Move implementation notes for Integer to Haddock named section
Revert documentation named chunk change [skip ci]
Haddock's named chunk feature was not used correctly in this case,
as it cannot export only parts of a Haddock top level comment.
As such, it was removed and replaced by a message informing the end-
user to browse the source code for detailed information.
-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 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 |