removed union from scheme/contract
svn: r8745
This commit is contained in:
parent
f2c8ff355e
commit
79f4b8ff30
|
@ -78,4 +78,5 @@
|
||||||
name-prop name-pred? name-get
|
name-prop name-pred? name-get
|
||||||
stronger-prop stronger-pred? stronger-get
|
stronger-prop stronger-pred? stronger-get
|
||||||
flat-prop flat-pred? flat-get
|
flat-prop flat-pred? flat-get
|
||||||
first-order-prop first-order-get)
|
first-order-prop first-order-get
|
||||||
|
(rename-out [or/c union]))
|
||||||
|
|
|
@ -173,7 +173,6 @@ differences from v3:
|
||||||
flat-contract
|
flat-contract
|
||||||
flat-contract-predicate
|
flat-contract-predicate
|
||||||
object-contract
|
object-contract
|
||||||
union
|
|
||||||
listof
|
listof
|
||||||
is-a?/c)
|
is-a?/c)
|
||||||
|
|
||||||
|
|
|
@ -820,7 +820,7 @@ improve method arity mismatch contract violation error messages?
|
||||||
|
|
||||||
(provide flat-rec-contract
|
(provide flat-rec-contract
|
||||||
flat-murec-contract
|
flat-murec-contract
|
||||||
or/c union
|
or/c
|
||||||
not/c
|
not/c
|
||||||
=/c >=/c <=/c </c >/c between/c
|
=/c >=/c <=/c </c >/c between/c
|
||||||
integer-in
|
integer-in
|
||||||
|
@ -895,23 +895,6 @@ improve method arity mismatch contract violation error messages?
|
||||||
[(_ ([name ctc ...] ...))
|
[(_ ([name ctc ...] ...))
|
||||||
(raise-syntax-error 'flat-rec-contract "expected at least one body expression" stx)]))
|
(raise-syntax-error 'flat-rec-contract "expected at least one body expression" stx)]))
|
||||||
|
|
||||||
(define-syntax (union stx)
|
|
||||||
(begin
|
|
||||||
#;
|
|
||||||
(fprintf (current-error-port)
|
|
||||||
"WARNING: union is deprecated, use or/c (file ~a~a)\n"
|
|
||||||
(let ([file (syntax-source stx)])
|
|
||||||
(if (path? file)
|
|
||||||
(path->string file)
|
|
||||||
(format "~s" file)))
|
|
||||||
(let ([line (syntax-line stx)])
|
|
||||||
(if (number? line)
|
|
||||||
(format ", line ~a" line)
|
|
||||||
"")))
|
|
||||||
(syntax-case stx ()
|
|
||||||
[(_ args ...) (syntax (or/c args ...))]
|
|
||||||
[id (syntax or/c)])))
|
|
||||||
|
|
||||||
(define or/c
|
(define or/c
|
||||||
(case-lambda
|
(case-lambda
|
||||||
[() (make-none/c '(or/c))]
|
[() (make-none/c '(or/c))]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user