Skip to content

Commit

Permalink
sessioned-response now no longer ever returns (group <response/full>)…
Browse files Browse the repository at this point in the history
… and instead just returns <response/full>. This allows a later contract to pass.
  • Loading branch information
rob7hunter committed Dec 6, 2008
1 parent 60e6e0f commit f851d57
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions leftparen.scm
Expand Up @@ -89,6 +89,7 @@
fresh-rec-from-data
same-rec?
only-rec-of-type
if-rec-of-type
rec-type-is?
is-descendant?
find-parent
Expand Down
1 change: 1 addition & 0 deletions session.scm
Expand Up @@ -82,6 +82,7 @@
body ...))
(let ((body-lst (list body ...)))
(or (single-response-promise-in-list body-lst)
(single-response/full-in-list body-lst)
`(group ,@body-lst))))))))

(define (cookied-response cookie-key-str cookie-val-str
Expand Down
15 changes: 14 additions & 1 deletion web-support.scm
Expand Up @@ -29,6 +29,7 @@

response-promise?
;; single-response-promise-in-list (via contract)
;; single-response/full-in-list (via contract)
;; response-promise-to-redirect (via contract)
;; response-from-promise (via contract)

Expand Down Expand Up @@ -233,7 +234,19 @@
(define (single-response-promise-in-list lst)
(and-let* (((and (length= lst 1)))
(elt (first lst))
((response-promise? (first lst))))
((response-promise? elt)))
elt))

;;
;; single-response/full-in-list
;;
(provide/contract
(single-response/full-in-list (-> (listof any/c) (or/c #f response/full?))))
;;
(define (single-response/full-in-list lst)
(and-let* (((and (length= lst 1)))
(elt (first lst))
((response/full? elt)))
elt))

;;
Expand Down

0 comments on commit f851d57

Please sign in to comment.