File tree Expand file tree Collapse file tree
plugins/hls-export-plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ import Development.IDE.Core.PluginUtils (runActionE, useE)
1313import Development.IDE.Core.Shake (getDiagnostics )
1414import Development.IDE.GHC.Compat
1515-- TcRnUnusedName (and its provenance) only became a structured diagnostic in
16- -- GHC 9.8. On 9.6 we cannot single out unused top-level binds this way.
16+ -- GHC 9.8 (GHC #20115, MR !10350). On 9.6 we cannot single out unused top-level
17+ -- binds this way.
1718#if MIN_VERSION_ghc(9,8,0)
1819import Development.IDE.GHC.Compat.Error (_TcRnMessage ,
1920 msgEnvelopeErrorL )
Original file line number Diff line number Diff line change @@ -265,7 +265,9 @@ main = defaultTestRunner $ testGroup "Export"
265265 ]
266266
267267 , testGroup " Export fixes the unused-binding warning"
268- [ testCase " Export action attaches the -Wunused-top-binds diagnostic" $ runExport $ \ _dir -> do
268+ [ knownBrokenForGhcVersions [GHC96 ]
269+ " TcRnUnusedName provenance is unstructured before GHC 9.8 (GHC #20115)" $
270+ testCase " Export action attaches the -Wunused-top-binds diagnostic" $ runExport $ \ _dir -> do
269271 doc <- openDoc " ExportUnusedFix.hs" " haskell"
270272 waitForKickDone
271273 actions <- rights . map toEither <$> getCodeActions doc (rangeAt 6 0 ) -- on `unused`
You can’t perform that action at this time.
0 commit comments