[commit: ghc] supercompiler: Wasn't releasing deeds when destroying identity CastIt (b61b975)

Max Bolingbroke <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : supercompiler

http://hackage.haskell.org/trac/ghc/changeset/b61b975bd592b6cc6f92083ec92f32c229b3faf6

>---------------------------------------------------------------

commit b61b975bd592b6cc6f92083ec92f32c229b3faf6
Author: Max Bolingbroke <[email protected]>
Date:   Thu Oct 6 09:29:03 2011 +0100

    Wasn't releasing deeds when destroying identity CastIt

>---------------------------------------------------------------

 .../Supercompile/Evaluator/Evaluate.hs             |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs b/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs
index 01a6ce9..a6198a4 100644
--- a/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs
+++ b/compiler/supercompile/Supercompile/Evaluator/Evaluate.hs
@@ -127,8 +127,8 @@ step' normalising ei_state =
         Case e x ty alts -> go (deeds, Heap h ids', Tagged tg (Scrutinise x' (renameType ids rn ty) (rn', alts))                 : k, (rn, e))
           where (ids', rn', x') = renameNonRecBinder ids rn x
         Cast e co        
-          | isReflCo co' -> go (deeds, heap,                                                                                       k, (rn, e))
-          | otherwise    -> go (deeds, heap,        Tagged tg (CastIt co')                                                       : k, (rn, e))
+          | isReflCo co' -> go (deeds + 1, heap,                                                                                   k, (rn, e))
+          | otherwise    -> go (deeds,     heap,    Tagged tg (CastIt co')                                                       : k, (rn, e))
           where co' = renameCoercion ids rn co
         Let x e1 e2
           | isUnLiftedType (idType x) -> go (deeds,     Heap h                                       ids', Tagged tg (StrictLet x' (rn', e2)) : k, in_e1)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.