[commit: ghc] wip/T10180: exprIsBottom should look through type lambdas (6ab5bc4)
git at git.haskell.org
git at git.haskell.org
Mon Mar 23 19:14:36 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T10180
Link : http://ghc.haskell.org/trac/ghc/changeset/6ab5bc4ca9b3afb5862079cd8e3922fdd8cbf1ff/ghc
>---------------------------------------------------------------
commit 6ab5bc4ca9b3afb5862079cd8e3922fdd8cbf1ff
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.
>---------------------------------------------------------------
6ab5bc4ca9b3afb5862079cd8e3922fdd8cbf1ff
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