Teo Camarasu pushed to branch wip/T26343 at Glasgow Haskell Compiler / GHC
Commits:
-
ad48bb4b
by Teo Camarasu at 2025-08-24T13:11:48+01:00
9 changed files:
- libraries/base/base.cabal.in
- libraries/base/src/Data/Array/Byte.hs
- libraries/base/src/GHC/Num.hs
- − libraries/base/src/GHC/Num/BigNat.hs
- − libraries/base/src/GHC/Num/Integer.hs
- − libraries/base/src/GHC/Num/Natural.hs
- libraries/base/src/System/CPUTime/Utils.hs
- libraries/ghc-bignum/ghc-bignum.cabal
- libraries/ghc-experimental/src/GHC/TypeNats/Experimental.hs
Changes:
| ... | ... | @@ -219,9 +219,6 @@ Library |
| 219 | 219 | , GHC.MVar
|
| 220 | 220 | , GHC.Natural
|
| 221 | 221 | , GHC.Num
|
| 222 | - , GHC.Num.Integer
|
|
| 223 | - , GHC.Num.Natural
|
|
| 224 | - , GHC.Num.BigNat
|
|
| 225 | 222 | , GHC.OldList
|
| 226 | 223 | , GHC.OverloadedLabels
|
| 227 | 224 | , GHC.Profiling
|
| ... | ... | @@ -27,7 +27,7 @@ import qualified GHC.Internal.Data.Foldable as F |
| 27 | 27 | import GHC.Internal.Data.Maybe (fromMaybe)
|
| 28 | 28 | import Data.Semigroup
|
| 29 | 29 | import GHC.Internal.Exts
|
| 30 | -import GHC.Num.Integer (Integer(..))
|
|
| 30 | +import GHC.Internal.Bignum.Integer (Integer(..))
|
|
| 31 | 31 | import GHC.Internal.Show (intToDigit)
|
| 32 | 32 | import GHC.Internal.ST (ST(..), runST)
|
| 33 | 33 | import GHC.Internal.Word (Word8(..))
|
| ... | ... | @@ -16,11 +16,11 @@ module GHC.Num |
| 16 | 16 | ( Num(..)
|
| 17 | 17 | , subtract
|
| 18 | 18 | , quotRemInteger
|
| 19 | - , module GHC.Num.Integer
|
|
| 20 | - , module GHC.Num.Natural
|
|
| 19 | + , module GHC.Internal.Bignum.Integer
|
|
| 20 | + , module GHC.Internal.Bignum.Natural
|
|
| 21 | 21 | )
|
| 22 | 22 | where
|
| 23 | 23 | |
| 24 | 24 | import GHC.Internal.Num
|
| 25 | -import GHC.Num.Integer
|
|
| 26 | -import GHC.Num.Natural |
|
| 25 | +import GHC.Internal.Bignum.Integer
|
|
| 26 | +import GHC.Internal.Bignum.Natural |
| 1 | -module GHC.Num.BigNat
|
|
| 2 | - ( module GHC.Internal.Bignum.BigNat
|
|
| 3 | - )
|
|
| 4 | -where
|
|
| 5 | - |
|
| 6 | -import GHC.Internal.Bignum.BigNat |
| 1 | -module GHC.Num.Integer
|
|
| 2 | - ( module GHC.Internal.Bignum.Integer
|
|
| 3 | - )
|
|
| 4 | -where
|
|
| 5 | - |
|
| 6 | -import GHC.Internal.Bignum.Integer |
| 1 | -module GHC.Num.Natural
|
|
| 2 | - ( module GHC.Internal.Bignum.Natural
|
|
| 3 | - )
|
|
| 4 | -where
|
|
| 5 | - |
|
| 6 | -import GHC.Internal.Bignum.Natural |
| ... | ... | @@ -8,7 +8,7 @@ module System.CPUTime.Utils |
| 8 | 8 | ) where
|
| 9 | 9 | |
| 10 | 10 | import GHC.Internal.Foreign.C.Types
|
| 11 | -import GHC.Num.Integer (Integer)
|
|
| 11 | +import GHC.Internal.Bignum.Integer (Integer)
|
|
| 12 | 12 | import GHC.Internal.Real (fromIntegral)
|
| 13 | 13 | |
| 14 | 14 | cClockToInteger :: CClock -> Integer
|
| ... | ... | @@ -10,10 +10,8 @@ bug-reports: https://gitlab.haskell.org/ghc/ghc/issues/new |
| 10 | 10 | category: Numeric, Algebra, GHC
|
| 11 | 11 | build-type: Simple
|
| 12 | 12 | description:
|
| 13 | - This package used to provide the low-level implementation of the standard
|
|
| 13 | + This package provides the low-level implementation of the standard
|
|
| 14 | 14 | 'BigNat', 'Natural' and 'Integer' types.
|
| 15 | - Use `base:GHC.Num.{Integer,Natural,BigNat}` instead or other modules from
|
|
| 16 | - `ghc-internal`.
|
|
| 17 | 15 | |
| 18 | 16 | extra-source-files:
|
| 19 | 17 | changelog.md
|
| ... | ... | @@ -40,13 +38,6 @@ library |
| 40 | 38 | , GHC.Internal.Bignum.Backend as GHC.Num.Backend
|
| 41 | 39 | , GHC.Internal.Bignum.Backend.Selected as GHC.Num.Backend.Selected
|
| 42 | 40 | , GHC.Internal.Bignum.Backend.Native as GHC.Num.Backend.Native
|
| 43 | - -- reexport from base
|
|
| 44 | - -- We can't reexport these modules from ghc-internal otherwise we get
|
|
| 45 | - -- ambiguity between:
|
|
| 46 | - -- ghc-bignum:GHC.Num.X
|
|
| 47 | - -- base:GHC.Num.X
|
|
| 48 | - -- we should probably just deprecate ghc-bignum and encourage users to use
|
|
| 49 | - -- exports from base instead.
|
|
| 50 | - , GHC.Num.BigNat
|
|
| 51 | - , GHC.Num.Natural
|
|
| 52 | - , GHC.Num.Integer |
|
| 41 | + , GHC.Internal.Bignum.BigNat as GHC.Num.BigNat
|
|
| 42 | + , GHC.Internal.Bignum.Natural as GHC.Num.Natural
|
|
| 43 | + , GHC.Internal.Bignum.Integer as GHC.Num.Integer |
| ... | ... | @@ -12,7 +12,7 @@ module GHC.TypeNats.Experimental ( |
| 12 | 12 | ) where
|
| 13 | 13 | |
| 14 | 14 | import GHC.Internal.TypeNats
|
| 15 | -import GHC.Num.Natural (naturalLog2)
|
|
| 15 | +import GHC.Internal.Bignum.Natural (naturalLog2)
|
|
| 16 | 16 | |
| 17 | 17 | plusSNat :: SNat n -> SNat m -> SNat (n + m)
|
| 18 | 18 | plusSNat (UnsafeSNat n) (UnsafeSNat m) = UnsafeSNat (n + m)
|