Skip to content

Commit 316f96e

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 f258edd commit 316f96e

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
@@ -535,12 +535,17 @@ diagnosticTests = testGroup "diagnostics"
535535
, "foo = 1 {-|-}"
536536
]
537537
_ <- createDoc "Foo.hs" "haskell" fooContent
538+
#if MIN_GHC_API_VERSION(9,0,1)
539+
-- Haddock parse errors are ignored on ghc-9.0.1
540+
pure ()
541+
#else
538542
expectDiagnostics
539543
[ ( "Foo.hs"
540544
, [(DsWarning, (2, 8), "Haddock parse error on input")
541545
]
542546
)
543547
]
548+
#endif
544549
, testSessionWait "strip file path" $ do
545550
let
546551
name = "Testing"
@@ -3618,6 +3623,8 @@ thTests =
36183623
T.unlines
36193624
[ "{-# LANGUAGE TemplateHaskell #-}"
36203625
, "module A (a) where"
3626+
, "import Language.Haskell.TH (ExpQ)"
3627+
, "a :: ExpQ" -- TH 2.17 requires an explicit type signature since splices are polymorphic
36213628
, "a = [| glorifiedID |]"
36223629
, "glorifiedID :: a -> a"
36233630
, "glorifiedID = id" ]

0 commit comments

Comments
 (0)