If anyone's still reading, I can't resist adding that I was doing type checking by macro expansion — a technique that was the subject of a 2017 POPL paper [0] — in 1983.
[0] https://www.ccs.neu.edu/home/stchang/pubs/ckg-popl2017.pdf
[0] https://www.ccs.neu.edu/home/stchang/pubs/ckg-popl2017.pdf