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

Commit 3625871

Browse files
committed
Use Compat module for GHC 8.2.2
1 parent f1f14fa commit 3625871

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

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

+12-12
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import qualified TcHsSyn
2222
import qualified CoreUtils
2323
import qualified Type
2424
import qualified Desugar
25-
import Haskell.Ide.Engine.Compat
25+
import qualified Haskell.Ide.Engine.Compat as Compat
2626

2727
import Haskell.Ide.Engine.ArtifactMap
2828

@@ -40,7 +40,7 @@ everythingInTypecheckedSourceM xs = bs
4040
where
4141
bs = foldBag (liftA2 IM.union) processBind (return IM.empty) xs
4242

43-
processBind :: GhcMonad m => GHC.LHsBindLR GHC.GhcTc GHC.GhcTc -> m TypeMap
43+
processBind :: GhcMonad m => GHC.LHsBindLR Compat.GhcTc Compat.GhcTc -> m TypeMap
4444
processBind x@(GHC.L (GHC.RealSrcSpan spn) b) =
4545
case b of
4646
GHC.FunBind _ fid fmatches _ _ ->
@@ -73,7 +73,7 @@ types = everythingButTypeM @GHC.Id (ty `combineM` fun `combineM` funBind)
7373

7474
funBind :: forall a' . (GhcMonad m, Data a') => a' -> m TypeMap
7575
funBind term = case cast term of
76-
(Just (GHC.L (GHC.RealSrcSpan spn) (FunBindType t))) ->
76+
(Just (GHC.L (GHC.RealSrcSpan spn) (Compat.FunBindType t))) ->
7777
return (IM.singleton (rspToInt spn) t)
7878
_ -> return IM.empty
7979

@@ -128,19 +128,19 @@ everythingButM f x = do
128128
--
129129
-- See #16233<https://gitlab.haskell.org/ghc/ghc/issues/16233>
130130
getType
131-
:: GhcMonad m => GHC.LHsExpr GhcTc -> m (Maybe (GHC.SrcSpan, Type.Type))
131+
:: GhcMonad m => GHC.LHsExpr Compat.GhcTc -> m (Maybe (GHC.SrcSpan, Type.Type))
132132
getType e@(GHC.L spn e') =
133133
-- Some expression forms have their type immediately available
134134
let
135135
tyOpt = case e' of
136-
HsOverLitType t -> Just t
137-
HsLitType t -> Just t
138-
HsLamType t -> Just t
139-
HsLamCaseType t -> Just t
140-
HsCaseType t -> Just t
141-
ExplicitListType t -> Just t
142-
ExplicitSumType t -> Just t
143-
HsMultiIfType t -> Just t
136+
Compat.HsOverLitType t -> Just t
137+
Compat.HsLitType t -> Just t
138+
Compat.HsLamType t -> Just t
139+
Compat.HsLamCaseType t -> Just t
140+
Compat.HsCaseType t -> Just t
141+
Compat.ExplicitListType t -> Just t
142+
Compat.ExplicitSumType t -> Just t
143+
Compat.HsMultiIfType t -> Just t
144144

145145
_ -> Nothing
146146
in case tyOpt of

0 commit comments

Comments
 (0)