Use ordered sets for type graph