From 8e82344661dcfeac91d657861a3c77cb0cf97284 Mon Sep 17 00:00:00 2001 From: johnvg Date: Fri, 18 Nov 2005 12:27:32 +0000 Subject: correct the arities in the 'incorrect arity' error message git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1561 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/generics1.icl | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'frontend') diff --git a/frontend/generics1.icl b/frontend/generics1.icl index 95b04aa..86aa01b 100644 --- a/frontend/generics1.icl +++ b/frontend/generics1.icl @@ -1919,16 +1919,12 @@ where #! (fun=:{fun_body, fun_arity}, fun_defs) = fun_defs ! [fun_index] #! fun_ident = genericIdentToFunIdent gc_ident gc_type_cons = case fun_body of - TransformedBody tb // user defined case - | fun_arity <> st.st_arity - # error = reportError gc_ident gc_pos - ("incorrect arity " +++ toString fun_arity +++ ", expected " +++ toString st.st_arity) error + TransformedBody tb // user defined case + | fun_arity <> st.st_arity + # error = reportError gc_ident gc_pos ("incorrect arity " +++ toString (SwitchGenericInfo (fun_arity-1) fun_arity) + +++ ", expected " +++ toString (SwitchGenericInfo (st.st_arity-1) st.st_arity)) error -> (group_index, groups, fun_defs, td_infos, modules, heaps, error) - #! fun = - { fun - & fun_ident = fun_ident - , fun_type = Yes st - } + #! fun = { fun & fun_ident = fun_ident , fun_type = Yes st } #! fun_defs = { fun_defs & [fun_index] = fun } -> (group_index, groups, fun_defs, td_infos, modules, heaps, error) //---> ("update_icl_function, TransformedBody", fun.fun_ident, fun_index, st) -- cgit v1.2.3