This repository was archived by the owner on Oct 7, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
hie-plugin-api/Haskell/Ide/Engine Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,25 @@ pattern FunBindType t <-
134
134
GHC. FunBind (GHC. L _ (Var. varType -> t)) _ _ _ _
135
135
#endif
136
136
137
+ pattern FunBindGen :: Type. Type -> GHC. MatchGroup GhcTc (GHC. LHsExpr GhcTc ) -> GHC. HsBindLR GhcTc GhcTc
138
+ pattern FunBindGen t fmatches <-
139
+ #if MIN_VERSION_ghc(8, 6, 0)
140
+ GHC. FunBind _ (GHC. L _ (Var. varType -> t)) fmatches _ _
141
+ #elif MIN_VERSION_ghc(8, 4, 0)
142
+ GHC. FunBind (GHC. L _ (Var. varType -> t)) fmatches _ _ _
143
+ #else
144
+ GHC. FunBind (GHC. L _ (Var. varType -> t)) fmatches _ _ _
145
+ #endif
146
+
147
+ pattern AbsBinds :: GHC. LHsBinds GhcTc -> GHC. HsBindLR GhcTc GhcTc
148
+ pattern AbsBinds bs <-
149
+ #if MIN_VERSION_ghc(8, 6, 0)
150
+ GHC. AbsBinds _ _ _ _ _ bs _
151
+ #elif MIN_VERSION_ghc(8, 4, 0)
152
+ GHC. AbsBinds _ _ _ _ bs _
153
+ #else
154
+ GHC. AbsBinds _ _ _ _ bs _
155
+ #endif
137
156
138
157
#if MIN_VERSION_ghc(8, 6, 0)
139
158
matchGroupType :: GHC. MatchGroupTc -> GHC. Type
Original file line number Diff line number Diff line change @@ -43,13 +43,13 @@ everythingInTypecheckedSourceM xs = bs
43
43
processBind :: GhcMonad m => GHC. LHsBindLR Compat. GhcTc Compat. GhcTc -> m TypeMap
44
44
processBind x@ (GHC. L (GHC. RealSrcSpan spn) b) =
45
45
case b of
46
- GHC. FunBind _ fid fmatches _ _ ->
46
+ Compat. FunBindGen t fmatches ->
47
47
case GHC. mg_origin fmatches of
48
48
Generated -> return IM. empty
49
49
FromSource -> do
50
50
im <- types fmatches
51
- return $ ( IM. singleton (rspToInt spn) (varType ( GHC. unLoc fid))) `IM.union` im
52
- GHC . AbsBinds _ _ _ _ _ bs _ -> everythingInTypecheckedSourceM bs
51
+ return $ IM. singleton (rspToInt spn) t `IM.union` im
52
+ Compat . AbsBinds bs -> everythingInTypecheckedSourceM bs
53
53
_ -> types x
54
54
processBind _ = return IM. empty
55
55
You can’t perform that action at this time.
0 commit comments