Commit 04c9c3b2 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Refactor to avoid gratuitous DEBUG warning

parent ff3d07ad
...@@ -1623,9 +1623,9 @@ tryEtaReduce bndrs body ...@@ -1623,9 +1623,9 @@ tryEtaReduce bndrs body
-- for why we have an accumulating coercion -- for why we have an accumulating coercion
go [] fun co go [] fun co
| ok_fun fun | ok_fun fun
, let result = mkCast fun co , let used_vars = exprFreeVars fun `unionVarSet` tyCoVarsOfCo co
, not (any (`elemVarSet` exprFreeVars result) bndrs) , not (any (`elemVarSet` used_vars) bndrs)
= Just result -- Check for any of the binders free in the result = Just (mkCast fun co) -- Check for any of the binders free in the result
-- including the accumulated coercion -- including the accumulated coercion
go (b : bs) (App fun arg) co go (b : bs) (App fun arg) co
......
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