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
-4
lines changed
hie-plugin-api/Haskell/Ide/Engine Expand file tree Collapse file tree 2 files changed +22
-4
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 @@ -12,7 +12,6 @@ import qualified GHC
1212import GHC ( TypecheckedModule , GhcMonad )
1313import Bag
1414import BasicTypes
15- import Var
1615
1716import Data.Data as Data
1817import Control.Monad.IO.Class
@@ -43,13 +42,13 @@ everythingInTypecheckedSourceM xs = bs
4342processBind :: GhcMonad m => GHC. LHsBindLR Compat. GhcTc Compat. GhcTc -> m TypeMap
4443processBind x@ (GHC. L (GHC. RealSrcSpan spn) b) =
4544 case b of
46- GHC. FunBind _ fid fmatches _ _ ->
45+ Compat. FunBindGen t fmatches ->
4746 case GHC. mg_origin fmatches of
4847 Generated -> return IM. empty
4948 FromSource -> do
5049 im <- types fmatches
51- return $ ( IM. singleton (rspToInt spn) (varType ( GHC. unLoc fid))) `IM.union` im
52- GHC . AbsBinds _ _ _ _ _ bs _ -> everythingInTypecheckedSourceM bs
50+ return $ IM. singleton (rspToInt spn) t `IM.union` im
51+ Compat . AbsBinds bs -> everythingInTypecheckedSourceM bs
5352 _ -> types x
5453processBind _ = return IM. empty
5554
You can’t perform that action at this time.
0 commit comments