Putting first-class and second-class types in the same tree