Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
3d80787f
Commit
3d80787f
authored
Feb 13, 2014
by
Gabor Greif
💬
Browse files
Fix some typos in comments
parent
34772165
Changes
2
Hide whitespace changes
Inline
Side-by-side
compiler/coreSyn/CoreSubst.lhs
View file @
3d80787f
...
...
@@ -1307,7 +1307,7 @@ Note [exprIsLiteral_maybe]
This function will, given an expression `e`, try to turn it into the form
`Lam v e'` (returned as `Just (v,e')`). Besides using lambdas, it looks through
casts (using the Push rule), and it unfold
e
s function calls if the unfolding
casts (using the Push rule), and it unfolds function calls if the unfolding
has a greater arity than arguments are present.
Currently, it is used in Rules.match, and is required to make
...
...
@@ -1321,7 +1321,7 @@ exprIsLambda_maybe :: InScopeEnv -> CoreExpr -> Maybe (Var, CoreExpr)
exprIsLambda_maybe _ (Lam x e)
= Just (x, e)
-- Also possible: A casted lambda. Push the coercion insi
n
de
-- Also possible: A casted lambda. Push the coercion inside
exprIsLambda_maybe (in_scope_set, id_unf) (Cast casted_e co)
| Just (x, e) <- exprIsLambda_maybe (in_scope_set, id_unf) casted_e
-- Only do value lambdas.
...
...
@@ -1337,7 +1337,7 @@ exprIsLambda_maybe (in_scope_set, id_unf) e
| (Var f, as) <- collectArgs e
, let unfolding = id_unf f
, Just rhs <- expandUnfolding_maybe unfolding
-- Make sure there is hope to get a lamda
-- Make sure there is hope to get a lam
b
da
, unfoldingArity unfolding > length (filter isValArg as)
-- Optimize, for beta-reduction
, let e' = simpleOptExprWith (mkEmptySubst in_scope_set) (rhs `mkApps` as)
...
...
compiler/specialise/SpecConstr.lhs
View file @
3d80787f
...
...
@@ -335,7 +335,7 @@ I wonder if SpecConstr couldn't be extended to handle this? After all,
lambda is a sort of constructor for functions and perhaps it already
has most of the necessary machinery?
Furthermore, there's an immediate win, because you don't need to allocate the lamda
Furthermore, there's an immediate win, because you don't need to allocate the lam
b
da
at the call site; and if perchance it's called in the recursive call, then you
may avoid allocating it altogether. Just like for constructors.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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