Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC

Commits:

5 changed files:

Changes:

  • libraries/base/src/Data/Data.hs
    1
    +{-# LANGUAGE CPP #-}
    
    2
    +
    
    1 3
     {-# LANGUAGE Safe #-}
    
    2 4
     
    
    3 5
     -- |
    
    ... ... @@ -100,6 +102,8 @@ module Data.Data (
    100 102
     import GHC.Internal.Data.Data
    
    101 103
     import Data.Typeable
    
    102 104
     
    
    105
    +#if __GLASGOW_HASKELL__ >= 1001
    
    106
    +
    
    103 107
     import GHC.Real (toRational)
    
    104 108
     import GHC.Float (Double)
    
    105 109
     import Data.Eq ((==))
    
    ... ... @@ -134,3 +138,5 @@ readConstr dt str =
    134 138
     
    
    135 139
         ffloat :: Double -> Constr
    
    136 140
         ffloat =  mkPrimCon dt str . FloatConstr . toRational
    
    141
    +
    
    142
    +#endif

  • libraries/base/src/Data/Version.hs
    1
    +{-# LANGUAGE CPP #-}
    
    2
    +
    
    1 3
     {-# LANGUAGE Safe #-}
    
    2 4
     
    
    3 5
     {-# LANGUAGE StandaloneDeriving #-}
    
    ... ... @@ -38,6 +40,8 @@ module Data.Version (
    38 40
     
    
    39 41
     import GHC.Internal.Data.Version
    
    40 42
     
    
    43
    +#if __GLASGOW_HASKELL__ >= 1001
    
    44
    +
    
    41 45
     import Control.Applicative (pure, (*>))
    
    42 46
     import Data.Functor (fmap)
    
    43 47
     import Data.Char (isDigit, isAlphaNum)
    
    ... ... @@ -59,3 +63,5 @@ parseVersion :: ReadP Version
    59 63
     parseVersion = do branch <- sepBy1 (fmap read (munch1 isDigit)) (char '.')
    
    60 64
                       tags   <- many (char '-' *> munch1 isAlphaNum)
    
    61 65
                       pure (Version branch tags)
    
    66
    +
    
    67
    +#endif

  • libraries/base/src/GHC/ByteOrder.hs
    1
    +{-# LANGUAGE CPP #-}
    
    2
    +
    
    1 3
     {-# LANGUAGE Safe #-}
    
    2 4
     
    
    3 5
     {-# LANGUAGE StandaloneDeriving #-}
    
    ... ... @@ -25,6 +27,8 @@ module GHC.ByteOrder
    25 27
     
    
    26 28
     import GHC.Internal.ByteOrder
    
    27 29
     
    
    30
    +#if __GLASGOW_HASKELL__ >= 1001
    
    31
    +
    
    28 32
     import Text.Read
    
    29 33
     
    
    30 34
     {-NOTE:
    
    ... ... @@ -35,3 +39,5 @@ import Text.Read
    35 39
     
    
    36 40
     -- | @since base-4.11.0.0
    
    37 41
     deriving instance Read ByteOrder
    
    42
    +
    
    43
    +#endif

  • libraries/base/src/Numeric.hs
    1
    +{-# LANGUAGE CPP #-}
    
    2
    +
    
    3
    +#if __GLASGOW_HASKELL__ >= 1001
    
    1 4
     {-# LANGUAGE Trustworthy #-}
    
    5
    +#else
    
    6
    +{-# LANGUAGE Safe #-}
    
    7
    +#endif
    
    8
    +
    
    2 9
     {-# LANGUAGE MagicHash #-}
    
    3 10
     {-# LANGUAGE ImportQualifiedPost #-}
    
    4 11
     
    
    ... ... @@ -51,6 +58,8 @@ module Numeric
    51 58
     
    
    52 59
     import GHC.Internal.Numeric
    
    53 60
     
    
    61
    +#if __GLASGOW_HASKELL__ >= 1001
    
    62
    +
    
    54 63
     import GHC.Types (Char (C#))
    
    55 64
     import GHC.Err (error, errorWithoutStackTrace)
    
    56 65
     import GHC.Base (unsafeChr)
    
    ... ... @@ -326,3 +335,5 @@ showOct = showIntAtBase 8 intToDigit
    326 335
     -- | Show /non-negative/ 'Integral' numbers in base 2.
    
    327 336
     showBin :: Integral a => a -> ShowS
    
    328 337
     showBin = showIntAtBase 2  intToDigit
    
    338
    +
    
    339
    +#endif

  • libraries/base/src/System/IO.hs
    ... ... @@ -899,6 +899,8 @@ rw_flags = output_flags .|. o_RDWR
    899 899
     -- > input^D
    
    900 900
     -- output
    
    901 901
     
    
    902
    +#if __GLASGOW_HASKELL__ >= 1001
    
    903
    +
    
    902 904
     {-NOTE:
    
    903 905
         The following instances are technically orphans, but practically they are
    
    904 906
         not, since ordinary users should not use @ghc-internal@ directly and thus
    
    ... ... @@ -919,3 +921,5 @@ deriving instance Read Newline
    919 921
     
    
    920 922
     -- | @since base-4.3.0.0
    
    921 923
     deriving instance Read NewlineMode
    
    924
    +
    
    925
    +#endif