Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alexis King
GHC
Commits
6b14c418
Commit
6b14c418
authored
Sep 26, 2020
by
GHC GitLab CI
Committed by
Marge Bot
Oct 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend mAX_TUPLE_SIZE to 64
As well a ctuples and sums.
parent
998803dc
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
58 additions
and
107 deletions
+58
-107
compiler/GHC/Builtin/Types.hs
compiler/GHC/Builtin/Types.hs
+1
-1
compiler/GHC/Settings/Constants.hs
compiler/GHC/Settings/Constants.hs
+4
-4
compiler/GHC/Tc/Gen/HsType.hs
compiler/GHC/Tc/Gen/HsType.hs
+1
-1
libraries/base/GHC/Exts.hs
libraries/base/GHC/Exts.hs
+1
-1
libraries/ghc-prim/GHC/Classes.hs
libraries/ghc-prim/GHC/Classes.hs
+20
-0
libraries/ghc-prim/GHC/Tuple.hs
libraries/ghc-prim/GHC/Tuple.hs
+8
-79
testsuite/tests/polykinds/T10451.hs
testsuite/tests/polykinds/T10451.hs
+3
-2
testsuite/tests/polykinds/T10451.stderr
testsuite/tests/polykinds/T10451.stderr
+10
-9
testsuite/tests/rename/should_fail/T6148.hs
testsuite/tests/rename/should_fail/T6148.hs
+4
-4
testsuite/tests/rename/should_fail/T6148.stderr
testsuite/tests/rename/should_fail/T6148.stderr
+6
-6
No files found.
compiler/GHC/Builtin/Types.hs
View file @
6b14c418
...
...
@@ -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 6
2
; beyond that
- Currently just go up to 6
4
; 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
...
...
compiler/GHC/Settings/Constants.hs
View file @
6b14c418
...
...
@@ -11,14 +11,14 @@ hiVersion = read (cProjectVersionInt ++ cProjectPatchLevel) :: Integer
-- All pretty arbitrary:
mAX_TUPLE_SIZE
::
Int
mAX_TUPLE_SIZE
=
6
2
-- Should really match the number
-- of decls in
Data
.Tuple
mAX_TUPLE_SIZE
=
6
4
-- Should really match the number
-- of decls in
GHC
.Tuple
mAX_CTUPLE_SIZE
::
Int
-- Constraint tuples
mAX_CTUPLE_SIZE
=
6
2
-- Should match the number of decls in GHC.Classes
mAX_CTUPLE_SIZE
=
6
4
-- Should match the number of decls in GHC.Classes
mAX_SUM_SIZE
::
Int
mAX_SUM_SIZE
=
6
2
mAX_SUM_SIZE
=
6
4
-- | Default maximum depth for both class instance search and type family
-- reduction. See also #5395.
...
...
compiler/GHC/Tc/Gen/HsType.hs
View file @
6b14c418
...
...
@@ -3742,7 +3742,7 @@ Consider
* GHC.Tc.Errors.mkHoleError finally reports the error.
An annoying difficulty happens if there are more than 6
2
inferred
An annoying difficulty happens if there are more than 6
4
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
...
...
libraries/base/GHC/Exts.hs
View file @
6b14c418
...
...
@@ -133,7 +133,7 @@ import Control.Applicative (ZipList(..))
-- XXX This should really be in Data.Tuple, where the definitions are
maxTupleSize
::
Int
maxTupleSize
=
6
2
maxTupleSize
=
6
4
-- | 'the' ensures that all the elements of the list are identical
-- and then returns that unique element
...
...
libraries/ghc-prim/GHC/Classes.hs
View file @
6b14c418
...
...
@@ -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
)
libraries/ghc-prim/GHC/Tuple.hs
View file @
6b14c418
This diff is collapsed.
Click to expand it.
testsuite/tests/polykinds/T10451.hs
View file @
6b14c418
...
...
@@ -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
)
testsuite/tests/polykinds/T10451.stderr
View file @
6b14c418
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’
testsuite/tests/rename/should_fail/T6148.hs
View file @
6b14c418
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
testsuite/tests/rename/should_fail/T6148.stderr
View file @
6b14c418
T6148.hs:3:5:
A 6
3
-tuple is too large for GHC
(max size is 6
2
)
A 6
5
-tuple is too large for GHC
(max size is 6
4
)
Workaround: use nested tuples or define a data type
T6148.hs:7:5:
A 6
3
-tuple is too large for GHC
(max size is 6
2
)
A 6
5
-tuple is too large for GHC
(max size is 6
4
)
Workaround: use nested tuples or define a data type
T6148.hs:11:6:
A 6
3
-tuple is too large for GHC
(max size is 6
2
)
A 6
5
-tuple is too large for GHC
(max size is 6
4
)
Workaround: use nested tuples or define a data type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment