From 272b8960b1247d04e1e1bdec6e0269114d5d1844 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 8 Oct 2017 00:52:57 -0400 Subject: - WIP: JVM field analysis. --- new-luxc/source/luxc/analyser/procedure/common.lux | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'new-luxc/source/luxc/analyser/procedure/common.lux') diff --git a/new-luxc/source/luxc/analyser/procedure/common.lux b/new-luxc/source/luxc/analyser/procedure/common.lux index c1ca36b17..ffb87a2ca 100644 --- a/new-luxc/source/luxc/analyser/procedure/common.lux +++ b/new-luxc/source/luxc/analyser/procedure/common.lux @@ -33,9 +33,9 @@ (list/map (function [[key val]] [(format prefix " " key) val])) (d;from-list text;Hash))) -(def: #export (wrong-amount-error proc expected actual) +(def: #export (wrong-arity proc expected actual) (-> Text Nat Nat Text) - (format "Wrong number of arguments for " (%t proc) "\n" + (format "Wrong arity for " (%t proc) "\n" "Expected: " (|> expected nat-to-int %i) "\n" " Actual: " (|> actual nat-to-int %i))) @@ -55,7 +55,7 @@ _ (&;within-type-env (TC;check expected output-type))] (wrap (#la;Procedure proc argsA))) - (&;fail (wrong-amount-error proc num-expected num-actual))))))) + (&;fail (wrong-arity proc num-expected num-actual))))))) (def: #export (nullary valueT proc) (-> Type Text Proc) @@ -103,7 +103,7 @@ (wrap (#la;Procedure proc (list opA)))) _ - (&;fail (wrong-amount-error proc +1 (list;size args)))))))) + (&;fail (wrong-arity proc +1 (list;size args)))))))) (def: lux-procs Bundle @@ -296,7 +296,7 @@ (wrap (#la;Procedure proc (list initA)))) _ - (&;fail (wrong-amount-error proc +1 (list;size args)))))))) + (&;fail (wrong-arity proc +1 (list;size args)))))))) (def: (atom-read proc) (-> Text Proc) -- cgit v1.2.3