Wolfgang Jeltsch pushed to branch wip/jeltsch/base-buildable-with-ghc-9-14 at Glasgow Haskell Compiler / GHC
Commits:
-
1b4fa9cf
by Wolfgang Jeltsch at 2026-05-19T16:49:59+03:00
1 changed file:
Changes:
| 1 | +{-# LANGUAGE CPP #-}
|
|
| 1 | 2 | {-# LANGUAGE Trustworthy #-}
|
| 2 | 3 | {-# LANGUAGE ScopedTypeVariables #-}
|
| 3 | 4 | {-# LANGUAGE PolyKinds #-}
|
| ... | ... | @@ -91,7 +92,11 @@ import GHC.Internal.TypeLits (KnownNat, natVal) |
| 91 | 92 | import GHC.Internal.Read
|
| 92 | 93 | import GHC.Internal.Text.ParserCombinators.ReadPrec
|
| 93 | 94 | import GHC.Internal.Text.Read.Lex
|
| 94 | -import qualified GHC.Internal.TH.Monad as TH
|
|
| 95 | +#if __GLASGOW_HASKELL__ < 1000
|
|
| 96 | +import GHC.Internal.TH.Syntax (unsafeCodeCoerce)
|
|
| 97 | +#else
|
|
| 98 | +import GHC.Internal.TH.Monad (unsafeCodeCoerce)
|
|
| 99 | +#endif
|
|
| 95 | 100 | import qualified GHC.Internal.TH.Lift as TH
|
| 96 | 101 | import Data.Typeable
|
| 97 | 102 | import Prelude
|
| ... | ... | @@ -147,7 +152,7 @@ instance (Typeable k,Typeable a) => Data (Fixed (a :: k)) where |
| 147 | 152 | -- @since template-haskell-2.19.0.0
|
| 148 | 153 | -- @since base-4.21.0.0
|
| 149 | 154 | instance TH.Lift (Fixed a) where
|
| 150 | - liftTyped x = TH.unsafeCodeCoerce (TH.lift x)
|
|
| 155 | + liftTyped x = unsafeCodeCoerce (TH.lift x)
|
|
| 151 | 156 | lift (MkFixed x) = [| MkFixed x |]
|
| 152 | 157 | |
| 153 | 158 | -- | Types which can be used as a resolution argument to the 'Fixed' type constructor must implement the 'HasResolution' typeclass.
|