summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/GHC/Tc/Module.hs12
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs
index 9f8c6a53da..ecb2e4241e 100644
--- a/compiler/GHC/Tc/Module.hs
+++ b/compiler/GHC/Tc/Module.hs
@@ -305,10 +305,14 @@ tcRnModuleTcRnM hsc_env mod_sum
reportUnusedNames tcg_env hsc_src
; -- add extra source files to tcg_dependent_files
addDependentFiles src_files
- ; tcg_env <- runTypecheckerPlugin mod_sum hsc_env tcg_env
- ; -- Dump output and return
- tcDump tcg_env
- ; return tcg_env }
+ -- Ensure plugins run with the same tcg_env that we pass in
+ ; setGblEnv tcg_env
+ $ do { tcg_env <- runTypecheckerPlugin mod_sum hsc_env tcg_env
+ ; -- Dump output and return
+ tcDump tcg_env
+ ; return tcg_env
+ }
+ }
}
}
}