@@ -1452,14 +1452,28 @@ generateGhcLibCabal ghcFlavor customCppOpts = do
14521452 ],
14531453 [" reexported-modules:" ],
14541454 indent2 (Data.List.NonEmpty. toList (withCommas (Data.List.NonEmpty. fromList $ nubSort parserModules))),
1455- if ghcSeries ghcFlavor > GHC_9_10 then
1456- -- ghc-lib w/ghc-9.10.1 re-exports ghc-lib-parser GHC.Internal modules
1457- join [
1458- [" if impl(ghc < 9.12.1)" ],
1459- [" reexported-modules:" ],
1460- indent3 (Data.List.NonEmpty. toList (withCommas (Data.List.NonEmpty. fromList [ " GHC.Internal.ForeignSrcLang" , " GHC.Internal.LanguageExtensions" , " GHC.Internal.Lexeme" , " GHC.Internal.TH.Syntax" , " GHC.Internal.TH.Ppr" , " GHC.Internal.TH.PprLib" , " GHC.Internal.TH.Lib.Map" ])))
1461- ]
1462- else [] ,
1455+ if ghcSeries ghcFlavor > GHC_9_12
1456+ then
1457+ join [
1458+ [" if impl(ghc < 9.12.1)" ],
1459+ [" hs-source-dirs:" ],
1460+ [" libraries/ghc-internal/src" ],
1461+ [" libraries/ghc-boot-th-internal" ],
1462+ [" reexported-modules:" ],
1463+ indent3 (Data.List.NonEmpty. toList (withCommas (Data.List.NonEmpty. fromList [ " GHC.Internal.ForeignSrcLang" , " GHC.Internal.LanguageExtensions" , " GHC.Internal.Lexeme" , " GHC.Internal.TH.Syntax" ])))
1464+ ]
1465+ else
1466+ if ghcSeries ghcFlavor > GHC_9_10
1467+ then
1468+ join [
1469+ [" if impl(ghc < 9.12.1)" ],
1470+ [" hs-source-dirs:" ],
1471+ [" libraries/ghc-internal/src" ],
1472+ [" libraries/ghc-boot-th-internal" ],
1473+ [" reexported-modules:" ],
1474+ indent3 (Data.List.NonEmpty. toList (withCommas (Data.List.NonEmpty. fromList [ " GHC.Internal.ForeignSrcLang" , " GHC.Internal.LanguageExtensions" , " GHC.Internal.Lexeme" , " GHC.Internal.TH.Syntax" , " GHC.Internal.TH.Ppr" , " GHC.Internal.TH.PprLib" , " GHC.Internal.TH.Lib.Map" ])))
1475+ ]
1476+ else [] ,
14631477 [ " exposed-modules:" ,
14641478 " Paths_ghc_lib"
14651479 ],
@@ -1582,17 +1596,29 @@ generateGhcLibParserCabal ghcFlavor customCppOpts = do
15821596 indent2 [x | ghcSeries ghcFlavor < GHC_9_0 , x <- [" Lexer" , " Parser" ]],
15831597 [" exposed-modules:" ],
15841598 indent2 parserModules,
1585- if ghcSeries ghcFlavor > GHC_9_10 then
1586- -- ghc-lib-parser with ghc-9.10.1 needs to contain GHC.Internal modules
1587- join [
1588- [" if impl(ghc < 9.12.1)" ],
1589- [" hs-source-dirs:" ],
1590- [" libraries/ghc-internal/src" ],
1591- [" libraries/ghc-boot-th-internal" ],
1592- [" exposed-modules:" ],
1593- indent3 [ " GHC.Internal.ForeignSrcLang" , " GHC.Internal.LanguageExtensions" , " GHC.Internal.Lexeme" , " GHC.Internal.TH.Syntax" , " GHC.Internal.TH.Ppr" , " GHC.Internal.TH.PprLib" , " GHC.Internal.TH.Lib.Map" ]
1594- ]
1595- else []
1599+ if ghcSeries ghcFlavor > GHC_9_12
1600+ then
1601+ join [
1602+ [" if impl(ghc < 9.12.1)" ],
1603+ [" hs-source-dirs:" ],
1604+ [" libraries/ghc-internal/src" ],
1605+ [" libraries/ghc-boot-th-internal" ],
1606+ [" exposed-modules:" ],
1607+ indent3 [ " GHC.Internal.ForeignSrcLang" , " GHC.Internal.LanguageExtensions" , " GHC.Internal.Lexeme" , " GHC.Internal.TH.Syntax" ]
1608+ ]
1609+ else
1610+ if ghcSeries ghcFlavor > GHC_9_10
1611+ then
1612+ join [
1613+ [" if impl(ghc < 9.12.1)" ],
1614+ [" hs-source-dirs:" ],
1615+ [" libraries/ghc-internal/src" ],
1616+ [" libraries/ghc-boot-th-internal" ],
1617+ [" exposed-modules:" ],
1618+ indent3 [ " GHC.Internal.ForeignSrcLang" , " GHC.Internal.LanguageExtensions" , " GHC.Internal.Lexeme" , " GHC.Internal.TH.Syntax" , " GHC.Internal.TH.Ppr" , " GHC.Internal.TH.PprLib" , " GHC.Internal.TH.Lib.Map" ]
1619+ ]
1620+ else
1621+ []
15961622 ]
15971623 putStrLn " # Generating 'ghc-lib-parser.cabal'... Done!"
15981624
0 commit comments