From: sof Date: Mon, 26 May 1997 01:29:22 +0000 (+0000) Subject: [project @ 1997-05-26 01:29:22 by sof] X-Git-Tag: Approximately_1000_patches_recorded~566 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=680cb8f0c76652fc4c44f7e72bc3e9ab2d6dafb4;p=ghc-hetmet.git [project @ 1997-05-26 01:29:22 by sof] Improved ppr of error messages --- diff --git a/ghc/compiler/typecheck/TcSimplify.lhs b/ghc/compiler/typecheck/TcSimplify.lhs index c1d9ec6..eddc3d3 100644 --- a/ghc/compiler/typecheck/TcSimplify.lhs +++ b/ghc/compiler/typecheck/TcSimplify.lhs @@ -44,8 +44,7 @@ import Id ( GenId ) import PrelInfo ( isNumericClass, isStandardClass, isCcallishClass ) import Maybes ( expectJust, firstJust, catMaybes, seqMaybe, maybeToBool ) -import Outputable ( Outputable(..){-instance * []-} ) -import PprStyle +import Outputable ( PprStyle, Outputable(..){-instance * []-} ) import PprType ( GenType, GenTyVar ) import Pretty import SrcLoc ( noSrcLoc ) @@ -719,7 +718,8 @@ genCantGenErr insts sty -- Can't generalise these Insts \begin{code} ambigErr insts sty - = vcat (map (pprInst sty "Ambiguous overloading") insts) + = hang (ptext SLIT("Ambiguous overloading")) + 4 (vcat (map (pprInst sty) insts)) \end{code} @reduceErr@ complains if we can't express required dictionaries in @@ -727,8 +727,8 @@ terms of the signature. \begin{code} reduceErr insts sty - = vcat (map (pprInst sty "Context required by inferred type, but missing on a type signature") - (bagToList insts)) + = hang (ptext (SLIT("Context required by inferred type, but missing on a type signature"))) + 4 (vcat (map (pprInst sty) (bagToList insts))) \end{code}