[commit: ghc] wip/ci-i386, wip/ww-noinline: Fix Haddock comment for Integer datatype (129a800)

git at git.haskell.org git at git.haskell.org
Tue Feb 19 14:13:33 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branches: wip/ci-i386,wip/ww-noinline
Link       : http://ghc.haskell.org/trac/ghc/changeset/129a800dd01bff93f64c21bc22a4609cb26fc571/ghc

>---------------------------------------------------------------

commit 129a800dd01bff93f64c21bc22a4609cb26fc571
Author: Alexandre Baldé <alexandrer_b at outlook.com>
Date:   Thu Feb 7 12:31:44 2019 +0000

    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.


>---------------------------------------------------------------

129a800dd01bff93f64c21bc22a4609cb26fc571
 libraries/integer-gmp/src/GHC/Integer/Type.hs | 8 ++++++--
 1 file 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 3434df2..8a1a574 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



More information about the ghc-commits mailing list