[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 03/16] r7rs-libraries: Add support for 'else' clause in cond-e
From: |
Maxim Cournoyer |
Subject: |
[PATCH v6 03/16] r7rs-libraries: Add support for 'else' clause in cond-expand. |
Date: |
Sat, 2 Dec 2023 20:37:04 -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 v6 00/16] Add SRFI 209 and dependencies; improve support for R7RS libraries, Maxim Cournoyer, 2023/12/02
- [PATCH v6 02/16] Use R7RS 'rename' syntax for exports., Maxim Cournoyer, 2023/12/02
- [PATCH v6 03/16] r7rs-libraries: Add support for 'else' clause in cond-expand.,
Maxim Cournoyer <=
- [PATCH v6 04/16] r7rs-libraries: Better support R7RS SRFI library names., Maxim Cournoyer, 2023/12/02
- [PATCH v6 01/16] ice-9: Fix 'include' when used in compilation contexts., Maxim Cournoyer, 2023/12/02
- [PATCH v6 05/16] (scheme base): Support non-negative SRFI integer names in cond-expand., Maxim Cournoyer, 2023/12/02
- [PATCH v6 07/16] build: Register '.sld' as an alternative extension to '.scm'., Maxim Cournoyer, 2023/12/02
- [PATCH v6 06/16] Share features tested by cond-expand library declarations and expressions., Maxim Cournoyer, 2023/12/02
- [PATCH v6 08/16] module: Add SRFI 126., Maxim Cournoyer, 2023/12/02
- [PATCH v6 09/16] module: Add SRFI 128., Maxim Cournoyer, 2023/12/02
- [PATCH v6 10/16] module: Add (scheme comparator)., Maxim Cournoyer, 2023/12/02
- [PATCH v6 12/16] module: Add SRFI 125., Maxim Cournoyer, 2023/12/02
- [PATCH v6 13/16] module: Add SRFI 151., Maxim Cournoyer, 2023/12/02