X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fspecialise%2FRules.lhs;h=8d8819a9137da0567cf0685b5bb9fc4e2f8c5198;hb=12e6a9a58473f8b24e831c2171bf62d256da8a85;hp=9fa73812a5da7225a8d7fe9c59517e5aba8b5ca5;hpb=f53c4074ff7554ceedaa6b7a5edb2bca7a2d3886;p=ghc-hetmet.git diff --git a/ghc/compiler/specialise/Rules.lhs b/ghc/compiler/specialise/Rules.lhs index 9fa7381..8d8819a 100644 --- a/ghc/compiler/specialise/Rules.lhs +++ b/ghc/compiler/specialise/Rules.lhs @@ -423,13 +423,12 @@ insertRule rules new_rule@(Rule _ tpl_vars tpl_args _) new_is_more_specific rule = maybeToBool (matchRule tpl_var_set rule tpl_args) -addIdSpecialisations :: Id -> [([CoreBndr], [CoreExpr], CoreExpr)] -> Id -addIdSpecialisations id spec_stuff - = setIdSpecialisation id new_rules +addIdSpecialisations :: Id -> [CoreRule] -> Id +addIdSpecialisations id rules + = setIdSpecialisation id new_specs where - rule_name = _PK_ ("SPEC " ++ showSDoc (ppr id)) - new_rules = foldr add (idSpecialisation id) spec_stuff - add (vars, args, rhs) rules = addRule rules id (Rule rule_name vars args rhs) + new_specs = foldr add (idSpecialisation id) rules + add rule rules = addRule rules id rule \end{code}