wingo pushed a commit to branch wip-whippet
in repository guile.
commit 7fdd17f5ae7a9518d4014743bb2e20bb4979596c
Author: Andy Wingo <[email protected]>
AuthorDate: Tue Jul 15 13:22:14 2025 +0200
Fix deprecation trampoline for `delay`
* module/ice-9/deprecated.scm (delay*): Expand out manually;
define-deprecated*/stx appears to not work for syntax.
---
module/ice-9/deprecated.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/module/ice-9/deprecated.scm b/module/ice-9/deprecated.scm
index 20c715a20..b7b3d2ac7 100644
--- a/module/ice-9/deprecated.scm
+++ b/module/ice-9/deprecated.scm
@@ -140,7 +140,7 @@
(hook->list* . hook->list)
module-defined-hook
(make-promise* . make-promise)
- (promise? . promise?)
+ (promise?* . promise?)
(delay* . delay)
(force* . force)))
@@ -391,7 +391,14 @@
(promise? x)
(make-promise thunk)
(force promise))
-(define-deprecated*/stx (ice-9 promises) delay)
+(define-syntax delay*
+ (lambda (stx)
+ (issue-deprecation-warning
+ "delay in the default environment is deprecated. "
+ "Import it from (ice-9 promises) instead.")
+ (syntax-case stx ()
+ ((_ exp)
+ #'(delay exp)))))
(cond-expand
;; FIXME: Don't include this if there is no regexp support!