on master help sign in
#170, make sure the right warnings are set when deferring errors to warnings (#172)
commit23142e3cec2a7839edf30fc7b910cfd2c08ba244 authorNeil Mitchell <ndmitchell@gmail.com> dateSun 20 Oct 2019, 02:22 (7 years ago) parent2755212
1 file changed+5−1
src/Development/IDE/Core/Compile.hs+5−1
src/Development/IDE/Core/Compile.hs+5−1
@@ -136,7 +136,11 @@ demoteTypeErrorsToWarnings =
136136 (update_pm_mod_summary . update_hspp_opts) demoteTEsToWarns where
137137
138138 demoteTEsToWarns :: DynFlags -> DynFlags
139− demoteTEsToWarns = (`gopt_set` Opt_DeferTypeErrors)
139+ -- convert the errors into warnings, and also check the warnings are enabled
140+ demoteTEsToWarns = (`wopt_set` Opt_WarnDeferredTypeErrors)
141+ . (`wopt_set` Opt_WarnTypedHoles)
142+ . (`wopt_set` Opt_WarnDeferredOutOfScopeVariables)
143+ . (`gopt_set` Opt_DeferTypeErrors)
140144 . (`gopt_set` Opt_DeferTypedHoles)
141145 . (`gopt_set` Opt_DeferOutOfScopeVariables)
142146