From 7f374dc23dfc7aaee652ba792303619046859971 Mon Sep 17 00:00:00 2001 From: mangoiv Date: Wed, 15 May 2024 21:11:56 +0200 Subject: [PATCH] add the applicable new (version 9.10) GHC flags to normaliseGhcArgs 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) --- Cabal/src/Distribution/Simple/Program/GHC.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Cabal/src/Distribution/Simple/Program/GHC.hs b/Cabal/src/Distribution/Simple/Program/GHC.hs index 84d6b0ccfaa..da6c08b5f55 100644 --- a/Cabal/src/Distribution/Simple/Program/GHC.hs +++ b/Cabal/src/Distribution/Simple/Program/GHC.hs @@ -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 @@ -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