Skip to content

Commit 653d661

Browse files
committed
Don't suggest -Wno-deferred-type-errors
Fixes haskell#2032
1 parent 132a662 commit 653d661

File tree

1 file changed

+7
-1
lines changed
  • plugins/hls-pragmas-plugin/src/Ide/Plugin

1 file changed

+7
-1
lines changed

plugins/hls-pragmas-plugin/src/Ide/Plugin/Pragmas.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,16 @@ suggest dflags diag =
8181

8282
suggestDisableWarning :: Diagnostic -> [PragmaEdit]
8383
suggestDisableWarning Diagnostic {_code}
84-
| Just (J.InR (T.stripPrefix "-W" -> Just w)) <- _code =
84+
| Just (J.InR (T.stripPrefix "-W" -> Just w)) <- _code
85+
, w `notElem` warningBlacklist =
8586
pure ("Disable \"" <> w <> "\" warnings", OptGHC w)
8687
| otherwise = []
8788

89+
-- Don't suggest disabling type errors as a solution to all type errors
90+
warningBlacklist :: [T.Text]
91+
-- warningBlacklist = []
92+
warningBlacklist = ["deferred-type-errors"]
93+
8894
-- ---------------------------------------------------------------------
8995

9096
-- | Offer to add a missing Language Pragma to the top of a file.

0 commit comments

Comments
 (0)