t:named?   scheme


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

Implementation

(define t:named? (lambda (x y)
                   (if (or (t:notype? x) (t:notype? y))
                       #t
                       (begin
                         (if (symbol? x) (set! x (symbol->string x)))
                         (if (symbol? y) (set! y (symbol->string y)))
                         (if (string? x) (set! x (impc:ir:get-type-from-pretty-str x)))
                         (if (string? y) (set! y (impc:ir:get-type-from-pretty-str y)))
                         (set! x (reduce-ptrdepth-to-zero x))
                         (set! y (reduce-ptrdepth-to-zero y))
                         ;; (println 'x x 'y y)
                         (if (and (string? x) (string? y))
                             (if (string=? (t:cleanup-string-type x) (t:cleanup-string-type y))
                                 #t
                                 #f)
                             (impc:ir:types-equal? x y))))))


Back to Index