diff options
author | simonmar <unknown> | 2001-03-01 13:44:33 +0000 |
---|---|---|
committer | simonmar <unknown> | 2001-03-01 13:44:33 +0000 |
commit | 6ae3188bfc73775a857ecf600a8c16408cb2cadf (patch) | |
tree | b1717249a4b69d630773cb6baef9d717d63c1a01 /ghc | |
parent | 09c9b6a7d04d95595097fcfe2505b380e754bf00 (diff) | |
download | haskell-6ae3188bfc73775a857ecf600a8c16408cb2cadf.tar.gz |
[project @ 2001-03-01 13:44:33 by simonmar]
fix an ASSERT: the isDeadBinder predicate can't be used here, because
all the Ids have been cloned with empty IdInfo.
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/compiler/coreSyn/CoreSat.lhs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ghc/compiler/coreSyn/CoreSat.lhs b/ghc/compiler/coreSyn/CoreSat.lhs index 3e53e9e6bb..f80d356ffd 100644 --- a/ghc/compiler/coreSyn/CoreSat.lhs +++ b/ghc/compiler/coreSyn/CoreSat.lhs @@ -530,9 +530,10 @@ mkCase scrut@(Var fn `App` Type ty `App` arg) bndr alts Case arg new_bndr [deflt_alt] other -> Case scrut bndr alts where - (deflt_alt : _) = [alt | alt@(DEFAULT,_,_) <- alts] + (deflt_alt@(_,_,rhs) : _) = [alt | alt@(DEFAULT,_,_) <- alts] - new_bndr = ASSERT( isDeadBinder bndr ) -- The binder shouldn't be used in the expression! + -- The binder shouldn't be used in the expression! + new_bndr = ASSERT2( not (bndr `elemVarSet` exprFreeVars rhs), ppr bndr ) setIdType bndr (exprType arg) -- NB: SeqOp :: forall a. a -> Int# -- So bndr has type Int# |