GNU bug report logs -
#16158
psyntax: bug in bound-identifier=?
Previous Next
Reported by: Mark H Weaver <mhw <at> netris.org>
Date: Mon, 16 Dec 2013 00:07:02 UTC
Severity: normal
Tags: notabug
Done: Mark H Weaver <mhw <at> netris.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
This bug report was last modified 11 years and 163 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.