diff options
Diffstat (limited to 'compiler/GHC/Core/Utils.hs')
-rw-r--r-- | compiler/GHC/Core/Utils.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs index 3f228f747d..6b779ef1aa 100644 --- a/compiler/GHC/Core/Utils.hs +++ b/compiler/GHC/Core/Utils.hs @@ -1609,11 +1609,14 @@ expr_ok primop_ok (Case scrut bndr _ alts) expr_ok primop_ok other_expr | (expr, args) <- collectArgs other_expr = case stripTicksTopE (not . tickishCounts) expr of - Var f -> app_ok primop_ok f args + Var f -> app_ok primop_ok f args -- 'LitRubbish' is the only literal that can occur in the head of an -- application and will not be matched by the above case (Var /= Lit). - Lit lit -> ASSERT( isRubbishLit lit ) True - _ -> False + Lit LitRubbish{} -> True +#if defined(DEBUG) + Lit _ -> pprPanic "Non-rubbish lit in app head" (ppr other_expr) +#endif + _ -> False ----------------------------- app_ok :: (PrimOp -> Bool) -> Id -> [CoreExpr] -> Bool |