[Git][ghc/ghc][master] base: Deprecate BCO primops exports from GHC.Exts

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Sep 11 06:42:37 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00
base: Deprecate BCO primops exports from GHC.Exts

See https://github.com/haskell/core-libraries-committee/issues/212.

These reexports will be removed in GHC 9.14.

- - - - -


4 changed files:

- libraries/base/src/GHC/Exts.hs
- libraries/ghci/GHCi/CreateBCO.hs
- libraries/ghci/ghci.cabal.in
- + testsuite/tests/module/T21752.stderr


Changes:

=====================================
libraries/base/src/GHC/Exts.hs
=====================================
@@ -23,6 +23,12 @@ module GHC.Exts
      -- **  Legacy interface for arrays of arrays
      module GHC.Internal.ArrayArray,
      -- *  Primitive operations
+     {-# DEPRECATED ["The BCO, mkApUpd0#, and newBCO# re-exports from GHC.Exts have been deprecated and will be removed in 9.14", "These symbols should be imported from ghc-internal instead if needed."] #-}
+     Prim.BCO,
+     {-# DEPRECATED ["The BCO, mkApUpd0#, and newBCO# re-exports from GHC.Exts have been deprecated and will be removed in 9.14", "These symbols should be imported from ghc-internal instead if needed."] #-}
+     Prim.mkApUpd0#,
+     {-# DEPRECATED ["The BCO, mkApUpd0#, and newBCO# re-exports from GHC.Exts have been deprecated and will be removed in 9.14", "These symbols should be imported from ghc-internal instead if needed."] #-}
+     Prim.newBCO#,
      module GHC.Prim,
      module GHC.Prim.Ext,
      -- **  Running 'RealWorld' state thread
@@ -114,7 +120,10 @@ import GHC.Internal.Exts
 import GHC.Internal.ArrayArray
 import GHC.Prim hiding (
   coerce, dataToTagSmall#, dataToTagLarge#, whereFrom#,
-  isByteArrayWeaklyPinned#, isMutableByteArrayWeaklyPinned# )
+  isByteArrayWeaklyPinned#, isMutableByteArrayWeaklyPinned#,
+  -- Deprecated
+  BCO, mkApUpd0#, newBCO# )
+import qualified GHC.Prim as Prim ( BCO, mkApUpd0#, newBCO# )
   -- Hide dataToTag# ops because they are expected to break for
   -- GHC-internal reasons in the near future, and shouldn't
   -- be exposed from base (not even GHC.Exts)


=====================================
libraries/ghci/GHCi/CreateBCO.hs
=====================================
@@ -6,6 +6,10 @@
 {-# LANGUAGE UnboxedTuples #-}
 {-# LANGUAGE RecordWildCards #-}
 {-# LANGUAGE CPP #-}
+{-# OPTIONS_GHC -Wno-warnings-deprecations #-}
+-- TODO We want to import GHC.Internal.Base (BCO, mkApUpd0#, newBCO#) instead
+-- of from GHC.Exts when we can require of the bootstrap compiler to have
+-- ghc-internal.
 
 --
 --  (c) The University of Glasgow 2002-2006


=====================================
libraries/ghci/ghci.cabal.in
=====================================
@@ -86,9 +86,10 @@ library
         array            == 0.5.*,
         base             >= 4.8 && < 4.21,
         -- ghc-internal     == @ProjectVersionForLib at .*
-        -- TODO: Use GHC.Internal.Desugar from ghc-internal instead of ignoring
-        -- the deprecation warning of GHC.Desugar when we require ghc-internal
-        -- of the bootstrap compiler
+        -- TODO: Use GHC.Internal.Desugar and GHC.Internal.Base from
+        -- ghc-internal instead of ignoring the deprecation warning in GHCi.TH
+        -- and GHCi.CreateBCO when we require ghc-internal of the bootstrap
+        -- compiler
         ghc-prim         >= 0.5.0 && < 0.12,
         binary           == 0.8.*,
         bytestring       >= 0.10 && < 0.13,


=====================================
testsuite/tests/module/T21752.stderr
=====================================
@@ -0,0 +1,32 @@
+T21752A.hs:4:5: warning: [GHC-68441] [-Wdeprecations (in -Wextended-warnings)]
+    In the use of ‘newBCO#’ (imported from GHC.Exts):
+    Deprecated: "The BCO, mkApUpd0#, and newBCO# re-exports from GHC.Exts have been deprecated and will be removed in 9.14
+                 These symbols should be imported from ghc-internal instead if needed."
+
+T21752A.hs:4:5: warning: [GHC-68441] [-Wdeprecations (in -Wextended-warnings)]
+    In the use of ‘newBCO#’ (imported from GHC.Exts):
+    Deprecated: "The BCO, mkApUpd0#, and newBCO# re-exports from GHC.Exts have been deprecated and will be removed in 9.14
+                 These symbols should be imported from ghc-internal instead if needed."
+
+T21752A.hs:4:5: warning: [GHC-68441] [-Wdeprecations (in -Wextended-warnings)]
+    In the use of ‘mkApUpd0#’ (imported from GHC.Exts):
+    Deprecated: "The BCO, mkApUpd0#, and newBCO# re-exports from GHC.Exts have been deprecated and will be removed in 9.14
+                 These symbols should be imported from ghc-internal instead if needed."
+
+T21752A.hs:4:5: warning: [GHC-68441] [-Wdeprecations (in -Wextended-warnings)]
+    In the use of ‘mkApUpd0#’ (imported from GHC.Exts):
+    Deprecated: "The BCO, mkApUpd0#, and newBCO# re-exports from GHC.Exts have been deprecated and will be removed in 9.14
+                 These symbols should be imported from ghc-internal instead if needed."
+
+T21752A.hs:4:5: warning: [GHC-68441] [-Wdeprecations (in -Wextended-warnings)]
+    In the use of type constructor or class ‘BCO’
+    (imported from GHC.Exts):
+    Deprecated: "The BCO, mkApUpd0#, and newBCO# re-exports from GHC.Exts have been deprecated and will be removed in 9.14
+                 These symbols should be imported from ghc-internal instead if needed."
+
+T21752A.hs:4:5: warning: [GHC-68441] [-Wdeprecations (in -Wextended-warnings)]
+    In the use of type constructor or class ‘BCO’
+    (imported from GHC.Exts):
+    Deprecated: "The BCO, mkApUpd0#, and newBCO# re-exports from GHC.Exts have been deprecated and will be removed in 9.14
+                 These symbols should be imported from ghc-internal instead if needed."
+



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0f696958db9e52b5b07d3d52658b4786280eb419

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0f696958db9e52b5b07d3d52658b4786280eb419
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/20240911/d1d536f6/attachment-0001.html>


More information about the ghc-commits mailing list