From 4bb675ba4243314baf3b41dbea01511fdc3ae729 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Wed, 20 Oct 2010 11:22:44 -0700 Subject: [PATCH] Print better error messages when the number of type params is wrong --- src/boot/me/semant.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/boot/me/semant.ml b/src/boot/me/semant.ml index 1e568df05c2..efa64c9ce53 100644 --- a/src/boot/me/semant.ml +++ b/src/boot/me/semant.ml @@ -978,7 +978,12 @@ let rec rebuild_ty_under_params (resolve_names:bool) : Ast.ty = if (Array.length params) <> (Array.length args) - then err None "mismatched type-params" + then + err None + "mismatched type-params: %s has %d param(s) but %d given" + (Ast.sprintf_ty () ty) + (Array.length params) + (Array.length args) else let nmap = Hashtbl.create (Array.length args) in let pmap = Hashtbl.create (Array.length args) in