Skip to content
  • Simon Peyton Jones's avatar
    Improve handling of partial applications involving casts · b2cc243a
    Simon Peyton Jones authored
    This patch improves prepareRhs, so that it deals better with casts.
    
    We want to deal well cases like this
    	v = (f e1 `cast` co) e2
    Here we want to make e1,e2 trivial and get
    	x1 = e1; x2 = e2; v = (f x1 `cast` co) v2
    
    This really happens in parser libraries, which wrap functions in newtypes.
    b2cc243a