impc:ti:get-polytype-candidate   scheme


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

Implementation

;; takes a polyname and a type, and returns the name of the first
;; (first) namedtype with that type
;; remap impc:ir:check-polytype
(define impc:ti:get-polytype-candidate
  (lambda (polytype-name func-type)
    (let loop ((candidates (impc:ti:get-polytype-candidate-list polytype-name)))
      (if (or (not candidates) (null? candidates))
          #f
          (if (equal? (vector-ref (car candidates) 1) func-type)
              (string->symbol (vector-ref (car candidates) 0))
              (loop (cdr candidates)))))))


Back to Index

Similar Entries