;; checks both named types and poly types
(define impc:ti:get-named-type
(lambda (name)
(or (impc:ti:get-generictype-candidate-types name)
(impc:ti:get-polytype-candidate-types name)
(let ((from-cache (impc:ti:get-namedtype-type name)))
(and from-cache
;; because the old (pre-mcjit) version used
;; llvm:get-named-type, which returned the type in
;; LLVM IR format, we convert to this format
(impc:ir:get-type-str from-cache))))))