i defined a user defined function "binarycopy",when i use my function, there is error:
sql>select binarycopy('starid','1111',1);
TypeException:user.s1_1[5]:'svom.binarycopy' undefined in: _9:any := svom.binarycopy(_6:str, _7:str, _8:int)
program contains errors

i want to debug the error with mal, there also some error:

[svomhpc@localhost /home/data1]$>mclient -l mal -u monetdb -d mydb4
password:
Welcome to mclient, the MonetDB interactive terminal (unreleased)
Type \q to quit, \? for a list of available commands
mal>
mal>
mal>function test(i:int):str;
mal>io.print(i);
mal>i:=i*2;
mal>b:=bat.new(:int,:int);
mal>bat.insert(b,1,i);
mal>io.print(b);
mal>return test:= "ok";
mal>end test;
MAPI  = (monetdb) /tmp/.s.monetdb.50000
QUERY = end test;
ERROR = !TypeException:user.test[3]:'bat.new' undefined in: b:any := bat.new(_5:int, _6:int)
        !TypeException:user.test[4]:'bat.insert' undefined in: _7:any := bat.insert(b:any, _8:int, i:int)
mal>

could anyone tell me how to debug my function ,please?

Thanks!