Conditionalize use of contract.

This commit is contained in:
Sam Tobin-Hochstadt 2011-07-19 15:40:34 -04:00
parent e07ce478af
commit 8a608ed840

View File

@ -696,7 +696,7 @@
;; just return a boolean result
(define infer
(let ()
(define/contract (infer X Y S T R [expected #f])
(define/cond-contract (infer X Y S T R [expected #f])
(((listof symbol?) (listof symbol?) (listof Type/c) (listof Type/c) Type?) ((or/c #f Type?)) . ->* . (or/c boolean? substitution/c))
(with-handlers ([exn:infer? (lambda _ #f)])
(let* ([expected-cset (if expected