patch applied (ghc): Improve handling of partial applications involving casts

Simon Peyton Jones simonpj at microsoft.com
Mon Feb 5 12:47:28 EST 2007


Mon Feb  5 09:40:58 PST 2007  simonpj at microsoft.com
  * Improve handling of partial applications involving casts
  
  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.
  

    M ./compiler/simplCore/Simplify.lhs -12 +30



More information about the Cvs-ghc mailing list