patch applied (ghc-7.0/ghc): Improve the rule-matcher
Ian Lynagh
igloo at earth.li
Mon Oct 11 15:45:03 EDT 2010
Thu Oct 7 03:37:00 PDT 2010 simonpj at microsoft.com
* Improve the rule-matcher
Previously it was rejecting the match
Template: forall s t. map s t
Actual: map Int t
which should obviously be fine. It turns out that this kind of match
comes up when specialising. By freshening that t we could avoid the
difficulty, but morally the (forall t) binds t and the rule should
be alpha-equivalent regardless of the forall'd variables.
This patch makes it so, and incidentally makes matching a little
more efficient. See Note [Eta expansion] in VarEnv.
M ./compiler/basicTypes/VarEnv.lhs -17 +39
M ./compiler/specialise/Rules.lhs -2 +2
View patch online:
http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=ghc-7.0/ghc;a=darcs_commitdiff;h=20101007103700-1287e-3f1c79428addd98ff65971c14431d61dfc45ffb0.gz
More information about the Cvs-ghc
mailing list