X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcoreSyn%2FCoreSyn.lhs;h=4ec954ce6a5b6282abc0438cb7ecb5aeecc3050b;hb=c6eadadbefe2ec5709e9d31893f79c4ff78754b4;hp=9b9d8faefdfba4b35967d8bd72daa587defdfeba;hpb=ec81fddea750b1ad21f63b7c4307c15f89f10dfd;p=ghc-hetmet.git diff --git a/compiler/coreSyn/CoreSyn.lhs b/compiler/coreSyn/CoreSyn.lhs index 9b9d8fae..4ec954c 100644 --- a/compiler/coreSyn/CoreSyn.lhs +++ b/compiler/coreSyn/CoreSyn.lhs @@ -228,8 +228,13 @@ data CoreRule ru_name :: RuleName, -- and suchlike. It has no free variables. ru_fn :: Name, -- Name of the Id at -- the head of this rule - ru_nargs :: Int, -- Number of args that ru_try expects + ru_nargs :: Int, -- Number of args that ru_try expects, + -- including type args ru_try :: [CoreExpr] -> Maybe CoreExpr } + -- This function does the rewrite. It given too many + -- arguments, it simply discards them; the returned CoreExpr + -- is just the rewrite of ru_fn applied to the first ru_nargs args + -- See Note [Extra args in rule matching] in Rules.lhs isBuiltinRule (BuiltinRule {}) = True isBuiltinRule _ = False