From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.devel Subject: Fix for 1.6 psyntax.pp bootstrapping bug. Date: Mon, 15 Sep 2003 00:23:07 -0500 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <873cey1v7o.fsf@raven.i.defaultvalue.org> References: <87y8wr40vw.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1063603430 21502 80.91.224.253 (15 Sep 2003 05:23:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Sep 2003 05:23:50 +0000 (UTC) Cc: Mikael Djurfeldt , marius.vollmer@uni-dortmund.de Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Sep 15 07:23:47 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19ylpz-0005f0-00 for ; Mon, 15 Sep 2003 07:23:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19ylpn-0008TX-Ju for guile-devel@m.gmane.org; Mon, 15 Sep 2003 01:23:35 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19ylpO-0008RB-7J for guile-devel@gnu.org; Mon, 15 Sep 2003 01:23:10 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19ylpM-0008R1-QN for guile-devel@gnu.org; Mon, 15 Sep 2003 01:23:09 -0400 Original-Received: from [66.93.216.237] (helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19ylpM-0008Qy-Al for guile-devel@gnu.org; Mon, 15 Sep 2003 01:23:08 -0400 Original-Received: from raven.i.defaultvalue.org (raven.i.defaultvalue.org [192.168.1.7]) by defaultvalue.org (Postfix) with ESMTP id 682553F7E; Mon, 15 Sep 2003 00:23:07 -0500 (CDT) Original-Received: by raven.i.defaultvalue.org (Postfix, from userid 1000) id 4C22C810DE; Mon, 15 Sep 2003 00:23:07 -0500 (CDT) Original-To: guile-devel@gnu.org In-Reply-To: <87y8wr40vw.fsf@raven.i.defaultvalue.org> (Rob Browning's message of "Sun, 14 Sep 2003 14:37:39 -0500") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2792 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2792 After more investigation, I think I've fixed the bug(s), but please check this patch if you have time, to be sure I've interpreted things correctly. In the case of compile-psyntax.scm, I guessed that the with-fluids clause was overlooked when similar changes were backported from 1.7 to 1.6. In the case of syncase.scm, eval was being defined to #f at the start of the file and then exported. It looks like this is what was causing the psyntax.ss (or was it .pp?) load to fail when the code attempted to call eval: : In expression (eval (list syntmp-noexpand-1497 syntmp-x-2446) (interaction-environment)): : Wrong type to apply: #f As a quick fix, I just moved the (export eval) lower in the file, so that it's located after the eval (re)definition. That way no one ever sees eval bound to #f. Index: ice-9/compile-psyntax.scm =================================================================== RCS file: /cvsroot/guile/guile/guile-core/ice-9/compile-psyntax.scm,v retrieving revision 1.1.2.2 diff -u -r1.1.2.2 compile-psyntax.scm --- ice-9/compile-psyntax.scm 4 Sep 2002 20:09:00 -0000 1.1.2.2 +++ ice-9/compile-psyntax.scm 15 Sep 2003 05:10:10 -0000 @@ -12,14 +12,16 @@ (let ((in (open-input-file source)) (out (open-output-file (string-append target ".tmp")))) - (let loop ((x (read in))) - (if (eof-object? x) - (begin - (close-port out) - (close-port in)) - (begin - (write (sc-expand3 x 'c '(compile load eval)) out) - (newline out) - (loop (read in)))))) + (with-fluids ((expansion-eval-closure + (module-eval-closure (current-module)))) + (let loop ((x (read in))) + (if (eof-object? x) + (begin + (close-port out) + (close-port in)) + (begin + (write (sc-expand3 x 'c '(compile load eval)) out) + (newline out) + (loop (read in))))))) (system (format #f "mv -f ~s.tmp ~s" target target)) Index: ice-9/syncase.scm =================================================================== RCS file: /cvsroot/guile/guile/guile-core/ice-9/syncase.scm,v retrieving revision 1.18.2.8 diff -u -r1.18.2.8 syncase.scm --- ice-9/syncase.scm 27 Jan 2003 11:02:51 -0000 1.18.2.8 +++ ice-9/syncase.scm 15 Sep 2003 05:10:11 -0000 @@ -61,9 +61,6 @@ ;; code and include 'eval' in the export clause of define-module, ;; above. -(define eval #f) -(export eval) - (define expansion-eval-closure (make-fluid)) @@ -255,6 +252,8 @@ (cadr x) (sc-expand x)) environment)) + +(export eval) ;;; Hack to make syncase macros work in the slib module (let ((m (nested-ref the-root-module '(app modules ice-9 slib)))) -- Rob Browning rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel