@@ -27,26 +27,26 @@ import TestLib.Types
2727tests :: (LspContext context m , HasNixEnvironment context ) => Text -> Text -> SpecFree context m ()
2828tests ghcPackage lsName = describe " Diagnostics" $ do
2929 describe " Foo.hs" $ do
30- testDiagnosticsLabelDesired " Out of scope variable" lsName " Foo.hs" Nothing
30+ testDiagnosticsLabelDesired " Out of scope variable" lsName " Foo.hs"
3131 [__i |module Foo where
3232 foo = bar
3333 |]
3434 ((== [(Range (Position 1 6 ) (Position 1 9 ), Just (InR " GHC-88464" ))]) . getDiagnosticRanges)
3535
3636 when (ghcPackage /= " ghc910" ) $ -- TODO: re-enable hlint test
37- testDiagnosticsLabelDesired " Eta reduce" lsName " Foo.hs" Nothing etaExpandCode
37+ testDiagnosticsLabelDesired " Eta reduce" lsName " Foo.hs" etaExpandCode
3838 ((== [(Range (Position 6 0 ) (Position 6 14 ), Just (InR " refact:Eta reduce" ))]) . getDiagnosticRanges)
3939
4040 describe " main.ipynb" $ do
41- testDiagnosticsLabelDesired " Top-level putStrLn" lsName " main.ipynb" Nothing
41+ testDiagnosticsLabelDesired " Top-level putStrLn" lsName " main.ipynb"
4242 [__i |-- A comment
4343 foo = bar
4444
4545 putStrLn "HI"
4646 |]
4747 ((== [(Range (Position 1 6 ) (Position 1 9 ), Just (InR " GHC-88464" ))]) . getDiagnosticRanges)
4848
49- testDiagnosticsLabel " Top-level putStrLn with diagnostic" lsName " main.ipynb" Nothing
49+ testDiagnosticsLabel " Top-level putStrLn with diagnostic" lsName " main.ipynb"
5050 [__i |-- Some comment
5151 import Data.ByteString.Lazy.Char8 as BL
5252 foo = bar
@@ -56,15 +56,15 @@ tests ghcPackage lsName = describe "Diagnostics" $ do
5656 [(Range (Position 4 0 ) (Position 4 8 ), x)] | containsAll x [" Ambiguous occurrence" , " putStrLn" ] -> return ()
5757 xs -> expectationFailure [i |Unexpected diagnostics: #{xs}|]
5858
59- testDiagnosticsLabelDesired " Reordering" lsName " main.ipynb" Nothing
59+ testDiagnosticsLabelDesired " Reordering" lsName " main.ipynb"
6060 [__i |import Data.Aeson.TH
6161 {-\# LANGUAGE TemplateHaskell \#-}
6262 foo = bar -- This should be the only diagnostic we get
6363 data Foo = Bar | Baz
6464 $(deriveJSON defaultOptions ''Foo)|]
6565 ((== [(Range (Position 2 6 ) (Position 2 9 ), Just (InR " GHC-88464" ))]) . getDiagnosticRanges)
6666
67- testDiagnosticsLabelDesired " Complicated reordering" lsName " main.ipynb" Nothing
67+ testDiagnosticsLabelDesired " Complicated reordering" lsName " main.ipynb"
6868 [__i |import Data.Aeson as A
6969 import Data.Aeson.TH
7070 :set -XTemplateHaskell
0 commit comments