[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 03/15] r7rs-libraries: Add support for 'else' clause in cond-e
From: |
Maxim Cournoyer |
Subject: |
[PATCH v5 03/15] r7rs-libraries: Add support for 'else' clause in cond-expand. |
Date: |
Wed, 29 Nov 2023 16:59:31 -0500 |
* module/ice-9/r7rs-libraries.scm (define-library)
<handle-cond-expand>: 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
- [PATCH v5 00/15] Add a few new SRFIs, R7RS libraries, Maxim Cournoyer, 2023/11/29
- [PATCH v5 01/15] ice-9: Fix 'include' when used in compilation contexts., Maxim Cournoyer, 2023/11/29
- [PATCH v5 02/15] Use R7RS 'rename' syntax for exports., Maxim Cournoyer, 2023/11/29
- [PATCH v5 03/15] r7rs-libraries: Add support for 'else' clause in cond-expand.,
Maxim Cournoyer <=
- [PATCH v5 05/15] (scheme base): Support non-negative SRFI integer names in cond-expand., Maxim Cournoyer, 2023/11/29
- [PATCH v5 04/15] r7rs-libraries: Better support R7RS SRFI library names., Maxim Cournoyer, 2023/11/29
- [PATCH v5 07/15] build: Register '.sld' as an alternative extension to '.scm'., Maxim Cournoyer, 2023/11/29
- [PATCH v5 06/15] Share features tested by cond-expand library declarations and expressions., Maxim Cournoyer, 2023/11/29
- [PATCH v5 09/15] module: Add SRFI 128., Maxim Cournoyer, 2023/11/29
- [PATCH v5 08/15] module: Add SRFI 126., Maxim Cournoyer, 2023/11/29
- [PATCH v5 11/15] module: Add (scheme sort)., Maxim Cournoyer, 2023/11/29
- [PATCH v5 10/15] module: Add (scheme comparator)., Maxim Cournoyer, 2023/11/29
- [PATCH v5 12/15] module: Add SRFI 125., Maxim Cournoyer, 2023/11/29
- [PATCH v5 13/15] module: Add SRFI 151., Maxim Cournoyer, 2023/11/29