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 <-
134134 GHC. FunBind (GHC. L _ (Var. varType -> t)) _ _ _ _
135135#endif
136136
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
137156
138157#if MIN_VERSION_ghc(8, 6, 0)
139158matchGroupType :: GHC. MatchGroupTc -> GHC. Type
Original file line number Diff line number Diff line change @@ -43,13 +43,13 @@ everythingInTypecheckedSourceM xs = bs
4343processBind :: GhcMonad m => GHC. LHsBindLR Compat. GhcTc Compat. GhcTc -> m TypeMap
4444processBind x@ (GHC. L (GHC. RealSrcSpan spn) b) =
4545 case b of
46- GHC. FunBind _ fid fmatches _ _ ->
46+ Compat. FunBindGen t fmatches ->
4747 case GHC. mg_origin fmatches of
4848 Generated -> return IM. empty
4949 FromSource -> do
5050 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
5353 _ -> types x
5454processBind _ = return IM. empty
5555
You can’t perform that action at this time.
0 commit comments