make types equality-comparable
calculate the type from type nodes in AST (wip)