Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Rob Hunter authored December 06, 2008
1  leftparen.scm
@@ -89,6 +89,7 @@
89 89
  fresh-rec-from-data
90 90
  same-rec?
91 91
  only-rec-of-type
  92
+ if-rec-of-type
92 93
  rec-type-is?
93 94
  is-descendant?
94 95
  find-parent
1  session.scm
@@ -82,6 +82,7 @@
82 82
                                body ...))
83 83
            (let ((body-lst (list body ...)))
84 84
              (or (single-response-promise-in-list body-lst)
  85
+                 (single-response/full-in-list body-lst)
85 86
                  `(group ,@body-lst))))))))
86 87
 
87 88
 (define (cookied-response cookie-key-str cookie-val-str
15  web-support.scm
@@ -29,6 +29,7 @@
29 29
 
30 30
          response-promise?
31 31
          ;; single-response-promise-in-list (via contract)
  32
+         ;; single-response/full-in-list (via contract)
32 33
          ;; response-promise-to-redirect (via contract)
33 34
          ;; response-from-promise (via contract)
34 35
          
@@ -233,7 +234,19 @@
233 234
 (define (single-response-promise-in-list lst)
234 235
   (and-let* (((and (length= lst 1)))
235 236
              (elt (first lst))
236  
-             ((response-promise? (first lst))))
  237
+             ((response-promise? elt)))
  238
+    elt))
  239
+
  240
+;;
  241
+;; single-response/full-in-list
  242
+;;
  243
+(provide/contract
  244
+ (single-response/full-in-list (-> (listof any/c) (or/c #f response/full?))))
  245
+;;
  246
+(define (single-response/full-in-list lst)
  247
+  (and-let* (((and (length= lst 1)))
  248
+             (elt (first lst))
  249
+             ((response/full? elt)))
237 250
     elt))
238 251
 
239 252
 ;;

0 notes on commit f851d57

Please sign in to comment.
Something went wrong with that request. Please try again.