racket/collects/unstable/contract.ss
Eli Barzilay e34e001167 comments
svn: r16704
2009-11-12 00:18:08 +00:00

20 lines
535 B
Scheme

#lang scheme
(define path-element?
(or/c path-string? (symbols 'up 'same)))
;; Eli: We already have a notion of "path element" which is different
;; from this (see `string->path-element') .
(define port-number? (between/c 1 65535))
(define non-empty-string/c
(and/c string?
(lambda (s) (not (zero? (string-length s))))))
;; Eli: If this gets in, there should also be versions for bytes, lists, and
;; vectors.
(provide/contract
[non-empty-string/c contract?]
[path-element? contract?]
[port-number? contract?])