[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 07/08: hat-let: Allow both _.
From: |
gnunet |
Subject: |
[gnunet-scheme] 07/08: hat-let: Allow both _. |
Date: |
Mon, 29 Aug 2022 00:15:12 +0200 |
This is an automated email from the git hooks/post-receive script.
maxime-devos pushed a commit to branch master
in repository gnunet-scheme.
commit e5b35985816cd966d3bb1744c4199dcdb3b4bdfd
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Mon Aug 29 00:13:42 2022 +0200
hat-let: Allow both _.
---
gnu/gnunet/utils/hat-let.scm | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/gnu/gnunet/utils/hat-let.scm b/gnu/gnunet/utils/hat-let.scm
index df280a0..582d452 100644
--- a/gnu/gnunet/utils/hat-let.scm
+++ b/gnu/gnunet/utils/hat-let.scm
@@ -34,19 +34,17 @@
;; usable.
;; * (2 3): Allow dotted variable lists with <--.
;; * (2 4): New: !^
+;; * (2 5): Allow both RnRS _ and plain _.
-(library (gnu gnunet utils hat-let (2 4))
+(library (gnu gnunet utils hat-let (2 5))
(export let^)
- ;; Avoid letting users of (gnu gnunet utils hat-let)
- ;; having to import _ from (rnrs base).
- (import (only (rnrs base)
- define-syntax syntax-rules let if begin
- lambda assert call-with-values ...))
+ (import (except (rnrs base) _)
+ (rename (rnrs base) (_ rnrs:_)))
;; A generalisation of let*, and-let*, receive, begin,
;; and generalised let for avoiding nesting.
(define-syntax let^
- (syntax-rules (? ! !! _ <- <-- /o/)
+ (syntax-rules (? ! !! _ rnrs:_ <- <-- /o/)
((: () code ...)
(let () code ...))
;; if x, then return @code{(begin esc esc* ...)}
@@ -76,11 +74,15 @@
(begin
(assert x)
(let^ (etc ...) code ...)))
- ;; Throw a result away
+ ;; Throw a result away. Allow both RnRS _ and unbound _.
((: ((_ x) etc ...) code ...)
(begin
x
(let^ (etc ...) code ...)))
+ ((: ((rnrs:_ x) etc ...) code ...)
+ (begin
+ x
+ (let^ (etc ...) code ...)))
;; Assign multiple values (from a thunk).
;; This is a historical mistake, use <--
;; instead (see mini changelog).
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] branch master updated (1b75c50 -> a9dbb6e), gnunet, 2022/08/28
- [gnunet-scheme] 04/08: data-string: Remove some dead code in string->data., gnunet, 2022/08/28
- [gnunet-scheme] 02/08: data-string: Raise exceptions in case of bogus input., gnunet, 2022/08/28
- [gnunet-scheme] 01/08: Makefile.am: Register (gnu gnunet data-string)., gnunet, 2022/08/28
- [gnunet-scheme] 03/08: data-string: Make string->data do less mutation., gnunet, 2022/08/28
- [gnunet-scheme] 08/08: data-string: Do not select imports., gnunet, 2022/08/28
- [gnunet-scheme] 07/08: hat-let: Allow both _.,
gnunet <=
- [gnunet-scheme] 05/08: data-string: Small simplification., gnunet, 2022/08/28
- [gnunet-scheme] 06/08: data-string: Simplify string->data more., gnunet, 2022/08/28