Commits

Bryan O'Sullivan  committed 9eda444

Fix compilation warnings with GHC 7.8

  • Participants
  • Parent commits 24e05c2

Comments (0)

Files changed (2)

File Data/Text/Format.hs

 {-# RULES "prec/Double"
     forall d x. prec d (x::Double) = B.build (C.toPrecision d x) #-}
 prec digits = B.build . C.toPrecision digits . realToFrac
+{-# NOINLINE[0] prec #-}
 
 -- | Render a floating point number using normal notation, with the
 -- given number of decimal places.
 fixed decs = B.build . C.toFixed decs . realToFrac
 {-# RULES "fixed/Double"
     forall d x. fixed d (x::Double) = B.build (C.toFixed d x) #-}
+{-# NOINLINE[0] fixed #-}
 
 -- | Render a floating point number using scientific/engineering
 -- notation (e.g. @2.3e123@), with the given number of decimal places.
 expt decs = B.build . C.toExponential decs . realToFrac
 {-# RULES "expt/Double"
     forall d x. expt d (x::Double) = B.build (C.toExponential d x) #-}
+{-# NOINLINE[0] expt #-}
 
 -- | Render a floating point number using the smallest number of
 -- digits that correctly represent it.
 shortest = B.build . C.toShortest . realToFrac
 {-# RULES "shortest/Double"
     forall x. shortest (x::Double) = B.build (C.toShortest x) #-}
+{-# NOINLINE[0] shortest #-}
 
 -- | Render an integer using hexadecimal notation.  (No leading "0x"
 -- is added.)

File Data/Text/Format/Int.hs

   where
     go n | n < 10    = digit n
          | otherwise = go (n `quot` 10) <> digit (n `rem` 10)
+{-# NOINLINE[0] decimal #-}
 
 hexadecimal :: Integral a => a -> Builder
 {-# SPECIALIZE hexadecimal :: Int -> Builder #-}
   where
     go n | n < 16    = hexDigit n
          | otherwise = go (n `quot` 16) <> hexDigit (n `rem` 16)
+{-# NOINLINE[0] hexadecimal #-}
 
 digit :: Integral a => a -> Builder
 digit n = singleton $! i2d (fromIntegral n)