Skip to content

Commit ad7254d

Browse files
committed
Fix transitive dependency test for ghc 8.10
1 parent df6f1df commit ad7254d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ghcide/test/exe/Dependency.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Data.Bool (bool)
1111
import Data.List (isSuffixOf)
1212
import Data.Maybe (fromMaybe)
1313
import Data.Proxy (Proxy (..))
14-
import Development.IDE.GHC.Compat (GhcVersion (..))
14+
import Development.IDE.GHC.Compat (GhcVersion (..), ghcVersion)
1515
import Language.LSP.Protocol.Message (TCustomMessage (NotMess),
1616
TNotificationMessage (..))
1717
import Language.LSP.Protocol.Types (Definition (..),
@@ -138,7 +138,9 @@ transitiveDependencyTest = testSessionWithExtraFiles "dependency" "goto transiti
138138
hashableDefs <- getDefinitions asyncDoc (Position 246 11)
139139
-- The location of the definition of Hashable in
140140
-- Data.Hashable.Class
141-
let expRange = Range (Position 198 14) (Position 198 22)
141+
let expRange = if ghcVersion >= GHC90
142+
then Range (Position 198 14) (Position 198 22)
143+
else Range (Position 198 0) (Position 235 31)
142144
case hashableDefs of
143145
InL (Definition (InR [Location uri actualRange])) ->
144146
liftIO $ do

0 commit comments

Comments
 (0)