diff options
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/typecheck/TcDeriv.hs | 2 | ||||
| -rw-r--r-- | compiler/typecheck/TcErrors.hs | 8 | ||||
| -rw-r--r-- | compiler/types/TypeRep.hs | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/compiler/typecheck/TcDeriv.hs b/compiler/typecheck/TcDeriv.hs index 8b7af86126..960b03f7fa 100644 --- a/compiler/typecheck/TcDeriv.hs +++ b/compiler/typecheck/TcDeriv.hs @@ -1396,7 +1396,7 @@ cond_functorOK allowFunctions (_, rep_tc, _) | not (null bad_stupid_theta) = NotValid (ptext (sLit "Data type") <+> quotes (ppr rep_tc) - <+> ptext (sLit "must not have a class context") <+> pprTheta bad_stupid_theta) + <+> ptext (sLit "must not have a class context:") <+> pprTheta bad_stupid_theta) | otherwise = allValid (map check_con data_cons) diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs index 44fbadb744..23cc0481f1 100644 --- a/compiler/typecheck/TcErrors.hs +++ b/compiler/typecheck/TcErrors.hs @@ -891,7 +891,7 @@ mkTyVarEqErr dflags ctxt extra ct oriented tv1 ty2 tclvl_extra = nest 2 $ sep [ quotes (ppr tv1) <+> ptext (sLit "is untouchable") - , nest 2 $ ptext (sLit "inside the constraints") <+> pprEvVarTheta given + , nest 2 $ ptext (sLit "inside the constraints:") <+> pprEvVarTheta given , nest 2 $ ptext (sLit "bound by") <+> ppr skol_info , nest 2 $ ptext (sLit "at") <+> ppr (tcl_loc env) ] tv_extra = extraTyVarInfo ctxt tv1 ty2 @@ -962,15 +962,15 @@ misMatchOrCND ctxt ct oriented ty1 ty2 couldNotDeduce :: [UserGiven] -> (ThetaType, CtOrigin) -> SDoc couldNotDeduce givens (wanteds, orig) - = vcat [ addArising orig (ptext (sLit "Could not deduce") <+> pprTheta wanteds) + = vcat [ addArising orig (ptext (sLit "Could not deduce:") <+> pprTheta wanteds) , vcat (pp_givens givens)] pp_givens :: [UserGiven] -> [SDoc] pp_givens givens = case givens of [] -> [] - (g:gs) -> ppr_given (ptext (sLit "from the context")) g - : map (ppr_given (ptext (sLit "or from"))) gs + (g:gs) -> ppr_given (ptext (sLit "from the context:")) g + : map (ppr_given (ptext (sLit "or from:"))) gs where ppr_given herald (gs, skol_info, _, loc) = hang (herald <+> pprEvVarTheta gs) diff --git a/compiler/types/TypeRep.hs b/compiler/types/TypeRep.hs index e4982b27a3..03faf5017d 100644 --- a/compiler/types/TypeRep.hs +++ b/compiler/types/TypeRep.hs @@ -525,7 +525,7 @@ pprClassPred clas tys = pprTypeApp (classTyCon clas) tys ------------ pprTheta :: ThetaType -> SDoc --- pprTheta [pred] = pprPred pred -- I'm in two minds about this +pprTheta [pred] = ppr_type TopPrec pred -- I'm in two minds about this pprTheta theta = parens (sep (punctuate comma (map (ppr_type TopPrec) theta))) pprThetaArrowTy :: ThetaType -> SDoc |
