diff options
author | ARATA Mizuki <minorinoki@gmail.com> | 2021-01-14 22:58:45 +0900 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-17 19:05:13 -0400 |
commit | 540fa6b2cff3802877ff56a47ab3611e33a9ac86 (patch) | |
tree | 3cb8a8448170e96ec1d0fadee138cd6a4e58249b /compiler/GHC/Builtin/Names.hs | |
parent | f11954b16c07703b5444eda4a8ab16eadaedc7e6 (diff) | |
download | haskell-540fa6b2cff3802877ff56a47ab3611e33a9ac86.tar.gz |
fromInteger :: Integer -> {Float,Double} now always round to nearest even
integerToFloat# and integerToDouble# were moved from ghc-bignum to base.
GHC.Integer.floatFromInteger and doubleFromInteger were removed.
Fixes #15926, #17231, #17782
Diffstat (limited to 'compiler/GHC/Builtin/Names.hs')
-rw-r--r-- | compiler/GHC/Builtin/Names.hs | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/compiler/GHC/Builtin/Names.hs b/compiler/GHC/Builtin/Names.hs index 2836c82e72..4779ca8de2 100644 --- a/compiler/GHC/Builtin/Names.hs +++ b/compiler/GHC/Builtin/Names.hs @@ -384,8 +384,6 @@ basicKnownKeyNames integerModName, integerDivModName, integerQuotRemName, - integerToFloatName, - integerToDoubleName, integerEncodeFloatName, integerEncodeDoubleName, integerGcdName, @@ -438,6 +436,8 @@ basicKnownKeyNames bignatFromWordListName, -- Float/Double + integerToFloatName, + integerToDoubleName, rationalToFloatName, rationalToDoubleName, @@ -1197,8 +1197,6 @@ integerFromNaturalName , integerModName , integerDivModName , integerQuotRemName - , integerToFloatName - , integerToDoubleName , integerEncodeFloatName , integerEncodeDoubleName , integerGcdName @@ -1324,8 +1322,6 @@ integerDivName = bniVarQual "integerDiv" integerDivIdK integerModName = bniVarQual "integerMod" integerModIdKey integerDivModName = bniVarQual "integerDivMod#" integerDivModIdKey integerQuotRemName = bniVarQual "integerQuotRem#" integerQuotRemIdKey -integerToFloatName = bniVarQual "integerToFloat#" integerToFloatIdKey -integerToDoubleName = bniVarQual "integerToDouble#" integerToDoubleIdKey integerEncodeFloatName = bniVarQual "integerEncodeFloat#" integerEncodeFloatIdKey integerEncodeDoubleName = bniVarQual "integerEncodeDouble#" integerEncodeDoubleIdKey integerGcdName = bniVarQual "integerGcd" integerGcdIdKey @@ -1370,7 +1366,9 @@ floatingClassName = clsQual gHC_FLOAT (fsLit "Floating") floatingClassKey realFloatClassName = clsQual gHC_FLOAT (fsLit "RealFloat") realFloatClassKey -- other GHC.Float functions -rationalToFloatName, rationalToDoubleName :: Name +integerToFloatName, integerToDoubleName, rationalToFloatName, rationalToDoubleName :: Name +integerToFloatName = varQual gHC_FLOAT (fsLit "integerToFloat#") integerToFloatIdKey +integerToDoubleName = varQual gHC_FLOAT (fsLit "integerToDouble#") integerToDoubleIdKey rationalToFloatName = varQual gHC_FLOAT (fsLit "rationalToFloat") rationalToFloatIdKey rationalToDoubleName = varQual gHC_FLOAT (fsLit "rationalToDouble") rationalToDoubleIdKey @@ -2387,6 +2385,10 @@ coercionTokenIdKey = mkPreludeMiscIdUnique 124 noinlineIdKey = mkPreludeMiscIdUnique 125 considerAccessibleIdKey = mkPreludeMiscIdUnique 126 +integerToFloatIdKey, integerToDoubleIdKey :: Unique +integerToFloatIdKey = mkPreludeMiscIdUnique 128 +integerToDoubleIdKey = mkPreludeMiscIdUnique 129 + rationalToFloatIdKey, rationalToDoubleIdKey :: Unique rationalToFloatIdKey = mkPreludeMiscIdUnique 130 rationalToDoubleIdKey = mkPreludeMiscIdUnique 131 @@ -2600,8 +2602,6 @@ integerFromNaturalIdKey , integerModIdKey , integerDivModIdKey , integerQuotRemIdKey - , integerToFloatIdKey - , integerToDoubleIdKey , integerEncodeFloatIdKey , integerEncodeDoubleIdKey , integerGcdIdKey @@ -2683,8 +2683,6 @@ integerDivIdKey = mkPreludeMiscIdUnique 624 integerModIdKey = mkPreludeMiscIdUnique 625 integerDivModIdKey = mkPreludeMiscIdUnique 626 integerQuotRemIdKey = mkPreludeMiscIdUnique 627 -integerToFloatIdKey = mkPreludeMiscIdUnique 628 -integerToDoubleIdKey = mkPreludeMiscIdUnique 629 integerEncodeFloatIdKey = mkPreludeMiscIdUnique 630 integerEncodeDoubleIdKey = mkPreludeMiscIdUnique 631 integerGcdIdKey = mkPreludeMiscIdUnique 632 |