Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : supercompiler

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

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

commit a1ba5fe37c31d588e88e28d7528113ad5f5adef0
Author: Max Bolingbroke <batterseapo...@hotmail.com>
Date:   Thu Aug 4 12:04:19 2011 +0100

    Cast things are cheap as well

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

 compiler/supercompile/Supercompile/Core/Syntax.hs |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Core/Syntax.hs 
b/compiler/supercompile/Supercompile/Core/Syntax.hs
index ad08f74..0444fc9 100644
--- a/compiler/supercompile/Supercompile/Core/Syntax.hs
+++ b/compiler/supercompile/Supercompile/Core/Syntax.hs
@@ -176,6 +176,7 @@ termIsCheap = isCheap . extract
     isCheap _ | cALL_BY_NAME = True -- A cunning hack. I think this is all 
that should be required...
     isCheap (Var _)         = True
     isCheap (Value _)       = True
+    isCheap (Cast e _)      = isCheap (extract e)
     isCheap (Case e _ _ []) = isCheap (extract e) -- NB: important for pushing 
down let-bound applications of ``error''
     isCheap _               = False
 



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to