add void to end of module begin of stlc; add some recursive tests
This commit is contained in:
parent
1e05e62963
commit
3c223663f0
|
@ -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))
|
||||
|
|
2
stlc.rkt
2
stlc.rkt
|
@ -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 (λ (xτ) (cons (car xτ) (syntax->datum (cdr xτ))))
|
||||
(hash->list (do-subst (Γ))))])
|
||||
|
|
Loading…
Reference in New Issue
Block a user