From: simonpj Date: Tue, 24 Jul 2001 16:47:40 +0000 (+0000) Subject: [project @ 2001-07-24 16:47:40 by simonpj] X-Git-Tag: Approximately_9120_patches~1421 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b766a90f7a273efef898bf9a5da28712b3c0c030;hp=ff868a84e540419ba281640cfcae306895080fcc;p=ghc-hetmet.git [project @ 2001-07-24 16:47:40 by simonpj] Print a bit more info in an old strictness analyser assert fail --- 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}