From: simonpj@microsoft.com Date: Tue, 3 Jul 2007 16:28:14 +0000 (+0000) Subject: Improve formatting of errors, and fix a typo X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=a13551ce57c67a333f41f0a6fe7e05a09d0c3614 Improve formatting of errors, and fix a typo --- diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs index 56351d7..24cf3f8 100644 --- a/compiler/typecheck/TcType.lhs +++ b/compiler/typecheck/TcType.lhs @@ -451,9 +451,9 @@ pprSkolTvBinding tv ppr_skol UnkSkol = empty -- Unhelpful; omit ppr_skol RuntimeUnkSkol = ptext SLIT("is an unknown runtime type") - ppr_skol info = ptext SLIT("is a rigid type variable bound by") - <+> sep [pprSkolInfo info, - nest 2 (ptext SLIT("at") <+> ppr (getSrcLoc tv))] + ppr_skol info = sep [ptext SLIT("is a rigid type variable bound by"), + sep [pprSkolInfo info, + nest 2 (ptext SLIT("at") <+> ppr (getSrcLoc tv))]] pprSkolInfo :: SkolemInfo -> SDoc pprSkolInfo (SigSkol ctxt) = pprUserTypeCtxt ctxt diff --git a/compiler/typecheck/TcUnify.lhs b/compiler/typecheck/TcUnify.lhs index c7082cd..821a1cc 100644 --- a/compiler/typecheck/TcUnify.lhs +++ b/compiler/typecheck/TcUnify.lhs @@ -1601,7 +1601,7 @@ ppr_ty :: TidyEnv -> TcType -> TcType -> TcM (TidyEnv, SDoc, SDoc) ppr_ty env ty other_ty = do { ty' <- zonkTcType ty ; let (env1, tidy_ty) = tidyOpenType env ty' - ; (env2, extra) <- ppr_extra env1 ty' other_ty + ; (env2, extra) <- ppr_extra env1 tidy_ty other_ty ; return (env2, quotes (ppr tidy_ty), extra) } -- (ppr_extra env ty other_ty) shows extra info about 'ty'