Different contracts

svn: r6643
This commit is contained in:
Jay McCarthy 2007-06-13 21:06:36 +00:00
parent 69c9896ca1
commit 3f838adc8b
3 changed files with 3 additions and 4 deletions

View File

@ -4,8 +4,7 @@
(lib "contract.ss")) (lib "contract.ss"))
(require "../private/util.ss") (require "../private/util.ss")
(define url-path? (define url-path?
; XXX should be (listof path-element?) ((url?) . ->* . (path? (listof path-element?))))
((url?) . ->* . (path? list?)))
(provide/contract (provide/contract
[url-path? contract?] [url-path? contract?]

View File

@ -282,7 +282,7 @@ needs. They are provided by @file{private/util.ss}.
@subsection{Contracts} @subsection{Contracts}
@defthing[port-number? contract?]{Equivalent to @scheme[(between/c 1 65535)].} @defthing[port-number? contract?]{Equivalent to @scheme[(between/c 1 65535)].}
@defthing[path-element? contract?]{Equivalent to @scheme[(or/c path? (symbols 'up 'same))].} @defthing[path-element? contract?]{Equivalent to @scheme[(or/c string? path? (symbols 'up 'same))].}
@subsection{Lists} @subsection{Lists}
@defproc[(list-prefix? [l list?] @defproc[(list-prefix? [l list?]

View File

@ -7,7 +7,7 @@
(lib "xml.ss" "xml") (lib "xml.ss" "xml")
(lib "url.ss" "net")) (lib "url.ss" "net"))
(define path-element? (define path-element?
(or/c path? (symbols 'up 'same))) (or/c string? path? (symbols 'up 'same)))
(define port-number? (between/c 1 65535)) (define port-number? (between/c 1 65535))