Rewrote do: to expand into do.

original commit: 23f30af459b4157c87b62dff535cdd0b7eb46927
This commit is contained in:
Vincent St-Amour 2010-05-26 18:08:40 -04:00
parent 4306ef78a7
commit 3bbf39b86a

View File

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