;; this one will recursively keep following aliases until it reaches
;; the "ground" type
(define impc:ti:get-typealias-ground-type
(lambda (typealias-name)
(let loop ((lowered-alias (impc:ti:get-typealias-type typealias-name)))
(if (and lowered-alias (string? lowered-alias))
(loop (impc:ti:get-typealias-type lowered-alias))
lowered-alias))))