lift handle-results, since matthew said that the compiler might not do so

svn: r9181
This commit is contained in:
Eli Barzilay 2008-04-07 19:55:54 +00:00
parent f0547adffc
commit 7a29625659

View File

@ -86,11 +86,13 @@
;; * does not deal with multiple values, since they're not used by the lazy
;; language (but see below)
(define handle-results
(case-lambda [(single) (values #f single)]
[multi (values #t multi)]))
(define (force-proc p root)
(let loop1 ([p p])
(let-values ([(multi? v) (call-with-values p
(case-lambda [(single) (values #f single)]
[multi (values #t multi)]))])
(let-values ([(multi? v) (call-with-values p handle-results)])
(if multi?
(begin ; error here for "library approach" (see above URL)
(set-promise-val! root v)