[commit: ghc] master: exprIsBottom should look through type lambdas (5673bfc)
git at git.haskell.org
git at git.haskell.org
Mon Mar 23 19:34:26 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/5673bfc49ec1e54a1540197078041a9da9754fa3/ghc
>---------------------------------------------------------------
commit 5673bfc49ec1e54a1540197078041a9da9754fa3
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Mon Mar 23 10:17:25 2015 +0100
exprIsBottom should look through type lambdas
as evaluting (\ (@ a) -> e) diverges if and only if evaluating e
diverges. This was found in the context of #10180.
>---------------------------------------------------------------
5673bfc49ec1e54a1540197078041a9da9754fa3
compiler/coreSyn/CoreUtils.hs | 1 +
1 file changed, 1 insertion(+)
diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs
index 08f4fcd..b385576 100644
--- a/compiler/coreSyn/CoreUtils.hs
+++ b/compiler/coreSyn/CoreUtils.hs
@@ -702,6 +702,7 @@ exprIsBottom e
go n (Tick _ e) = go n e
go n (Cast e _) = go n e
go n (Let _ e) = go n e
+ go n (Lam v e) | isTyVar v = go n e
go _ _ = False
{-
More information about the ghc-commits
mailing list