@@ -27,6 +27,7 @@ module Ghclibgen
2727 applyPatchStage ,
2828 applyPatchNoMonoLocalBinds ,
2929 applyPatchCmmParseNoImplicitPrelude ,
30+ applyPatchCompilerGHCUnitTypes ,
3031 applyPatchHadrianCabalProject ,
3132 applyPatchGhcInternalEventWindowsHsc ,
3233 applyPatchTemplateHaskellLanguageHaskellTHSyntax ,
@@ -1060,6 +1061,15 @@ applyPatchHadrianCabalProject _ = do
10601061 cabalProject = " hadrian" </> " cabal.project"
10611062 cabalProjectFreeze = cabalProject ++ " .freeze"
10621063
1064+ applyPatchCompilerGHCUnitTypes :: GhcFlavor -> IO ()
1065+ applyPatchCompilerGHCUnitTypes ghcFlavor = do
1066+ when (ghcFlavor == Ghc9101 ) $ do
1067+ writeFile " compiler/GHC/Unit/Types.hs"
1068+ . replace
1069+ " import Control.DeepSeq"
1070+ " import Control.DeepSeq (NFData(..))"
1071+ =<< readFile' " compiler/GHC/Unit/Types.hs"
1072+
10631073-- Data type representing an approximately parsed Cabal file.
10641074data Cabal = Cabal
10651075 { cabalDir :: FilePath , -- the directory this file exists in
@@ -1175,7 +1185,8 @@ baseBounds = \case
11751185 -- base-4.19.0.0, ghc-prim-0.11.0
11761186 Ghc981 -> " base >= 4.17 && < 4.19.1" -- [ghc-9.4.1, ghc-9.8.2)
11771187 -- base-4.19.1.0
1178- Ghc982 -> " base >= 4.17 && < 4.20" -- [ghc-9.4.1, ghc-9.10.1)
1188+ Ghc982 -> " base >= 4.17 && < 4.19.2" -- [ghc-9.4.1, ghc-9.10.1)
1189+ -- base-4.19.2.0
11791190 Ghc983 -> " base >= 4.17 && < 4.20" -- [ghc-9.4.1, ghc-9.10.1)
11801191 -- base-4.20.0.0
11811192 Ghc9101 -> " base >= 4.18 && < 4.21" -- [ghc-9.6.1, ghc-9.12.1)
0 commit comments