Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

sessioned-response now no longer ever returns (group <response/full>)…

… and instead just returns <response/full>. This allows a later contract to pass.
  • Loading branch information...
commit f851d5745facea5aee80c036d7da587b6f8a56f9 1 parent 60e6e0f
@vegashacker authored
Showing with 16 additions and 1 deletion.
  1. +1 −0  leftparen.scm
  2. +1 −0  session.scm
  3. +14 −1 web-support.scm
View
1  leftparen.scm
@@ -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
View
1  session.scm
@@ -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
View
15 web-support.scm
@@ -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)
@@ -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))
;;
Please sign in to comment.
Something went wrong with that request. Please try again.