Check for large tuples more thoroughly
This fixes #18723 (closed) by:
- Moving the existing
GHC.Tc.Gen.HsType.bigConstraintTuple
validity check toGHC.Rename.Utils.checkCTupSize
for consistency withGHC.Rename.Utils.checkTupSize
, and - Using
check(C)TupSize
when checking tuple types, in addition to checking names, expressions, and patterns.
Note that I put as many of these checks as possible in the typechecker so
that GHC can properly distinguish between boxed and constraint tuples. The
exception to this rule is checking names, which I perform in the renamer
(in GHC.Rename.Env
) so that we can rule out (,, ... ,,)
and
''(,, ... ,,)
alike in one fell swoop.
While I was in town, I also removed the HsConstraintTuple
and
HsBoxedTuple
constructors of HsTupleSort
, which are functionally
unused. This requires a haddock
submodule bump.