Clean up TH's treatment of unary tuples (or, #16881 part two)
!1906 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. Fixes #17371. Fixes #17380.
Showing
- compiler/GHC/Hs/Expr.hs 8 additions, 0 deletionscompiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Pat.hs 8 additions, 2 deletionscompiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Types.hs 14 additions, 1 deletioncompiler/GHC/Hs/Types.hs
- compiler/GHC/ThToHs.hs 5 additions, 11 deletionscompiler/GHC/ThToHs.hs
- compiler/iface/IfaceType.hs 41 additions, 24 deletionscompiler/iface/IfaceType.hs
- compiler/prelude/TysWiredIn.hs 5 additions, 1 deletioncompiler/prelude/TysWiredIn.hs
- compiler/prelude/TysWiredIn.hs-boot 5 additions, 0 deletionscompiler/prelude/TysWiredIn.hs-boot
- docs/users_guide/8.10.1-notes.rst 6 additions, 3 deletionsdocs/users_guide/8.10.1-notes.rst
- libraries/template-haskell/Language/Haskell/TH/Ppr.hs 20 additions, 4 deletionslibraries/template-haskell/Language/Haskell/TH/Ppr.hs
- testsuite/tests/ghc-api/annotations/parseTree.stdout 7 additions, 7 deletionstestsuite/tests/ghc-api/annotations/parseTree.stdout
- testsuite/tests/th/T16881.hs 15 additions, 0 deletionstestsuite/tests/th/T16881.hs
- testsuite/tests/th/T16881.stdout 2 additions, 0 deletionstestsuite/tests/th/T16881.stdout
- testsuite/tests/th/T17380.hs 24 additions, 0 deletionstestsuite/tests/th/T17380.hs
- testsuite/tests/th/T17380.stderr 39 additions, 0 deletionstestsuite/tests/th/T17380.stderr
- testsuite/tests/th/T8761.stderr 4 additions, 8 deletionstestsuite/tests/th/T8761.stderr
- testsuite/tests/th/TH_Promoted1Tuple.stderr 1 addition, 1 deletiontestsuite/tests/th/TH_Promoted1Tuple.stderr
- testsuite/tests/th/TH_unresolvedInfix.hs 2 additions, 8 deletionstestsuite/tests/th/TH_unresolvedInfix.hs
- testsuite/tests/th/TH_unresolvedInfix.stdout 0 additions, 2 deletionstestsuite/tests/th/TH_unresolvedInfix.stdout
- testsuite/tests/th/TH_unresolvedInfix_Lib.hs 2 additions, 4 deletionstestsuite/tests/th/TH_unresolvedInfix_Lib.hs
- testsuite/tests/th/all.T 2 additions, 0 deletionstestsuite/tests/th/all.T
Loading
Please register or sign in to comment