diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2017-07-29 19:36:42 -0400 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2017-07-29 19:36:42 -0400 |
commit | 7089dc2f12f9616771fc1de143e9b974157405d8 (patch) | |
tree | 386a5bebf509ffb04ef8b91a34d1214e59bee441 /libraries | |
parent | f839b9de18a9f795e438314bea9f17e594afa354 (diff) | |
download | haskell-7089dc2f12f9616771fc1de143e9b974157405d8.tar.gz |
Follow-up to #13887, for promoted infix constructors
Summary:
Correct a couple more spots in the TH pretty-printer by applying the
appropriate parenthesization for infix names. Fixes #13887 (again).
Test Plan: make test TEST=T13887
Reviewers: austin, bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13887
Differential Revision: https://phabricator.haskell.org/D3802
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs index 696c4454c7..e6c33029ab 100644 --- a/libraries/template-haskell/Language/Haskell/TH/Ppr.hs +++ b/libraries/template-haskell/Language/Haskell/TH/Ppr.hs @@ -689,11 +689,11 @@ pprParendType (UnboxedSumT arity) = hashParens $ hcat $ replicate (arity-1) bar pprParendType ArrowT = parens (text "->") pprParendType ListT = text "[]" pprParendType (LitT l) = pprTyLit l -pprParendType (PromotedT c) = text "'" <> ppr c +pprParendType (PromotedT c) = text "'" <> pprName' Applied c pprParendType (PromotedTupleT 0) = text "'()" pprParendType (PromotedTupleT n) = quoteParens (hcat (replicate (n-1) comma)) pprParendType PromotedNilT = text "'[]" -pprParendType PromotedConsT = text "(':)" +pprParendType PromotedConsT = text "'(:)" pprParendType StarT = char '*' pprParendType ConstraintT = text "Constraint" pprParendType (SigT ty k) = parens (ppr ty <+> text "::" <+> ppr k) |