Fix nasty infelicity: do not short-cut empty substitution in the simplifier
authorsimonpj@microsoft.com <unknown>
Wed, 17 Sep 2008 16:29:10 +0000 (16:29 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 17 Sep 2008 16:29:10 +0000 (16:29 +0000)
commit3b896bc3a6fbc19ee311849aed046edcd75dca62
treed9ff00fdd59f3435c82bb6c9cfb0c1695b8295f1
parent0ac253aac15a6d5bcfa54be310531203a5456a0a
Fix nasty infelicity: do not short-cut empty substitution in the simplifier

I was perplexed about why an arity-related WARN was tripping. It took
me _day_ (sigh) to find that it was because SimplEnv.substExpr was taking
a short cut when the substitution was empty, thereby not subsituting for
Ids in scope, which must be done (CoreSubst Note [Extending the Subst]).

The fix is a matter of deleting the "optimisation".  Same with
CoreSubst.substSpec, although I don't know if that actually caused a
probem.
compiler/coreSyn/CoreSubst.lhs
compiler/simplCore/SimplEnv.lhs