I need to do letrec...

This commit is contained in:
Danny Yoo 2011-03-19 19:52:19 -04:00
parent 541da68b82
commit 488fe3f0a1
2 changed files with 13 additions and 2 deletions

View File

@ -49,7 +49,7 @@
#:transparent)
(define-struct: LetRec ([count : Natural]
[rhss : (Listof ExpressionCore)]
[rhss : (Listof Lam)]
[body : ExpressionCore])
#:transparent)

View File

@ -254,4 +254,15 @@
;; stack layout [???, x_1, x_0, prefix]
(make-App (make-ToplevelRef 3 0)
(list (make-LocalRef 1)))))))
(list (make-LocalRef 1)))))))
(test (parse '(let* ()
42))
(make-Top (make-Prefix '()) (make-Constant 42)))
(test (parse '(letrec ([x (lambda (x) x)]
[y (lambda (x) x)])))
(make-Top (make-Prefix '())