Skip to content

Clean up TH's treatment of unary tuples (or, #16881 part two)

Ryan Scott requested to merge wip/T17380 into master

!1906 (closed) left some loose ends in regards to Template Haskell's treatment of unary tuples. This patch ends to tie up those loose ends:

  • In addition to having TupleT 1 produce unary tuples, TupE [exp] and TupP [pat] also now produce unary tuples.
  • I have added various special cases in GHC's pretty-printers to ensure that explicit 1-tuples are printed using the Unit type. See testsuite/tests/th/T17380.
  • The GHC 8.10.1 release notes entry has been tidied up a little.

Fixes #16881 (closed). Fixes #17371 (closed). Fixes #17380 (closed).

Edited by Ryan Scott

Merge request reports