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]

Problem with define-private


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 




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