commit f4979c9e5892e19c74d5a55d2a24f3e1114503a6
parent b8e3ad16024a693c632383bd478c2e01ad07ad71
Author: Stephen Chang <stchang@ccs.neu.edu>
Date: Thu, 10 Mar 2016 16:23:00 -0500
fix mlish tests to use ->/test -- all tests passing
Diffstat:
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/tapl/tests/mlish-tests.rkt b/tapl/tests/mlish-tests.rkt
@@ -18,7 +18,7 @@
(typecheck-fail (f (λ ([x : Int]) x)))
(define (g [x : X] → X) x)
-(check-type g : (→ X X))
+(check-type g : (→/test X X))
;; (inferred) polymorpic instantiation
(check-type (g 1) : Int ⇒ 1)
@@ -41,7 +41,7 @@
#:with-msg "match: clauses not exhaustive; missing: Nil")
(define (g2 [lst : (List Y)] → (List Y)) lst)
-(check-type g2 : (→ (List Y) (List Y)))
+(check-type g2 : (→/test (List Y) (List Y)))
(typecheck-fail (g2 1)
#:with-msg
(expected "(List Y)" #:given "Int"
@@ -85,11 +85,11 @@
(match lst with
[Nil -> Nil]
[Cons x xs -> (Cons (f x) (map f xs))]))
-(check-type map : (→ (→ X Y) (List X) (List Y)))
-(check-type map : (→ (→ Y X) (List Y) (List X)))
-(check-type map : (→ (→ A B) (List A) (List B)))
-(check-not-type map : (→ (→ A B) (List B) (List A)))
-(check-not-type map : (→ (→ X X) (List X) (List X))) ; only 1 bound tyvar
+(check-type map : (→/test (→ X Y) (List X) (List Y)))
+(check-type map : (→/test (→ Y X) (List Y) (List X)))
+(check-type map : (→/test (→ A B) (List A) (List B)))
+(check-not-type map : (→/test (→ A B) (List B) (List A)))
+(check-not-type map : (→/test (→ X X) (List X) (List X))) ; only 1 bound tyvar
; nil without annotation; tests fn-first, left-to-right arg inference
; does work yet, need to add left-to-right inference in #%app
diff --git a/tapl/tests/mlish/queens.mlish b/tapl/tests/mlish/queens.mlish
@@ -22,11 +22,11 @@
(match lst with
[Nil -> Nil]
[Cons x xs -> (Cons (f x) (map f xs))]))
-(check-type map : (→ (→ X Y) (List X) (List Y)))
-(check-type map : (→ (→ Y X) (List Y) (List X)))
-(check-type map : (→ (→ A B) (List A) (List B)))
-(check-not-type map : (→ (→ A B) (List B) (List A)))
-(check-not-type map : (→ (→ X X) (List X) (List X))) ; only 1 bound tyvar
+(check-type map : (→/test (→ X Y) (List X) (List Y)))
+(check-type map : (→/test (→ Y X) (List Y) (List X)))
+(check-type map : (→/test (→ A B) (List A) (List B)))
+(check-not-type map : (→/test (→ A B) (List B) (List A)))
+(check-not-type map : (→/test (→ X X) (List X) (List X))) ; only 1 bound tyvar
; nil without annotation; tests fn-first, left-to-right arg inference
; does work yet, need to add left-to-right inference in #%app