This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Starting a repl within a package


Per Bothner <per@bothner.com> writes:

> What might be reasonable is to add a new syntax (module-package "FOO").
> This would override the -P flag to set the default package name for
> a .scm file or a repl.  This shouldn't be too difficult to do.

I don't quite understand:

bash$ bash$ java -cp .:./kawa-1.6.70.jar:. kawa.repl -P 'test.'
#|kawa:1|# (field (make <test.test>) 'i)
11
#|kawa:2|# (make <test>)
test@23b25c
#|kawa:3|# (field (make <test>) 'i)
java.lang.RuntimeException: no such field i in test


Or do you mean that the macro should compile a lambda
into a module and than invoke that?  Is it possible to
compile the following expression at run-time:

(lambda ()
 (module <test>)
 (+ 1 2 (field (this) i)))


Jost


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]