Commit 6b14c418 authored by GHC GitLab CI's avatar GHC GitLab CI Committed by Marge Bot

Extend mAX_TUPLE_SIZE to 64

As well a ctuples and sums.
parent 998803dc
Pipeline #26386 canceled with stages
......@@ -726,7 +726,7 @@ Note [How tuples work] See also Note [Known-key names] in GHC.Builtin.Names
- Wanted constraints: there is a built-in instance
instance (c1,c2) => (c1,c2)
See GHC.Tc.Instance.Class.matchCTuple
- Currently just go up to 62; beyond that
- Currently just go up to 64; beyond that
you have to use manual nesting
- Their OccNames look like (%,,,%), so they can easily be
distinguished from term tuples. But (following Haskell) we
......
......@@ -11,14 +11,14 @@ hiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Integer
-- All pretty arbitrary:
mAX_TUPLE_SIZE :: Int
mAX_TUPLE_SIZE = 62 -- Should really match the number
-- of decls in Data.Tuple
mAX_TUPLE_SIZE = 64 -- Should really match the number
-- of decls in GHC.Tuple
mAX_CTUPLE_SIZE :: Int -- Constraint tuples
mAX_CTUPLE_SIZE = 62 -- Should match the number of decls in GHC.Classes
mAX_CTUPLE_SIZE = 64 -- Should match the number of decls in GHC.Classes
mAX_SUM_SIZE :: Int
mAX_SUM_SIZE = 62
mAX_SUM_SIZE = 64
-- | Default maximum depth for both class instance search and type family
-- reduction. See also #5395.
......
......@@ -3742,7 +3742,7 @@ Consider
* GHC.Tc.Errors.mkHoleError finally reports the error.
An annoying difficulty happens if there are more than 62 inferred
An annoying difficulty happens if there are more than 64 inferred
constraints. Then we need to fill in the TcTyVar with (say) a 70-tuple.
Where do we find the TyCon? For good reasons we only have constraint
tuples up to 62 (see Note [How tuples work] in GHC.Builtin.Types). So how
......
......@@ -133,7 +133,7 @@ import Control.Applicative (ZipList(..))
-- XXX This should really be in Data.Tuple, where the definitions are
maxTupleSize :: Int
maxTupleSize = 62
maxTupleSize = 64
-- | 'the' ensures that all the elements of the list are identical
-- and then returns that unique element
......
......@@ -890,3 +890,23 @@ class (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16,
c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44,
c45, c46, c47, c48, c49, c50, c51, c52, c53, c54, c55, c56, c57, c58,
c59, c60, c61, c62)
class (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16,
c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30,
c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44,
c45, c46, c47, c48, c49, c50, c51, c52, c53, c54, c55, c56, c57, c58,
c59, c60, c61, c62, c63)
=> (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16,
c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30,
c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44,
c45, c46, c47, c48, c49, c50, c51, c52, c53, c54, c55, c56, c57, c58,
c59, c60, c61, c62, c63)
class (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16,
c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30,
c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44,
c45, c46, c47, c48, c49, c50, c51, c52, c53, c54, c55, c56, c57, c58,
c59, c60, c61, c62, c63, c64)
=> (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16,
c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30,
c31, c32, c33, c34, c35, c36, c37, c38, c39, c40, c41, c42, c43, c44,
c45, c46, c47, c48, c49, c50, c51, c52, c53, c54, c55, c56, c57, c58,
c59, c60, c61, c62, c63, c64)
This diff is collapsed.
......@@ -17,7 +17,7 @@ type S a = ( Eq a, Eq a, Eq a, Eq a
, Eq a, Eq a, Eq a, Eq a
, Eq a, Eq a, Eq a, Eq a
, Eq a, Eq a, Eq a, Eq a
, Eq a, Eq a )
, Eq a, Eq a, Eq a, Eq a )
type T a = ( Eq a, Eq a, Eq a, Eq a
, Eq a, Eq a, Eq a, Eq a
......@@ -34,5 +34,6 @@ type T a = ( Eq a, Eq a, Eq a, Eq a
, Eq a, Eq a, Eq a, Eq a
, Eq a, Eq a, Eq a, Eq a
, Eq a, Eq a, Eq a, Eq a
, Eq a, Eq a, Eq a, Eq a)
, Eq a, Eq a, Eq a, Eq a
, Eq a, Eq a)
T10451.hs:22:12: error:
Constraint tuple arity too large: 64 (max arity = 62)
Instead, use a nested tuple
In the type ‘(Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a)’
In the type declaration for ‘T’
• Constraint tuple arity too large: 66 (max arity = 64)
Instead, use a nested tuple
• In the type ‘(Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a, Eq a,
Eq a, Eq a, Eq a)’
In the type declaration for ‘T’
module T6148 where
a = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
b = (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
b = (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
data T = T
c :: (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
c :: (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)
T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T
T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T
T T T
T T T T T
c = c
T6148.hs:3:5:
A 63-tuple is too large for GHC
(max size is 62)
A 65-tuple is too large for GHC
(max size is 64)
Workaround: use nested tuples or define a data type
T6148.hs:7:5:
A 63-tuple is too large for GHC
(max size is 62)
A 65-tuple is too large for GHC
(max size is 64)
Workaround: use nested tuples or define a data type
T6148.hs:11:6:
A 63-tuple is too large for GHC
(max size is 62)
A 65-tuple is too large for GHC
(max size is 64)
Workaround: use nested tuples or define a data type
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment