From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.bugs Subject: bug#18245: [master branch] Useless imported module cause strange problem Date: Mon, 11 Aug 2014 17:14:48 +0800 Organization: HFG Message-ID: <1407748488.5167.7.camel@Renee-desktop.suse> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-pZ474uMQOVMzmEKykDB8" X-Trace: ger.gmane.org 1407748592 31757 80.91.229.3 (11 Aug 2014 09:16:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Aug 2014 09:16:32 +0000 (UTC) To: 18245@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Aug 11 11:16:26 2014 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 1XGliL-0000R4-EZ for guile-bugs@m.gmane.org; Mon, 11 Aug 2014 11:16:25 +0200 Original-Received: from localhost ([::1]:34594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGliL-0000xK-15 for guile-bugs@m.gmane.org; Mon, 11 Aug 2014 05:16:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGli8-0000w2-1C for bug-guile@gnu.org; Mon, 11 Aug 2014 05:16:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGlhy-0007R6-Vs for bug-guile@gnu.org; Mon, 11 Aug 2014 05:16:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGlhy-0007R0-SO for bug-guile@gnu.org; Mon, 11 Aug 2014 05:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XGlhy-0003ne-Hw for bug-guile@gnu.org; Mon, 11 Aug 2014 05:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nala Ginrut Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 11 Aug 2014 09:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18245 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.140774853314564 (code B ref -1); Mon, 11 Aug 2014 09:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Aug 2014 09:15:33 +0000 Original-Received: from localhost ([127.0.0.1]:38554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XGlhS-0003mo-UQ for submit@debbugs.gnu.org; Mon, 11 Aug 2014 05:15:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52317) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XGlhP-0003mX-Ow for submit@debbugs.gnu.org; Mon, 11 Aug 2014 05:15:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGlhB-00071z-FF for submit@debbugs.gnu.org; Mon, 11 Aug 2014 05:15:22 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:43589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGlhB-00071v-Br for submit@debbugs.gnu.org; Mon, 11 Aug 2014 05:15:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGlh2-0000ma-8T for bug-guile@gnu.org; Mon, 11 Aug 2014 05:15:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGlgt-0006hp-7b for bug-guile@gnu.org; Mon, 11 Aug 2014 05:15:04 -0400 Original-Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]:58089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGlgt-0006hl-02 for bug-guile@gnu.org; Mon, 11 Aug 2014 05:14:55 -0400 Original-Received: by mail-pa0-f52.google.com with SMTP id bj1so10778732pad.39 for ; Mon, 11 Aug 2014 02:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:date:organization:content-type :mime-version; bh=bzymqlvtIkCUTybiLCHYgk5M3wIWu4B0UfJphJFypDo=; b=ib0Z0UbEEG16jQdZ+ilJQJSFgQZXM1+XyGPVlKsA+OxahrLXRnZK6oEAlB9gXpOOH8 dhr8FzR/4DsZx0xEkA0WmoXLzw4roNJfCHm2/hga1tAyvLznHn64CNxKQQnkKSzar2OO Uhsf5+vyglNG+N9GbSYPRXzuqUDshcZSoTWnSk8vua0vR1Rbj14QUVF6+at3o05dtHVO VZThkAaN/tDjSd7yntg2+Wo2abfP4K9tPW2RS0wFSqzjLGd/o7Bp6UzkGN0zcPMtDcdV qWkGQ0NTmx1mdbK6AQOZS0cS6/wQ6TB7Kyz/PeyjHEi91wqB7r8kfvBlLc0AazA29HPX PZ+w== X-Received: by 10.68.244.40 with SMTP id xd8mr41009797pbc.24.1407748493577; Mon, 11 Aug 2014 02:14:53 -0700 (PDT) Original-Received: from [147.2.147.182] ([203.192.156.9]) by mx.google.com with ESMTPSA id t7sm16524114pdj.94.2014.08.11.02.14.50 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Mon, 11 Aug 2014 02:14:52 -0700 (PDT) X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:7536 Archived-At: --=-pZ474uMQOVMzmEKykDB8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Note this bug is under Master branch, it's fine in stable-2.0. I've imported srfi-1, but after some modifications, the program happens not to use any srfi-1 symbols, then there's the problem that one of the rule in syntax-rules can't be found and threw error. It works when I removed useless srfi-1 from imported list. I think srfi-1 here is not related, and maybe the same with syntax-rules. But I can reproduce it with these two prerequisites. I've attached two simplified files(modules) for reproducing. (The code may look not so nice, but it's unrelated, some code looks ugly because of the simplification from my project) --=-pZ474uMQOVMzmEKykDB8 Content-Disposition: attachment; filename="mmr.scm" Content-Type: text/x-scheme; name="mmr.scm"; charset="UTF-8" Content-Transfer-Encoding: 7bit (define-module (xxx mmr) #:export (->sql2)) (define-syntax -> (syntax-rules (end) ((_ end fmt args ...) (format #f "~@?;" fmt args ...)) ((_ fmt args ...) (format #f fmt args ...)))) (define-syntax-rule (->end name arg) (-> end "~a ~a" name arg)) (define-syntax sql-alter (syntax-rules (table rename to add modify drop column as select primary key) ((_ table name drop primary key) (-> "table ~a drop primary key" name)) ((_ table old-name rename to new-name) (-> "table ~a rename to ~a" old-name new-name)) ((_ table name add cname ctype) ;; e.g: (->sql alter table 'mmr add 'cname 'varchar(50)) (-> "table ~a add ~a ~a" cname ctype)) ((_ table name mofify pairs) (-> "table ~a modify (~{~a~^,~})" name (->lst pairs))) ((_ table name drop column cname) (-> "table ~a drop column ~a" name cname)) ((_ table name add primary key keys) (-> "table ~a add primary key (~{~a~^,~})" name keys)) ((_ table name rename column old-name to new-name) (-> "table ~a rename column ~a to ~a" name old-name new-name)))) (define-syntax ->sql2 (syntax-rules (select insert alter create update delete use) ((_ alter rest ...) (->end 'alter (sql-alter rest ...))))) --=-pZ474uMQOVMzmEKykDB8 Content-Disposition: attachment; filename="mmr2.scm" Content-Type: text/x-scheme; name="mmr2.scm"; charset="UTF-8" Content-Transfer-Encoding: 7bit (define-module (xxx mmr2) #:use-module (xxx mmr) #:use-module (srfi srfi-1) #:export (mmr)) (define mmr (->sql2 alter table 'tname drop primary key)) --=-pZ474uMQOVMzmEKykDB8--