summaryrefslogtreecommitdiff
path: root/compiler/specialise
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2007-02-09 17:29:38 +0000
committersimonpj@microsoft.com <unknown>2007-02-09 17:29:38 +0000
commite9f23b4cc3df781f2fc84b48716a7779ecc8ab06 (patch)
tree2ec6f1c221c6083ffc12c57390e46693113157f0 /compiler/specialise
parent5bf1b7f5742ba6405239692f329e8be35491b350 (diff)
downloadhaskell-e9f23b4cc3df781f2fc84b48716a7779ecc8ab06.tar.gz
Refactor the simplifier's treatment of case expressions
(NB: this patch could conceivably require some bits of the following SpecConstr patch to compile cleanly. It's conceptually independent, but I'm not 100% certain that I've included all the necessary bits here.) This patch cleans up the simplifier's handling of various otimisations for case expressions, notably - case elimination (discarding the case altogether) - merging identical alternatives - discarding impossible alternative - merging nested cases Previously this was partly handled before, and partly after, simplifying the case alternatives. The trouble with that is that the dead-ness information on the case binders gets munged during simplification, and that turned out to mean that case elmination essentially never happened -- stupid. Now I've moved it all to before simplifying the alterntives. In fact this reduces the amount of code, I think, and it's certainly tidier. I don't think there is any loss.
Diffstat (limited to 'compiler/specialise')
0 files changed, 0 insertions, 0 deletions