#lang plai ;;; Group members: arjun sk dwincort sms (fill in as appropriate) (define (operator-symbol? x) (member x '(+ - * /))) (define-type Expr [num (n number?)] [id (v symbol?)] [bool (b boolean?)] [bin-num-op (op operator-symbol?) (lhs Expr?) (rhs Expr?)] [iszero (e Expr?)] [bif (test Expr?) (then Expr?) (else Expr?)] [with (bound-id symbol?) (bound-type Type?) (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"))