X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcRnDriver.lhs;h=eabd3bc7ee48b276be379c3e19d5163fe6378c69;hp=9c9c71f70ea64d4e906da32952c62df3766707b6;hb=7aa3f5247ae454b10b61e2f28a9431f0889a8cff;hpb=1db8e4d0719bff692a9dbb74e2b250a8745470b9 diff --git a/compiler/typecheck/TcRnDriver.lhs b/compiler/typecheck/TcRnDriver.lhs index 9c9c71f..eabd3bc 100644 --- a/compiler/typecheck/TcRnDriver.lhs +++ b/compiler/typecheck/TcRnDriver.lhs @@ -302,6 +302,7 @@ tcRnExtCore hsc_env (HsExtCore this_mod decls src_binds) mg_types = final_type_env, mg_insts = tcg_insts tcg_env, mg_fam_insts = tcg_fam_insts tcg_env, + mg_fam_inst_env = tcg_fam_inst_env tcg_env, mg_rules = [], mg_binds = core_binds, @@ -396,15 +397,16 @@ tc_rn_src_decls boot_details ds -- Deal with decls up to, but not including, the first splice (tcg_env, rn_decls) <- checkNoErrs $ rnTopSrcDecls first_group ; - -- checkNoErrs: don't typecheck if renaming failed - tc_envs <- setGblEnv tcg_env $ - tcTopSrcDecls boot_details rn_decls ; + -- checkNoErrs: stop if renaming fails + + (tcg_env, tcl_env) <- setGblEnv tcg_env $ + tcTopSrcDecls boot_details rn_decls ; -- If there is no splice, we're nearly done - setEnvs tc_envs $ + setEnvs (tcg_env, tcl_env) $ case group_tail of { Nothing -> do { tcg_env <- checkMain ; -- Check for `main' - return (tcg_env, snd tc_envs) + return (tcg_env, tcl_env) } ; -- If there's a splice, we must carry on