[commit: ghc] cardinality: Comments (e721135)

Simon Peyton Jones simonpj at microsoft.com
Mon Mar 25 14:03:07 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : cardinality

https://github.com/ghc/ghc/commit/e7211357fb808a31731f48c0f73c26bdf5576fed

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

commit e7211357fb808a31731f48c0f73c26bdf5576fed
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Mar 25 13:02:37 2013 +0000

    Comments

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

 compiler/stranal/DmdAnal.lhs | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/compiler/stranal/DmdAnal.lhs b/compiler/stranal/DmdAnal.lhs
index e706bd3..85290d2 100644
--- a/compiler/stranal/DmdAnal.lhs
+++ b/compiler/stranal/DmdAnal.lhs
@@ -44,7 +44,6 @@ import TysPrim		( realWorldStatePrimTy )
 %************************************************************************
 
 \begin{code}
-
 dmdAnalProgram :: DynFlags -> CoreProgram -> IO CoreProgram
 dmdAnalProgram dflags binds
   = do {
@@ -99,17 +98,6 @@ c) The application rule wouldn't be right either
    evaluation of f in a C(L) demand!
 
 \begin{code}
-{-
-simpleDmdAnal :: DynFlags -> AnalEnv -> DmdType 
-              -> CoreExpr -> (DmdType, CoreExpr)
-simpleDmdAnal env res_ty e
-  | ae_virgin env -- See Note [Always analyse in virgin pass]
-  , (_discarded_res_ty, e') <- dmdAnal env cleanEvalDmd e
-  = (res_ty, e')
-  | otherwise
-  = (res_ty, e)
--}
-
 dmdAnalThunk :: AnalEnv 
              -> Demand 	-- This one takes a *Demand*
              -> CoreExpr -> (DmdType, CoreExpr)
@@ -493,12 +481,7 @@ dmdTransform env var dmd
     res
 
   | Just (sig, top_lvl) <- lookupSigEnv env var  -- Local letrec bound thing
-  , let 
-        fn_ty = dmdTransformSig sig dmd
-        -- stripping of the usage environment (making all free vars absent)      
-        -- it is going to be restored when getting back to Let-case
-        -- See Note [Aggregated demand for cardinality]
-        -- trim_ty = trimFvUsageTy fn_ty
+  , let fn_ty = dmdTransformSig sig dmd
   = if isTopLevel top_lvl           
     then fn_ty   -- Don't record top level things
     else addVarDmd fn_ty var (mkOnceUsedDmd dmd)





More information about the ghc-commits mailing list