(define xtmdoc-namedtype-handler
(lambda (name-sym)
(list
'(category . "named type")
(cons 'name (symbol->string name-sym))
(list 'args)
(cons 'type (impc:ir:pretty-print-type (impc:ti:get-namedtype-type (symbol->string name-sym))))
(cons 'docstring
(let ((docstring (impc:ti:get-namedtype-docstring (symbol->string name-sym))))
(if (string=? docstring "") '() docstring))))))