Skip to content
  • Simon Peyton Jones's avatar
    Establish the CoreSyn let/app invariant · 7b01315d
    Simon Peyton Jones authored
    This patch clears up a long-standing wart.   For some time it's been the
    case that 
    	the RHS of a non-recursive let can be unlifed iff 
    	the RHS is ok-for-speculation
    
    This patch extends the invariant to the argument of an App, and 
    establishes it by the smart constructors mkDsApp, mkDsApps in the desugarer.
    
    Once established, it should be maintained by the optimiser.
    
    This tides up some awkward cases, notably in exprIsHNF, and I think it
    fixes a outright strictness bug in Simplify.prepareRhs.
    7b01315d