(define impc:aot:insert-namedtype-binding-details
(lambda (name type docstring)
(if (output-port? *impc:aot:current-output-port*)
(begin
(write
(list
(if *impc:compiler:aot:dll* 'bind-lib-type 'register-lib-type)
(string->symbol *impc:aot:current-lib-name*)
(string->symbol name)
(string->symbol (impc:ir:pretty-print-type type))
docstring)
*impc:aot:current-output-port*)
(newline *impc:aot:current-output-port*)))))