Skip to content

Commit 9158969

Browse files
committed
Adapt imports plugin to last ghcide
1 parent a02e6c7 commit 9158969

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ extractMinimalImports ::
192192
Maybe (HscEnvEq) ->
193193
Maybe (TcModuleResult) ->
194194
IO ([LImportDecl GhcRn], Maybe [LImportDecl GhcRn])
195-
extractMinimalImports (Just (hsc)) (Just (tmrModule -> TypecheckedModule {..})) = do
195+
extractMinimalImports (Just (hsc)) (Just (TcModuleResult {..})) = do
196196
-- extract the original imports and the typechecking environment
197-
let (tcEnv, _) = tm_internals_
198-
Just (_, imports, _, _) = tm_renamed_source
199-
ParsedModule {pm_parsed_source = L loc _} = tm_parsed_module
197+
let tcEnv = tmrTypechecked
198+
(_, imports, _, _) = tmrRenamed
199+
ParsedModule {pm_parsed_source = L loc _} = tmrParsed
200200
span = fromMaybe (error "expected real") $ realSpan loc
201201

202202
-- GHC is secretly full of mutable state

0 commit comments

Comments
 (0)