Hi Schemers,

I am developing an application in R7RS Scheme and I would like to get
it to work on MIT Scheme. (It also runs on Guile and Gauche).

I am running MIT Scheme 12.1 on AArch64 Debian:

    > MIT/GNU Scheme running under GNU/Linux
    > Image saved on Saturday January 7, 2023 at 2:49:11 AM
    >  Release 12.1 || SF || LIAR/AArch64

My source code is public:
<https://codeberg.org/ramin_hal9001/schemacs>.  To run the program,
launch "scheme" from the project top-level directory and execute:
(load "build.scm") (load "elisp-tests.scm")

I actually have two different questions.

My first question is on using "cf". I can "load" a library definition
without issue, but when I run "cf" I keep getting "unregistered import
library" errors like this:

------------------------------------------------------------
    ;Generating SCode for file: "schemacs/string.sld" =>
"schemacs/string.binld"...
    ;Unregistered import libraries: ((srfi 140))
------------------------------------------------------------

This even happens when I build and load a library in the same directory:

------------------------------------------------------------
    1 ]=> (cf "slib/common.sld")

    ;Generating SCode for file: "slib/common.sld" => "slib/common.binld"...
    ;Warning: Unreferenced bound variable: #[uninterned-symbol 39
.args.0] (system)
    ;Warning: Unreferenced bound variable: #[uninterned-symbol 40
.arg.6] (output-port-height)
    ;Warning: Unreferenced bound variable: #[uninterned-symbol 41
.arg.7] (output-port-width)
    ;... done
    ;Compiling file: "slib/common.binld" => "slib/common.comld"... done
    ;Unspecified return value

    1 ]=> (load "slib/common.comld")

    ;Loading "slib/common.comld"...
    ;Warning: Replacing library: #[library 47 (slib common)]
#[library-db 36 host]
    ;... done
    ;Value: (slib common)

    1 ]=> (cf "slib/filename.sld")

    ;Generating SCode for file: "slib/filename.sld" => "slib/filename.binld"...
    ;Unregistered import libraries: ((slib common))
    ;To continue, call RESTART with an option number:
    ; (RESTART 2) => Skip processing file
/home/ramin/work-src/schemacs/slib/filename.sld
    ; (RESTART 1) => Return to read-eval-print level 1.
------------------------------------------------------------

Even when I load the library file containing the definition of "(slib
common)" the compiler doesn't see it when it is imported by a library
in the same directory.

I can't seem to find any information in the documentation about
"registering" import libraries. Though a "grep" through the compiler
source code shows me there is a "runtime" library I can import. So my
first question is, how might I resolve this issue with the compiler?

The second question I have is that there appears to be a "cref"
utility, and a "(define-package)" form that MIT Scheme recognizes, but
I can't find documentation on this anywhere. Is that for internal use
only, or are there tools to build my project as a binary before
loading it?

Thanks, and best regards,

-- Ramin Honary

Reply via email to