Commit a5168e30 authored by's avatar
Browse files

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.
parent 14e8b22b
......@@ -81,7 +81,7 @@ tidyAlt case_bndr env (DataAlt con, vs, rhs)
| not (isVanillaDataCon con) -- GADT case
= tidyBndrs env tvs =: \ (env1, tvs') ->
env2 = refineTidyEnv env con tvs' scrut_ty
env2 = refineTidyEnv env1 con tvs' scrut_ty
tidyBndrs env2 ids =: \ (env3, ids') ->
(DataAlt con, tvs' ++ ids', tidyExpr env3 rhs)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment