#lang plai

(define-type TFWAE
  [num (n number?)]
  [add (lhs TFWAE?) (rhs TFWAE?)]
  [with (name symbol?) (named-expr TFWAE?) (body TFWAE?)]
  [id (name symbol?)]
  [fun (arg-id symbol?) (arg-type Type?) (result-type Type?) (body TFWAE?)]
  [app (fun-expr TFWAE?) (arg-expr TFWAE?)])

(define-type Type
  [t-num]
  [t-fun (arg Type?) (result Type?)])

;; type=? : Type Type -> boolean
(define (type=? t1 t2)
  (error "not implemented"))

;; parse-type : s-expression -> Type
(define (parse-type t-expr)
  (error "not implemented"))

;; parse : s-expression -> TFWAE
(define (parse sexp)
  (error "not implemented"))

;; type-of : TFWAE -> Type
(define (type-of expr)
  (error "not implemented"))
