From 5e6e6b8bb75bac436b4dd9f0fd3b518cdd707652 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Fri, 11 Aug 2006 13:33:17 +0000 Subject: [PATCH] Improve error message layouts --- compiler/typecheck/TcBinds.lhs | 3 ++- compiler/typecheck/TcUnify.lhs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/typecheck/TcBinds.lhs b/compiler/typecheck/TcBinds.lhs index d9b76d2..e189a98 100644 --- a/compiler/typecheck/TcBinds.lhs +++ b/compiler/typecheck/TcBinds.lhs @@ -499,7 +499,8 @@ checkStrictBinds top_lvl rec_group mbind mono_tys infos check_sig other = return () strictBindErr flavour unlifted mbind - = hang (text flavour <+> msg <+> ptext SLIT("aren't allowed:")) 4 (ppr mbind) + = hang (text flavour <+> msg <+> ptext SLIT("aren't allowed:")) + 4 (pprLHsBinds mbind) where msg | unlifted = ptext SLIT("bindings for unlifted types") | otherwise = ptext SLIT("bang-pattern bindings") diff --git a/compiler/typecheck/TcUnify.lhs b/compiler/typecheck/TcUnify.lhs index e8fb134..eba9985 100644 --- a/compiler/typecheck/TcUnify.lhs +++ b/compiler/typecheck/TcUnify.lhs @@ -1515,7 +1515,7 @@ notMonoType ty = do { ty' <- zonkTcType ty ; env0 <- tcInitTidyEnv ; let (env1, tidy_ty) = tidyOpenType env0 ty' - msg = ptext SLIT("Cannot match a monotype with") <+> ppr tidy_ty + msg = ptext SLIT("Cannot match a monotype with") <+> quotes (ppr tidy_ty) ; failWithTcM (env1, msg) } occurCheck tyvar ty -- 1.7.10.4