Typed Racket first runs the macro expander, and then type checks the
expanded program.

If your implementation can type check an expanded program too, then
you can probably get started by copy/pasting typed racket's
#%module-begin and inserting a new pass over the program just after
the optimizer. Here's one place to get started looking for what to
re-use:*
https://github.com/racket/typed-racket/blob/master/typed-racket-lib/typed-racket/core.rkt#L34

If your implementation wants to type check the surface syntax of a
program, then maybe you can hack something together using the above
strategy and the source-syntax library:
http://docs.racket-lang.org/source-syntax/index.html


* I think it'd be nice if typed racket provided an "expand +
type-check" function that other #langs could re-use, but AFAIK it
doesn't yet

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to