From 9b3e63f4f57586f473834f8a58d766ac7b73746f Mon Sep 17 00:00:00 2001 From: sof Date: Tue, 2 Mar 1999 17:18:27 +0000 Subject: [PATCH] [project @ 1999-03-02 17:18:27 by sof] ppr bugfix for dcons that are locally qualified (omit braces around context if there isn't one.) --- ghc/compiler/main/MkIface.lhs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/main/MkIface.lhs b/ghc/compiler/main/MkIface.lhs index 5307d23..4a41a10 100644 --- a/ghc/compiler/main/MkIface.lhs +++ b/ghc/compiler/main/MkIface.lhs @@ -42,11 +42,12 @@ import CoreSyn ( CoreExpr, CoreBind, Bind(..) ) import CoreUtils ( exprSomeFreeVars ) import CoreUnfold ( calcUnfoldingGuidance, UnfoldingGuidance(..), Unfolding, okToUnfoldInHiFile ) +import Module ( moduleString, pprModule, pprModuleBoot ) import Name ( isLocallyDefined, isWiredInName, nameRdrName, nameModule, isExported, Name, NamedThing(..) ) -import OccName ( OccName, pprOccName, moduleString, pprModule, pprModuleBoot ) +import OccName ( OccName, pprOccName ) import TyCon ( TyCon, getSynTyConDefn, isSynTyCon, isNewTyCon, isAlgTyCon, tyConTheta, tyConTyVars, tyConDataCons ) @@ -543,7 +544,8 @@ ppr_decl_context [] = empty ppr_decl_context theta = pprIfaceTheta theta <+> ptext SLIT(" =>") pprIfaceTheta :: ThetaType -> SDoc -- Use braces rather than parens in interface files -pprIfaceTheta theta = braces (hsep (punctuate comma [pprConstraint c tys | (c,tys) <- theta])) +pprIfaceTheta [] = empty +pprIfaceTheta theta = braces (hsep (punctuate comma [pprConstraint c tys | (c,tys) <- theta])) \end{code} %************************************************************************ -- 1.7.10.4