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 v9 03/18] r7rs-libraries: Add support for 'else' clause in cond-expand. Date: Tue, 12 Dec 2023 23:37:42 -0500 Message-ID: <20231213044217.14093-4-maxim.cournoyer@gmail.com> References: <20231213044217.14093-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="25502"; 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 Dec 13 05:43:47 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 1rDH63-0006TX-Fq for guile-devel@m.gmane-mx.org; Wed, 13 Dec 2023 05:43:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDH4q-0004HV-8g; Tue, 12 Dec 2023 23:42:32 -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 1rDH4o-0004Gp-E8 for guile-devel@gnu.org; Tue, 12 Dec 2023 23:42:30 -0500 Original-Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rDH4n-000709-1W for guile-devel@gnu.org; Tue, 12 Dec 2023 23:42:30 -0500 Original-Received: by mail-qt1-x82a.google.com with SMTP id d75a77b69052e-425baafa3c3so27168321cf.0 for ; Tue, 12 Dec 2023 20:42:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702442547; x=1703047347; 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=csznTYMkph4UVfrFI4TW3EGq2el975cCLa0tJmQ2aIcqWnxnF0YtRJatXdUv5e3lu8 7KOXr1gEI6iNtjvi1kIYCjSIzZANsjg7TJAKGNGakDha3749BW3s6EZLSyVz24CeFpv0 2+kOklevt73X7f3eFDaZ50imOqMGSpUeCKto+Tr90NFSvn3ZikwIkFAIXU50fU1Hnk5E /UUrzdi6Ae0gvNz/33lQ6JR1QC1DQkZNA5v3AtJyzJtjqFGVhaqLc8H1NFdQ7TIkcfRO /jjZBrs1kPiz+upEdy4oT1d4ksIjE47N8QzXqFkFwgZd4Tj3p8iIopgnMmA+5rHjorxU GePw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702442547; x=1703047347; 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=T8Ns7niKSwOC+yFQ+MmKR8MIz5kyKsuTkO/4J9K1aXwQCPZ/ZIFTLUfEQNoQ93xBxy ewIOZfd0bGprYM4tpAi7xMt0iFu+2ADIfTp+BQO0V+xx4NFDqf4VtomhywHcc//t1Qck ngSxkIwHLilpBR3Ju0pP2vUqEJkyCbIJoCDh/37/xVyJj/ksXpuay9HC453noDhZW3FA KrmINrlUtx7dtPFFTZd6YymZk+xjc4PLA4OW90ysO+qMGzpn/1AWL4yyugLGs9UDDIjA UABNk4/pU2tKuz5egcJRcOpPKB7YE0+wteVhtZGcbtzO2sbKg3ym+gPVp+Mt0bGTXgzu BHgQ== X-Gm-Message-State: AOJu0Yw2+8a1tpXBQyKKF8PPbWhWjiNlA3eamHO7Cp18+bZaOMkcc4Rv wEFlpcp+0az6/2aI81PYWYK1JLM0dB/gJw== X-Google-Smtp-Source: AGHT+IE+9HoaI3lsCPX7zC9qfwB+scC09fpLR48rZRocHswjpIlbNIF6UyvKME87e3/+NLz0MR0/4A== X-Received: by 2002:a05:622a:490:b0:425:4043:763a with SMTP id p16-20020a05622a049000b004254043763amr10593403qtx.98.1702442546727; Tue, 12 Dec 2023 20:42:26 -0800 (PST) Original-Received: from localhost.localdomain (dsl-157-186.b2b2c.ca. [66.158.157.186]) by smtp.gmail.com with ESMTPSA id s7-20020ac87587000000b004181138e0c0sm4621719qtq.31.2023.12.12.20.42.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 20:42:26 -0800 (PST) X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231213044217.14093-1-maxim.cournoyer@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::82a; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x82a.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:22236 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