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 +14
-3
lines changed
hie-plugin-api/Haskell/Ide/Engine Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import qualified GHC
7
7
import qualified Type
8
8
import qualified TcHsSyn
9
9
import qualified TysWiredIn
10
+ import qualified Var
10
11
11
12
#if MIN_VERSION_filepath(1,4,2)
12
13
#else
@@ -123,6 +124,17 @@ pattern HsMultiIfType t <-
123
124
GHC. HsMultiIf t _
124
125
#endif
125
126
127
+ pattern FunBindType :: Type. Type -> GHC. HsBindLR GhcTc GhcTc
128
+ pattern FunBindType t <-
129
+ #if MIN_VERSION_ghc(8, 6, 0)
130
+ GHC. FunBind _ (GHC. L _ (Var. varType -> t)) _ _ _
131
+ #elif MIN_VERSION_ghc(8, 4, 0)
132
+ GHC. FunBind (GHC. L _ (Var. varType -> t)) _ _ _ _
133
+ #else
134
+ GHC. FunBind (GHC. L _ (Var. varType -> t)) _ _ _ _
135
+ #endif
136
+
137
+
126
138
#if MIN_VERSION_ghc(8, 6, 0)
127
139
matchGroupType :: GHC. MatchGroupTc -> GHC. Type
128
140
matchGroupType (GHC. MatchGroupTc args res) = Type. mkFunTys args res
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import qualified TcHsSyn
18
18
import qualified CoreUtils
19
19
import qualified Type
20
20
import qualified Desugar
21
- import qualified Var
22
21
import Haskell.Ide.Engine.Compat
23
22
24
23
import Haskell.Ide.Engine.ArtifactMap
@@ -57,8 +56,8 @@ types hs_env = everythingInTypecheckedSourceM (ty `combineM` fun `combineM` funB
57
56
58
57
funBind :: forall a . Data a => a -> IO TypeMap
59
58
funBind term = case cast term of
60
- (Just (GHC. L (GHC. RealSrcSpan spn) (( GHC. FunBind _ ( GHC. L _ (idp :: GHC. IdP GhcTc )) _ _ _) :: GHC. HsBindLR GhcTc GhcTc ))) ->
61
- return (IM. singleton (rspToInt spn) ( Var. varType idp) )
59
+ (Just (GHC. L (GHC. RealSrcSpan spn) (FunBindType t ))) ->
60
+ return (IM. singleton (rspToInt spn) t )
62
61
_ -> return IM. empty
63
62
64
63
-- | Combine two queries into one using alternative combinator.
You can’t perform that action at this time.
0 commit comments