summaryrefslogtreecommitdiff
path: root/ghc/compiler/hsSyn/HsExpr.lhs
diff options
context:
space:
mode:
authorsimonpj <unknown>2000-11-10 15:12:55 +0000
committersimonpj <unknown>2000-11-10 15:12:55 +0000
commitf23ba2b294429ccbdeb80f0344ec08f6abf61bb7 (patch)
tree30e94ffff421c99ae25f35759e52b7e267e9e8af /ghc/compiler/hsSyn/HsExpr.lhs
parent6bd12a0cb5115d08a9ee84dbc1920e83bb7c1616 (diff)
downloadhaskell-f23ba2b294429ccbdeb80f0344ec08f6abf61bb7.tar.gz
[project @ 2000-11-10 15:12:50 by simonpj]
1. Outputable.PprStyle now carries a bit more information In particular, the printing style tells whether to print a name in unqualified form. This used to be embedded in a Name, but since Names now outlive a single compilation unit, that's no longer appropriate. So now the print-unqualified predicate is passed in the printing style, not embedded in the Name. 2. I tidied up HscMain a little. Many of the showPass messages have migraged into the repective pass drivers
Diffstat (limited to 'ghc/compiler/hsSyn/HsExpr.lhs')
-rw-r--r--ghc/compiler/hsSyn/HsExpr.lhs7
1 files changed, 3 insertions, 4 deletions
diff --git a/ghc/compiler/hsSyn/HsExpr.lhs b/ghc/compiler/hsSyn/HsExpr.lhs
index 43592185cd..4ba2e2a19f 100644
--- a/ghc/compiler/hsSyn/HsExpr.lhs
+++ b/ghc/compiler/hsSyn/HsExpr.lhs
@@ -19,7 +19,7 @@ import HsTypes ( HsType )
-- others:
import Name ( Name, isLexSym )
import Outputable
-import PprType ( pprType, pprParendType )
+import PprType ( pprParendType )
import Type ( Type )
import Var ( TyVar )
import DataCon ( DataCon )
@@ -305,8 +305,7 @@ ppr_expr (HsDoOut do_or_list_comp stmts _ _ _ _ _) = pprDo do_or_list_comp stmts
ppr_expr (ExplicitList exprs)
= brackets (fsep (punctuate comma (map ppr_expr exprs)))
ppr_expr (ExplicitListOut ty exprs)
- = hcat [ brackets (fsep (punctuate comma (map ppr_expr exprs))),
- ifNotPprForUser ((<>) space (parens (pprType ty))) ]
+ = brackets (fsep (punctuate comma (map ppr_expr exprs)))
ppr_expr (ExplicitTuple exprs boxity)
= tupleParens boxity (sep (punctuate comma (map ppr_expr exprs)))
@@ -394,7 +393,7 @@ pprParendExpr expr
\begin{code}
isOperator :: Outputable a => a -> Bool
-isOperator v = isLexSym (_PK_ (showSDoc (ppr v)))
+isOperator v = isLexSym (_PK_ (showSDocUnqual (ppr v)))
-- We use (showSDoc (ppr v)), rather than isSymOcc (getOccName v) simply so
-- that we don't need NamedThing in the context of all these functions.
-- Gruesome, but simple.