diff options
author | JJ | 2024-07-29 19:47:19 +0000 |
---|---|---|
committer | JJ | 2024-07-29 19:47:19 +0000 |
commit | 83a1400957da57bf6930bab4b81af87f1851be5b (patch) | |
tree | ace9579033a9967893656e681ad938e8ac82f351 /stlc-fix.rkt | |
parent | 17c9a9a1eb4b211b5b4260d7cdca598d14316ac3 (diff) |
split lib into lib and base; move tests to separate files & directory
Diffstat (limited to 'stlc-fix.rkt')
-rw-r--r-- | stlc-fix.rkt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/stlc-fix.rkt b/stlc-fix.rkt index ad45b90..2c68696 100644 --- a/stlc-fix.rkt +++ b/stlc-fix.rkt @@ -1,9 +1,10 @@ #lang racket (require "lib.rkt") +(require "base.rkt") ;; The Simply-Typed Lambda Calculus, with general recursion -;; (interpret Expr Table[Sym, Expr]): Value +;; (interpret Expr Context): Value (define (interpret expr) (interpret-core (strip (desugar expr)) #hash())) (define (interpret-core expr Γ) @@ -29,7 +30,7 @@ [e (err (format "interpreting an unknown expression ~a" e))])) -;; (check Expr Type Table[Sym, Type]): Bool +;; (check Expr Type Context): Bool (define (check expr with) (check-core (desugar expr) with #hash())) (define (check-core expr with Γ) @@ -47,7 +48,7 @@ [_ (equal? (infer-core expr Γ) with)]))) -;; (infer Expr Table[Sym, Type]): Type +;; (infer Expr Context): Type (define (infer expr) (infer-core (desugar expr) #hash())) (define (infer-core expr Γ) |