From e69d9f497bac804308d539acc644069d0c06887d Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Wed, 3 Jan 2007 12:15:40 +0000 Subject: [PATCH] Fix stupid error in rehashing TcRnDriver (fixes TH test errors) --- compiler/typecheck/TcRnDriver.lhs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/compiler/typecheck/TcRnDriver.lhs b/compiler/typecheck/TcRnDriver.lhs index 9c9c71f..aee72c8 100644 --- a/compiler/typecheck/TcRnDriver.lhs +++ b/compiler/typecheck/TcRnDriver.lhs @@ -396,15 +396,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 -- 1.7.10.4