chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: require-extension and require-library


From: Evan Hanson
Subject: Re: require-extension and require-library
Date: Thu, 23 Dec 2021 11:24:45 +1300

Hi Erica,

require-extension and require-library are only equivalent when import
libraries ("import.scm" files) are available for the given name, which
isn't the case in your interpreted example.

When main_a.scm starts, it implicitly tries to import module "extra" as
a first step, and no such module is available (since "extra.scm" has not
been evaluated yet and there is no file "extra.import.scm" to load).

When main_b.scm starts, it firstly evaluates "extra.scm" (thereby
registering module "extra") and _then_ imports module "extra", which
works since the module is known to the runtime.

That doesn't really help achieve your goal of making the compiled and
interpreted cases works the same, I know, but it hopefully helps to
explain the difference in behaviour between those files.

Cheers,

Evan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]