From unknown Fri Aug 15 04:05:14 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#10246 <10246@debbugs.gnu.org> To: bug#10246 <10246@debbugs.gnu.org> Subject: Status: R6RS library form broken? Reply-To: bug#10246 <10246@debbugs.gnu.org> Date: Fri, 15 Aug 2025 11:05:14 +0000 retitle 10246 R6RS library form broken? reassign 10246 guile submitter 10246 Tobias Brandt severity 10246 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 07 13:07:22 2011 Received: (at submit) by debbugs.gnu.org; 7 Dec 2011 18:07:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYLtp-00011g-KA for submit@debbugs.gnu.org; Wed, 07 Dec 2011 13:07:22 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYLhu-0000Vj-5z for submit@debbugs.gnu.org; Wed, 07 Dec 2011 12:55:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYLh6-0000ae-6Z for submit@debbugs.gnu.org; Wed, 07 Dec 2011 12:54:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:41590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYLh6-0000aa-1A for submit@debbugs.gnu.org; Wed, 07 Dec 2011 12:54:12 -0500 Received: from eggs.gnu.org ([140.186.70.92]:40423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYLh0-0004j8-Eu for bug-guile@gnu.org; Wed, 07 Dec 2011 12:54:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYLgu-0000Xn-Kr for bug-guile@gnu.org; Wed, 07 Dec 2011 12:54:06 -0500 Received: from mail-vw0-f41.google.com ([209.85.212.41]:50963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYLgu-0000Xe-H0 for bug-guile@gnu.org; Wed, 07 Dec 2011 12:54:00 -0500 Received: by vbbfn1 with SMTP id fn1so787953vbb.0 for ; Wed, 07 Dec 2011 09:53:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=TR28uzjvifBsgPgyI3C3cdc3AYJlpfPufMtXVdpm78c=; b=fIrRbL1SyEl1zde3yRZZ3Fgrmnuye+qF9An9quMoAX5cGkyuz55Ic5dKNLFhf/OdgO LTvZf5fi9eCdYKAa0Qn3kBpTqXhYP/nXy1S2/dV2LOsFVuW+VTjRu4WP5B2ReBggi87x KHWHTb84qflK7HfPhR3UXKLZTqZ5GNHzTucrA= MIME-Version: 1.0 Received: by 10.52.26.66 with SMTP id j2mr8507085vdg.98.1323280439350; Wed, 07 Dec 2011 09:53:59 -0800 (PST) Received: by 10.52.75.9 with HTTP; Wed, 7 Dec 2011 09:53:59 -0800 (PST) Date: Wed, 7 Dec 2011 18:53:59 +0100 Message-ID: Subject: R6RS library form broken? From: Tobias Brandt To: bug-guile@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 07 Dec 2011 13:07:19 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Hi, I'm running the latest git version (2.0.3.244-04ec29). Declaring a R6RS style library doesn't work: (library (foo)) => ice-9/psyntax.scm:1422:30: In procedure expand-macro: ice-9/psyntax.scm:1422:30: Syntax error: source expression failed to match any pattern in form (library (foo)) while this does: (define-module (foo)) From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 07 18:05:22 2011 Received: (at 10246) by debbugs.gnu.org; 7 Dec 2011 23:05:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYQYD-0001xO-Rx for submit@debbugs.gnu.org; Wed, 07 Dec 2011 18:05:22 -0500 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYQYB-0001xH-VP for 10246@debbugs.gnu.org; Wed, 07 Dec 2011 18:05:21 -0500 Received: by wgbdq10 with SMTP id dq10so2226939wgb.15 for <10246@debbugs.gnu.org>; Wed, 07 Dec 2011 15:04:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=6OJ69imt+Sa7l6zGytuBy1/c3QLBjbc+f5+mquyKpYM=; b=nB7tbfgt5DA8TRej5kH6QQXE3ZIVlsekXrAMQjx1b0d67ykb0QpkZMqPJN0QrBh9OC YU9Qb6uG5eIFYsEhOtQ08L27rljPiMteNN1EvwZfBqWhLK1kuyfmcKLCf3nzMR+X+sFz eMfMlY5azaznedg7ASxGcbrksFTUXfWY5knsw= Received: by 10.180.7.195 with SMTP id l3mr609889wia.30.1323299073329; Wed, 07 Dec 2011 15:04:33 -0800 (PST) Received: from Kagami.home (host86-168-33-149.range86-168.btcentralplus.com. [86.168.33.149]) by mx.google.com with ESMTPS id m25sm5527788wbp.6.2011.12.07.15.04.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 07 Dec 2011 15:04:31 -0800 (PST) From: Ian Price To: Tobias Brandt Subject: Re: bug#10246: R6RS library form broken? In-Reply-To: (Tobias Brandt's message of "Wed, 7 Dec 2011 18:53:59 +0100") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Date: Wed, 07 Dec 2011 23:00:59 +0000 Message-ID: <877h28aswk.fsf@Kagami.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 10246 Cc: 10246@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) Tobias Brandt writes: > Declaring a R6RS style library doesn't work: > > (library (foo)) > > => > ice-9/psyntax.scm:1422:30: In procedure expand-macro: > ice-9/psyntax.scm:1422:30: Syntax error: > source expression failed to match any pattern in form (library (foo)) > > > while this does: > > (define-module (foo)) This is a misunderstanding on your part, I'm afraid. R6RS library forms are intended to wrap the code[0]; they are not declarations to be placed at the top. The manual does mention this[1], by noting the syntax for library is (library name (export export-spec ...) (import import-spec ...) body ...) Without an example, I can see how the equivalence mentioned at the top may be misleading. Perhaps the manual should add an example? Even something as simple as, say (library (counters) (export make-counter) (import (rnrs base) (define (make-counter start) (lambda () (let ((val start)) (set! start (+ start 1)) val))) ) would probably be helpful. 0. http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-10.html 1. http://www.gnu.org/software/guile/manual/html_node/R6RS-Libraries.html -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled" From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 08 15:06:34 2011 Received: (at 10246-done) by debbugs.gnu.org; 8 Dec 2011 20:06:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYkEj-0007zH-1U for submit@debbugs.gnu.org; Thu, 08 Dec 2011 15:06:34 -0500 Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62] helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RYkEg-0007z9-I7 for 10246-done@debbugs.gnu.org; Thu, 08 Dec 2011 15:06:32 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 418878948; Thu, 8 Dec 2011 15:05:39 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=obTn+V+lnR2/S9mEs49hAYf5F0k=; b=vMTbeP +IJBARjmp4u2EO4B6eu0gx7b02ps/y6+AFcHbNGziEQKnuHAP+YMSVJBmq3QrlSY pRXQESBGUO01Yuta1iOxCTY5jf5cUSDf+uBBPk3effGisB6Bjd/ZZeVyfVjZ8KqW 7lae7Gr14qjaBQw9DqFu3tZYBHjoNOqlRYOZE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=da+Xj/2OjWpbqaG/KH1ZGK9c1zzWxQjL SaLIMVKfUJDmEo5Qm8H9tI/q/BkEx7loO8Wsn2Tfrym4nQyDmwEXg4Y7o7f9duxP P1+ZRdbvnyrKk5cKmqpKm9BxJvsWbDGpTm3cIJDEGo7Lf3k4OWDnXtRQ4xV1e12x 7KktXTPV5b4= Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 3B2218947; Thu, 8 Dec 2011 15:05:39 -0500 (EST) Received: from badger (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id AAD4A8946; Thu, 8 Dec 2011 15:05:38 -0500 (EST) From: Andy Wingo To: Ian Price Subject: Re: bug#10246: R6RS library form broken? References: <877h28aswk.fsf@Kagami.home> Date: Thu, 08 Dec 2011 21:05:34 +0100 In-Reply-To: <877h28aswk.fsf@Kagami.home> (Ian Price's message of "Wed, 07 Dec 2011 23:00:59 +0000") Message-ID: <87wra6kewh.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Pobox-Relay-ID: FFA407D2-21D7-11E1-8551-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 10246-done Cc: Tobias Brandt , 10246-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) On Thu 08 Dec 2011 00:00, Ian Price writes: > Tobias Brandt writes: > >> (library (foo)) > > This is a misunderstanding on your part, I'm afraid. R6RS library forms > are intended to wrap the code[0]; they are not declarations to be placed at > the top. The manual does mention this[1], by noting the syntax for library > is > > (library name (export export-spec ...) (import import-spec ...) body ...) Indeed. Thanks for the answer, Ian. In the new email-happy bug system, to close a bug you edit the Cc: list to add -done after the bug number, as I have done here. Feel free to do this for any bug that you feel is done; if we make a mistake, we can simply re-open it. I'm sure we could do better accounting as to the kind of resolution and such, but I'm most concern with simply marking bugs as being resolved. Regards, and happy hacking to you both :-) Andy -- http://wingolog.org/ From unknown Fri Aug 15 04:05:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 06 Jan 2012 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator