bugKawa - Bugs: bug #24369, Use of colon in define in...

 
 

bug #24369: Use of colon in define in evaluated form does not bind properly in environment.

Submitted by:  None
Submitted on:  Wed 24 Sep 2008 07:08:20 PM UTC  
 
Category: Scheme languageSeverity: 3 - Normal
Item Group: Run-time exceptionStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 24 Sep 2008 07:11:54 PM UTC, comment #1:

this affects both 1.9.1 and TRUNK

Anonymous
Wed 24 Sep 2008 07:08:20 PM UTC, original submission:

examples:

works:

(define my-env (interaction-environment))

(define (eval:something)
(eval '(define (with:colon x) (+ x 1)) my-env))

(eval:something)
(display (with:colon 1)) (newline)

also works:

(define my-env (interaction-environment))

(define (eval:something)
(eval '(define (nocolon x) (+ x 1)) my-env)
(display (nocolon 1)) (newline))

(eval:something)

fails:

(define my-env (interaction-environment))

(define (eval:something)
(eval '(define (with:colon x) (+ x 1)) my-env)
(display (environment-bound? (interaction-environment) 'with:colon)) (newline)
(display (environment-bound? my-env 'with:colon)) (newline)
(display (with:colon 1)) (newline))

(eval:something)

->

#|kawa:1|# (load "bugs/kawa/eval/fail.scm")
#t
#t
bugs/kawa/eval/fail.scm:7:13: unbound location with
at gnu.mapping.Location.get(Location.java:67)
at atInteractiveLevel$3.eval$ClSomething(fail.scm:7)
at atInteractiveLevel$3.apply0(fail.scm:3)
at gnu.expr.ModuleMethod.apply0(ModuleMethod.java:176)
at gnu.expr.ModuleMethod.apply(ModuleMethod.java:150)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:251)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:296)
at kawa.Shell.run(Shell.java:230)
at kawa.standard.load.loadSource(load.java:110)
at kawa.standard.load.apply(load.java:210)
at kawa.standard.load.apply2(load.java:147)
at kawa.standard.load.apply1(load.java:138)
at gnu.mapping.Procedure.apply(Procedure.java:112)
at gnu.mapping.Procedure.apply(Procedure.java:95)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:251)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:296)
at kawa.Shell.run(Shell.java:230)
at kawa.Shell.run(Shell.java:172)
at kawa.Shell.run(Shell.java:159)
at kawa.repl.main(repl.java:844)
#|kawa:2|# make: *** [repl] Error 130

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup