X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypes%2FTypeRep.lhs;h=fafbaab1d27df759b5ad8d84504350ee0f9070fe;hp=55beb28da186117bcb58638c9309eddb7ec64bf7;hb=d2ce0f52d42edf32bb9f13796e6ba6edba8bd516;hpb=fc7a2876f23510ab795ab2098bbac278d29d6356 diff --git a/compiler/types/TypeRep.lhs b/compiler/types/TypeRep.lhs index 55beb28..fafbaab 100644 --- a/compiler/types/TypeRep.lhs +++ b/compiler/types/TypeRep.lhs @@ -449,13 +449,14 @@ pprClassPred :: Class -> [Type] -> SDoc pprClassPred clas tys = ppr_type_app TopPrec (getName clas) tys pprTheta :: ThetaType -> SDoc -pprTheta theta = parens (sep (punctuate comma (map pprPred theta))) +-- pprTheta [pred] = pprPred pred -- I'm in two minds about this +pprTheta theta = parens (sep (punctuate comma (map pprPred theta))) pprThetaArrow :: ThetaType -> SDoc pprThetaArrow [] = empty pprThetaArrow [pred] - | noParenPred pred = pprPred pred <+> ptext (sLit "=>") -pprThetaArrow preds = parens (sep (punctuate comma (map pprPred preds))) <+> ptext (sLit "=>") + | noParenPred pred = pprPred pred <+> darrow +pprThetaArrow preds = parens (sep (punctuate comma (map pprPred preds))) <+> darrow noParenPred :: PredType -> Bool -- A predicate that can appear without parens before a "=>"