From: simonpj Date: Mon, 30 Apr 2001 10:49:21 +0000 (+0000) Subject: [project @ 2001-04-30 10:48:57 by simonpj] X-Git-Tag: Approximately_9120_patches~2065 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=39068cf49bf3553f90ec316569619c310a6be8de;hp=c481ebb0eca85885e22e526ea5de43573e725199;p=ghc-hetmet.git [project @ 2001-04-30 10:48:57 by simonpj] Improve error message --- diff --git a/ghc/compiler/typecheck/TcBinds.lhs b/ghc/compiler/typecheck/TcBinds.lhs index 5bd9cae..a50bc50 100644 --- a/ghc/compiler/typecheck/TcBinds.lhs +++ b/ghc/compiler/typecheck/TcBinds.lhs @@ -473,8 +473,7 @@ generalise binder_names mbind tau_tvs lie_req sigs tysig_names = [name | (TySigInfo name _ _ _ _ _ _ _) <- sigs] - doc | null sigs = ptext SLIT("banding(s) for") <+> pprBinders binder_names - | otherwise = ptext SLIT("type signature(s) for") <+> pprBinders binder_names + doc = ptext SLIT("type signature(s) for") <+> pprBinders binder_names ----------------------- -- CHECK THAT ALL THE SIGNATURE CONTEXTS ARE UNIFIABLE @@ -827,5 +826,5 @@ restrictedBindCtxtErr binder_names ptext SLIT("that falls under the monomorphism restriction")]) -- Used in error messages -pprBinders bndrs = braces (pprWithCommas ppr bndrs) +pprBinders bndrs = pprWithCommas ppr bndrs \end{code} diff --git a/ghc/compiler/typecheck/TcInstDcls.lhs b/ghc/compiler/typecheck/TcInstDcls.lhs index 1a38a13..95add91 100644 --- a/ghc/compiler/typecheck/TcInstDcls.lhs +++ b/ghc/compiler/typecheck/TcInstDcls.lhs @@ -729,7 +729,8 @@ check_tyvars dflags clas inst_taus | otherwise = [the_err] where the_err = instTypeErr clas inst_taus msg - msg = ptext SLIT("There must be at least one non-type-variable in the instance head") + msg = ptext SLIT("There must be at least one non-type-variable in the instance head") + $$ ptext SLIT("Use -fallow-undecidable-instances to lift this restriction") check_fundeps dflags theta clas inst_taus | checkInstFDs theta clas inst_taus = []