aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorjohnvg2005-11-18 12:27:32 +0000
committerjohnvg2005-11-18 12:27:32 +0000
commit8e82344661dcfeac91d657861a3c77cb0cf97284 (patch)
tree74198f2aa44bf2f77efc8c3d09eb9d0f8f67f157 /frontend
parentremove code for compatibility with Clean 1.3 (diff)
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
Diffstat (limited to 'frontend')
-rw-r--r--frontend/generics1.icl14
1 files changed, 5 insertions, 9 deletions
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)