[commit: ghc] master: Remove utterly bogus code (de4723f)
git at git.haskell.org
git at git.haskell.org
Mon Mar 27 15:32:02 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/de4723fd6d97b285bb754d8b95531c86d34c4032/ghc
>---------------------------------------------------------------
commit de4723fd6d97b285bb754d8b95531c86d34c4032
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Mon Mar 27 14:33:55 2017 +0100
Remove utterly bogus code
The commit 6746549772c5cc0ac66c0fce562f297f4d4b80a2
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date: Fri Dec 11 18:19:53 2015 -0500
Add kind equalities to GHC.
added this entirely bogus code to Simplify.simplLam:
env' | Coercion co <- arg
= extendCvSubst env bndr co
| otherwise
= env
It's bogus because 'co' is an 'InCoercion', but a CvSubst should have
only OutCoercions in it. Moreover, completeBind does the job nicely.
This led to an ASSERT failure in an experimental branch; but I have
not got a repro case that works on HEAD. But still, the patch deletes
code and fixes a bug, so it must be good.
The only mystery is why Richard added it in the first place :-).
I hope I'm not missing anything. But it validates fine.
>---------------------------------------------------------------
de4723fd6d97b285bb754d8b95531c86d34c4032
compiler/simplCore/Simplify.hs | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs
index fae040f..e78714d 100644
--- a/compiler/simplCore/Simplify.hs
+++ b/compiler/simplCore/Simplify.hs
@@ -1370,13 +1370,8 @@ simplLam env (bndr:bndrs) body (ApplyToTy { sc_arg_ty = arg_ty, sc_cont = cont }
simplLam env (bndr:bndrs) body (ApplyToVal { sc_arg = arg, sc_env = arg_se
, sc_cont = cont })
= do { tick (BetaReduction bndr)
- ; simplNonRecE env' (zap_unfolding bndr) (arg, arg_se) (bndrs, body) cont }
+ ; simplNonRecE env (zap_unfolding bndr) (arg, arg_se) (bndrs, body) cont }
where
- env' | Coercion co <- arg
- = extendCvSubst env bndr co
- | otherwise
- = env
-
zap_unfolding bndr -- See Note [Zap unfolding when beta-reducing]
| isId bndr, isStableUnfolding (realIdUnfolding bndr)
= setIdUnfolding bndr NoUnfolding
More information about the ghc-commits
mailing list