UNB/ CS/ David Bremner/ teaching/ cs4613/ lectures/ lecture13/ ex.rkt
(define (typecheck [fae : FAE] [env : TypeEnv]) : Type
  (type-case FAE fae
    [(Add l r)
     (let* ([l-type  (typecheck l env)]
            [r-type  (typecheck r env)])
       (if (and
            (equal? l-type (NumT))
            (equal? r-type (NumT)))
           (NumT)
           (error 'typecheck "oops")))