Annotate ast with types for adt codegen