From ba0e6b67209e33561469e80adae5aafc211d3171 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 24 Sep 2009 12:41:28 +0000 Subject: [PATCH] Errors talking about a left section should refer to the "first" argument rather than the "second" argument. Fixes trac #3505. --- compiler/typecheck/TcExpr.lhs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/typecheck/TcExpr.lhs b/compiler/typecheck/TcExpr.lhs index 4ccd89c..98942a4 100644 --- a/compiler/typecheck/TcExpr.lhs +++ b/compiler/typecheck/TcExpr.lhs @@ -261,7 +261,7 @@ tcExpr in_expr@(SectionL arg1 lop@(L loc op)) res_ty <+> ptext (sLit "takes one argument") tc_args arg2_ty' qtvs qtys [arg1_ty, arg2_ty] = do { boxyUnify arg2_ty' (substTyWith qtvs qtys arg2_ty) - ; arg1' <- tcArg lop 2 arg1 qtvs qtys arg1_ty + ; arg1' <- tcArg lop 1 arg1 qtvs qtys arg1_ty ; qtys' <- mapM refineBox qtys -- c.f. tcArgs ; return (qtys', arg1') } tc_args _ _ _ _ = panic "tcExpr SectionL" -- 1.7.10.4