projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1ca40c2
)
Comments only (concerning rewrite rules)
author
simonpj@microsoft.com
<unknown>
Sun, 22 Apr 2007 21:06:14 +0000
(21:06 +0000)
committer
simonpj@microsoft.com
<unknown>
Sun, 22 Apr 2007 21:06:14 +0000
(21:06 +0000)
compiler/coreSyn/CoreSyn.lhs
patch
|
blob
|
history
diff --git
a/compiler/coreSyn/CoreSyn.lhs
b/compiler/coreSyn/CoreSyn.lhs
index
9b9d8fa
..
4ec954c
100644
(file)
--- 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_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 }
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
isBuiltinRule (BuiltinRule {}) = True
isBuiltinRule _ = False