summaryrefslogtreecommitdiff
path: root/compiler/GHC/Hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Hs')
-rw-r--r--compiler/GHC/Hs/Expr.hs2
-rw-r--r--compiler/GHC/Hs/Pat.hs4
-rw-r--r--compiler/GHC/Hs/Type.hs6
3 files changed, 6 insertions, 6 deletions
diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs
index 5c40d351ec..b24531f790 100644
--- a/compiler/GHC/Hs/Expr.hs
+++ b/compiler/GHC/Hs/Expr.hs
@@ -549,7 +549,7 @@ ppr_expr (ExplicitTuple _ exprs boxity)
-- `Solo x`, not `(x)`
| [Present _ expr] <- exprs
, Boxed <- boxity
- = hsep [text (mkTupleStr Boxed 1), ppr expr]
+ = hsep [text (mkTupleStr Boxed dataName 1), ppr expr]
| otherwise
= tupleParens (boxityTupleSort boxity) (fcat (ppr_tup_args exprs))
where
diff --git a/compiler/GHC/Hs/Pat.hs b/compiler/GHC/Hs/Pat.hs
index 3d251103ce..39a788aab5 100644
--- a/compiler/GHC/Hs/Pat.hs
+++ b/compiler/GHC/Hs/Pat.hs
@@ -81,7 +81,7 @@ import GHC.Core.Type
import GHC.Types.SrcLoc
import GHC.Data.Bag -- collect ev vars from pats
import GHC.Data.Maybe
-import GHC.Types.Name (Name)
+import GHC.Types.Name (Name, dataName)
import GHC.Driver.Session
import qualified GHC.LanguageExtensions as LangExt
import Data.Data
@@ -353,7 +353,7 @@ pprPat (TuplePat _ pats bx)
-- `Solo x`, not `(x)`
| [pat] <- pats
, Boxed <- bx
- = hcat [text (mkTupleStr Boxed 1), pprParendLPat appPrec pat]
+ = hcat [text (mkTupleStr Boxed dataName 1), pprParendLPat appPrec pat]
| otherwise
= tupleParens (boxityTupleSort bx) (pprWithCommas ppr pats)
pprPat (SumPat _ pat alt arity) = sumParens (pprAlternative ppr pat alt arity)
diff --git a/compiler/GHC/Hs/Type.hs b/compiler/GHC/Hs/Type.hs
index 770a91b35a..5e614ff79d 100644
--- a/compiler/GHC/Hs/Type.hs
+++ b/compiler/GHC/Hs/Type.hs
@@ -102,7 +102,7 @@ import GHC.Parser.Annotation
import GHC.Types.Fixity ( LexicalFixity(..) )
import GHC.Types.Id ( Id )
import GHC.Types.SourceText
-import GHC.Types.Name( Name, NamedThing(getName) )
+import GHC.Types.Name( Name, NamedThing(getName), tcName )
import GHC.Types.Name.Reader ( RdrName )
import GHC.Types.Var ( VarBndr )
import GHC.Core.TyCo.Rep ( Type(..) )
@@ -1145,7 +1145,7 @@ ppr_mono_ty (HsTupleTy _ con tys)
-- `Solo x`, not `(x)`
| [ty] <- tys
, BoxedTuple <- std_con
- = sep [text (mkTupleStr Boxed 1), ppr_mono_lty ty]
+ = sep [text (mkTupleStr Boxed tcName 1), ppr_mono_lty ty]
| otherwise
= tupleParens std_con (pprWithCommas ppr tys)
where std_con = case con of
@@ -1170,7 +1170,7 @@ ppr_mono_ty (HsExplicitTupleTy _ tys)
-- Special-case unary boxed tuples so that they are pretty-printed as
-- `'Solo x`, not `'(x)`
| [ty] <- tys
- = quote $ sep [text (mkTupleStr Boxed 1), ppr_mono_lty ty]
+ = quote $ sep [text (mkTupleStr Boxed tcName 1), ppr_mono_lty ty]
| otherwise
= quote $ parens (maybeAddSpace tys $ interpp'SP tys)
ppr_mono_ty (HsTyLit _ t) = ppr t