www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

stlc-tests.rkt (564B)


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