Commit 9b3e63f4 authored by sof's avatar sof
Browse files

[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.)
parent 94ff1ec1
......@@ -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}
%************************************************************************
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment