#include "modules.h"
+static SCM the_root_module;
+
+SCM
+scm_the_root_module ()
+{
+ return SCM_CDR (the_root_module);
+}
+
static SCM the_module;
SCM
}
static SCM make_modules_in;
+static SCM beautify_user_module_x;
SCM
scm_make_module (SCM name)
{
return scm_apply (SCM_CDR (make_modules_in),
- SCM_LIST2 (scm_selected_module (),
+ SCM_LIST2 (scm_the_root_module (),
scm_module_full_name (name)),
SCM_EOL);
}
+SCM
+scm_ensure_user_module (SCM module)
+{
+ scm_apply (SCM_CDR (beautify_user_module_x), SCM_LIST1 (module), SCM_EOL);
+ return SCM_UNSPECIFIED;
+}
+
static SCM module_eval_closure;
SCM
SCM_EOL);
}
+static SCM try_module_autoload;
+
+SCM
+scm_load_scheme_module (SCM name)
+{
+ return scm_apply (SCM_CDR (try_module_autoload), SCM_LIST1 (name), SCM_EOL);
+}
+
void
scm_init_modules ()
{
void
scm_post_boot_init_modules ()
{
+ the_root_module = scm_intern0 ("the-root-module");
the_module = scm_intern0 ("the-module");
set_current_module = scm_intern0 ("set-current-module");
module_prefix = scm_permanent_object (SCM_LIST2 (scm_sym_app,
scm_sym_modules));
make_modules_in = scm_intern0 ("make-modules-in");
+ beautify_user_module_x = scm_intern0 ("beautify-user-module!");
module_eval_closure = scm_intern0 ("module-eval-closure");
+ try_module_autoload = scm_intern0 ("try-module-autoload");
}
extern SCM scm_selected_module (void);
extern SCM scm_select_module (SCM module);
extern SCM scm_make_module (SCM name);
+extern SCM scm_ensure_user_module (SCM name);
extern SCM scm_module_lookup_closure (SCM module);
+extern SCM scm_load_scheme_module (SCM name);
extern void scm_init_modules (void);
extern void scm_post_boot_init_modules (void);