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
This commit is contained in:
Robby Findler 2012-07-15 08:04:45 -05:00
parent 8c659d50ed
commit 0ee8155527

View File

@ -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)))))