This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Problem with define-private
- To: kawa at sourceware dot cygnus dot com
- Subject: Problem with define-private
- From: Jocelyn Paine <popx at pop3 dot ifs dot org dot uk>
- Date: Tue, 30 Jan 2001 08:18:34 +0000 (GMT)
Something odd about define-private. Here's a simple
program:
(module-name 't)
(module-static #t)
(define (f)
(g)
)
(define-private (g)
(begin
(write 'g)
(newline)
)
)
I load it and call f, and then g isn't found:
(load "t.scm")
#|kawa:2|# (f)
gnu.mapping.UnboundSymbol: Unbound symbol g
at kawa.standard.ScmEnvConstraint.get(ScmEnv.java:74)
at gnu.mapping.Constraint.getProcedure(Constraint.java:28)
at gnu.mapping.Binding.getProcedure(Binding.java:23)
at atInteractiveLevel.f(Unknown Source)
at atInteractiveLevel.apply0(Compiled Code)
at atInteractiveLevel.apply0(Compiled Code)
at gnu.expr.ModuleBody.applyN(ModuleBody.java:93)
at gnu.expr.ModuleMethod.applyN(ModuleMethod.java:61)
at gnu.expr.ApplyExp.eval(Compiled Code)
Confusing, this is. Shouldn't g be visible within
the current module, including inside f?
Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091