sys:load-preload-check   scheme


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

Implementation

(define sys:load-preload-check
  (lambda (libname)
    (if (not (or (symbol? libname) (string? libname)))
        (sys:load-escape "Error: lib-name must be symbol or string."))
    (if (not (string=? (ipc:get-process-name) "primary"))
        (sys:load-escape "Error: xtlang code must be compiled in the primary process."))
    (if (defined? (string->symbol (string-append "*xtmlib-" (atom->string libname) "-loaded*")))
        (sys:load-escape (string-append (atom->string libname) " already loaded")))))


Back to Index