diff --git a/libraries/base/changelog.md b/libraries/base/changelog.md index 5ffc4d886469fea440460cf0ca374ad68205bd7b..a8af334f4f899d619a15975cbc4479ddbb34ade0 100644 --- a/libraries/base/changelog.md +++ b/libraries/base/changelog.md @@ -47,6 +47,7 @@ matches a `data` or `data instance` declaration) with all of its constructors in scope and the levity of `t` is statically known, then the constraint `DataToTag t` can always be solved. + * `GHC.Exts` no longer exports the GHC-internal `whereFrom#` primop ([CLC proposal #214](https://github.com/haskell/core-libraries-committee/issues/214)) * `GHC.InfoProv.InfoProv` now provides a `ipUnitId :: String` field encoding the unit ID of the unit defining the info table ([CLC proposal #214](https://github.com/haskell/core-libraries-committee/issues/214)) ([CLC proposal #104](https://github.com/haskell/core-libraries-committee/issues/104)) diff --git a/libraries/base/src/GHC/Base.hs b/libraries/base/src/GHC/Base.hs index 2fd16860016fbd18612b2ff3c1e1fbdb5737bbdb..f770e682707a17900c898c833f8d50e3a3c71c2f 100644 --- a/libraries/base/src/GHC/Base.hs +++ b/libraries/base/src/GHC/Base.hs @@ -139,7 +139,12 @@ module GHC.Base ) where import GHC.Internal.Base -import GHC.Prim hiding (dataToTagLarge#, dataToTagSmall#) +import GHC.Prim hiding (dataToTagLarge#, dataToTagSmall#, whereFrom#) + -- Hide dataToTagLarge# because it is expected to break for + -- GHC-internal reasons in the near future, and shouldn't + -- be exposed from base (not even GHC.Exts) + -- whereFrom# is similarly internal. + import GHC.Prim.Ext import GHC.Prim.PtrEq import GHC.Internal.Err diff --git a/libraries/base/src/GHC/Exts.hs b/libraries/base/src/GHC/Exts.hs index 28bf5539a201a151be5caa6cf7055bcc0794ee85..6e278f02019612848653ad509e85d127c2823dc1 100644 --- a/libraries/base/src/GHC/Exts.hs +++ b/libraries/base/src/GHC/Exts.hs @@ -111,10 +111,11 @@ module GHC.Exts import GHC.Internal.Exts import GHC.Internal.ArrayArray -import GHC.Prim hiding ( coerce, dataToTagSmall#, dataToTagLarge# ) +import GHC.Prim hiding ( coerce, dataToTagSmall#, dataToTagLarge#, whereFrom# ) -- 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) + -- whereFrom# is similarly internal. import GHC.Prim.Ext diff --git a/libraries/ghc-internal/src/GHC/Internal/Base.hs b/libraries/ghc-internal/src/GHC/Internal/Base.hs index 24104a511bffd5c2ab75eeb29666184a5cf500d6..3363d5c6c97fe118b62c945dc7b8ad66935569a0 100644 --- a/libraries/ghc-internal/src/GHC/Internal/Base.hs +++ b/libraries/ghc-internal/src/GHC/Internal/Base.hs @@ -315,7 +315,7 @@ import GHC.Classes hiding ( import GHC.CString import GHC.Magic import GHC.Magic.Dict -import GHC.Prim hiding (dataToTagSmall#, dataToTagLarge#) +import GHC.Prim hiding (dataToTagSmall#, dataToTagLarge#, whereFrom#) -- 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) diff --git a/libraries/ghc-internal/src/GHC/Internal/Exts.hs b/libraries/ghc-internal/src/GHC/Internal/Exts.hs index 40214b206f2c1788e0bd4f0b97cf8ef37fced71c..0ccc9e5a7f00c1bd0867d6c68c062b4d9e029738 100644 --- a/libraries/ghc-internal/src/GHC/Internal/Exts.hs +++ b/libraries/ghc-internal/src/GHC/Internal/Exts.hs @@ -133,10 +133,11 @@ module GHC.Internal.Exts maxTupleSize, ) where -import GHC.Prim hiding ( coerce, dataToTagSmall#, dataToTagLarge# ) - -- Hide dataToTag# ops because they are expected to break for +import GHC.Prim hiding ( coerce, dataToTagSmall#, dataToTagLarge#, whereFrom# ) + -- Hide dataToTagLarge# because it is expected to break for -- GHC-internal reasons in the near future, and shouldn't -- be exposed from base (not even GHC.Exts) + -- whereFrom# is similarly internal. import GHC.Types hiding ( IO -- Exported from "GHC.IO" diff --git a/libraries/ghc-internal/src/GHC/Internal/InfoProv/Types.hsc b/libraries/ghc-internal/src/GHC/Internal/InfoProv/Types.hsc index ce46ed246e201c28118b8aaba72af773eb3a2bdc..b1859048932d03b75412d986088498a51852f621 100644 --- a/libraries/ghc-internal/src/GHC/Internal/InfoProv/Types.hsc +++ b/libraries/ghc-internal/src/GHC/Internal/InfoProv/Types.hsc @@ -29,6 +29,7 @@ import GHC.Internal.IO.Encoding (utf8) import GHC.Internal.Foreign.Storable (peekByteOff) import GHC.Internal.ClosureTypes import GHC.Internal.Text.Read +import GHC.Prim (whereFrom##) data InfoProv = InfoProv { ipName :: String, diff --git a/testsuite/tests/interface-stability/base-exports.stdout b/testsuite/tests/interface-stability/base-exports.stdout index 0e4548eecf8510c0277eb10c87676d2d2ca5c9d0..5561d432ddd53a21699103ac1b3ed9fec4e2e702 100644 --- a/testsuite/tests/interface-stability/base-exports.stdout +++ b/testsuite/tests/interface-stability/base-exports.stdout @@ -4755,7 +4755,6 @@ module GHC.Base where waitRead# :: forall d. Int# -> State# d -> State# d waitWrite# :: forall d. Int# -> State# d -> State# d when :: forall (f :: * -> *). Applicative f => Bool -> f () -> f () - whereFrom# :: forall a d. a -> Addr# -> State# d -> (# State# d, Int# #) word16ToInt16# :: Word16# -> Int16# word16ToWord# :: Word16# -> Word# word2Double# :: Word# -> Double# @@ -6857,7 +6856,6 @@ module GHC.Exts where void# :: (# #) waitRead# :: forall d. Int# -> State# d -> State# d waitWrite# :: forall d. Int# -> State# d -> State# d - whereFrom# :: forall a d. a -> Addr# -> State# d -> (# State# d, Int# #) word16ToInt16# :: Word16# -> Int16# word16ToWord# :: Word16# -> Word# word2Double# :: Word# -> Double# diff --git a/testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs b/testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs index 952c51ca37b5a9e0e0e709128923c62650e8671d..7de8b85755ed065a6131410a2214077f8e06483c 100644 --- a/testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs +++ b/testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs @@ -4755,7 +4755,6 @@ module GHC.Base where waitRead# :: forall d. Int# -> State# d -> State# d waitWrite# :: forall d. Int# -> State# d -> State# d when :: forall (f :: * -> *). Applicative f => Bool -> f () -> f () - whereFrom# :: forall a d. a -> Addr# -> State# d -> (# State# d, Int# #) word16ToInt16# :: Word16# -> Int16# word16ToWord# :: Word16# -> Word# word2Double# :: Word# -> Double# @@ -6826,7 +6825,6 @@ module GHC.Exts where void# :: (# #) waitRead# :: forall d. Int# -> State# d -> State# d waitWrite# :: forall d. Int# -> State# d -> State# d - whereFrom# :: forall a d. a -> Addr# -> State# d -> (# State# d, Int# #) word16ToInt16# :: Word16# -> Int16# word16ToWord# :: Word16# -> Word# word2Double# :: Word# -> Double# diff --git a/testsuite/tests/interface-stability/base-exports.stdout-mingw32 b/testsuite/tests/interface-stability/base-exports.stdout-mingw32 index 54dc6fe5d9ef8ff5ffed387760bf57020efe4e4c..79f581ca782f3f393b083342377f286bf22caebf 100644 --- a/testsuite/tests/interface-stability/base-exports.stdout-mingw32 +++ b/testsuite/tests/interface-stability/base-exports.stdout-mingw32 @@ -4758,7 +4758,6 @@ module GHC.Base where waitRead# :: forall d. Int# -> State# d -> State# d waitWrite# :: forall d. Int# -> State# d -> State# d when :: forall (f :: * -> *). Applicative f => Bool -> f () -> f () - whereFrom# :: forall a d. a -> Addr# -> State# d -> (# State# d, Int# #) word16ToInt16# :: Word16# -> Int16# word16ToWord# :: Word16# -> Word# word2Double# :: Word# -> Double# @@ -7006,7 +7005,6 @@ module GHC.Exts where void# :: (# #) waitRead# :: forall d. Int# -> State# d -> State# d waitWrite# :: forall d. Int# -> State# d -> State# d - whereFrom# :: forall a d. a -> Addr# -> State# d -> (# State# d, Int# #) word16ToInt16# :: Word16# -> Int16# word16ToWord# :: Word16# -> Word# word2Double# :: Word# -> Double# diff --git a/testsuite/tests/interface-stability/base-exports.stdout-ws-32 b/testsuite/tests/interface-stability/base-exports.stdout-ws-32 index 0e4548eecf8510c0277eb10c87676d2d2ca5c9d0..5561d432ddd53a21699103ac1b3ed9fec4e2e702 100644 --- a/testsuite/tests/interface-stability/base-exports.stdout-ws-32 +++ b/testsuite/tests/interface-stability/base-exports.stdout-ws-32 @@ -4755,7 +4755,6 @@ module GHC.Base where waitRead# :: forall d. Int# -> State# d -> State# d waitWrite# :: forall d. Int# -> State# d -> State# d when :: forall (f :: * -> *). Applicative f => Bool -> f () -> f () - whereFrom# :: forall a d. a -> Addr# -> State# d -> (# State# d, Int# #) word16ToInt16# :: Word16# -> Int16# word16ToWord# :: Word16# -> Word# word2Double# :: Word# -> Double# @@ -6857,7 +6856,6 @@ module GHC.Exts where void# :: (# #) waitRead# :: forall d. Int# -> State# d -> State# d waitWrite# :: forall d. Int# -> State# d -> State# d - whereFrom# :: forall a d. a -> Addr# -> State# d -> (# State# d, Int# #) word16ToInt16# :: Word16# -> Int16# word16ToWord# :: Word16# -> Word# word2Double# :: Word# -> Double#