[commit: ghc] master: Remove dead code (f0eb404)

git at git.haskell.org git at git.haskell.org
Wed Dec 12 20:29:21 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/f0eb404e1b5b296048da3d0b9efe42d5aa9e0f1d/ghc

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

commit f0eb404e1b5b296048da3d0b9efe42d5aa9e0f1d
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Dec 12 20:21:12 2018 +0000

    Remove dead code
    
    This is a follow-up to
     d77501cd5b Improvements to demand analysis
    
    I forgot to remove some now-dead code


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

f0eb404e1b5b296048da3d0b9efe42d5aa9e0f1d
 compiler/stranal/WwLib.hs | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/compiler/stranal/WwLib.hs b/compiler/stranal/WwLib.hs
index ef6be89..a62ed16 100644
--- a/compiler/stranal/WwLib.hs
+++ b/compiler/stranal/WwLib.hs
@@ -1183,20 +1183,6 @@ mk_absent_let dflags arg
               -- See also Note [Unique Determinism] in Unique
     unlifted_rhs = mkTyApps (Lit rubbishLit) [arg_ty]
 
-mk_seq_case :: Id -> CoreExpr -> CoreExpr
-mk_seq_case arg body = Case (Var arg) (sanitiseCaseBndr arg) (exprType body) [(DEFAULT, [], body)]
-
-sanitiseCaseBndr :: Id -> Id
--- The argument we are scrutinising has the right type to be
--- a case binder, so it's convenient to re-use it for that purpose.
--- But we *must* throw away all its IdInfo.  In particular, the argument
--- will have demand info on it, and that demand info may be incorrect for
--- the case binder.  e.g.       case ww_arg of ww_arg { I# x -> ... }
--- Quite likely ww_arg isn't used in '...'.  The case may get discarded
--- if the case binder says "I'm demanded".  This happened in a situation
--- like         (x+y) `seq` ....
-sanitiseCaseBndr id = id `setIdInfo` vanillaIdInfo
-
 mk_ww_local :: Unique -> (Type, StrictnessMark) -> Id
 -- The StrictnessMark comes form the data constructor and says
 -- whether this field is strict



More information about the ghc-commits mailing list