mkapidocs.py: decompose the high-level types