typed-racket/typed-racket-test/succeed/type-variable-scope.rkt
2014-12-16 10:07:25 -05:00

25 lines
391 B
Racket

#lang typed/racket
;; Testing type variable scope
;;
;; These should all succeed
(: f (All (b) (b -> b)))
(define f
(plambda: (a) ([x : a]) x))
(: g (All (a) (a -> a)))
(define g
(plambda: (b) ([x : b]) x))
(: h (All (x y) (x -> x)))
(define h
(plambda: (a b) ([x : a]) x))
(: i (All (x) (x -> x)))
(define i
(plambda: (b) ([x : b])
(plambda: (b) ([y : b])
y)
x))