From 28108884ab90dfe29f721dcee8575afd7d1a7f5b Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Wed, 12 Dec 2012 14:01:34 -0500 Subject: [PATCH] Fix tests where type variable scoping is wrong --- collects/tests/racket/benchmarks/common/typed/lattice2.rktl | 6 +++--- collects/tests/typed-racket/succeed/basic-tests.rkt | 6 +++--- collects/tests/typed-racket/succeed/leftist-heap.rkt | 2 +- collects/tests/typed-racket/succeed/little-schemer.rkt | 6 +++--- collects/tests/typed-racket/succeed/poly-tests.rkt | 6 +++--- collects/tests/typed-racket/succeed/priority-queue.scm | 6 +++--- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/collects/tests/racket/benchmarks/common/typed/lattice2.rktl b/collects/tests/racket/benchmarks/common/typed/lattice2.rktl index 86f9c21863..4712e6e66b 100644 --- a/collects/tests/racket/benchmarks/common/typed/lattice2.rktl +++ b/collects/tests/racket/benchmarks/common/typed/lattice2.rktl @@ -67,7 +67,7 @@ (: zulu-select (All (X) ((X -> Any) (Listof X) -> (Listof X)))) (define zulu-select (lambda (test lst) - (: select-a (All (X) ((Listof X) (Listof X) -> (Listof X)))) + (: select-a ((Listof X) (Listof X) -> (Listof X))) (define select-a (lambda (ac lst) (if (null? lst) @@ -86,7 +86,7 @@ (: select-map (All (X Y) ((X -> Any) (X -> Y) (Listof X) -> (Listof Y)))) (define select-map (lambda (test func lst) - (: select-a (All (X Y) ((Listof Y) (Listof X) -> (Listof Y)))) + (: select-a ((Listof Y) (Listof X) -> (Listof Y))) (define select-a (lambda (ac lst) (if (null? lst) @@ -108,7 +108,7 @@ (lambda (proc lst) (if (null? lst) #t - (letrec: ((drudge : (All (X) ((Listof X) -> Any)) + (letrec: ((drudge : ((Listof X) -> Any) (lambda (lst) (let ((rest (cdr lst))) (if (null? rest) diff --git a/collects/tests/typed-racket/succeed/basic-tests.rkt b/collects/tests/typed-racket/succeed/basic-tests.rkt index f127a11bdc..02c1af3bf2 100644 --- a/collects/tests/typed-racket/succeed/basic-tests.rkt +++ b/collects/tests/typed-racket/succeed/basic-tests.rkt @@ -92,9 +92,9 @@ (define: mymap : (All (a b) ((a -> b) (Listof a) -> (Listof b))) (plambda: (a b) ([f : (a -> b)] [l : (Listof a)]) - (cond [(null? l) '()] - [else (cons (f (car l)) - (mymap f (cdr l)))]))) + (cond [(null? l) '()] + [else (cons (f (car l)) + (mymap f (cdr l)))]))) (mymap add1 (cons 1 (cons 2 (cons 3 #{'() :: (Listof number)})))) diff --git a/collects/tests/typed-racket/succeed/leftist-heap.rkt b/collects/tests/typed-racket/succeed/leftist-heap.rkt index 3dd6f1aaf9..6cea6c2b30 100644 --- a/collects/tests/typed-racket/succeed/leftist-heap.rkt +++ b/collects/tests/typed-racket/succeed/leftist-heap.rkt @@ -207,7 +207,7 @@ (define: list->heap : (All (a) (case-lambda (comparator (list-of a) -> (Heap a)) ((list-of a) -> (Heap a)))) ; time: O(n) - (pcase-lambda: (a) + (pcase-lambda: (a) [([l : (list-of a)]) (list->heap (current-compare) l)] [([cmp : comparator] [l : (list-of a)]) (let* ([e (#{empty @ a} cmp)] diff --git a/collects/tests/typed-racket/succeed/little-schemer.rkt b/collects/tests/typed-racket/succeed/little-schemer.rkt index a32d491941..087fa50f02 100644 --- a/collects/tests/typed-racket/succeed/little-schemer.rkt +++ b/collects/tests/typed-racket/succeed/little-schemer.rkt @@ -357,9 +357,9 @@ ;; FIXME (define: mymap : (All (a b) ((a -> b) (list-of a) -> (list-of b))) (plambda: (a b) ([f : (a -> b)] [l : (list-of a)]) - (cond [(null? l) '()] - [else (cons (f (car l)) - (mymap f (cdr l)))]))) + (cond [(null? l) '()] + [else (cons (f (car l)) + (mymap f (cdr l)))]))) (mymap add1 (cons 1 (cons 2 (cons 3 '())))) diff --git a/collects/tests/typed-racket/succeed/poly-tests.rkt b/collects/tests/typed-racket/succeed/poly-tests.rkt index 6458bf98e3..c3d8212fbf 100644 --- a/collects/tests/typed-racket/succeed/poly-tests.rkt +++ b/collects/tests/typed-racket/succeed/poly-tests.rkt @@ -7,9 +7,9 @@ #;(require "prims.rkt") (define: mymap : (All (a b) ((a -> b) (list-of a) -> (list-of b))) (plambda: (a b) ([f : (a -> b)] [l : (list-of a)]) - (cond [(null? l) '()] - [else (cons (f (car l)) - (mymap f (cdr l)))]))) + (cond [(null? l) '()] + [else (cons (f (car l)) + (mymap f (cdr l)))]))) (pdefine: (a b) (mymap2 [f : (a -> b)] [l : (list-of a)]) : (list-of b) (cond [(null? l) '()] diff --git a/collects/tests/typed-racket/succeed/priority-queue.scm b/collects/tests/typed-racket/succeed/priority-queue.scm index 3e7b563996..054c06c9e5 100644 --- a/collects/tests/typed-racket/succeed/priority-queue.scm +++ b/collects/tests/typed-racket/succeed/priority-queue.scm @@ -54,9 +54,9 @@ (define: empty : (All (a) (case-lambda (-> (priority-queue a)) (comparator -> (priority-queue a)))) (pcase-lambda: (a) - [() (#{empty @ a} (current-compare))] - [([cmp : comparator]) (make (#{heap:empty :: (case-lambda (-> (pqh a)) - (comparator -> (pqh a)))} cmp))])) + [() (#{empty @ a} (current-compare))] + [([cmp : comparator]) (make (#{heap:empty :: (case-lambda (-> (pqh a)) + (comparator -> (pqh a)))} cmp))])) (pdefine: (e r) (fold [f : ((cons number e) r -> r)] [b : r] [a : (priority-queue e)]) : r (heap:fold f b (#{heap :: ((priority-queue e) -> (pqh e))} a)))