File tree 2 files changed +11
-3
lines changed
ghcide/src/Development/IDE
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ module Development.IDE.GHC.Compat(
42
42
disableWarningsAsErrors ,
43
43
AvailInfo ,
44
44
tcg_exports ,
45
+ pattern FunTy ,
45
46
46
47
#if MIN_GHC_API_VERSION(8,10,0)
47
48
module GHC.Hs.Extension ,
@@ -89,6 +90,7 @@ import HsExtension
89
90
#endif
90
91
91
92
import qualified GHC
93
+ import qualified TyCoRep
92
94
import GHC hiding (
93
95
ModLocation ,
94
96
HasSrcSpan ,
@@ -283,3 +285,10 @@ pattern ExposePackage s a mr <- DynFlags.ExposePackage s a _ mr
283
285
#else
284
286
pattern ExposePackage s a mr = DynFlags. ExposePackage s a mr
285
287
#endif
288
+
289
+ pattern FunTy :: Type -> Type -> Type
290
+ #if MIN_GHC_API_VERSION(8, 10, 0)
291
+ pattern FunTy arg res <- TyCoRep. FunTy {ft_arg = arg, ft_res = res}
292
+ #else
293
+ pattern FunTy arg res <- TyCoRep. FunTy arg res
294
+ #endif
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import Development.IDE.Core.PositionMapping
32
32
import Name
33
33
import Outputable hiding ((<>) )
34
34
import SrcLoc
35
- import TyCoRep
35
+ import TyCoRep hiding ( FunTy )
36
36
import TyCon
37
37
import qualified Var
38
38
import NameEnv
@@ -257,7 +257,7 @@ typeLocationsAtPoint hiedb lookupModule _ideOptions pos (HAR _ ast _ hieKind) =
257
257
AppTy a b -> getTypes [a,b]
258
258
TyConApp tc ts -> tyConName tc : getTypes ts
259
259
ForAllTy _ t -> getTypes [t]
260
- FunTy _ a b -> getTypes [a,b]
260
+ FunTy a b -> getTypes [a,b]
261
261
CastTy t _ -> getTypes [t]
262
262
_ -> []
263
263
in fmap nubOrd $ concatMapM (fmap (maybe [] id ) . nameToLocation hiedb lookupModule) (getTypes ts)
@@ -338,4 +338,3 @@ pointCommand hf pos k =
338
338
sp fs = mkRealSrcSpan (sloc fs) (sloc fs)
339
339
line = _line pos
340
340
cha = _character pos
341
-
You can’t perform that action at this time.
0 commit comments