Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround ghc-9.10.1/deepseq ambiguity #279

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ buildDists ghcFlavor noGhcCheckout noBuilds versionSuffix = do
branch = \case
Ghc9121 -> "ghc-9.12"
Ghc9101 -> "ghc-9.10.1-release"
Ghc983 -> "ghc-9.8"
Ghc983 -> "ghc-9.8.3-release"
Ghc982 -> "ghc-9.8.2-release"
Ghc981 -> "ghc-9.8.1-release"
Ghc966 -> "ghc-9.6.6-release"
Expand Down
13 changes: 12 additions & 1 deletion ghc-lib-gen/src/Ghclibgen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module Ghclibgen
applyPatchStage,
applyPatchNoMonoLocalBinds,
applyPatchCmmParseNoImplicitPrelude,
applyPatchCompilerGHCUnitTypes,
applyPatchHadrianCabalProject,
applyPatchGhcInternalEventWindowsHsc,
applyPatchTemplateHaskellLanguageHaskellTHSyntax,
Expand Down Expand Up @@ -1060,6 +1061,15 @@ applyPatchHadrianCabalProject _ = do
cabalProject = "hadrian" </> "cabal.project"
cabalProjectFreeze = cabalProject ++ ".freeze"

applyPatchCompilerGHCUnitTypes :: GhcFlavor -> IO ()
applyPatchCompilerGHCUnitTypes ghcFlavor = do
when (ghcFlavor == Ghc9101) $ do
writeFile "compiler/GHC/Unit/Types.hs"
. replace
"import Control.DeepSeq"
"import Control.DeepSeq (NFData(..))"
=<< readFile' "compiler/GHC/Unit/Types.hs"

-- Data type representing an approximately parsed Cabal file.
data Cabal = Cabal
{ cabalDir :: FilePath, -- the directory this file exists in
Expand Down Expand Up @@ -1175,7 +1185,8 @@ baseBounds = \case
-- base-4.19.0.0, ghc-prim-0.11.0
Ghc981 -> "base >= 4.17 && < 4.19.1" -- [ghc-9.4.1, ghc-9.8.2)
-- base-4.19.1.0
Ghc982 -> "base >= 4.17 && < 4.20" -- [ghc-9.4.1, ghc-9.10.1)
Ghc982 -> "base >= 4.17 && < 4.19.2" -- [ghc-9.4.1, ghc-9.10.1)
-- base-4.19.2.0
Ghc983 -> "base >= 4.17 && < 4.20" -- [ghc-9.4.1, ghc-9.10.1)
-- base-4.20.0.0
Ghc9101 -> "base >= 4.18 && < 4.21" -- [ghc-9.6.1, ghc-9.12.1)
Expand Down
1 change: 1 addition & 0 deletions ghc-lib-gen/src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ghclibgen (GhclibgenOpts root _patches target ghcFlavor skipInit cppOpts _resolv
applyPatchHaddockHs ghcFlavor
applyPatchNoMonoLocalBinds ghcFlavor
applyPatchTemplateHaskellLanguageHaskellTHSyntax ghcFlavor
applyPatchCompilerGHCUnitTypes ghcFlavor
generateGhcLibParserCabal ghcFlavor cppOpts
Ghclib -> do
when withInit $ init ghcFlavor
Expand Down
Loading