bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bugs #11577] gnu.mapping.InheritingEnvironment not seeing sy


From: tk
Subject: [Bug-kawa] [bugs #11577] gnu.mapping.InheritingEnvironment not seeing symbols in parent environment
Date: Tue, 15 Feb 2005 18:57:59 +0000
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12

Follow-up Comment #5, bugs #11577 (project kawa):

thanks for the fixes, this is working much better -- but there are still 

a few cases where symbols aren't being inherited properly.



1. Inheriting environments only share symbols that existed before the

child environment is created. Symbols subsequently defined in either 

the child or parent environment aren't seen in the other.

(this isn't necessarily unreasonable behavior, but it's different

than the earlier implementation of environments).



2. Some predefined symbols (e.g. those defined in kawa.standard.Scheme) that


exist in the parent environment aren't seen in the inheriting environment 

unless the symbol has been retrieved (say, for printing). For example, 

the symbol "eval" (r5rs-environment) or "sleep" (kawa-environment) aren't

visible in a child environment unless the symbol has been referenced 

in the parent environment. 



3. this case is a bit more peculiar, as I thought that primitive and java 

class type names were treated as literals. Referencing any of these 

names (e.g. <int> or <java.lang.Object>) in a child environment will throw 

an UnboundLocationException unless the name was seen in the parent
environment 

before the new environment was created.





to reproduce:



$ CLASSPATH=kawa-1.7.91.jar rlwrap java kawa.repl



#|kawa:1|# (define x 1)



#|kawa:2|# <long>

Type long



#|kawa:3|# sleep

#<procedure sleep>



#|kawa:4|# (scheme-window #t)

kawa.GuiConsole[frame0,100,50,700x500,layout=java.awt.BorderLayout,title=Kawa,resizable,normal]



#|kawa:5|# (define y 1)



#|kawa:6|# z

gnu.mapping.UnboundLocationException: unbound location z

        at gnu.expr.ReferenceExp.eval(ReferenceExp.java:93)

        at gnu.expr.Expression.apply(Expression.java:28)

        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:190)

        at kawa.Shell.run(Shell.java:231)

        at kawa.Shell.run(Shell.java:177)

        at kawa.Shell.run(Shell.java:164)

        at kawa.Shell.run(Shell.java:151)

        at kawa.repl.main(repl.java:672)

#|kawa:7|# 







;; in scheme window:

;; first 3 cases ok, as these were seen in parent 

;; before current environment was created:



#|kawa:1|# x

1

#|kawa:2|# <long>

Type long



#|kawa:3|# sleep

#<procedure sleep>



#|kawa:4|# y

gnu.mapping.UnboundLocationException: unbound location y

        at gnu.expr.ReferenceExp.eval(ReferenceExp.java:93)

        at gnu.expr.Expression.apply(Expression.java:28)

        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:190)

        at kawa.Shell.run(Shell.java:231)

        at kawa.Shell.run(Shell.java:177)

        at kawa.Shell.run(Shell.java:164)

        at kawa.repl.apply0(repl.java:27)

        at gnu.mapping.Future.run(Future.java:50)



#|kawa:5|# <int> 

gnu.mapping.UnboundLocationException: unbound location <int>

        at gnu.expr.ReferenceExp.eval(ReferenceExp.java:93)

        at gnu.expr.Expression.apply(Expression.java:28)

        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:190)

        at kawa.Shell.run(Shell.java:231)

        at kawa.Shell.run(Shell.java:177)

        at kawa.Shell.run(Shell.java:164)

        at kawa.repl.apply0(repl.java:27)

        at gnu.mapping.Future.run(Future.java:50)



#|kawa:6|# eval

gnu.mapping.UnboundLocationException: unbound location eval

        at gnu.expr.ReferenceExp.eval(ReferenceExp.java:93)

        at gnu.expr.Expression.apply(Expression.java:28)

        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:190)

        at kawa.Shell.run(Shell.java:231)

        at kawa.Shell.run(Shell.java:177)

        at kawa.Shell.run(Shell.java:164)

        at kawa.repl.apply0(repl.java:27)

        at gnu.mapping.Future.run(Future.java:50)



#|kawa:7|# (define z 1)

#|kawa:8|# 

    _______________________________________________________

This item URL is:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11577>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]