diff options
author | Alfredo Di Napoli <alfredo@well-typed.com> | 2020-12-08 10:28:54 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-09 21:18:34 -0500 |
commit | 9a62ecfa1653db5491f901d317d0c20454e3b426 (patch) | |
tree | 53077ab27b95b3c28eb2d3579c0abe8980ab27c0 /compiler/GHC/Tc/Module.hs | |
parent | bd877edd9499a351db947cd51ed583872b2facdf (diff) | |
download | haskell-9a62ecfa1653db5491f901d317d0c20454e3b426.tar.gz |
Remove errShortString, cleanup error-related functions
This commit removes the errShortString field from the ErrMsg type,
allowing us to cleanup a lot of dynflag-dependent error functions, and
move them in a more specialised 'GHC.Driver.Errors' closer to the
driver, where they are actually used.
Metric Increase:
T4801
T9961
Diffstat (limited to 'compiler/GHC/Tc/Module.hs')
-rw-r--r-- | compiler/GHC/Tc/Module.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs index 174055bd01..819740c341 100644 --- a/compiler/GHC/Tc/Module.hs +++ b/compiler/GHC/Tc/Module.hs @@ -208,7 +208,7 @@ tcRnModule hsc_env mod_sum save_rn_syntax hsc_src = ms_hsc_src mod_sum dflags = hsc_dflags hsc_env home_unit = hsc_home_unit hsc_env - err_msg = mkPlainErrMsg dflags loc $ + err_msg = mkPlainErrMsg loc $ text "Module does not have a RealSrcSpan:" <+> ppr this_mod pair :: (Module, SrcSpan) @@ -3119,5 +3119,5 @@ mark_plugin_unsafe dflags = unless (gopt Opt_PluginTrustworthy dflags) $ recordUnsafeInfer pluginUnsafe where unsafeText = "Use of plugins makes the module unsafe" - pluginUnsafe = unitBag ( mkPlainWarnMsg dflags noSrcSpan + pluginUnsafe = unitBag ( mkPlainWarnMsg noSrcSpan (Outputable.text unsafeText) ) |