[commit: ghc] wip/typeable-unwired: Generate trModule after typechecking types (e405eb1)
git at git.haskell.org
git at git.haskell.org
Fri Feb 12 12:33:11 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/typeable-unwired
Link : http://ghc.haskell.org/trac/ghc/changeset/e405eb1541c9e8a9ff3be21bb1036b00665def17/ghc
>---------------------------------------------------------------
commit e405eb1541c9e8a9ff3be21bb1036b00665def17
Author: Ben Gamari <ben at smart-cactus.org>
Date: Fri Feb 12 13:34:28 2016 +0100
Generate trModule after typechecking types
>---------------------------------------------------------------
e405eb1541c9e8a9ff3be21bb1036b00665def17
compiler/typecheck/TcRnDriver.hs | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/compiler/typecheck/TcRnDriver.hs b/compiler/typecheck/TcRnDriver.hs
index b483b84..f40c941 100644
--- a/compiler/typecheck/TcRnDriver.hs
+++ b/compiler/typecheck/TcRnDriver.hs
@@ -471,21 +471,23 @@ tcRnSrcDecls :: Bool -- False => no 'module M(..) where' header at all
-- Returns the variables free in the decls
-- Reason: solely to report unused imports and bindings
tcRnSrcDecls explicit_mod_hdr decls
- = do { -- Create a binding for $trModule
- -- Do this before processing any data type declarations,
- -- which need tcg_tr_module to be initialised
- ; tcg_env <- mkModIdBindings
- ; tcg_env <- setGblEnv tcg_env mkPrimTypeableBinds
-
- -- Do all the declarations
- ; ((tcg_env, tcl_env), lie) <- setGblEnv tcg_env $
- captureConstraints $
+ = do { -- Do all the declarations
+ ((tcg_env, tcl_env), lie) <- captureConstraints $
do { (tcg_env, tcl_env) <- tc_rn_src_decls decls ;
; tcg_env <- setEnvs (tcg_env, tcl_env) $
checkMain explicit_mod_hdr
; return (tcg_env, tcl_env) }
; setEnvs (tcg_env, tcl_env) $ do {
+ ; traceTc "Tc9" empty
+
+ -- Create a binding for $trModule
+ -- Do this before processing any data type declarations,
+ -- which need tcg_tr_module to be initialised
+ ; tcg_env <- mkModIdBindings
+ ; tcg_env <- setGblEnv tcg_env mkPrimTypeableBinds
+ ; setGblEnv tcg_env $ do {
+
#ifdef GHCI
; finishTH
#endif /* GHCI */
@@ -544,7 +546,7 @@ tcRnSrcDecls explicit_mod_hdr decls
; setGlobalTypeEnv tcg_env' final_type_env
- } }
+ } } }
tc_rn_src_decls :: [LHsDecl RdrName]
-> TcM (TcGblEnv, TcLclEnv)
More information about the ghc-commits
mailing list