(define impc:ti:split-namedtype
(lambda (str)
(if (symbol? str) (set! str (symbol->string str)))
(if (regex:match? str "^[A-Za-z0-9_]*{")
(let* ((p (regex:type-split str "{"))
(ptrd (impc:ir:get-ptr-depth (cadr p)))
(base (impc:ir:get-base-type (cadr p))))
(list (car p) (apply string-append "<" (substring base 0 (- (string-length base) 1)) ">"
(make-list ptrd "*"))))
(if (regex:match? str "^[A-Za-z0-9_]*:")
(regex:type-split str ":")
(regex:type-split str "\\*")))))