typed/racunit:

- fix more contracts
- make test tests not fail

original commit: 3ebd04550a14e52ed1ce44abe2c1d9f4b7c3374a
This commit is contained in:
Sam Tobin-Hochstadt 2010-05-04 09:59:12 -04:00
parent 9e9ee0aee4
commit c1415c98c2
2 changed files with 9 additions and 11 deletions

View File

@ -10,7 +10,7 @@
(: my-* : Integer Integer -> Integer)
(define (my-* a b)
(if (zero? a)
(if (= a 1)
b
(my-* (sub1 a) (my-+ b b))))

View File

@ -5,8 +5,8 @@
(case-lambda
(Any Any -> Void)
(Any Any String -> Void)))
(define-type (Predicate A) (Any -> Boolean))
(define-type (Thunk A) (-> Any))
(define-type (Predicate A) (A -> Boolean))
(define-type (Thunk A) (-> A))
; 3.2
(require/typed/provide
@ -43,15 +43,13 @@
(Any -> #t)
(Any String -> #t))]
[check-exn
(All (A B)
(case-lambda
((Predicate A) (Thunk B) -> #t)
((Predicate A) (Thunk B) String -> #t)))]
(case-lambda
((Predicate Any) (Thunk Any) -> #t)
((Predicate Any) (Thunk Any) String -> #t))]
[check-not-exn
(All (A)
(case-lambda
((Thunk A) -> #t)
((Thunk A) String -> #t)))]
(case-lambda
((Thunk Any) -> #t)
((Thunk Any) String -> #t))]
[fail
(case-lambda
(-> #t)