Rewrote do: to expand into do.
original commit: 23f30af459b4157c87b62dff535cdd0b7eb46927
This commit is contained in:
parent
4306ef78a7
commit
3bbf39b86a
|
@ -368,15 +368,15 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
|||
(define-syntax (do: stx)
|
||||
(syntax-parse stx #:literals (:)
|
||||
[(_ : ty
|
||||
((var:annotated-name init (~optional step:expr #:defaults ([step #'var]))) ...)
|
||||
(stop?:expr (~optional (~seq finish0:expr finish:expr ...) #:defaults ([finish0 #'(void)] [(finish 1) '()])))
|
||||
((var:annotated-name rest ...) ...)
|
||||
(stop?:expr ret ...)
|
||||
c:expr ...)
|
||||
(syntax/loc
|
||||
stx
|
||||
(let: doloop : ty ([var.name : var.ty init] ...)
|
||||
(if stop?
|
||||
(begin finish0 finish ...)
|
||||
(begin c ... (doloop step ...)))))]))
|
||||
(ann (do ((var.ann-name rest ...) ...)
|
||||
(stop? ret ...)
|
||||
c ...)
|
||||
ty))]))
|
||||
|
||||
(define-syntax (provide: stx)
|
||||
(syntax-parse stx
|
||||
|
|
Loading…
Reference in New Issue
Block a user