summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-05-11 15:22:58 -0400
committerBen Gamari <ben@smart-cactus.org>2023-05-11 17:59:17 -0400
commitabb31c08f378d5030db09df7cd2b1ac3899414ea (patch)
tree6a3886953a4bf08cf4d9e329228e6988f2d70894
parentf1d2b91e8b1bc50762014e264745004977b71830 (diff)
downloadhaskell-abb31c08f378d5030db09df7cd2b1ac3899414ea.tar.gz
base: Add export list to GHC.Float
-rw-r--r--libraries/base/GHC/Float.hs111
-rw-r--r--testsuite/tests/interface-stability/base-exports.stdout8
2 files changed, 103 insertions, 16 deletions
diff --git a/libraries/base/GHC/Float.hs b/libraries/base/GHC/Float.hs
index 8045216b25..00a22a8bf6 100644
--- a/libraries/base/GHC/Float.hs
+++ b/libraries/base/GHC/Float.hs
@@ -45,14 +45,109 @@
module GHC.Float
- ( module GHC.Float
- , Float(..), Double(..), Float#, Double#
- , double2Int, int2Double, float2Int, int2Float
-
- -- * Monomorphic equality operators
- -- | See GHC.Classes#matching_overloaded_methods_in_rules
- , eqFloat, eqDouble
- ) where
+ ( -- * Classes
+ Floating(..)
+ , RealFloat(..)
+
+ -- * 'Float'
+ , Float(..), Float#
+ -- ** Conversion
+ , float2Int
+ , int2Float
+ , word2Float
+ , integerToFloat#
+ , naturalToFloat#
+ , rationalToFloat
+ , castWord32ToFloat
+ , castFloatToWord32
+ , float2Double
+ -- ** Operations
+ -- | See GHC.Classes#matching_overloaded_methods_in_rules
+ , floorFloat
+ , ceilingFloat
+ , truncateFloat
+ , roundFloat
+ , properFractionFloat
+ -- ** Predicate
+ , isFloatDenormalized
+ , isFloatFinite
+ , isFloatInfinite
+ , isFloatNaN
+ , isFloatNegativeZero
+ -- ** Comparison
+ , eqFloat, gtFloat, geFloat, leFloat, ltFloat
+ -- ** Arithmetic
+ , plusFloat, minusFloat, timesFloat, divideFloat
+ , negateFloat
+ , powerFloat
+ , expFloat, expm1Float
+ , logFloat, log1pFloat, sqrtFloat, fabsFloat
+ , sinFloat, cosFloat, tanFloat
+ , asinFloat, acosFloat, atanFloat
+ , sinhFloat, coshFloat, tanhFloat
+ , asinhFloat, acoshFloat, atanhFloat
+
+ -- * 'Double'
+ , Double(..)
+ , Double#
+ -- ** Conversion
+ , double2Int
+ , int2Double
+ , word2Double
+ , integerToDouble#
+ , naturalToDouble#
+ , rationalToDouble
+ , castWord64ToDouble
+ , castDoubleToWord64
+ , double2Float
+ -- ** Operations
+ -- | See GHC.Classes#matching_overloaded_methods_in_rules
+ , floorDouble
+ , ceilingDouble
+ , truncateDouble
+ , roundDouble
+ , properFractionDouble
+ -- ** Predicate
+ , isDoubleDenormalized
+ , isDoubleFinite
+ , isDoubleInfinite
+ , isDoubleNaN
+ , isDoubleNegativeZero
+ -- ** Comparison
+ , eqDouble, gtDouble, geDouble, leDouble, ltDouble
+ -- ** Arithmetic
+ , plusDouble, minusDouble, timesDouble, divideDouble
+ , negateDouble
+ , powerDouble
+ , expDouble, expm1Double
+ , logDouble, log1pDouble, sqrtDouble, fabsDouble
+ , sinDouble, cosDouble, tanDouble
+ , asinDouble, acosDouble, atanDouble
+ , sinhDouble, coshDouble, tanhDouble
+ , asinhDouble, acoshDouble, atanhDouble
+
+ -- * Formatting
+ , showFloat
+ , FFFormat(..)
+ , formatRealFloat
+ , formatRealFloatAlt
+ , showSignedFloat
+
+ -- * Operations
+ , log1mexpOrd
+ , roundTo
+ , floatToDigits
+ , integerToBinaryFloat'
+ , fromRat
+ , fromRat'
+ , roundingMode#
+
+ -- * Internal
+ , stgFloatToWord32
+ , stgWord32ToFloat
+ , stgDoubleToWord64
+ , stgWord64ToDouble
+ ) where
import Data.Maybe
diff --git a/testsuite/tests/interface-stability/base-exports.stdout b/testsuite/tests/interface-stability/base-exports.stdout
index e525642821..e1e3de98f6 100644
--- a/testsuite/tests/interface-stability/base-exports.stdout
+++ b/testsuite/tests/interface-stability/base-exports.stdout
@@ -7426,7 +7426,6 @@ module GHC.Float where
castWord64ToDouble :: GHC.Word.Word64 -> Double
ceilingDouble :: GHC.Real.Integral b => Double -> b
ceilingFloat :: GHC.Real.Integral b => Float -> b
- clamp :: GHC.Types.Int -> GHC.Types.Int -> GHC.Types.Int
cos :: Floating a => a -> a
cosDouble :: Double -> Double
cosFloat :: Float -> Float
@@ -7448,9 +7447,6 @@ module GHC.Float where
expm1Double :: Double -> Double
expm1Float :: Float -> Float
exponent :: RealFloat a => a -> GHC.Types.Int
- expt :: GHC.Num.Integer.Integer -> GHC.Types.Int -> GHC.Num.Integer.Integer
- expts :: GHC.Arr.Array GHC.Types.Int GHC.Num.Integer.Integer
- expts10 :: GHC.Arr.Array GHC.Types.Int GHC.Num.Integer.Integer
fabsDouble :: Double -> Double
fabsFloat :: Float -> Float
float2Double :: Float -> Double
@@ -7465,7 +7461,6 @@ module GHC.Float where
formatRealFloatAlt :: RealFloat a => FFFormat -> GHC.Maybe.Maybe GHC.Types.Int -> GHC.Types.Bool -> a -> GHC.Base.String
fromRat :: RealFloat a => GHC.Real.Rational -> a
fromRat' :: RealFloat a => GHC.Real.Rational -> a
- fromRat'' :: RealFloat a => GHC.Types.Int -> GHC.Types.Int -> GHC.Num.Integer.Integer -> GHC.Num.Integer.Integer -> a
geDouble :: Double -> Double -> GHC.Types.Bool
geFloat :: Float -> Float -> GHC.Types.Bool
gtDouble :: Double -> Double -> GHC.Types.Bool
@@ -7504,9 +7499,6 @@ module GHC.Float where
logFloat :: Float -> Float
ltDouble :: Double -> Double -> GHC.Types.Bool
ltFloat :: Float -> Float -> GHC.Types.Bool
- maxExpt :: GHC.Types.Int
- maxExpt10 :: GHC.Types.Int
- minExpt :: GHC.Types.Int
minusDouble :: Double -> Double -> Double
minusFloat :: Float -> Float -> Float
naturalToDouble# :: GHC.Num.Natural.Natural -> Double#