bind-alias   macro


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

Implementation

(define-macro (bind-alias symbol type . docstring)
  `(begin (impc:ti:register-new-typealias
           ,(symbol->string symbol)
           ',(impc:ir:get-type-from-pretty-str (symbol->string type))
           ,(if (null? docstring) "" (car docstring)))
          (impc:compiler:print-binding-details-to-log
           "SetAlias:"
           ',symbol
           ;;(print ',type)
           (begin
             (set! *impc:ir:get-type-callback-off* #t) ;; don't wait, do it immediately
             (let ((r (impc:ir:pretty-print-type ,(symbol->string symbol))))
               (set! *impc:ir:get-type-callback-off* #f)
               r))
           )))


Back to Index