macrotypes/tapl/tests/stlc-tests.rkt
2015-10-22 13:22:35 -04:00

12 lines
564 B
Racket

#lang s-exp "../stlc.rkt"
(require "rackunit-typechecking.rkt")
;; cannot write any terms without base types, but can check some errors
(typecheck-fail (λ ([x : Undef]) x) #:with-msg "Undef: unbound identifier")
(typecheck-fail (λ ([x : ]) x)
#:with-msg "Improper usage of type constructor →.+expected >= 1 arguments")
(typecheck-fail (λ ([x : ()]) x)
#:with-msg "Improper usage of type constructor →.+expected >= 1 arguments")
(typecheck-fail (λ ([x : ( )]) x)
#:with-msg "Improper usage of type constructor →.+expected >= 1 arguments")