Tidy up substitutions
authorsimonpj@microsoft.com <unknown>
Mon, 6 Nov 2006 15:59:01 +0000 (15:59 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 6 Nov 2006 15:59:01 +0000 (15:59 +0000)
commit94b170a053c161d1e0cc4418b37a6a4807872a5f
tree503c35e17451af58b27957469996aae81174ebd7
parente513c1cc1de895fed5796d16cb67525f4b581b2a
Tidy up substitutions

The new simplifer stuff exposed the fact that the invariants on the
TvSubstEnv and IdSubstEnv were insufficiently explicit.  (Resulted in
a bug found by Sam Brosnon.)

This patch fixes the bug, and tries to document the invariants pretty
thoroughly. See
Note [Extending the TvSubst] in Type
Note [Extenting the Subst]   in CoreSubst

(Most of the new lines are comments.)
compiler/coreSyn/CoreSubst.lhs
compiler/simplCore/SimplEnv.lhs
compiler/types/Type.lhs