* [PATCH] Add support for 'else' clause in R7RS cond-expand.
@ 2023-11-25 2:22 Maxim Cournoyer
0 siblings, 0 replies; only message in thread
From: Maxim Cournoyer @ 2023-11-25 2:22 UTC (permalink / raw)
To: guile-devel; +Cc: Maxim Cournoyer
* module/ice-9/r7rs-libraries.scm (define-library)
<handle-cond-expand>: Add a pattern to match an 'else' clause.
---
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 63a300a26..86b3dee24 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 ...)
base-commit: d579848cb5d65440af5afd9c8968628665554c22
--
2.41.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-25 2:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-25 2:22 [PATCH] Add support for 'else' clause in R7RS cond-expand Maxim Cournoyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).