bugKawa - Bugs: bug #5113, define-namespace aliases inside...

 
 

bug #5113: define-namespace aliases inside define-syntax

Submitted by:  Chris Dean <ctdean>
Submitted on:  Sun 07 Sep 2003 06:12:55 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 09 Sep 2003 04:16:32 AM UTC, comment #4:

I checked in a fix to kawa.lang.Translator.

Per Bothner <bothner>
Project Administrator
Mon 08 Sep 2003 06:02:26 AM UTC, comment #3:

This doesn't appear to be a trivial fix.
In Kawa, mapping prefixes to namespaces is done at
name resolution time, not "read" time. (Unlike
Common Lisp package prefixes.) Name resolution
happens after macro expansion, and hygiene
renaming is part of the macro expansion.
So we have to "undo" hygiene renaming. We
already do this in Translator.rewrite(Object,boolean),
which is where the namespace resolution is handled.
I'm looking into "fixing" the rewrite method.

Per Bothner <bothner>
Project Administrator
Mon 08 Sep 2003 04:40:30 AM UTC, comment #2:

Ok, try this. Make Bar.scm

(module-name <Bar>)
(require <Foo>)
(run-it)

and compile it with "java kawa.repl --main -C Bar.scm" and then run "java Bar". I get:

gnu.mapping.UnboundSymbol: Unbound symbol date:parse
at gnu.expr.Interpreter.getDefaultSymbolValue(Interpreter.java:638)
at gnu.expr.Interpreter.getSymbolProcedure(Interpreter.java:655)
at Foo.runIt(Foo.scm:18)
at Bar.apply(Bar.scm:6)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:289)
at gnu.expr.ModuleBody.runAsMain(ModuleBody.java:95)
at Bar.main(Bar.scm)

Chris Dean <ctdean>
Mon 08 Sep 2003 04:34:42 AM UTC, comment #1:

It seems to work for me:
$ java kawa.repl -C ~/tmp/Foo.scm
(compiling /Users/bothner/tmp/Foo.scm)
$ java kawa.repl
#|kawa:1|# (require <Foo>)
#|kawa:2|# (run-it)
1062831600000

Per Bothner <bothner>
Project Administrator
Sun 07 Sep 2003 06:12:55 AM UTC, original submission:

Kawa doesn't recognize aliases created with define-namespace when the alias is used inside a define-syntax form. See the attached file.

Chris Dean <ctdean>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #647:  Foo.scm added by ctdean (249B - application/octet-stream)

 

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):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Tue 09 Sep 2003 04:16:32 AM UTCbothnerOpen/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1