unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: 16158@debbugs.gnu.org
Subject: bug#16158: psyntax: bug in bound-identifier=?
Date: Sun, 15 Dec 2013 19:04:04 -0500	[thread overview]
Message-ID: <87bo0hfyq3.fsf@netris.org> (raw)

While reading psyntax.scm, I noticed that the definition of 'bound-id=?'
does not match the definition in "Syntax Abstraction in Scheme" by
Dybvig, Hieb, and Bruggeman.

The paper states "Two identifiers that are bound-identifier=? are also
free-identifier=?".  The following expression shows that this is not the
case in Guile 2.0:

  (let* ((x 1) (s1 #'x)
         (x 2) (s2 #'x))
    (list (bound-identifier=? s1 s2)
          (free-identifier=? s1 s2)))
  => (#t #f)

Racket reports (#f #f) for the same expression.

According to the paper, two identifiers are 'bound-id=?' if and only if
they resolve to the same binding name (gensym) and have the same marks
(i.e. they were both introduced by the same macro instantiation, or
neither were introduced by a macro).  However, the implementation in
'psyntax.scm' does not compare the binding names (gensyms); it instead
compares only the symbolic names.

      Mark





             reply	other threads:[~2013-12-16  0:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16  0:04 Mark H Weaver [this message]
2013-12-16  0:11 ` bug#16158: psyntax: bug in bound-identifier=? Mark H Weaver
2013-12-16  7:49 ` Marco Maggi
2013-12-16 16:38   ` Mark H Weaver
2013-12-17  4:03   ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bo0hfyq3.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=16158@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).