From 70767635bb8cccfcba4432bc746a33e0964db805 Mon Sep 17 00:00:00 2001 From: Stephen Chang Date: Tue, 19 Aug 2014 15:53:41 -0400 Subject: [PATCH] stlc: cleanup --- stlc.rkt | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/stlc.rkt b/stlc.rkt index c00ce08..6cc3d41 100644 --- a/stlc.rkt +++ b/stlc.rkt @@ -19,16 +19,15 @@ (rename-out [λ/tc λ] [app/tc #%app] [let/tc let] [define/tc define] [begin/tc begin] [void/tc void] - [if/tc if] #;[+/tc +] + [if/tc if] [datum/tc #%datum] [module-begin/tc #%module-begin] [cons/tc cons] [null/tc null] [null?/tc null?] [first/tc first] [rest/tc rest] [list/tc list])) ;; Simply-Typed Lambda Calculus+ ;; Features: -;; - letrec -;; - lists +;; - stlc ;; - user (recursive) function definitions -;; - user (recursive) (variant) type-definitions +;; - user (recursive) (variant) type-definitions + cases (define-and-provide-builtin-types Int String Bool → Listof Unit) (provide (for-syntax assert-Unit-type assert-Int-type)) @@ -93,14 +92,6 @@ (syntax-parse stx [(_) (⊢ (syntax/loc stx (void)) #'Unit)])) - -#;(define-syntax (+/tc stx) - (syntax-parse stx - [(_ e ...) - #:with (e+ ...) (stx-map expand/df #'(e ...)) - #:when (stx-andmap assert-Int-type #'(e+ ...)) - (⊢ (syntax/loc stx (+ e+ ...)) #'Int)])) - (define-syntax (define-prim stx) (syntax-parse stx [(_ op τ_arg τ_res)