summaryrefslogtreecommitdiff
path: root/compiler/GHC/Types/Id/Info.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Types/Id/Info.hs')
-rw-r--r--compiler/GHC/Types/Id/Info.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/Types/Id/Info.hs b/compiler/GHC/Types/Id/Info.hs
index 399937265c..f02409d03c 100644
--- a/compiler/GHC/Types/Id/Info.hs
+++ b/compiler/GHC/Types/Id/Info.hs
@@ -111,6 +111,7 @@ import GHC.Types.Cpr
import GHC.Utils.Misc
import GHC.Utils.Outputable
import GHC.Utils.Panic
+import GHC.Utils.Panic.Plain
import Data.Word
@@ -334,13 +335,13 @@ bitfieldSetLevityInfo info (BitField bits) =
bitfieldSetCallArityInfo :: ArityInfo -> BitField -> BitField
bitfieldSetCallArityInfo info bf@(BitField bits) =
- ASSERT(info < 2^(30 :: Int) - 1)
+ assert (info < 2^(30 :: Int) - 1) $
bitfieldSetArityInfo (bitfieldGetArityInfo bf) $
BitField ((fromIntegral info `shiftL` 3) .|. (bits .&. 0b111))
bitfieldSetArityInfo :: ArityInfo -> BitField -> BitField
bitfieldSetArityInfo info (BitField bits) =
- ASSERT(info < 2^(30 :: Int) - 1)
+ assert (info < 2^(30 :: Int) - 1) $
BitField ((fromIntegral info `shiftL` 33) .|. (bits .&. ((1 `shiftL` 33) - 1)))
-- Getters
@@ -741,7 +742,7 @@ instance Outputable LevityInfo where
-- polymorphic
setNeverLevPoly :: HasDebugCallStack => IdInfo -> Type -> IdInfo
setNeverLevPoly info ty
- = ASSERT2( not (resultIsLevPoly ty), ppr ty )
+ = assertPpr (not (resultIsLevPoly ty)) (ppr ty) $
info { bitfield = bitfieldSetLevityInfo NeverLevityPolymorphic (bitfield info) }
setLevityInfoWithType :: IdInfo -> Type -> IdInfo