(define impc:ti:generate-generic-type-cname
(lambda (t gtype)
;; (println 'gentypecname: t gtype)
(let (;(mint (impc:ti:minimize-generic-type t gtype)))
(mint (impc:ti:minimized-gen-type t gtype)))
;; (println 'generatecname: t 'gtype gtype 'min mint)
(for-each (lambda (x)
(if (string-contains? x "!")
(impc:compiler:print-bad-type-error t
(string-append "Could not generate type cname:" (sexpr->string mint)))))
mint)
;; (println 'new_cname_for: 't: t 'is (string-append "<" (string-join mint ",") ">"))
(cname-encode (string-append "<" (string-join mint ",") ">")))))