adjust check syntax so it can show info before expansion completes

and sometimes when there are syntax errors raised

In more detail, rearrange online check syntax's internal plumbing
so that syntax objects can be handed to check syntax at any point
(via a special log message, see the changes to the docs)
not just when expansion is finished

Use this in TR to get check syntax information even when there is
a type error (and also get the check syntax information processing
started before type checking starts (altho this isn't running
in a separate place, so there is no new parallelism here))

original commit: 09920bd8ce46f15d9cf4a5066ab2cfb84bbdd417
This commit is contained in:
Robby Findler 2013-09-30 15:41:18 -05:00
parent f44c9539f0
commit 459a59a954

View File

@ -42,6 +42,8 @@
.
body)))
(define-logger online-check-syntax)
(define (tc-setup/proc orig-stx stx expand-ctxt init checker f)
(set-box! typed-context? #t)
;(start-timing (syntax-property stx 'enclosing-module-name))
@ -62,6 +64,12 @@
(when (show-input?)
(pretty-print (syntax->datum fully-expanded-stx)))
(do-time "Local Expand Done")
(let ([exprs (syntax->list (syntax-local-introduce fully-expanded-stx))])
(when (pair? exprs)
(log-message online-check-syntax-logger
'info
"TR's expanded syntax objects; this message is ignored"
(cdr exprs))))
(init)
(do-time "Initialized Envs")
(find-mutated-vars fully-expanded-stx mvar-env)