(define local_gen_type_minimize
(lambda (n t)
(let* ((l (map atom->string t))
(l1 (foldl (lambda (xs x)
(append (regex:match-all (atom->string x) "(![a-z]*)") xs))
'() (cdr l)))
(l2 (cl:remove-duplicates (reverse l1)))
(l3 (foldl (lambda (xs x)
(if (string=? "" xs)
(string-append xs x)
(string-append xs "," x)))
"" l2)))
(if (null? l2)
(string-append (symbol->string n) "_data_" (car l))
(string-append (symbol->string n) "_data_" (car l) "{" l3 "}")))))