[project @ 2001-08-20 11:00:18 by simonpj]
authorsimonpj <unknown>
Mon, 20 Aug 2001 11:00:18 +0000 (11:00 +0000)
committersimonpj <unknown>
Mon, 20 Aug 2001 11:00:18 +0000 (11:00 +0000)
commite80b5e1afc83493593446e1cc4fa76f45e6a4512
tree3517ea68c20edad08c702c107d6aea557db472c7
parent72e0e2a878d596cebdfb44b4a156e9ee2fce8e51
[project @ 2001-08-20 11:00:18 by simonpj]
Remove the identity-substitution "optimisation" from zip_ty_env.

-- There used to be a special case for when
-- ty == TyVarTy tv
-- (a not-uncommon case) in which case the substitution was dropped.
-- But the type-tidier changes the print-name of a type variable without
-- changing the unique, and that led to a bug.   Why?  Pre-tidying, we had
-- a type {Foo t}, where Foo is a one-method class.  So Foo is really a newtype.
-- And it happened that t was the type variable of the class.  Post-tiding,
-- it got turned into {Foo t2}.  The ext-core printer expanded this using
-- sourceTypeRep, but that said "Oh, t == t2" because they have the same unique,
-- and so generated a rep type mentioning t not t2.
--
-- Simplest fix is to nuke the "optimisation"
ghc/compiler/coreSyn/Subst.lhs