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

On branch  : new-demand

http://hackage.haskell.org/trac/ghc/changeset/430172316ca8b49c679f91cbede8190406d70911

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

commit 430172316ca8b49c679f91cbede8190406d70911
Author: Ilya Sergey <[email protected]>
Date:   Sat Jul 14 01:20:44 2012 +0100

    fixes

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

 compiler/simplCore/SimplCore.lhs |    5 ++++-
 compiler/stranal/NewDmdAnal.lhs  |    5 ++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/compiler/simplCore/SimplCore.lhs b/compiler/simplCore/SimplCore.lhs
index edb9aff..dc47b4a 100644
--- a/compiler/simplCore/SimplCore.lhs
+++ b/compiler/simplCore/SimplCore.lhs
@@ -198,7 +198,10 @@ getCoreToDo dflags
                     ])
     
     -- so far, do nothing
-    new_demand_phases = CoreDoNewStrictness
+    new_demand_phases = (CoreDoPasses [
+                           CoreDoNewStrictness,
+                           CoreDoPrintCore
+                         ])
 
     core_todo =
      if opt_level == 0 then
diff --git a/compiler/stranal/NewDmdAnal.lhs b/compiler/stranal/NewDmdAnal.lhs
index ce45c64..bee7a93 100644
--- a/compiler/stranal/NewDmdAnal.lhs
+++ b/compiler/stranal/NewDmdAnal.lhs
@@ -112,11 +112,10 @@ dmdAnalTopBind sigs (Rec pairs)
 \begin{code}
 dmdAnal :: AnalEnv -> Demand -> CoreExpr -> (DmdType, CoreExpr)
 
-dmdAnal _ dmd e | isTop(dmd)
+dmdAnal _ dmd e | isTop(dmd) || isTop(dmd)
   -- top demand does not provide any way to infer something interesting 
   = (topDmdType, e)
 
---Ilya: Why?!
 dmdAnal env dmd e
   | not (isStrictDmd dmd)
   = let (res_ty, e') = dmdAnal env evalDmd e
@@ -523,7 +522,7 @@ dmdAnalRhs top_lvl rec_flag env (id, rhs)
                        -- in which case we should not complain. 
                       mkSigTy top_lvl rec_flag id rhs rhs_dmd_ty
   id'               = id `nd_setIdStrictness` sig_ty
-  sigs'                     = extendSigEnv top_lvl (sigEnv env) id' sig_ty
+  sigs'                     = extendSigEnv top_lvl (sigEnv env) id sig_ty
 
 \end{code}
 



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to