Log types of expressions and fully expanded syntax (before typechecking)
original commit: 780fb37c0dab0bdab8b91a083660ae88021435e8
This commit is contained in:
parent
2f3b9bb927
commit
ec2ee0af5f
|
@ -34,6 +34,8 @@
|
|||
(type-alias-env-map (lambda (id ty)
|
||||
(cons (syntax-e id) ty))))))
|
||||
|
||||
(define-logger online-check-syntax)
|
||||
|
||||
(define-syntax-rule (tc-setup orig-stx stx expand-ctxt fully-expanded-stx init checker pre-result post-result . body)
|
||||
(tc-setup/proc orig-stx stx expand-ctxt init checker
|
||||
(λ (fully-expanded-stx pre-result post-result)
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
(define (reset-type-table) (set! table (make-hasheq)))
|
||||
|
||||
(define (add-typeof-expr e t)
|
||||
(log-message online-check-syntax-logger 'info #f "type of expression" (list e t))
|
||||
(when (optimize?)
|
||||
(hash-update! table e
|
||||
;; when typechecking a case-> type, types get added for
|
||||
|
@ -30,6 +31,7 @@
|
|||
(ret (map Un old-ts t-ts))]
|
||||
[(_ _) t])) ; irrelevant to the optimizer, just clobber
|
||||
t)))
|
||||
(define-logger online-check-syntax)
|
||||
|
||||
(define (type-of e)
|
||||
(hash-ref table e
|
||||
|
|
Loading…
Reference in New Issue
Block a user