summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Main.hs
diff options
context:
space:
mode:
authorOleg Grenrus <oleg.grenrus@iki.fi>2023-05-14 21:00:56 +0300
committerOleg Grenrus <oleg.grenrus@iki.fi>2023-05-17 16:58:37 +0300
commit2b04bce3a94e3b191a5c43414b7f76d144f0d1f6 (patch)
tree1c61ad2c6390799859e48bf9cd52b2902b01982d /compiler/GHC/Driver/Main.hs
parent2972fd66f91cb51426a1df86b8166a067015e231 (diff)
downloadhaskell-wip/warns-to-drivermessages.tar.gz
Make Warn = Located DriverMessagewip/warns-to-drivermessages
Resolves #23261 This change makes command line argument parsing use diagnostic framework for producing warnings.
Diffstat (limited to 'compiler/GHC/Driver/Main.hs')
-rw-r--r--compiler/GHC/Driver/Main.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs
index 3321d1203f..e795b5cd55 100644
--- a/compiler/GHC/Driver/Main.hs
+++ b/compiler/GHC/Driver/Main.hs
@@ -1710,9 +1710,9 @@ markUnsafeInfer tcg_env whyUnsafe = do
(vcat $ badInsts $ tcg_insts tcg_env)
]
badFlags df = concatMap (badFlag df) unsafeFlagsForInfer
- badFlag df (str,loc,on,_)
+ badFlag df (ext,loc,on,_)
| on df = [mkLocMessage MCOutput (loc df) $
- text str <+> text "is not allowed in Safe Haskell"]
+ text "-X" <> ppr ext <+> text "is not allowed in Safe Haskell"]
| otherwise = []
badInsts insts = concatMap badInst insts