diff --git a/tapl/tests/stlc-tests.rkt b/tapl/tests/stlc-tests.rkt index 02bcc1d..2502b9e 100644 --- a/tapl/tests/stlc-tests.rkt +++ b/tapl/tests/stlc-tests.rkt @@ -1,4 +1,12 @@ #lang s-exp "../stlc.rkt" (require "rackunit-typechecking.rkt") -;; cannot write any terms without base types \ No newline at end of file +;; 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") \ No newline at end of file