Teo Camarasu pushed to branch wip/T26832 at Glasgow Haskell Compiler / GHC

Commits:

7 changed files:

Changes:

  • libraries/ghc-internal/src/GHC/Internal/Exts.hs
    ... ... @@ -321,10 +321,7 @@ import GHC.Internal.Data.Data
    321 321
     import GHC.Internal.Data.Ord
    
    322 322
     import qualified GHC.Internal.Debug.Trace
    
    323 323
     import GHC.Internal.Unsafe.Coerce ( unsafeCoerce# ) -- just for re-export
    
    324
    -
    
    325
    --- XXX This should really be in Data.Tuple, where the definitions are
    
    326
    -maxTupleSize :: Int
    
    327
    -maxTupleSize = 64
    
    324
    +import GHC.Internal.Tuple (maxTupleSize)
    
    328 325
     
    
    329 326
     -- | 'the' ensures that all the elements of the list are identical
    
    330 327
     -- and then returns that unique element
    

  • libraries/ghc-internal/src/GHC/Internal/Tuple.hs
    ... ... @@ -27,10 +27,11 @@ module GHC.Internal.Tuple (
    27 27
       Tuple40(..), Tuple41(..), Tuple42(..), Tuple43(..), Tuple44(..), Tuple45(..), Tuple46(..), Tuple47(..), Tuple48(..), Tuple49(..),
    
    28 28
       Tuple50(..), Tuple51(..), Tuple52(..), Tuple53(..), Tuple54(..), Tuple55(..), Tuple56(..), Tuple57(..), Tuple58(..), Tuple59(..),
    
    29 29
       Tuple60(..), Tuple61(..), Tuple62(..), Tuple63(..), Tuple64(..),
    
    30
    +  maxTupleSize,
    
    30 31
     ) where
    
    31 32
     
    
    32 33
     -- See W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base
    
    33
    -import GHC.Internal.Types ()
    
    34
    +import GHC.Internal.Types (Int)
    
    34 35
     
    
    35 36
     default () -- Double and Integer aren't available yet
    
    36 37
     
    
    ... ... @@ -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
    598 599
           r1 s1 t1 u1 v1 w1 x1 y1 z1 a2 b2 c2 d2 e2 f2 g2 h2 i2 j2 k2 l2
    
    599 600
       = (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,
    
    600 601
          r1,s1,t1,u1,v1,w1,x1,y1,z1,a2,b2,c2,d2,e2,f2,g2,h2,i2,j2,k2,l2)
    
    602
    +
    
    603
    +maxTupleSize :: Int
    
    604
    +maxTupleSize = 64

  • libraries/ghc-internal/src/GHC/Internal/Wasm/Prim/Exports.hs
    ... ... @@ -40,6 +40,7 @@ import GHC.Internal.TopHandler (flushStdHandles)
    40 40
     import GHC.Internal.Wasm.Prim.Types
    
    41 41
     import GHC.Internal.Word
    
    42 42
     import GHC.Internal.Unsafe.Coerce ( unsafeCoerce# )
    
    43
    +import GHC.Internal.Ptr
    
    43 44
     
    
    44 45
     mkJSCallback :: (StablePtr a -> IO JSVal) -> a -> IO JSVal
    
    45 46
     mkJSCallback adjustor f = do
    

  • testsuite/tests/interface-stability/ghc-experimental-exports.stdout
    ... ... @@ -4453,6 +4453,7 @@ module Data.Tuple.Experimental where
    4453 4453
       type Unit# :: GHC.Internal.Types.ZeroBitType
    
    4454 4454
       data Unit# = ...
    
    4455 4455
       getSolo :: forall a. Solo a -> a
    
    4456
    +  maxTupleSize :: GHC.Internal.Types.Int
    
    4456 4457
     
    
    4457 4458
     module GHC.Exception.Backtrace.Experimental where
    
    4458 4459
       -- Safety: None
    
    ... ... @@ -11044,6 +11045,7 @@ module Prelude.Experimental where
    11044 11045
       type Unit# :: GHC.Internal.Types.ZeroBitType
    
    11045 11046
       data Unit# = ...
    
    11046 11047
       getSolo :: forall a. Solo a -> a
    
    11048
    +  maxTupleSize :: GHC.Internal.Types.Int
    
    11047 11049
     
    
    11048 11050
     module System.Mem.Experimental where
    
    11049 11051
       -- Safety: None
    

  • testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
    ... ... @@ -4453,6 +4453,7 @@ module Data.Tuple.Experimental where
    4453 4453
       type Unit# :: GHC.Internal.Types.ZeroBitType
    
    4454 4454
       data Unit# = ...
    
    4455 4455
       getSolo :: forall a. Solo a -> a
    
    4456
    +  maxTupleSize :: GHC.Internal.Types.Int
    
    4456 4457
     
    
    4457 4458
     module GHC.Exception.Backtrace.Experimental where
    
    4458 4459
       -- Safety: None
    
    ... ... @@ -11047,6 +11048,7 @@ module Prelude.Experimental where
    11047 11048
       type Unit# :: GHC.Internal.Types.ZeroBitType
    
    11048 11049
       data Unit# = ...
    
    11049 11050
       getSolo :: forall a. Solo a -> a
    
    11051
    +  maxTupleSize :: GHC.Internal.Types.Int
    
    11050 11052
     
    
    11051 11053
     module System.Mem.Experimental where
    
    11052 11054
       -- Safety: None
    

  • testsuite/tests/interface-stability/ghc-prim-exports.stdout
    ... ... @@ -3892,6 +3892,7 @@ module GHC.Tuple where
    3892 3892
       type Unit :: *
    
    3893 3893
       data Unit = ()
    
    3894 3894
       getSolo :: forall a. Solo a -> a
    
    3895
    +  maxTupleSize :: GHC.Internal.Types.Int
    
    3895 3896
     
    
    3896 3897
     module GHC.Types where
    
    3897 3898
       -- Safety: None
    

  • testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32
    ... ... @@ -3894,6 +3894,7 @@ module GHC.Tuple where
    3894 3894
       type Unit :: *
    
    3895 3895
       data Unit = ()
    
    3896 3896
       getSolo :: forall a. Solo a -> a
    
    3897
    +  maxTupleSize :: GHC.Internal.Types.Int
    
    3897 3898
     
    
    3898 3899
     module GHC.Types where
    
    3899 3900
       -- Safety: None