use a more descriptive name in the identifier generated by define-on-demand
so when it shows up in an error message it doesn't take forever to figure out which 'val' that is original commit: 0ee8155527bf0118c1b035efdcc5a6a2fac4828a
This commit is contained in:
parent
0d977a560c
commit
11fd5a91ed
|
@ -5,8 +5,8 @@
|
|||
|
||||
(define-syntax-rule (define-on-demand id rhs)
|
||||
(begin
|
||||
(define val (delay rhs))
|
||||
(define define-on-demand-bound-promise (delay rhs))
|
||||
(define-syntax (id stx)
|
||||
(if (identifier? stx)
|
||||
#'(force val)
|
||||
#'(force define-on-demand-bound-promise)
|
||||
(raise-syntax-error #f "bad syntax" stx)))))
|
||||
|
|
Loading…
Reference in New Issue
Block a user