Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
jberryman
GHC
Commits
d05cdffb
Commit
d05cdffb
authored
Jul 02, 2009
by
simonpj@microsoft.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Look through Notes when matching
parent
4c719df4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
compiler/specialise/Rules.lhs
compiler/specialise/Rules.lhs
+9
-8
No files found.
compiler/specialise/Rules.lhs
View file @
d05cdffb
...
...
@@ -488,9 +488,10 @@ match menv subst (Var v1) e2
| Just subst <- match_var menv subst v1 e2
= Just subst
match menv subst e1 (Note _ e2)
= match menv subst e1 e2
-- See Note [Notes in RULE matching]
match menv subst (Note _ e1) e2 = match menv subst e1 e2
match menv subst e1 (Note _ e2) = match menv subst e1 e2
-- Ignore notes in both template and thing to be matched
-- See Note [Notes in RULE matching]
match menv subst e1 (Var v2) -- Note [Expanding variables]
| not (locallyBoundR rn_env v2) -- Note [Do not expand locally-bound variables]
...
...
@@ -684,11 +685,11 @@ Hence, (a) the guard (not (isLocallyBoundR v2))
Note [Notes in RULE matching]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Look through Notes
. In particular, we don't want to
be confused by InlineMe notes. Maybe we
should be more
careful about profiling notes, but for now I'm just
riding roughshod over them.
See Note [Notes in call patterns] in
SpecConstr
Look through Notes
in both template and expression being matched. In
particular, we don't want to
be confused by InlineMe notes. Maybe we
should be more
careful about profiling notes, but for now I'm just
riding roughshod over them.
cf Note [Notes in call patterns] in
SpecConstr
Note [Matching lets]
~~~~~~~~~~~~~~~~~~~~
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment