add sysf tests
This commit is contained in:
parent
820d56cf2a
commit
1a327fc8f9
9
sysf-tests.rkt
Normal file
9
sysf-tests.rkt
Normal file
|
@ -0,0 +1,9 @@
|
|||
#lang s-exp "sysf.rkt"
|
||||
|
||||
;; polymorphic tests
|
||||
(define-type (Maybe X) (variant (None) (Just X)))
|
||||
(check-type (None {Int}) : (Maybe Int))
|
||||
(check-type (Just {Int} 1) : (Maybe Int))
|
||||
(check-type-error (Just {Int} #f))
|
||||
(check-not-type (Just {Int} 1) : (Maybe Bool))
|
||||
(check-type (λ {X} ([x : X]) x) : (∀ (X) (→ X X)))
|
Loading…
Reference in New Issue
Block a user