PR 10078 -- NOT for inclusion in the release

svn: r14122
This commit is contained in:
Robby Findler 2009-03-16 12:06:17 +00:00
parent 75a80ff7a8
commit 2556c61f9d

View File

@ -356,7 +356,9 @@
(define (flat-contract predicate) (coerce-flat-contract 'flat-contract predicate))
(define (check-flat-named-contract predicate) (coerce-flat-contract 'flat-named-contract predicate))
(define (flat-named-contract name predicate)
(coerce-flat-contract 'flat-named-contract predicate)
(unless (and (procedure? predicate)
(procedure-arity-includes? predicate 1))
(error 'flat-named-contract "expected a procedure of arity 1 as second argument, got ~e" predicate))
(make-predicate-contract name predicate))
;; build-compound-type-name : (union contract symbol) ... -> (-> sexp)