Implement a typed AST.