-isMarkedStrict :: StrictnessMark -> Bool
-isMarkedStrict NotMarkedStrict = False
-isMarkedStrict _ = True -- All others are strict
+ | HsUnpack -- {-# UNPACK #-} ! (GHC extension, meaning "unbox")
+
+ | HsUnpackFailed -- An UNPACK pragma that we could not make
+ -- use of, because the type isn't unboxable;
+ -- equivalant to HsStrict except for checkValidDataCon
+ deriving (Eq, Data, Typeable)
+
+instance Outputable HsBang where
+ ppr HsNoBang = empty
+ ppr HsStrict = char '!'
+ ppr HsUnpack = ptext (sLit "{-# UNPACK #-} !")
+ ppr HsUnpackFailed = ptext (sLit "{-# UNPACK (failed) #-} !")
+
+isBanged :: HsBang -> Bool
+isBanged HsNoBang = False
+isBanged _ = True
+
+isMarkedUnboxed :: HsBang -> Bool
+isMarkedUnboxed HsUnpack = True
+isMarkedUnboxed _ = False
+
+-------------------------
+-- StrictnessMark is internal only, used to indicate strictness
+-- of the DataCon *worker* fields
+data StrictnessMark = MarkedStrict | NotMarkedStrict