Commit f2e74c88 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Improvement to SimplUtils.mkLam

parent 5e3c9a59
......@@ -1027,6 +1027,11 @@ mkLam _env bndrs body
co_vars = tyVarsOfType co
bad bndr = isCoVar bndr && bndr `elemVarSet` co_vars
mkLam' dflags bndrs body@(Lam {})
= mkLam' dflags (bndrs ++ bndrs1) body1
where
(bndrs1, body1) = collectBinders body
mkLam' dflags bndrs body
| dopt Opt_DoEtaReduction dflags,
Just etad_lam <- tryEtaReduce bndrs body
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment