Consider variables with conlike unfoldings interesting
authorRoman Leshchinskiy <rl@cse.unsw.edu.au>
Wed, 4 Nov 2009 14:28:36 +0000 (14:28 +0000)
committerRoman Leshchinskiy <rl@cse.unsw.edu.au>
Wed, 4 Nov 2009 14:28:36 +0000 (14:28 +0000)
commitc01e472e205f09e6cdadc1c878263998f637bc8d
tree89391f959d86f90ccb4f3c17b031fae69bca2d8f
parentd10fa3041959b3e05a4718ff9d1ab8201d1d591e
Consider variables with conlike unfoldings interesting

In this expression:

  let x = f (g e1) in e2

the simplifier will inline f if it thinks that (g e1) is an interesting
argument. Until now, this was essentially the case if g was a data constructor
- we'd inline f in the hope that it will inspect and hence eliminate the
constructor application. This patch extends this mechanism to CONLIKE
functions. We consider (g e1) interesting if g is CONLIKE and inline f in the
hope that this will allow rewrite rules to match.
compiler/coreSyn/CoreSyn.lhs
compiler/coreSyn/CoreUnfold.lhs
compiler/coreSyn/CoreUtils.lhs
compiler/coreSyn/PprCore.lhs