Refactor the typechecker to use ExpTypes.