This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: module extension
>>>>> "PB" == Per Bothner <per@bothner.com> writes:
MD> If so, should it also be possible to make Scheme modules based on
MD> Java classes that have constructors with arguments?
PB> Yes - but I haven't figured out a syntax for it - let a alone
PB> impleemnted it.
I'm not sure I understand. In the previous example, suppose that
TestbaseSimple's constructor had an "int foo" argument. Why wouldn't
syntax like "(make <testSimple> 1)" be adequate?
PB> The following patch seems to fix the problem:
Yep, it does.
Btw, in the "int foo" case above the error is:
#|kawa:2|# (make <testSimple> 1)
gnu.mapping.WrongArguments
at gnu.mapping.MethodProc.matchFailAsException(MethodProc.java:99)
at gnu.kawa.reflect.Invoke.applyN(Invoke.java:122)
at gnu.kawa.reflect.Invoke.applyN(Invoke.java:49)
at gnu.expr.ApplyExp.eval(ApplyExp.java:38)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:38)
at kawa.Shell.run(Shell.java:85)
at kawa.Shell.run(Shell.java:35)
at kawa.Shell.run(Shell.java:19)
at kawa.repl.main(repl.java:357)
#|kawa:3|#