doc comments for show.rs; minor refactoring

renamed write_type -> write_type_definition
renamed write_inner_type -> write_type