Different contracts
svn: r6643
This commit is contained in:
parent
69c9896ca1
commit
3f838adc8b
|
@ -4,8 +4,7 @@
|
|||
(lib "contract.ss"))
|
||||
(require "../private/util.ss")
|
||||
(define url-path?
|
||||
; XXX should be (listof path-element?)
|
||||
((url?) . ->* . (path? list?)))
|
||||
((url?) . ->* . (path? (listof path-element?))))
|
||||
|
||||
(provide/contract
|
||||
[url-path? contract?]
|
||||
|
|
|
@ -282,7 +282,7 @@ needs. They are provided by @file{private/util.ss}.
|
|||
|
||||
@subsection{Contracts}
|
||||
@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}
|
||||
@defproc[(list-prefix? [l list?]
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
(lib "xml.ss" "xml")
|
||||
(lib "url.ss" "net"))
|
||||
(define path-element?
|
||||
(or/c path? (symbols 'up 'same)))
|
||||
(or/c string? path? (symbols 'up 'same)))
|
||||
|
||||
(define port-number? (between/c 1 65535))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user