From a5168e30f331c6fe912cca4f53be8544ce6800d5 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Thu, 25 May 2006 09:43:00 +0000 Subject: [PATCH] Fix egregious and long-standing tidying bug A typo in tidyAlt meant that we could get shadowing of occurrence names in the output of tidying. (Specifically, of existentially bound type variables.) That in turn meant that an IfaceExpr could have shadowing, so when the IfaceExpr was read in, it meant something different. That in turn led to an obscure crash like: Panic: tcIfaceTyVar Anyway, this fixes it. MERGE into 6.4.3. --- compiler/coreSyn/CoreTidy.lhs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/coreSyn/CoreTidy.lhs b/compiler/coreSyn/CoreTidy.lhs index ba60466..6f13740 100644 --- a/compiler/coreSyn/CoreTidy.lhs +++ b/compiler/coreSyn/CoreTidy.lhs @@ -81,7 +81,7 @@ tidyAlt case_bndr env (DataAlt con, vs, rhs) | not (isVanillaDataCon con) -- GADT case = tidyBndrs env tvs =: \ (env1, tvs') -> let - env2 = refineTidyEnv env con tvs' scrut_ty + env2 = refineTidyEnv env1 con tvs' scrut_ty in tidyBndrs env2 ids =: \ (env3, ids') -> (DataAlt con, tvs' ++ ids', tidyExpr env3 rhs) -- 1.7.10.4