How do compilers represent types in an AST in practice? https://blog.ezyang.com/2013/05/the-ast-typing-problem/