summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2006-08-08 08:02:55 +0000
committersimonpj@microsoft.com <unknown>2006-08-08 08:02:55 +0000
commitd2b27dcd73c7d3aa21059e2a26ee7923fd7bca0a (patch)
treee95c9d0eadca4d2209013f19ce6059489a719be7 /compiler
parentd7fdebe8a174f968b63c98845cb16577e444ee13 (diff)
downloadhaskell-d2b27dcd73c7d3aa21059e2a26ee7923fd7bca0a.tar.gz
Improve error message
Improve a little-used error message. Given f :: a -> a f x y = e the error says The equations for f have two arguments but its type `a -> a' has only one (Before, it said "its type `a' has only one" which is bogus.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/typecheck/TcUnify.lhs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/typecheck/TcUnify.lhs b/compiler/typecheck/TcUnify.lhs
index c13da2cef5..f9936e7f87 100644
--- a/compiler/typecheck/TcUnify.lhs
+++ b/compiler/typecheck/TcUnify.lhs
@@ -168,7 +168,7 @@ subFunTys error_herald n_pats res_ty thing_inside
loop n args_so_far res_ty@(AppTy _ _)
= do { [arg_ty',res_ty'] <- newBoxyTyVarTys [argTypeKind, openTypeKind]
; (_, mb_unit) <- tryTcErrs $ boxyUnify res_ty (FunTy arg_ty' res_ty')
- ; if isNothing mb_unit then bale_out args_so_far res_ty
+ ; if isNothing mb_unit then bale_out args_so_far
else loop n args_so_far (FunTy arg_ty' res_ty') }
loop n args_so_far (TyVarTy tv)
@@ -185,9 +185,9 @@ subFunTys error_herald n_pats res_ty thing_inside
-- Note argTypeKind: the args can have an unboxed type,
-- but not an unboxed tuple.
- loop n args_so_far res_ty = bale_out args_so_far res_ty
+ loop n args_so_far res_ty = bale_out args_so_far
- bale_out args_so_far res_ty
+ bale_out args_so_far
= do { env0 <- tcInitTidyEnv
; res_ty' <- zonkTcType res_ty
; let (env1, res_ty'') = tidyOpenType env0 res_ty'