bug-kawa
[Top][All Lists]
Advanced

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

[Bug-kawa] [bugs #12317] Reader macros not working


From: Per Bothner
Subject: [Bug-kawa] [bugs #12317] Reader macros not working
Date: Thu, 17 Mar 2005 02:10:58 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020

Follow-up Comment #2, bugs #12317 (project kawa):

For this to work the function set-dispatch-macro-character in reader1.scm
must be called when *compiling* reader2.  This used to work for static
modules when the module body was automatically run during class
initialization; I doubt it ever worked for non-static modules.

I think correct behavior is that the compiler should *not* automatically run
the bodies of required modules.  (This seems to match what MzScheme does, if
I'm reading its documentation right, which is a factor because it has been
hinted that R6RS modules will be based on MzScheme modules.)

The problem is that set-dispatch-macro-character is a function call, not a
macro definition or even syntax.

A solution/work-around is to require reader.1 before compiling:
java kawa.repl -e '(require <reader1>)' -C reader2.scm
This doesn't work with CVS Kawa, but it works with some patches I'm hoping to
check in this evening or tomorrow.

An alternative solution could make use of an '(eval-when (compile) ....)'
form similar to ChezScheme's (and Common Lisps'), combined with load (rather
than require).

    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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