From b03781ed8049e2037a5b573918d46dcdcd4baeb1 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Wed, 14 Mar 2007 12:14:10 +0000 Subject: [PATCH] Improve typechecker error messages; see Trac #1221 --- compiler/typecheck/TcUnify.lhs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/typecheck/TcUnify.lhs b/compiler/typecheck/TcUnify.lhs index 99cd7b9..8de9f6c 100644 --- a/compiler/typecheck/TcUnify.lhs +++ b/compiler/typecheck/TcUnify.lhs @@ -721,8 +721,12 @@ tc_sub1 sub_ctxt act_sty actual_ty exp_ib exp_sty expected_ty ----------------------------------- defer_to_boxy_matching sub_ctxt act_sty actual_ty exp_ib exp_sty expected_ty = do { addSubCtxt sub_ctxt act_sty exp_sty $ - u_tys True False act_sty actual_ty exp_ib exp_sty expected_ty + u_tys outer False act_sty actual_ty exp_ib exp_sty expected_ty ; return idHsWrapper } + where + outer = case sub_ctxt of -- Ugh + SubDone -> False + other -> True ----------------------------------- tc_sub_funs act_arg act_res exp_ib exp_arg exp_res -- 1.7.10.4