From b766a90f7a273efef898bf9a5da28712b3c0c030 Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 24 Jul 2001 16:47:40 +0000 Subject: [PATCH] [project @ 2001-07-24 16:47:40 by simonpj] Print a bit more info in an old strictness analyser assert fail --- ghc/compiler/stranal/SaAbsInt.lhs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/stranal/SaAbsInt.lhs b/ghc/compiler/stranal/SaAbsInt.lhs index 82a2b47..192dc8a 100644 --- a/ghc/compiler/stranal/SaAbsInt.lhs +++ b/ghc/compiler/stranal/SaAbsInt.lhs @@ -318,8 +318,11 @@ evalAbsence (WwUnpack _ demand_info) val = case val of AbsTop -> False -- No poison in here AbsBot -> True -- Pure poison - AbsProd vals -> or (zipWithEqual "evalAbsence" evalAbsence demand_info vals) - _ -> panic "evalAbsence: other" + AbsProd vals + | length vals /= length demand_info -> pprTrace "evalAbsence" (ppr demand_info $$ ppr val) + True + | otherwise -> or (zipWithEqual "evalAbsence" evalAbsence demand_info vals) + _ -> panic "evalAbsence: other" evalAbsence other val = anyBot val -- The demand is conservative; even "Lazy" *might* evaluate the @@ -505,6 +508,11 @@ absEval anal (Let (Rec pairs) body) env in absEval anal body new_env +absEval anal (Note (Coerce _ _) expr) env = AbsTop + -- Don't look inside coerces, becuase they + -- are usually recursive newtypes + -- (Could improve, for the error case, but we're about + -- to kill this analyser anyway.) absEval anal (Note note expr) env = absEval anal expr env \end{code} -- 1.7.10.4