impc:ti:generic-type-details   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/llvmti.xtm

Implementation

(define impc:ti:generic-type-details
  (lambda (a)
    (if (and (symbol? a)
             (string-contains? (symbol->string a) "##"))
        (let* ((gname (car (regex:split (symbol->string a) "##")))
               (gnum (string->number (cadr (regex:split (symbol->string a) "##"))))
               (_basename (impc:ir:get-base-type gname))
               (name_and_type (impc:ti:split-namedtype _basename))
               (basename (car name_and_type))
               (gtype (if (null? (cdr name_and_type)) #f (cadr name_and_type)))
               (gchar (cdr (regex:split basename "%")))
               (gname2 (car (regex:split basename "%")))
               (gpt (impc:ti:get-generictype-candidate-types gname2)))
          (if gpt
              (list (string->symbol gname2) gnum (if (null? gchar) "" (car gchar)) (impc:ir:get-type-from-pretty-str (symbol->string gpt)) gtype)
              (list (string->symbol gname2) gnum (if (null? gchar) "" (car gchar)) '() gtype)))
        #f)))


Back to Index