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 v6 03/16] r7rs-libraries: Add support for 'else' clause in cond-expand. Date: Sat, 2 Dec 2023 20:37:04 -0500 Message-ID: <20231203014115.26985-4-maxim.cournoyer@gmail.com> References: <20231203014115.26985-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="28585"; 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 Sun Dec 03 02:42:33 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 1r9bVB-0007Gn-3r for guile-devel@m.gmane-mx.org; Sun, 03 Dec 2023 02:42:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r9bUB-0001KI-1P; Sat, 02 Dec 2023 20:41:31 -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 1r9bU9-0001Jo-Bf for guile-devel@gnu.org; Sat, 02 Dec 2023 20:41:29 -0500 Original-Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r9bU7-0001WC-PS for guile-devel@gnu.org; Sat, 02 Dec 2023 20:41:29 -0500 Original-Received: by mail-qk1-x733.google.com with SMTP id af79cd13be357-77eced97847so101861785a.2 for ; Sat, 02 Dec 2023 17:41:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701567686; x=1702172486; 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=VjO834ZCQgq8r/NLu0A/K5x+LqJ5VTg/dVC9O2iZ4zBb46BD33T38aQIxRRpFhTdPl I0Qqc7yPorqS0T/bQMUTW0MCiVQFcgUY2U4smA85bV1noKS2iKI+IoRqOC4j9lk18xiK Mok97itM/J236iUeusnbIchYAtO+gCYwXkYJ2zX2shsC+/NWhJghXYXjKhVO+j+Zxocm i1D0auFWIgMk6TnhZd8OaKig2QCgnaDw2Oa7jS9oJ1jX0Az4/6tjUPanQteqmxpO3fU6 crTeuPiKedzcPTtBD98hd+s2waFnV4Kn4pEGCxCki/ifH6ckydjCGly3MqYdjoqJUY9M m3Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701567686; x=1702172486; 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=qyagp2Hm3bBHybEgcESicSuI96BUu5413QnPNoBpUOKKA3wlsSqXuHyZ3JzmowOEF3 F2r7gROx2x1ZB4fUVgk9yrbHCAn74qKNjR8CejVlMEAlaiqr8fAeK4pXMs7oJgpQKTS3 51D/Aa0c8EROMw2mda1MixLIoitmU1q6ut/NiqIPeGNwkyA2sJi9hT3FpaKTdgxUmzUm jO03O4RvmpW6/lSTPYfPKQOFYZUu93tLa/eyqUxO1q9rM4BgeH8KjHr0r/6+v4B4Ws4M VDh/+z52atKSL40rOV3TyhEnQvLYe0DGIrUgSeG20udkDitN4l2KPh26b/FlD99r4KhY vzRg== X-Gm-Message-State: AOJu0Yx4a3ciCQMw0kyHPA3yLS/MLRQXrcWkW3RvuC6ZaPWAn0ycy4x2 XnyaAJdFcn1wzpoosLtB2MY1CHhBYxM= X-Google-Smtp-Source: AGHT+IEMyn1plalUDE/KK4BpnZVGUb9clP56j4n+TGsXHneqtowrH0hExCYPSpjKvIKJ0DBH5IfWAQ== X-Received: by 2002:a05:620a:8520:b0:77e:fba3:81f4 with SMTP id pe32-20020a05620a852000b0077efba381f4mr2430962qkn.138.1701567686551; Sat, 02 Dec 2023 17:41:26 -0800 (PST) Original-Received: from localhost.localdomain (dsl-10-141-196.b2b2c.ca. [72.10.141.196]) by smtp.gmail.com with ESMTPSA id t15-20020a05620a450f00b0077dca8ed9a4sm2869664qkp.133.2023.12.02.17.41.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Dec 2023 17:41:26 -0800 (PST) X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231203014115.26985-1-maxim.cournoyer@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::733; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x733.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:22161 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