[Git][ghc/ghc][master] Fix warning with UNPACK on sum type (#23921)
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Fri Sep 1 18:30:22 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
ac29787c by Sylvain Henry at 2023-09-01T14:30:02-04:00
Fix warning with UNPACK on sum type (#23921)
- - - - -
1 changed file:
- compiler/GHC/Core/TyCon.hs
Changes:
=====================================
compiler/GHC/Core/TyCon.hs
=====================================
@@ -1,4 +1,4 @@
-
+{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE DeriveDataTypeable #-}
@@ -1531,13 +1531,19 @@ See Note [RuntimeRep and PrimRep] in GHC.Types.RepType.
-}
+
-- | A 'PrimRep' is an abstraction of a type. It contains information that
-- the code generator needs in order to pass arguments, return results,
-- and store values of this type. See also Note [RuntimeRep and PrimRep] in
-- "GHC.Types.RepType" and Note [VoidRep] in "GHC.Types.RepType".
data PrimRep
= VoidRep
+-- Unpacking of sum types is only supported since 9.6.1
+#if MIN_VERSION_GLASGOW_HASKELL(9,6,0,0)
| BoxedRep {-# UNPACK #-} !(Maybe Levity) -- ^ Boxed, heap value
+#else
+ | BoxedRep !(Maybe Levity) -- ^ Boxed, heap value
+#endif
| Int8Rep -- ^ Signed, 8-bit value
| Int16Rep -- ^ Signed, 16-bit value
| Int32Rep -- ^ Signed, 32-bit value
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ac29787c92551682ec89fcd71ac939becf69f051
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ac29787c92551682ec89fcd71ac939becf69f051
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230901/64c0318c/attachment-0001.html>
More information about the ghc-commits
mailing list