Skip to content

Commit

Permalink
add the applicable new (version 9.10) GHC flags to normaliseGhcArgs
Browse files Browse the repository at this point in the history
Actionable flags are:
- fdiagnostics-as-json (changes the format GHC outputs its diagnostics)
- fprint-error-index-lists (changes the way GHC displays compile time)
- fbreak-points (enables/disables break-points in GHCi)
- dipe-stats (dumps information about which info tables have IPE
  information)
  • Loading branch information
MangoIV committed May 15, 2024
1 parent 03d9829 commit 7f374dc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Cabal/src/Distribution/Simple/Program/GHC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,14 @@ normaliseGhcArgs (Just ghcVersion) PackageDescription{..} ghcArgs
, "keep-going" -- try harder, the build will still fail if it's erroneous
, "print-axiom-incomps" -- print more debug info for closed type families
]
, from
[9, 10]
[ "diagnostics-as-json"
, "print-error-index-links"
, "break-points"
]
]
, flagIn . invertibleFlagSet "-d" $ ["ppr-case-as-let", "ppr-ticks"]
, flagIn $ invertibleFlagSet "-d" ["ppr-case-as-let", "ppr-ticks"]
, isOptIntFlag
, isIntFlag
, if safeToFilterWarnings
Expand Down Expand Up @@ -289,6 +295,7 @@ normaliseGhcArgs (Just ghcVersion) PackageDescription{..} ghcArgs
, from [8, 6] ["-dhex-word-literals"]
, from [8, 8] ["-fshow-docs-of-hole-fits", "-fno-show-docs-of-hole-fits"]
, from [9, 0] ["-dlinear-core-lint"]
, from [9, 10] ["-dipe-stats"]
]

isOptIntFlag :: String -> Any
Expand Down

0 comments on commit 7f374dc

Please sign in to comment.