summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Opt/Simplify/Utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Core/Opt/Simplify/Utils.hs')
-rw-r--r--compiler/GHC/Core/Opt/Simplify/Utils.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/Core/Opt/Simplify/Utils.hs b/compiler/GHC/Core/Opt/Simplify/Utils.hs
index e66c88ac7a..75f5acaace 100644
--- a/compiler/GHC/Core/Opt/Simplify/Utils.hs
+++ b/compiler/GHC/Core/Opt/Simplify/Utils.hs
@@ -73,6 +73,7 @@ import GHC.Utils.Monad
import GHC.Utils.Outputable
import GHC.Utils.Logger
import GHC.Utils.Panic
+import GHC.Utils.Panic.Plain
import GHC.Core.Opt.ConstantFold
import GHC.Data.FastString ( fsLit )
@@ -1928,8 +1929,8 @@ new binding is abstracted. Note that
abstractFloats :: UnfoldingOpts -> TopLevelFlag -> [OutTyVar] -> SimplFloats
-> OutExpr -> SimplM ([OutBind], OutExpr)
abstractFloats uf_opts top_lvl main_tvs floats body
- = ASSERT( notNull body_floats )
- ASSERT( isNilOL (sfJoinFloats floats) )
+ = assert (notNull body_floats) $
+ assert (isNilOL (sfJoinFloats floats)) $
do { (subst, float_binds) <- mapAccumLM abstract empty_subst body_floats
; return (float_binds, GHC.Core.Subst.substExpr subst body) }
where
@@ -2252,7 +2253,7 @@ mkCase dflags scrut outer_bndr alts_ty (Alt DEFAULT _ deflt_rhs : outer_alts)
, inner_scrut_var == outer_bndr
= do { tick (CaseMerge outer_bndr)
- ; let wrap_alt (Alt con args rhs) = ASSERT( outer_bndr `notElem` args )
+ ; let wrap_alt (Alt con args rhs) = assert (outer_bndr `notElem` args)
(Alt con args (wrap_rhs rhs))
-- Simplifier's no-shadowing invariant should ensure
-- that outer_bndr is not shadowed by the inner patterns