;; The first three lines of this file were inserted by DrScheme. ;; They record information about the language level. #reader(lib "plai-restricted-reader.ss" "plai")((modname type-checker-template) (read-case-sensitive #t) (teachpacks ())) ;;; Your solution must be written in PLAI Restricted Scheme ;;; Group members: arjun sk dwincort sms (fill in as appropriate) (define-type Expr [num (n number?)] [id (v symbol?)] [bool (b boolean?)] [bin-num-op (op procedure?) (lhs Expr?) (rhs Expr?)] [iszero (e Expr?)] [bif (test Expr?) (then Expr?) (else Expr?)] [with (bound-id symbol?) (bound-body Expr?) (body Expr?)] [fun (arg-id symbol?) (arg-type Type?) (result-type Type?) (body Expr?)] [app (fun-expr Expr?) (arg-expr Expr?)] [nempty] [ncons (first Expr?) (rest Expr?)] [nfirst (e Expr?)] [nrest (e Expr?)] [isnempty (e Expr?)]) (define-type Type [t-num] [t-bool] [t-nlist] [t-fun (arg Type?) (result Type?)]) ;;; parse :: s-expression -> Expr (define (parse sexp) (error 'parse "not implemented")) ;;; type-of :: Expr -> Type (define (type-of e) (error 'type-of "not implemented"))