[commit: ghc] wip/nomeata-T2110: In simpleOptExpr, unfold compulsary unfoldings (82bb528)
git at git.haskell.org
git at git.haskell.org
Fri Jan 24 14:32:37 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nomeata-T2110
Link : http://ghc.haskell.org/trac/ghc/changeset/82bb5283e27932c6f903cf5e2f2c1af3747f7faa/ghc
>---------------------------------------------------------------
commit 82bb5283e27932c6f903cf5e2f2c1af3747f7faa
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Fri Jan 24 13:35:21 2014 +0000
In simpleOptExpr, unfold compulsary unfoldings
such as that of coerce.
>---------------------------------------------------------------
82bb5283e27932c6f903cf5e2f2c1af3747f7faa
compiler/coreSyn/CoreSubst.lhs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/compiler/coreSyn/CoreSubst.lhs b/compiler/coreSyn/CoreSubst.lhs
index 3dedbc8..87f868a 100644
--- a/compiler/coreSyn/CoreSubst.lhs
+++ b/compiler/coreSyn/CoreSubst.lhs
@@ -966,6 +966,9 @@ simple_app subst (Lam b e) (a:as)
where
(subst', b') = subst_opt_bndr subst b
b2 = add_info subst' b b'
+simple_app subst (Var v) as
+ | isCompulsoryUnfolding (idUnfolding v)
+ = simple_app subst (unfoldingTemplate (idUnfolding v)) as
simple_app subst e as
= foldl App (simple_opt_expr subst e) as
More information about the ghc-commits
mailing list