patch applied (ghc): Fix name-capture bug in rule matching

Simon Peyton Jones simonpj at microsoft.com
Fri Nov 24 06:21:22 EST 2006


Fri Nov 24 03:11:58 PST 2006  simonpj at microsoft.com
  * Fix name-capture bug in rule matching
  
  The matching algorithm for RULES should respect alpha-conversion, but it
  wasn't doing so.  In particular, if the names of the template variables
  clashed with a variable in scope at the call site, bad things could happen
  (it showed up as a CoreLint failure when compiling nofib/real/parser)
  
  This patch fixes the problem; see Note [Template binders]
  
  Test is in simplCore/should_compile/spec002, but nofib -O2 in
  	real/parser, real/fulsom
  
  

    M ./compiler/specialise/Rules.lhs -20 +29


More information about the Cvs-ghc mailing list