• Simon Peyton Jones's avatar
    Fix a nasty bug in exprIsExpandable · 9be18ea4
    Simon Peyton Jones authored
    This bug has been lurking for ages: Trac #13155
    
    The important semantic change is to ensure that exprIsExpandable
    returns False for primop calls.  Previously exprIsExpandable used
    exprIsCheap' which always used primOpIsCheap.
    
    I took the opportunity to combine the code for exprIsCheap' (two
    variants: exprIsCheap and exprIsExpandable) with that for
    exprIsWorkFree.  Result is simpler, tighter, easier to understand.
    And correct (at least wrt this bug)!
    9be18ea4
all.T 9.02 KB