@@ -31,9 +31,11 @@ genTypeMap tm = do
31
31
hs_env <- GHC. getSession
32
32
liftIO $ types hs_env typecheckedSource
33
33
34
- collectAllSpansTypes'
35
- :: GHC. GhcMonad m => Bool -> TypecheckedModule -> m [(GHC. SrcSpan , GHC. Type )]
36
- collectAllSpansTypes' = collectAllSpansTypes
34
+
35
+ everythingInTypecheckedSourceM
36
+ :: Data x => (forall a . Data a => a -> IO TypeMap ) -> x -> IO TypeMap
37
+ everythingInTypecheckedSourceM f = everythingButTypeM @ GHC. Id f
38
+
37
39
38
40
-- | Obtain details map for types.
39
41
types :: GHC. HscEnv -> GHC. TypecheckedSource -> IO TypeMap
@@ -53,11 +55,6 @@ types hs_env = everythingInTypecheckedSourceM (ty `combineM` fun)
53
55
return (IM. singleton (rspToInt spn) (TcHsSyn. hsPatType hsPatType))
54
56
_ -> return IM. empty
55
57
56
-
57
- everythingInTypecheckedSourceM
58
- :: Data x => (forall a . Data a => a -> IO TypeMap ) -> x -> IO TypeMap
59
- everythingInTypecheckedSourceM f = everythingButTypeM @ GHC. Id f
60
-
61
58
-- | Combine two queries into one using alternative combinator.
62
59
combineM
63
60
:: (forall a . Data a => a -> IO TypeMap )
@@ -115,7 +112,7 @@ everythingButM f x = do
115
112
-- Since the above is quite costly, we just skip cases where computing the
116
113
-- expression's type is going to be expensive.
117
114
--
118
- -- See #16233
115
+ -- See #16233<https://gitlab.haskell.org/ghc/ghc/issues/16233>
119
116
getType
120
117
:: GHC. HscEnv -> GHC. LHsExpr GHC. GhcTc -> IO (Maybe (GHC. SrcSpan , Type. Type ))
121
118
getType hs_env e@ (GHC. L spn e') =
0 commit comments