File tree 1 file changed +6
-0
lines changed
ghcide/src/Development/IDE/Spans
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 2
2
-- SPDX-License-Identifier: Apache-2.0
3
3
4
4
{-# LANGUAGE GADTs #-}
5
+ {-# LANGUAGE CPP #-}
6
+ #include "ghc-api-version.h"
5
7
6
8
-- | Gives information about symbols at a given point in DAML files.
7
9
-- These are all pure functions that should execute quickly.
@@ -253,7 +255,11 @@ typeLocationsAtPoint hiedb lookupModule _ideOptions pos (HAR _ ast _ _ hieKind)
253
255
where ni = nodeInfo x
254
256
getTypes ts = flip concatMap (unfold ts) $ \ case
255
257
HTyVarTy n -> [n]
258
+ #if MIN_GHC_API_VERSION(8,8,0)
256
259
HAppTy a (HieArgs xs) -> getTypes (a : map snd xs)
260
+ #else
261
+ HAppTy a b -> getTypes [a,b]
262
+ #endif
257
263
HTyConApp tc (HieArgs xs) -> ifaceTyConName tc : getTypes (map snd xs)
258
264
HForAllTy _ a -> getTypes [a]
259
265
HFunTy a b -> getTypes [a,b]
You can’t perform that action at this time.
0 commit comments