Teo Camarasu pushed to branch wip/T26832 at Glasgow Haskell Compiler / GHC Commits: f00fd086 by Teo Camarasu at 2026-01-28T12:44:44+00:00 ghc-internal: move maxTupleSize to GHC.Internal.Tuple This previously lived in GHC.Internal.Exts but a comment already said it should be moved to .Tuple - - - - - 7 changed files: - libraries/ghc-internal/src/GHC/Internal/Exts.hs - libraries/ghc-internal/src/GHC/Internal/Tuple.hs - libraries/ghc-internal/src/GHC/Internal/Wasm/Prim/Exports.hs - testsuite/tests/interface-stability/ghc-experimental-exports.stdout - testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 - testsuite/tests/interface-stability/ghc-prim-exports.stdout - testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32 Changes: ===================================== libraries/ghc-internal/src/GHC/Internal/Exts.hs ===================================== @@ -321,10 +321,7 @@ import GHC.Internal.Data.Data import GHC.Internal.Data.Ord import qualified GHC.Internal.Debug.Trace import GHC.Internal.Unsafe.Coerce ( unsafeCoerce# ) -- just for re-export - --- XXX This should really be in Data.Tuple, where the definitions are -maxTupleSize :: Int -maxTupleSize = 64 +import GHC.Internal.Tuple (maxTupleSize) -- | 'the' ensures that all the elements of the list are identical -- and then returns that unique element ===================================== libraries/ghc-internal/src/GHC/Internal/Tuple.hs ===================================== @@ -27,10 +27,11 @@ module GHC.Internal.Tuple ( Tuple40(..), Tuple41(..), Tuple42(..), Tuple43(..), Tuple44(..), Tuple45(..), Tuple46(..), Tuple47(..), Tuple48(..), Tuple49(..), Tuple50(..), Tuple51(..), Tuple52(..), Tuple53(..), Tuple54(..), Tuple55(..), Tuple56(..), Tuple57(..), Tuple58(..), Tuple59(..), Tuple60(..), Tuple61(..), Tuple62(..), Tuple63(..), Tuple64(..), + maxTupleSize, ) where -- See W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base -import GHC.Internal.Types () +import GHC.Internal.Types (Int) default () -- Double and Integer aren't available yet @@ -598,3 +599,6 @@ data Tuple64 a b c d e f g h i j k l m n o p q r s t u v w x y z a1 b1 c1 d1 e1 r1 s1 t1 u1 v1 w1 x1 y1 z1 a2 b2 c2 d2 e2 f2 g2 h2 i2 j2 k2 l2 = (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a1,b1,c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,n1,o1,p1,q1, r1,s1,t1,u1,v1,w1,x1,y1,z1,a2,b2,c2,d2,e2,f2,g2,h2,i2,j2,k2,l2) + +maxTupleSize :: Int +maxTupleSize = 64 ===================================== libraries/ghc-internal/src/GHC/Internal/Wasm/Prim/Exports.hs ===================================== @@ -40,6 +40,7 @@ import GHC.Internal.TopHandler (flushStdHandles) import GHC.Internal.Wasm.Prim.Types import GHC.Internal.Word import GHC.Internal.Unsafe.Coerce ( unsafeCoerce# ) +import GHC.Internal.Ptr mkJSCallback :: (StablePtr a -> IO JSVal) -> a -> IO JSVal mkJSCallback adjustor f = do ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout ===================================== @@ -4453,6 +4453,7 @@ module Data.Tuple.Experimental where type Unit# :: GHC.Internal.Types.ZeroBitType data Unit# = ... getSolo :: forall a. Solo a -> a + maxTupleSize :: GHC.Internal.Types.Int module GHC.Exception.Backtrace.Experimental where -- Safety: None @@ -11044,6 +11045,7 @@ module Prelude.Experimental where type Unit# :: GHC.Internal.Types.ZeroBitType data Unit# = ... getSolo :: forall a. Solo a -> a + maxTupleSize :: GHC.Internal.Types.Int module System.Mem.Experimental where -- Safety: None ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 ===================================== @@ -4453,6 +4453,7 @@ module Data.Tuple.Experimental where type Unit# :: GHC.Internal.Types.ZeroBitType data Unit# = ... getSolo :: forall a. Solo a -> a + maxTupleSize :: GHC.Internal.Types.Int module GHC.Exception.Backtrace.Experimental where -- Safety: None @@ -11047,6 +11048,7 @@ module Prelude.Experimental where type Unit# :: GHC.Internal.Types.ZeroBitType data Unit# = ... getSolo :: forall a. Solo a -> a + maxTupleSize :: GHC.Internal.Types.Int module System.Mem.Experimental where -- Safety: None ===================================== testsuite/tests/interface-stability/ghc-prim-exports.stdout ===================================== @@ -3892,6 +3892,7 @@ module GHC.Tuple where type Unit :: * data Unit = () getSolo :: forall a. Solo a -> a + maxTupleSize :: GHC.Internal.Types.Int module GHC.Types where -- Safety: None ===================================== testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32 ===================================== @@ -3894,6 +3894,7 @@ module GHC.Tuple where type Unit :: * data Unit = () getSolo :: forall a. Solo a -> a + maxTupleSize :: GHC.Internal.Types.Int module GHC.Types where -- Safety: None View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f00fd086e7764bbf3f0f4bdd48b46d69... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f00fd086e7764bbf3f0f4bdd48b46d69... You're receiving this email because of your account on gitlab.haskell.org.