Skip to content

Commit 02a0ce8

Browse files
committed
Adapt retrie plugin to last ghcide
1 parent 9158969 commit 02a0ce8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

plugins/default/src/Ide/Plugin/Retrie.hs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,14 @@ import Development.IDE.GHC.Compat (GenLocated (L), GhcRn,
5353
RuleDecls (HsRules),
5454
SrcSpan (..),
5555
TyClDecl (SynDecl),
56-
TyClGroup (..),
57-
TypecheckedModule (..), fun_id,
56+
TyClGroup (..), fun_id,
5857
mi_fixities, moduleNameString,
5958
parseModule, rds_rules,
6059
srcSpanFile)
6160
import GHC.Generics (Generic)
6261
import GhcPlugins (Outputable,
6362
SourceText (NoSourceText),
64-
isQual, isQual_maybe,
63+
hm_iface, isQual, isQual_maybe,
6564
nameModule_maybe, nameRdrName,
6665
occNameFS, occNameString,
6766
rdrNameOcc, unpackFS)
@@ -213,7 +212,7 @@ getBinds nfp = runMaybeT $ do
213212
-- we use the typechecked source instead of the parsed source
214213
-- to be able to extract module names from the Ids,
215214
-- so that we can include adding the required imports in the retrie command
216-
let TypecheckedModule {tm_renamed_source = Just rn} = tmrModule tm
215+
let rn = tmrRenamed tm
217216
( HsGroup
218217
{ hs_valds =
219218
XValBindsLR
@@ -454,9 +453,9 @@ callRetrie state session rewrites origin restrictToOriginatingFile = do
454453
let fs = occNameFS n
455454
]
456455
fixFixities f pm = do
457-
HiFileResult {hirModIface} <-
456+
HiFileResult {hirHomeMod} <-
458457
useOrFail "GetModIface" NoTypeCheck GetModIface f
459-
let fixities = fixityEnvFromModIface hirModIface
458+
let fixities = fixityEnvFromModIface $ hm_iface hirHomeMod
460459
res <- transformA pm (fix fixities)
461460
return (fixities, res)
462461
fixAnns ParsedModule {..} =

0 commit comments

Comments
 (0)