[Git][ghc/ghc][wip/T24359] split up SPECIALISE pragmas in GHC.Internal.Float and GHC.Internal.Numeric

sheaf (@sheaf) gitlab at gitlab.haskell.org
Thu Dec 5 10:51:23 UTC 2024



sheaf pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC


Commits:
0a1d7ebc by sheaf at 2024-12-05T11:49:41+01:00
split up SPECIALISE pragmas in GHC.Internal.Float and GHC.Internal.Numeric

- - - - -


2 changed files:

- libraries/ghc-internal/src/GHC/Internal/Float.hs
- libraries/ghc-internal/src/GHC/Internal/Numeric.hs


Changes:

=====================================
libraries/ghc-internal/src/GHC/Internal/Float.hs
=====================================
@@ -1217,8 +1217,8 @@ floatToDigits base x =
 -- Converting from an Integer to a RealFloat
 ------------------------------------------------------------------------
 
-{-# SPECIALISE integerToBinaryFloat' :: Integer -> Float,
-                                        Integer -> Double #-}
+{-# SPECIALISE integerToBinaryFloat' :: Integer -> Float #-}
+{-# SPECIALISE integerToBinaryFloat' :: Integer -> Double #-}
 -- | Converts a positive integer to a floating-point value.
 --
 -- The value nearest to the argument will be returned.
@@ -1386,8 +1386,8 @@ Float or Double exploiting the known floatRadix and avoiding
 divisions as much as possible.
 -}
 
-{-# SPECIALISE fromRat'' :: Int -> Int -> Integer -> Integer -> Float,
-                            Int -> Int -> Integer -> Integer -> Double #-}
+{-# SPECIALISE fromRat'' :: Int -> Int -> Integer -> Integer -> Float #-}
+{-# SPECIALISE fromRat'' :: Int -> Int -> Integer -> Integer -> Double #-}
 fromRat'' :: RealFloat a => Int -> Int -> Integer -> Integer -> a
 -- Invariant: n and d strictly positive
 fromRat'' minEx@(I# me#) mantDigs@(I# md#) n d =


=====================================
libraries/ghc-internal/src/GHC/Internal/Numeric.hs
=====================================
@@ -174,13 +174,16 @@ showInt n0 cs0
 -- mutual module deps.
 
 {-# SPECIALIZE showEFloat ::
-        Maybe Int -> Float  -> ShowS,
+        Maybe Int -> Float  -> ShowS #-}
+{-# SPECIALIZE showEFloat ::
         Maybe Int -> Double -> ShowS #-}
 {-# SPECIALIZE showFFloat ::
-        Maybe Int -> Float  -> ShowS,
+        Maybe Int -> Float  -> ShowS #-}
+{-# SPECIALIZE showFFloat ::
         Maybe Int -> Double -> ShowS #-}
 {-# SPECIALIZE showGFloat ::
-        Maybe Int -> Float  -> ShowS,
+        Maybe Int -> Float  -> ShowS #-}
+{-# SPECIALIZE showGFloat ::
         Maybe Int -> Double -> ShowS #-}
 
 -- | Show a signed 'RealFloat' value



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0a1d7ebc96065cc0006ea80947fb2ec32b824e3f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0a1d7ebc96065cc0006ea80947fb2ec32b824e3f
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241205/42e83140/attachment-0001.html>


More information about the ghc-commits mailing list