[Top][All Lists]

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-124-g70c74

From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.9-124-g70c74b8
Date: Mon, 16 Dec 2013 00:11:02 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

The branch, stable-2.0 has been updated
       via  70c74b847680d3b239e591afa2e99c51a712980c (commit)
      from  032a16fced2128626e13e6964ea39f1c8fe44091 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 70c74b847680d3b239e591afa2e99c51a712980c
Author: Mark H Weaver <address@hidden>
Date:   Sun Dec 15 19:04:59 2013 -0500

    Fix bound-identifier=? to compare binding names, not just symbolic names.
    Fixes <>.
    * module/ice-9/psyntax.scm (bound-id=?): Use 'id-var-name' to compare
      binding names (gensyms), not just symbolic names.
    * module/ice-9/psyntax-pp.scm: Regenerate.
    * test-suite/tests/syntax.test: Add test.


Summary of changes:
 module/ice-9/psyntax-pp.scm  |    1 +
 module/ice-9/psyntax.scm     |    1 +
 test-suite/tests/syntax.test |    5 +++++
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/module/ice-9/psyntax-pp.scm b/module/ice-9/psyntax-pp.scm
index f5f764b..af5b61b 100644
--- a/module/ice-9/psyntax-pp.scm
+++ b/module/ice-9/psyntax-pp.scm
@@ -484,6 +484,7 @@
      (lambda (i j)
        (if (and (syntax-object? i) (syntax-object? j))
          (and (eq? (syntax-object-expression i) (syntax-object-expression j))
+              (eq? (id-var-name i '(())) (id-var-name j '(())))
                 (car (syntax-object-wrap i))
                 (car (syntax-object-wrap j))))
diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm
index fa009d2..21dce12 100644
--- a/module/ice-9/psyntax.scm
+++ b/module/ice-9/psyntax.scm
@@ -885,6 +885,7 @@
         (if (and (syntax-object? i) (syntax-object? j))
             (and (eq? (syntax-object-expression i)
                       (syntax-object-expression j))
+                 (eq? (id-var-name i empty-wrap) (id-var-name j empty-wrap))
                  (same-marks? (wrap-marks (syntax-object-wrap i))
                               (wrap-marks (syntax-object-wrap j))))
             (eq? i j))))
diff --git a/test-suite/tests/syntax.test b/test-suite/tests/syntax.test
index 6fac0ba..a608af6 100644
--- a/test-suite/tests/syntax.test
+++ b/test-suite/tests/syntax.test
@@ -1172,6 +1172,11 @@
        (r 'outer))
+(pass-if "bound-identifier=?"
+  (let* ((x 1) (s1 #'x)
+         (x 2) (s2 #'x))
+    (not (bound-identifier=? s1 s2))))
 (with-test-prefix "syntax-case"
   (pass-if-syntax-error "duplicate pattern variable"

GNU Guile

reply via email to

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