patch applied (ghc): Make rule-matching robust to lets

Simon Peyton Jones simonpj at microsoft.com
Thu May 25 11:48:33 EDT 2006


Thu May 25 08:44:47 PDT 2006  simonpj at microsoft.com
  * Make rule-matching robust to lets
  
  Consider a RULE like
  	forall arr. splitD (joinD arr) = arr
  
  Until now, this rule would not match code of form
  	splitD (let { d = ... } in joinD (...d...))
  because the 'let' got in the way.
  
  This patch makes the rule-matcher robust to lets.  See comments with
  the Let case of Rules.match.
  
  This improvement is highly desirable in the fusion rules for NDP
  stuff that Roman is working on, where we are doing fusion of *overloaded*
  functions (which may look lazy).  The let expression that Roman tripped
  up on was a dictioary binding.
  

    M ./compiler/basicTypes/VarEnv.lhs -4 +12
    M ./compiler/coreSyn/CoreFVs.lhs -1 +8
    M ./compiler/specialise/Rules.lhs -45 +113


More information about the Cvs-ghc mailing list