This repository was archived by the owner on Oct 7, 2020. It is now read-only.
File tree 2 files changed +22
-4
lines changed
hie-plugin-api/Haskell/Ide/Engine
2 files changed +22
-4
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 @@ -12,7 +12,6 @@ import qualified GHC
12
12
import GHC ( TypecheckedModule , GhcMonad )
13
13
import Bag
14
14
import BasicTypes
15
- import Var
16
15
17
16
import Data.Data as Data
18
17
import Control.Monad.IO.Class
@@ -43,13 +42,13 @@ everythingInTypecheckedSourceM xs = bs
43
42
processBind :: GhcMonad m => GHC. LHsBindLR Compat. GhcTc Compat. GhcTc -> m TypeMap
44
43
processBind x@ (GHC. L (GHC. RealSrcSpan spn) b) =
45
44
case b of
46
- GHC. FunBind _ fid fmatches _ _ ->
45
+ Compat. FunBindGen t fmatches ->
47
46
case GHC. mg_origin fmatches of
48
47
Generated -> return IM. empty
49
48
FromSource -> do
50
49
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
53
52
_ -> types x
54
53
processBind _ = return IM. empty
55
54
You can’t perform that action at this time.
0 commit comments