Skip to content

Commit 4c044b4

Browse files
committed
fix 8.6
1 parent 8d0631f commit 4c044b4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ghcide/src/Development/IDE/Spans/AtPoint.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
-- SPDX-License-Identifier: Apache-2.0
33

44
{-# LANGUAGE GADTs #-}
5+
{-# LANGUAGE CPP #-}
6+
#include "ghc-api-version.h"
57

68
-- | Gives information about symbols at a given point in DAML files.
79
-- These are all pure functions that should execute quickly.
@@ -253,7 +255,11 @@ typeLocationsAtPoint hiedb lookupModule _ideOptions pos (HAR _ ast _ _ hieKind)
253255
where ni = nodeInfo x
254256
getTypes ts = flip concatMap (unfold ts) $ \case
255257
HTyVarTy n -> [n]
258+
#if MIN_GHC_API_VERSION(8,8,0)
256259
HAppTy a (HieArgs xs) -> getTypes (a : map snd xs)
260+
#else
261+
HAppTy a b -> getTypes [a,b]
262+
#endif
257263
HTyConApp tc (HieArgs xs) -> ifaceTyConName tc : getTypes (map snd xs)
258264
HForAllTy _ a -> getTypes [a]
259265
HFunTy a b -> getTypes [a,b]

0 commit comments

Comments
 (0)