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