Teo Camarasu pushed to branch wip/T26625 at Glasgow Haskell Compiler / GHC
Commits:
-
9bd917d8
by Teo Camarasu at 2025-12-04T16:18:42+00:00
5 changed files:
- libraries/base/src/GHC/Num.hs
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
- testsuite/tests/interface-stability/base-exports.stdout-mingw32
- testsuite/tests/interface-stability/base-exports.stdout-ws-32
Changes:
| 1 | +{-# LANGUAGE MagicHash #-}
|
|
| 1 | 2 | {-# OPTIONS_HADDOCK not-home #-}
|
| 2 | 3 | |
| 3 | 4 | -- |
|
| ... | ... | @@ -16,11 +17,190 @@ module GHC.Num |
| 16 | 17 | ( Num(..)
|
| 17 | 18 | , subtract
|
| 18 | 19 | , quotRemInteger
|
| 19 | - , module GHC.Num.Integer
|
|
| 20 | - , module GHC.Num.Natural
|
|
| 20 | + , integerFromNatural
|
|
| 21 | + , integerToNaturalClamp
|
|
| 22 | + , integerToNaturalThrow
|
|
| 23 | + , integerToNatural
|
|
| 24 | + , integerToWord#
|
|
| 25 | + , integerToInt#
|
|
| 26 | + , integerToWord64#
|
|
| 27 | + , integerToInt64#
|
|
| 28 | + , integerAdd
|
|
| 29 | + , integerMul
|
|
| 30 | + , integerSub
|
|
| 31 | + , integerNegate
|
|
| 32 | + , integerAbs
|
|
| 33 | + , integerPopCount#
|
|
| 34 | + , integerQuot
|
|
| 35 | + , integerRem
|
|
| 36 | + , integerDiv
|
|
| 37 | + , integerMod
|
|
| 38 | + , integerDivMod#
|
|
| 39 | + , integerQuotRem#
|
|
| 40 | + , integerEncodeFloat#
|
|
| 41 | + , integerEncodeDouble#
|
|
| 42 | + , integerGcd
|
|
| 43 | + , integerLcm
|
|
| 44 | + , integerAnd
|
|
| 45 | + , integerOr
|
|
| 46 | + , integerXor
|
|
| 47 | + , integerComplement
|
|
| 48 | + , integerBit#
|
|
| 49 | + , integerTestBit#
|
|
| 50 | + , integerShiftL#
|
|
| 51 | + , integerShiftR#
|
|
| 52 | + , integerFromWord#
|
|
| 53 | + , integerFromWord64#
|
|
| 54 | + , integerFromInt64#
|
|
| 55 | + , Integer(..)
|
|
| 56 | + , integerBit
|
|
| 57 | + , integerCheck
|
|
| 58 | + , integerCheck#
|
|
| 59 | + , integerCompare
|
|
| 60 | + , integerDecodeDouble#
|
|
| 61 | + , integerDivMod
|
|
| 62 | + , integerEncodeDouble
|
|
| 63 | + , integerEq
|
|
| 64 | + , integerEq#
|
|
| 65 | + , integerFromAddr
|
|
| 66 | + , integerFromAddr#
|
|
| 67 | + , integerFromBigNat#
|
|
| 68 | + , integerFromBigNatNeg#
|
|
| 69 | + , integerFromBigNatSign#
|
|
| 70 | + , integerFromByteArray
|
|
| 71 | + , integerFromByteArray#
|
|
| 72 | + , integerFromInt
|
|
| 73 | + , integerFromInt#
|
|
| 74 | + , integerFromWord
|
|
| 75 | + , integerFromWordList
|
|
| 76 | + , integerFromWordNeg#
|
|
| 77 | + , integerFromWordSign#
|
|
| 78 | + , integerGcde
|
|
| 79 | + , integerGcde#
|
|
| 80 | + , integerGe
|
|
| 81 | + , integerGe#
|
|
| 82 | + , integerGt
|
|
| 83 | + , integerGt#
|
|
| 84 | + , integerIsNegative
|
|
| 85 | + , integerIsNegative#
|
|
| 86 | + , integerIsOne
|
|
| 87 | + , integerIsPowerOf2#
|
|
| 88 | + , integerIsZero
|
|
| 89 | + , integerLe
|
|
| 90 | + , integerLe#
|
|
| 91 | + , integerLog2
|
|
| 92 | + , integerLog2#
|
|
| 93 | + , integerLogBase
|
|
| 94 | + , integerLogBase#
|
|
| 95 | + , integerLogBaseWord
|
|
| 96 | + , integerLogBaseWord#
|
|
| 97 | + , integerLt
|
|
| 98 | + , integerLt#
|
|
| 99 | + , integerNe
|
|
| 100 | + , integerNe#
|
|
| 101 | + , integerOne
|
|
| 102 | + , integerPowMod#
|
|
| 103 | + , integerQuotRem
|
|
| 104 | + , integerRecipMod#
|
|
| 105 | + , integerShiftL
|
|
| 106 | + , integerShiftR
|
|
| 107 | + , integerSignum
|
|
| 108 | + , integerSignum#
|
|
| 109 | + , integerSizeInBase#
|
|
| 110 | + , integerSqr
|
|
| 111 | + , integerTestBit
|
|
| 112 | + , integerToAddr
|
|
| 113 | + , integerToAddr#
|
|
| 114 | + , integerToBigNatClamp#
|
|
| 115 | + , integerToBigNatSign#
|
|
| 116 | + , integerToInt
|
|
| 117 | + , integerToMutableByteArray
|
|
| 118 | + , integerToMutableByteArray#
|
|
| 119 | + , integerToWord
|
|
| 120 | + , integerZero
|
|
| 121 | + , naturalToWord#
|
|
| 122 | + , naturalPopCount#
|
|
| 123 | + , naturalShiftR#
|
|
| 124 | + , naturalShiftL#
|
|
| 125 | + , naturalAdd
|
|
| 126 | + , naturalSub
|
|
| 127 | + , naturalSubThrow
|
|
| 128 | + , naturalSubUnsafe
|
|
| 129 | + , naturalMul
|
|
| 130 | + , naturalQuotRem#
|
|
| 131 | + , naturalQuot
|
|
| 132 | + , naturalRem
|
|
| 133 | + , naturalAnd
|
|
| 134 | + , naturalAndNot
|
|
| 135 | + , naturalOr
|
|
| 136 | + , naturalXor
|
|
| 137 | + , naturalTestBit#
|
|
| 138 | + , naturalBit#
|
|
| 139 | + , naturalGcd
|
|
| 140 | + , naturalLcm
|
|
| 141 | + , naturalLog2#
|
|
| 142 | + , naturalLogBaseWord#
|
|
| 143 | + , naturalLogBase#
|
|
| 144 | + , naturalPowMod
|
|
| 145 | + , naturalSizeInBase#
|
|
| 146 | + , Natural(..)
|
|
| 147 | + , naturalBit
|
|
| 148 | + , naturalCheck
|
|
| 149 | + , naturalCheck#
|
|
| 150 | + , naturalClearBit
|
|
| 151 | + , naturalClearBit#
|
|
| 152 | + , naturalCompare
|
|
| 153 | + , naturalComplementBit
|
|
| 154 | + , naturalComplementBit#
|
|
| 155 | + , naturalEncodeDouble#
|
|
| 156 | + , naturalEncodeFloat#
|
|
| 157 | + , naturalEq
|
|
| 158 | + , naturalEq#
|
|
| 159 | + , naturalFromAddr
|
|
| 160 | + , naturalFromAddr#
|
|
| 161 | + , naturalFromBigNat#
|
|
| 162 | + , naturalFromByteArray#
|
|
| 163 | + , naturalFromWord
|
|
| 164 | + , naturalFromWord#
|
|
| 165 | + , naturalFromWord2#
|
|
| 166 | + , naturalFromWordList
|
|
| 167 | + , naturalGe
|
|
| 168 | + , naturalGe#
|
|
| 169 | + , naturalGt
|
|
| 170 | + , naturalGt#
|
|
| 171 | + , naturalIsOne
|
|
| 172 | + , naturalIsPowerOf2#
|
|
| 173 | + , naturalIsZero
|
|
| 174 | + , naturalLe
|
|
| 175 | + , naturalLe#
|
|
| 176 | + , naturalLog2
|
|
| 177 | + , naturalLogBase
|
|
| 178 | + , naturalLogBaseWord
|
|
| 179 | + , naturalLt
|
|
| 180 | + , naturalLt#
|
|
| 181 | + , naturalNe
|
|
| 182 | + , naturalNe#
|
|
| 183 | + , naturalNegate
|
|
| 184 | + , naturalOne
|
|
| 185 | + , naturalPopCount
|
|
| 186 | + , naturalQuotRem
|
|
| 187 | + , naturalSetBit
|
|
| 188 | + , naturalSetBit#
|
|
| 189 | + , naturalShiftL
|
|
| 190 | + , naturalShiftR
|
|
| 191 | + , naturalSignum
|
|
| 192 | + , naturalSqr
|
|
| 193 | + , naturalTestBit
|
|
| 194 | + , naturalToAddr
|
|
| 195 | + , naturalToAddr#
|
|
| 196 | + , naturalToBigNat#
|
|
| 197 | + , naturalToMutableByteArray#
|
|
| 198 | + , naturalToWord
|
|
| 199 | + , naturalToWordClamp
|
|
| 200 | + , naturalToWordClamp#
|
|
| 201 | + , naturalToWordMaybe#
|
|
| 202 | + , naturalZero
|
|
| 21 | 203 | )
|
| 22 | 204 | where
|
| 23 | 205 | |
| 24 | 206 | import GHC.Internal.Num |
| 25 | -import GHC.Num.Integer
|
|
| 26 | -import GHC.Num.Natural |
| ... | ... | @@ -8351,7 +8351,7 @@ module GHC.Natural where |
| 8351 | 8351 | xorNatural :: Natural -> Natural -> Natural
|
| 8352 | 8352 | |
| 8353 | 8353 | module GHC.Num where
|
| 8354 | - -- Safety: None
|
|
| 8354 | + -- Safety: Safe-Inferred
|
|
| 8355 | 8355 | type Integer :: *
|
| 8356 | 8356 | data Integer = IS GHC.Internal.Prim.Int# | IP GHC.Internal.Prim.ByteArray# | IN GHC.Internal.Prim.ByteArray#
|
| 8357 | 8357 | type Natural :: *
|
| ... | ... | @@ -11397,7 +11397,7 @@ module GHC.Natural where |
| 11397 | 11397 | xorNatural :: Natural -> Natural -> Natural
|
| 11398 | 11398 | |
| 11399 | 11399 | module GHC.Num where
|
| 11400 | - -- Safety: None
|
|
| 11400 | + -- Safety: Safe-Inferred
|
|
| 11401 | 11401 | type Integer :: *
|
| 11402 | 11402 | data Integer = IS GHC.Internal.Prim.Int# | IP GHC.Internal.Prim.ByteArray# | IN GHC.Internal.Prim.ByteArray#
|
| 11403 | 11403 | type Natural :: *
|
| ... | ... | @@ -8569,7 +8569,7 @@ module GHC.Natural where |
| 8569 | 8569 | xorNatural :: Natural -> Natural -> Natural
|
| 8570 | 8570 | |
| 8571 | 8571 | module GHC.Num where
|
| 8572 | - -- Safety: None
|
|
| 8572 | + -- Safety: Safe-Inferred
|
|
| 8573 | 8573 | type Integer :: *
|
| 8574 | 8574 | data Integer = IS GHC.Internal.Prim.Int# | IP GHC.Internal.Prim.ByteArray# | IN GHC.Internal.Prim.ByteArray#
|
| 8575 | 8575 | type Natural :: *
|
| ... | ... | @@ -8351,7 +8351,7 @@ module GHC.Natural where |
| 8351 | 8351 | xorNatural :: Natural -> Natural -> Natural
|
| 8352 | 8352 | |
| 8353 | 8353 | module GHC.Num where
|
| 8354 | - -- Safety: None
|
|
| 8354 | + -- Safety: Safe-Inferred
|
|
| 8355 | 8355 | type Integer :: *
|
| 8356 | 8356 | data Integer = IS GHC.Internal.Prim.Int# | IP GHC.Internal.Prim.ByteArray# | IN GHC.Internal.Prim.ByteArray#
|
| 8357 | 8357 | type Natural :: *
|