impc:ir:get-type-from-pretty-tuple   scheme


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

Implementation

(define impc:ir:get-type-from-pretty-tuple
  (lambda (string-type . args)
    (if (not (char=? (string-ref string-type 0) #\<))
        (impc:compiler:print-bad-type-error string-type "tuple type should start with '<'")
        (let* ((s1 (regex:replace string-type "\\<(.*)\\>?.*" "$1"))
               (t1 (impc:ir:get-type-joiner
                    (cl:remove-if (lambda (x) (string=? x ""))
                                  (regex:match-all s1 impc:ir:regex-tc-or-a))))
               (t2 (map (lambda (x) (apply impc:ir:get-type-from-pretty-str x args)) t1)))
          t2))))


Back to Index