From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxim Cournoyer Newsgroups: gmane.lisp.guile.devel Subject: [PATCH v5 03/15] r7rs-libraries: Add support for 'else' clause in cond-expand. Date: Wed, 29 Nov 2023 16:59:31 -0500 Message-ID: <20231129220225.6819-4-maxim.cournoyer@gmail.com> References: <20231129220225.6819-1-maxim.cournoyer@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11975"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Maxim Cournoyer To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Wed Nov 29 23:04:03 2023 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r8Sez-0002mz-8P for guile-devel@m.gmane-mx.org; Wed, 29 Nov 2023 23:03:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8Sdy-00019p-KF; Wed, 29 Nov 2023 17:02:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8Sdt-00018q-9s for guile-devel@gnu.org; Wed, 29 Nov 2023 17:02:49 -0500 Original-Received: from mail-qv1-xf2f.google.com ([2607:f8b0:4864:20::f2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r8Sdq-0004C7-Fq for guile-devel@gnu.org; Wed, 29 Nov 2023 17:02:48 -0500 Original-Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-67a34fbaf12so1571666d6.3 for ; Wed, 29 Nov 2023 14:02:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701295364; x=1701900164; darn=gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+a5GNctb59/+r/BIJwlfXk0gx37GRJ7w+o5ObM2btns=; b=Z5EaWIuxie2AIL3kJZjZHNK9CaldTB4ic5O9fWI5i6OREF/lzM7hqDBrB+xkq2nVGK MlmQPp68S50TLynIfxY/E84IMuSxmbCV9vXy5RfmIjSABJLrJdQS7oU9OZkvLiUpQEDw ll2yC92SCgvySDhRhXxH83q5YG4p84yvsAreltz2tB98JRma8Ci/vIoH06ILMXnXQmba GLB8USdSQayW7XaQSQviMiro1kYl5Bt8nEgQjKzEcYm0X6gvJOjloPbHylF9BhpLTXHO tc8GyiNIravJS03z0b3/W83MI26ZXxS5+OdEsh9IHvaQyiuX1b41lngUff79D73wkPJc CWVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701295364; x=1701900164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+a5GNctb59/+r/BIJwlfXk0gx37GRJ7w+o5ObM2btns=; b=b3Pc0R7YW9V7u5jubXyM+Kwi27C8hf9w2y0iiDGig70o/LDG6WtasP+F1OP/mwri2T IcfisDQVjXKc2w2u4UbKqCBeoUwONY0AkSSaazNlU3AeZERp/v4jXeSE9044QjMKnjwq ZyOC86Me+ykJXKuXJFLHsJs9axiFfvc5EWdau2Zl2FGw4pDtyJk+9LeQZDARUJi3f76a MQB1K/RTEvJ+AGQ2vk6OYJ9SUwQXRAkL/Nsw/XSXL09wyK5Ks8NPkeDUYkQfVTZ9kRPf E2QSr40rgjvr7r+68bYvtwjt0mhCCdw8U+gUyAdzoPIO4cRX7h8apHdzDV5rjrjevxRB +wKw== X-Gm-Message-State: AOJu0YwJhND638taxhQS6a5e4WE+iLEyXnaHaVBCmsaPKcqyIsWMlIVt xyzuhfNJUKNFWGnCC3lIvxVujxW94l8= X-Google-Smtp-Source: AGHT+IFEQsXLu005XVLmLvkfOR/Tk9+dh0/FxySUw/2A8hswLEsLbyQ3QSuFY6GNrfmaB2PaxjITXQ== X-Received: by 2002:a0c:f7ce:0:b0:67a:1d71:fc2d with SMTP id f14-20020a0cf7ce000000b0067a1d71fc2dmr19505747qvo.20.1701295364284; Wed, 29 Nov 2023 14:02:44 -0800 (PST) Original-Received: from localhost.localdomain (dsl-158-174.b2b2c.ca. [66.158.158.174]) by smtp.gmail.com with ESMTPSA id g15-20020ad4510f000000b0067a2a0b44ddsm4644444qvp.44.2023.11.29.14.02.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 14:02:43 -0800 (PST) X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231129220225.6819-1-maxim.cournoyer@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::f2f; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf2f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22147 Archived-At: * module/ice-9/r7rs-libraries.scm (define-library) : Add a pattern to match an 'else' clause. --- (no changes since v1) module/ice-9/r7rs-libraries.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/ice-9/r7rs-libraries.scm b/module/ice-9/r7rs-libraries.scm index 429d82ad9..97465b649 100644 --- a/module/ice-9/r7rs-libraries.scm +++ b/module/ice-9/r7rs-libraries.scm @@ -64,8 +64,10 @@ ;; FIXME: R7RS (features) isn't quite the same as ;; %cond-expand-features; see scheme/base.scm. (memq (syntax->datum #'id) %cond-expand-features)))) - (syntax-case clauses () + (syntax-case clauses (else) (() #'()) ; R7RS says this is not specified :-/ + (((else decl ...)) + #'(decl ...)) (((test decl ...) . clauses) (if (has-req? #'test) #'(decl ...) -- 2.41.0