[commit: ghc] : cpe_ExprIsTrivial: Nullary Constructors are trivial (d519964)
git at git.haskell.org
git at git.haskell.org
Mon Oct 10 21:43:20 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch :
Link : http://ghc.haskell.org/trac/ghc/changeset/d51996444bfd40eb7588e696078f3f6eedd35442/ghc
>---------------------------------------------------------------
commit d51996444bfd40eb7588e696078f3f6eedd35442
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Sun Oct 9 12:07:50 2016 -0400
cpe_ExprIsTrivial: Nullary Constructors are trivial
>---------------------------------------------------------------
d51996444bfd40eb7588e696078f3f6eedd35442
compiler/coreSyn/CorePrep.hs | 1 +
1 file changed, 1 insertion(+)
diff --git a/compiler/coreSyn/CorePrep.hs b/compiler/coreSyn/CorePrep.hs
index d321064..a98abab 100644
--- a/compiler/coreSyn/CorePrep.hs
+++ b/compiler/coreSyn/CorePrep.hs
@@ -950,6 +950,7 @@ cpe_ExprIsTrivial (Type _) = True
cpe_ExprIsTrivial (Coercion _) = True
cpe_ExprIsTrivial (Lit _) = True
cpe_ExprIsTrivial (App e arg) = not (isRuntimeArg arg) && cpe_ExprIsTrivial e
+cpe_ExprIsTrivial (ConApp _ args) = not (any isRuntimeArg args)
cpe_ExprIsTrivial (Lam b e) = not (isRuntimeVar b) && cpe_ExprIsTrivial e
cpe_ExprIsTrivial (Tick t e) = not (tickishIsCode t) && cpe_ExprIsTrivial e
cpe_ExprIsTrivial (Cast e _) = cpe_ExprIsTrivial e
More information about the ghc-commits
mailing list