add void to end of module begin of stlc; add some recursive tests

This commit is contained in:
Stephen Chang 2014-08-08 16:53:19 -04:00
parent 1e05e62963
commit 3c223663f0
2 changed files with 5 additions and 1 deletions

View File

@ -78,3 +78,7 @@
=> (cons {Int} 2 (cons {Int} 3 (null {Int}))))
(check-not-type (map add1 (cons {Int} 1 (cons {Int} 2 (null {Int}))))
: (Listof String))
(define (a [x : Int]) (b x))
(define (b [x : Int]) (a x))
(define (ff [x : Int]) (ff x))

View File

@ -336,7 +336,7 @@
; #:when (printf "mb: ~a\n" (syntax->datum (expand/df #'(letrec ([f v] ...) e ...))))
(quasisyntax/loc stx
(#%module-begin
#,(expand/df #'(letrec/tc ([f : τ v] ...) e ...))
#,(expand/df #'(letrec/tc ([f : τ v] ...) e ... (void)))
(define #,(datum->syntax stx 'runtime-env)
(for/hash ([x:τ '#,(map (λ () (cons (car ) (syntax->datum (cdr ))))
(hash->list (do-subst (Γ))))])