Unboxed tuple constructors of size 32 cause incorrect error
Summary
Unboxed tuple constructors of size 32 and higher cause a tuple size error despite the tuple size limit being 62. The error message states that the tuples are twice as large as they actually are. Unboxed tuple sections and unboxed tuples not in prefix form work as expected.
Steps to reproduce
type UTuple32 = (#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#)
makeUTuple32 = (#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#)
produces the following errors:
A 64-tuple is too large for GHC
(max size is 62)
Workaround: use nested tuples or define a data type
|
23 | type UTuple32 = (#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A 64-tuple is too large for GHC
(max size is 62)
Workaround: use nested tuples or define a data type
|
37 | makeUTuple32 = (#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expected behavior
The above should compile.
Environment
- GHC version used: 8.8.1