Fixed a bug with Typed Scheme's do: with no finish-expr.

Include in 5.0 release.
This commit is contained in:
Vincent St-Amour 2010-05-21 16:04:51 -04:00
parent 88dc30aa3c
commit fece1f6d03

View File

@ -367,13 +367,13 @@ This file defines two sorts of primitives. All of them are provided into any mod
(syntax-parse stx #:literals (:)
[(_ : ty
((var:annotated-name init (~optional step:expr #:defaults ([step #'var]))) ...)
(stop?:expr (~optional (~seq finish:expr ...) #:defaults ([(finish 1) #'((void))])))
(stop?:expr (~optional (~seq finish0:expr finish:expr ...) #:defaults ([finish0 #'(void)] [(finish 1) '()])))
c:expr ...)
(syntax/loc
stx
(let: doloop : ty ([var.name : var.ty init] ...)
(if stop?
(begin finish ...)
(begin finish0 finish ...)
(begin c ... (doloop step ...)))))]))
(define-syntax (provide: stx)