Stupid $%^#*&!*ing typo. It has been in this code since the major code

reorganization that was included in v4.2.3. Cost me most of the night to
track down.

svn: r18592
This commit is contained in:
Eli Barzilay 2010-03-21 10:00:58 +00:00
parent 236b0249a7
commit 40444fc087

View File

@ -30,9 +30,12 @@
;; ----------------------------------------------------------------------------
;; Forcers
;; force/composable iterates on composable promises
;; `force/composable' iterates on composable promises
;; * (force X) = X for non promises
;; * does not deal with multiple values in the composable case
;; note: measuring time invested divided by the number of lines, this innocent
;; looking piece of code is by far the leader of that competition -- handle
;; with extreme care.
(define (force/composable root)
(let ([v (pref root)])
(cond
@ -69,10 +72,11 @@
;; try to make the order efficient, with common cases first
[(pair? v) (if (null? (unsafe-cdr v)) (unsafe-car v) (apply values v))]
;; follow all sharings (and shortcut directly to the right force)
[(composable-promise? v) (force/composable v) (force v)]
[(composable-promise? v) (force/composable v)]
[(null? v) (values)]
[else (error 'force "composable promise with invalid contents: ~e" v)])))
;; convenient utility for any number of stored values or a raised value.
(define (reify-result v)
(cond [(pair? v) (if (null? (unsafe-cdr v)) (unsafe-car v) (apply values v))]
[(null? v) (values)]
@ -86,7 +90,7 @@
;; the ability to know that it is running; the second can be resolved
;; with a new kind of `running' value that can be used again, but the
;; first cannot be solved. I still didn't ever see any use for them, so
;; they're still forbidden.)
;; they're still forbidden -- throw a "reentrant promise" error.)
(define (force/generic promise)
(reify-result
(let ([v (pref promise)])