From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#16158: psyntax: bug in bound-identifier=? Date: Sun, 15 Dec 2013 19:04:04 -0500 Message-ID: <87bo0hfyq3.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1387152441 30966 80.91.229.3 (16 Dec 2013 00:07:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Dec 2013 00:07:21 +0000 (UTC) To: 16158@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Dec 16 01:07:26 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VsLiX-0003wU-4M for guile-bugs@m.gmane.org; Mon, 16 Dec 2013 01:07:25 +0100 Original-Received: from localhost ([::1]:52947 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsLiW-0000Mc-Kn for guile-bugs@m.gmane.org; Sun, 15 Dec 2013 19:07:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsLiK-0000MS-JF for bug-guile@gnu.org; Sun, 15 Dec 2013 19:07:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsLiB-0003Mh-6T for bug-guile@gnu.org; Sun, 15 Dec 2013 19:07:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsLiB-0003Lm-39 for bug-guile@gnu.org; Sun, 15 Dec 2013 19:07:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VsLiA-0005j1-J6 for bug-guile@gnu.org; Sun, 15 Dec 2013 19:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 16 Dec 2013 00:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16158 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138715236421933 (code B ref -1); Mon, 16 Dec 2013 00:07:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Dec 2013 00:06:04 +0000 Original-Received: from localhost ([127.0.0.1]:52349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VsLhD-0005hg-SG for submit@debbugs.gnu.org; Sun, 15 Dec 2013 19:06:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59095) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VsLh7-0005hB-Tx for submit@debbugs.gnu.org; Sun, 15 Dec 2013 19:05:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsLgy-0003E0-34 for submit@debbugs.gnu.org; Sun, 15 Dec 2013 19:05:57 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:46540) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsLgx-0003Dw-W3 for submit@debbugs.gnu.org; Sun, 15 Dec 2013 19:05:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsLgq-0008G1-Kp for bug-guile@gnu.org; Sun, 15 Dec 2013 19:05:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsLgj-0003Bw-Bi for bug-guile@gnu.org; Sun, 15 Dec 2013 19:05:40 -0500 Original-Received: from world.peace.net ([96.39.62.75]:48999) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsLgj-0003Bq-1J for bug-guile@gnu.org; Sun, 15 Dec 2013 19:05:33 -0500 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1VsLgc-0005E0-Hh; Sun, 15 Dec 2013 19:05:26 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7361 Archived-At: 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