sysf: move apply-forall to typecheck.rkt
This commit is contained in:
parent
ea5d41deb0
commit
caeda2ff0d
15
sysf.rkt
15
sysf.rkt
|
@ -56,21 +56,6 @@
|
|||
(⊢ (syntax/loc stx (lam xs e++ ... e_result++)) #'(∀ τs (→ τ ... τ_body)))]
|
||||
[(_ any ...) #'(stlc:λ any ...)]))
|
||||
|
||||
(define-for-syntax (apply-forall ∀τ τs)
|
||||
(define ctx (syntax-local-make-definition-context))
|
||||
(define id (generate-temporary))
|
||||
(syntax-local-bind-syntaxes
|
||||
(list id)
|
||||
(syntax-parse ∀τ #:datum-literals (∀)
|
||||
[(∀ (X ...) τbody)
|
||||
#'(λ (stx)
|
||||
(syntax-parse stx
|
||||
[(_ (τ (... ...)))
|
||||
#:with (X ...) #'(τ (... ...))
|
||||
#'τbody]))])
|
||||
ctx)
|
||||
(local-expand #`(#,id #,τs) 'expression (list #'#%app) ctx))
|
||||
|
||||
; #%app -----------------------------------------------------------------------
|
||||
(define-syntax (app/tc stx)
|
||||
(syntax-parse stx #:literals (→ void)
|
||||
|
|
Loading…
Reference in New Issue
Block a user