Skip to content

Commit 874278f

Browse files
committed
Fix two more test failures
- GHC9 uses a more lenient haddock parser - TH2.17 has polymorphic Q monad with a type class
1 parent f334cbd commit 874278f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ghcide/test/exe/Main.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,12 +525,17 @@ diagnosticTests = testGroup "diagnostics"
525525
, "foo = 1 {-|-}"
526526
]
527527
_ <- createDoc "Foo.hs" "haskell" fooContent
528+
#if MIN_GHC_API_VERSION(9,0,1)
529+
-- Haddock parse errors are ignored on ghc-9.0.1
530+
pure ()
531+
#else
528532
expectDiagnostics
529533
[ ( "Foo.hs"
530534
, [(DsWarning, (2, 8), "Haddock parse error on input")
531535
]
532536
)
533537
]
538+
#endif
534539
, testSessionWait "strip file path" $ do
535540
let
536541
name = "Testing"
@@ -3568,6 +3573,8 @@ thTests =
35683573
T.unlines
35693574
[ "{-# LANGUAGE TemplateHaskell #-}"
35703575
, "module A (a) where"
3576+
, "import Language.Haskell.TH (ExpQ)"
3577+
, "a :: ExpQ" -- TH 2.17 requires an explicit type signature since splices are polymorphic
35713578
, "a = [| glorifiedID |]"
35723579
, "glorifiedID :: a -> a"
35733580
, "glorifiedID = id" ]

0 commit comments

Comments
 (0)