Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit be44bc9

Browse files
committed
Remove unused function and add comment
1 parent 00a101d commit be44bc9

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

hie-plugin-api/Haskell/Ide/Engine/TypeMap.hs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ genTypeMap tm = do
3131
hs_env <- GHC.getSession
3232
liftIO $ types hs_env typecheckedSource
3333

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+
3739

3840
-- | Obtain details map for types.
3941
types :: GHC.HscEnv -> GHC.TypecheckedSource -> IO TypeMap
@@ -53,11 +55,6 @@ types hs_env = everythingInTypecheckedSourceM (ty `combineM` fun)
5355
return (IM.singleton (rspToInt spn) (TcHsSyn.hsPatType hsPatType))
5456
_ -> return IM.empty
5557

56-
57-
everythingInTypecheckedSourceM
58-
:: Data x => (forall a . Data a => a -> IO TypeMap) -> x -> IO TypeMap
59-
everythingInTypecheckedSourceM f = everythingButTypeM @GHC.Id f
60-
6158
-- | Combine two queries into one using alternative combinator.
6259
combineM
6360
:: (forall a . Data a => a -> IO TypeMap)
@@ -115,7 +112,7 @@ everythingButM f x = do
115112
-- Since the above is quite costly, we just skip cases where computing the
116113
-- expression's type is going to be expensive.
117114
--
118-
-- See #16233
115+
-- See #16233<https://gitlab.haskell.org/ghc/ghc/issues/16233>
119116
getType
120117
:: GHC.HscEnv -> GHC.LHsExpr GHC.GhcTc -> IO (Maybe (GHC.SrcSpan, Type.Type))
121118
getType hs_env e@(GHC.L spn e') =

0 commit comments

Comments
 (0)