Commit 69570e0b authored by simonpj@microsoft.com's avatar simonpj@microsoft.com

exprIsHNF should "look through" lets

I can't quite remember when I spotted this, but exprIsHNF (and
similarly exprIsConLike) should ignore enclosing let-bindings,
since they don't affect termination.
parent 7d8ad026
......@@ -736,6 +736,7 @@ exprIsHNFlike is_con is_con_unf = is_hnf_like
is_hnf_like (Cast e _) = is_hnf_like e
is_hnf_like (App e (Type _)) = is_hnf_like e
is_hnf_like (App e a) = app_is_value e [a]
is_hnf_like (Let _ e) = is_hnf_like e -- Lazy let(rec)s don't affect us
is_hnf_like _ = False
-- There is at least one value argument
......
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