Improve exprIsCheap
authorsimonpj@microsoft.com <unknown>
Mon, 14 Aug 2006 16:50:43 +0000 (16:50 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 14 Aug 2006 16:50:43 +0000 (16:50 +0000)
commit25ce05f745a40a57ff64f8ee3d59a31ba61400fc
treeb6e1d5ccf65f33eaeba50dc0020ac870f23581f6
parent674100eccdd01014d165eb74b4193438404e2d40
Improve exprIsCheap

exprIsCheap is meant to return True iff it's ok to push the expression
inside a lambda.  But the previous version would return True of a nested
construtor application like (1:2:3:[]), which isn't right.

This patch re-factors the code somewhat, and fixes the bug.
compiler/coreSyn/CoreUtils.lhs