bug-kawa
[Top][All Lists]
Advanced

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

[Bug-kawa] [bug #17229] Hygienic macros permit capture of top-level bind


From: Dean Ferreyra
Subject: [Bug-kawa] [bug #17229] Hygienic macros permit capture of top-level bindings
Date: Fri, 28 Jul 2006 15:03:32 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5

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

                 Summary: Hygienic macros permit capture of top-level
bindings
                 Project: Kawa
            Submitted by: dferreyra
            Submitted on: Friday 07/28/2006 at 15:03
                Category: Scheme language
                Severity: 3 - Normal
              Item Group: Unexpected result
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:

The attached sample generates the following errors on compile:

% java -jar kawa-1.8.1alpha.jar -C ~/capture.scm
(compiling /home/dferreyra/capture.scm)
/home/dferreyra/capture.scm:14:16: warning - duplicate definition of
'*the-cache*' here
/home/dferreyra/capture.scm:14:16: warning - previous definition of
'*the-cache*' here
/home/dferreyra/capture.scm:15:16: warning - duplicate definition of
'*the-cache-has-been-set?*' here
/home/dferreyra/capture.scm:15:16: warning - previous definition of
'*the-cache-has-been-set?*' here
(compiling /home/dferreyra/capture.scm to capture)

Expected behavior: since *the-cache* and *the-cache-has-been-set?* are free
identifiers in the scope of the define-syntax form (i.e., the module that the
file defines does not bind them anywhere), then they should be each be
rewritten as some unique symbol at expansion-time.

In the repl it seems to work fine:

  #|kawa:26|# (foo)
  foo!
  foo
  #|kawa:27|# (bar)
  bar!
  bar
  #|kawa:28|# (foo)
  foo
  #|kawa:29|# (bar)
  bar

and it works under Scheme 48 1.3 and DrScheme version 350.

This is on a recent svn pull, revision 5372.

This was discovered by Luis.





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Friday 07/28/2006 at 15:03  Name: capture.scm  Size: 742B   By:
dferreyra

<http://savannah.gnu.org/bugs/download.php?file_id=10435>

    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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