1 /* Copyright (C) 1998,2000,2001,2002,2003,2004,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public License
5 * as published by the Free Software Foundation; either version 3 of
6 * the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
27 #include "libguile/_scm.h"
29 #include "libguile/eval.h"
30 #include "libguile/smob.h"
31 #include "libguile/procprop.h"
32 #include "libguile/vectors.h"
33 #include "libguile/hashtab.h"
34 #include "libguile/struct.h"
35 #include "libguile/variable.h"
36 #include "libguile/fluids.h"
37 #include "libguile/deprecation.h"
39 #include "libguile/modules.h"
41 int scm_module_system_booted_p
= 0;
43 scm_t_bits scm_module_tag
;
45 /* The current module, a fluid. */
46 static SCM the_module
;
48 /* Most of the module system is implemented in Scheme. These bindings from
49 boot-9 are needed to provide the Scheme interface. */
50 static SCM the_root_module_var
;
51 static SCM module_make_local_var_x_var
;
52 static SCM define_module_star_var
;
53 static SCM process_use_modules_var
;
54 static SCM resolve_module_var
;
55 static SCM module_public_interface_var
;
56 static SCM module_export_x_var
;
57 static SCM default_duplicate_binding_procedures_var
;
60 static SCM
unbound_variable (const char *func
, SCM sym
)
62 scm_error (scm_from_locale_symbol ("unbound-variable"), func
,
63 "Unbound variable: ~S", scm_list_1 (sym
), SCM_BOOL_F
);
67 scm_the_root_module (void)
69 if (scm_module_system_booted_p
)
70 return SCM_VARIABLE_REF (the_root_module_var
);
75 SCM_DEFINE (scm_current_module
, "current-module", 0, 0, 0,
77 "Return the current module.")
78 #define FUNC_NAME s_scm_current_module
80 SCM curr
= scm_fluid_ref (the_module
);
82 return scm_is_true (curr
) ? curr
: scm_the_root_module ();
86 static void scm_post_boot_init_modules (void);
88 SCM_DEFINE (scm_set_current_module
, "set-current-module", 1, 0, 0,
90 "Set the current module to @var{module} and return\n"
91 "the previous current module.")
92 #define FUNC_NAME s_scm_set_current_module
96 if (!scm_module_system_booted_p
)
97 scm_post_boot_init_modules ();
99 SCM_VALIDATE_MODULE (SCM_ARG1
, module
);
101 old
= scm_current_module ();
102 scm_fluid_set_x (the_module
, module
);
108 SCM_DEFINE (scm_interaction_environment
, "interaction-environment", 0, 0, 0,
110 "Return a specifier for the environment that contains\n"
111 "implementation--defined bindings, typically a superset of those\n"
112 "listed in the report. The intent is that this procedure will\n"
113 "return the environment in which the implementation would\n"
114 "evaluate expressions dynamically typed by the user.")
115 #define FUNC_NAME s_scm_interaction_environment
117 return scm_current_module ();
122 scm_c_call_with_current_module (SCM module
,
123 SCM (*func
)(void *), void *data
)
125 return scm_c_with_fluid (the_module
, module
, func
, data
);
129 scm_dynwind_current_module (SCM module
)
131 scm_dynwind_fluid (the_module
, module
);
135 convert "A B C" to scheme list (A B C)
138 convert_module_name (const char *name
)
149 while (*ptr
&& *ptr
!= ' ')
153 SCM sym
= scm_from_locale_symboln (name
, ptr
-name
);
154 *tail
= scm_cons (sym
, SCM_EOL
);
155 tail
= SCM_CDRLOC (*tail
);
164 scm_c_resolve_module (const char *name
)
166 return scm_resolve_module (convert_module_name (name
));
170 scm_resolve_module (SCM name
)
172 return scm_call_1 (SCM_VARIABLE_REF (resolve_module_var
), name
);
176 scm_c_define_module (const char *name
,
177 void (*init
)(void *), void *data
)
179 SCM module
= scm_call_1 (SCM_VARIABLE_REF (define_module_star_var
),
180 convert_module_name (name
));
182 scm_c_call_with_current_module (module
, (SCM (*)(void*))init
, data
);
187 scm_c_use_module (const char *name
)
189 scm_call_1 (SCM_VARIABLE_REF (process_use_modules_var
),
190 scm_list_1 (scm_list_1 (convert_module_name (name
))));
194 scm_module_export (SCM module
, SCM namelist
)
196 return scm_call_2 (SCM_VARIABLE_REF (module_export_x_var
),
202 @code{scm_c_export}(@var{name-list})
204 @code{scm_c_export} exports the named bindings from the current
205 module, making them visible to users of the module. This function
206 takes a list of string arguments, terminated by NULL, e.g.
209 scm_c_export ("add-double-record", "bamboozle-money", NULL);
213 scm_c_export (const char *name
, ...)
218 SCM names
= scm_cons (scm_from_locale_symbol (name
), SCM_EOL
);
219 SCM
*tail
= SCM_CDRLOC (names
);
223 const char *n
= va_arg (ap
, const char *);
226 *tail
= scm_cons (scm_from_locale_symbol (n
), SCM_EOL
);
227 tail
= SCM_CDRLOC (*tail
);
230 scm_module_export (scm_current_module (), names
);
237 SCM_SYMBOL (sym_module
, "module");
240 scm_lookup_closure_module (SCM proc
)
242 if (scm_is_false (proc
))
243 return scm_the_root_module ();
244 else if (SCM_EVAL_CLOSURE_P (proc
))
245 return SCM_PACK (SCM_SMOB_DATA (proc
));
250 /* FIXME: The `module' property is no longer set on eval closures, as it
251 introduced a circular reference that precludes garbage collection of
252 modules with the current weak hash table semantics (see
253 http://lists.gnu.org/archive/html/guile-devel/2009-01/msg00102.html and
254 http://thread.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/2465
255 for details). Since it doesn't appear to be used (only in this
256 function, which has 1 caller), we no longer extend
257 `set-module-eval-closure!' to set the `module' property. */
260 mod
= scm_procedure_property (proc
, sym_module
);
261 if (scm_is_false (mod
))
262 mod
= scm_the_root_module ();
268 * C level implementation of the standard eval closure
270 * This increases loading speed substantially. The code may be
271 * replaced by something based on environments.[ch], in a future
275 /* Return the list of default duplicate binding handlers (procedures). */
277 default_duplicate_binding_handlers (void)
281 get_handlers
= SCM_VARIABLE_REF (default_duplicate_binding_procedures_var
);
283 return (scm_call_0 (get_handlers
));
286 /* Resolve the import of SYM in MODULE, where SYM is currently provided by
287 both IFACE1 as VAR1 and IFACE2 as VAR2. Return the variable chosen by the
288 duplicate binding handlers or `#f'. */
290 resolve_duplicate_binding (SCM module
, SCM sym
,
291 SCM iface1
, SCM var1
,
292 SCM iface2
, SCM var2
)
294 SCM result
= SCM_BOOL_F
;
296 if (!scm_is_eq (var1
, var2
))
299 SCM handlers
, h
, handler_args
;
301 val1
= SCM_VARIABLE_REF (var1
);
302 val2
= SCM_VARIABLE_REF (var2
);
304 val1
= (val1
== SCM_UNSPECIFIED
) ? SCM_BOOL_F
: val1
;
305 val2
= (val2
== SCM_UNSPECIFIED
) ? SCM_BOOL_F
: val2
;
307 handlers
= SCM_MODULE_DUPLICATE_HANDLERS (module
);
308 if (scm_is_false (handlers
))
309 handlers
= default_duplicate_binding_handlers ();
311 handler_args
= scm_list_n (module
, sym
,
312 iface1
, val1
, iface2
, val2
,
317 scm_is_pair (h
) && scm_is_false (result
);
320 result
= scm_apply (SCM_CAR (h
), handler_args
, SCM_EOL
);
329 SCM scm_pre_modules_obarray
;
331 /* Lookup SYM as an imported variable of MODULE. */
333 module_imported_variable (SCM module
, SCM sym
)
335 #define SCM_BOUND_THING_P scm_is_true
336 register SCM var
, imports
;
338 /* Search cached imported bindings. */
339 imports
= SCM_MODULE_IMPORT_OBARRAY (module
);
340 var
= scm_hashq_ref (imports
, sym
, SCM_UNDEFINED
);
341 if (SCM_BOUND_THING_P (var
))
345 /* Search the use list for yet uncached imported bindings, possibly
346 resolving duplicates as needed and caching the result in the import
349 SCM found_var
= SCM_BOOL_F
, found_iface
= SCM_BOOL_F
;
351 for (uses
= SCM_MODULE_USES (module
);
353 uses
= SCM_CDR (uses
))
357 iface
= SCM_CAR (uses
);
358 var
= scm_module_variable (iface
, sym
);
360 if (SCM_BOUND_THING_P (var
))
362 if (SCM_BOUND_THING_P (found_var
))
364 /* SYM is a duplicate binding (imported more than once) so we
365 need to resolve it. */
366 found_var
= resolve_duplicate_binding (module
, sym
,
367 found_iface
, found_var
,
369 if (scm_is_eq (found_var
, var
))
373 /* Keep track of the variable we found and check for other
374 occurences of SYM in the use list. */
375 found_var
= var
, found_iface
= iface
;
379 if (SCM_BOUND_THING_P (found_var
))
381 /* Save the lookup result for future reference. */
382 (void) scm_hashq_set_x (imports
, sym
, found_var
);
388 #undef SCM_BOUND_THING_P
391 SCM_DEFINE (scm_module_local_variable
, "module-local-variable", 2, 0, 0,
392 (SCM module
, SCM sym
),
393 "Return the variable bound to @var{sym} in @var{module}. Return "
394 "@code{#f} is @var{sym} is not bound locally in @var{module}.")
395 #define FUNC_NAME s_scm_module_local_variable
397 #define SCM_BOUND_THING_P(b) \
402 if (scm_module_system_booted_p
)
403 SCM_VALIDATE_MODULE (1, module
);
405 SCM_VALIDATE_SYMBOL (2, sym
);
407 if (scm_is_false (module
))
408 return scm_hashq_ref (scm_pre_modules_obarray
, sym
, SCM_UNDEFINED
);
410 /* 1. Check module obarray */
411 b
= scm_hashq_ref (SCM_MODULE_OBARRAY (module
), sym
, SCM_UNDEFINED
);
412 if (SCM_BOUND_THING_P (b
))
415 /* At this point we should just be able to return #f, but there is the
416 possibility that a custom binder establishes a mapping for this
419 However a custom binder should be called only if there is no
420 imported binding with the name SYM. So here instead of the order:
422 2. Search imported bindings. In order to be consistent with
423 `module-variable', the binder gets called only when no
424 imported binding matches SYM.
426 3. Query the custom binder.
428 we first check if there is a binder at all, and if not, just return
433 SCM binder
= SCM_MODULE_BINDER (module
);
435 if (scm_is_true (binder
))
438 b
= module_imported_variable (module
, sym
);
439 if (SCM_BOUND_THING_P (b
))
443 b
= scm_call_3 (binder
, module
, sym
, SCM_BOOL_F
);
444 if (SCM_BOUND_THING_P (b
))
451 #undef SCM_BOUND_THING_P
455 SCM_DEFINE (scm_module_variable
, "module-variable", 2, 0, 0,
456 (SCM module
, SCM sym
),
457 "Return the variable bound to @var{sym} in @var{module}. This "
458 "may be both a local variable or an imported variable. Return "
459 "@code{#f} is @var{sym} is not bound in @var{module}.")
460 #define FUNC_NAME s_scm_module_variable
462 #define SCM_BOUND_THING_P(b) \
467 if (scm_module_system_booted_p
)
468 SCM_VALIDATE_MODULE (1, module
);
470 SCM_VALIDATE_SYMBOL (2, sym
);
472 if (scm_is_false (module
))
473 return scm_hashq_ref (scm_pre_modules_obarray
, sym
, SCM_UNDEFINED
);
475 /* 1. Check module obarray */
476 var
= scm_hashq_ref (SCM_MODULE_OBARRAY (module
), sym
, SCM_UNDEFINED
);
477 if (SCM_BOUND_THING_P (var
))
480 /* 2. Search among the imported variables. */
481 var
= module_imported_variable (module
, sym
);
482 if (SCM_BOUND_THING_P (var
))
486 /* 3. Query the custom binder. */
489 binder
= SCM_MODULE_BINDER (module
);
490 if (scm_is_true (binder
))
492 var
= scm_call_3 (binder
, module
, sym
, SCM_BOOL_F
);
493 if (SCM_BOUND_THING_P (var
))
500 #undef SCM_BOUND_THING_P
504 scm_t_bits scm_tc16_eval_closure
;
506 #define SCM_F_EVAL_CLOSURE_INTERFACE (1<<0)
507 #define SCM_EVAL_CLOSURE_INTERFACE_P(e) \
508 (SCM_SMOB_FLAGS (e) & SCM_F_EVAL_CLOSURE_INTERFACE)
510 /* NOTE: This function may be called by a smob application
511 or from another C function directly. */
513 scm_eval_closure_lookup (SCM eclo
, SCM sym
, SCM definep
)
515 SCM module
= SCM_PACK (SCM_SMOB_DATA (eclo
));
516 if (scm_is_true (definep
))
518 if (SCM_EVAL_CLOSURE_INTERFACE_P (eclo
))
520 return scm_call_2 (SCM_VARIABLE_REF (module_make_local_var_x_var
),
524 return scm_module_variable (module
, sym
);
527 SCM_DEFINE (scm_standard_eval_closure
, "standard-eval-closure", 1, 0, 0,
529 "Return an eval closure for the module @var{module}.")
530 #define FUNC_NAME s_scm_standard_eval_closure
532 SCM_RETURN_NEWSMOB (scm_tc16_eval_closure
, SCM_UNPACK (module
));
537 SCM_DEFINE (scm_standard_interface_eval_closure
,
538 "standard-interface-eval-closure", 1, 0, 0,
540 "Return a interface eval closure for the module @var{module}. "
541 "Such a closure does not allow new bindings to be added.")
542 #define FUNC_NAME s_scm_standard_interface_eval_closure
544 SCM_RETURN_NEWSMOB (scm_tc16_eval_closure
| (SCM_F_EVAL_CLOSURE_INTERFACE
<<16),
545 SCM_UNPACK (module
));
549 SCM_DEFINE (scm_eval_closure_module
,
550 "eval-closure-module", 1, 0, 0,
552 "Return the module associated with this eval closure.")
553 /* the idea is that eval closures are really not the way to do things, they're
554 superfluous given our module system. this function lets mmacros migrate away
555 from eval closures. */
556 #define FUNC_NAME s_scm_eval_closure_module
558 SCM_MAKE_VALIDATE_MSG (SCM_ARG1
, eval_closure
, EVAL_CLOSURE_P
,
560 return SCM_SMOB_OBJECT (eval_closure
);
565 scm_module_lookup_closure (SCM module
)
567 if (scm_is_false (module
))
570 return SCM_MODULE_EVAL_CLOSURE (module
);
574 scm_current_module_lookup_closure ()
576 if (scm_module_system_booted_p
)
577 return scm_module_lookup_closure (scm_current_module ());
582 SCM_SYMBOL (sym_macroexpand
, "macroexpand");
584 SCM_DEFINE (scm_module_transformer
, "module-transformer", 1, 0, 0,
586 "Returns the syntax expander for the given module.")
587 #define FUNC_NAME s_scm_module_transformer
589 if (SCM_UNLIKELY (scm_is_false (module
)))
591 SCM v
= scm_hashq_ref (scm_pre_modules_obarray
,
594 if (scm_is_false (v
))
595 SCM_MISC_ERROR ("no module, and `macroexpand' unbound", SCM_EOL
);
596 return SCM_VARIABLE_REF (v
);
600 SCM_VALIDATE_MODULE (SCM_ARG1
, module
);
601 return SCM_MODULE_TRANSFORMER (module
);
607 scm_current_module_transformer ()
609 return scm_module_transformer (scm_current_module ());
612 SCM_DEFINE (scm_module_import_interface
, "module-import-interface", 2, 0, 0,
613 (SCM module
, SCM sym
),
614 "Return the module or interface from which @var{sym} is imported "
615 "in @var{module}. If @var{sym} is not imported (i.e., it is not "
616 "defined in @var{module} or it is a module-local binding instead "
617 "of an imported one), then @code{#f} is returned.")
618 #define FUNC_NAME s_scm_module_import_interface
620 SCM var
, result
= SCM_BOOL_F
;
622 SCM_VALIDATE_MODULE (1, module
);
623 SCM_VALIDATE_SYMBOL (2, sym
);
625 var
= scm_module_variable (module
, sym
);
626 if (scm_is_true (var
))
628 /* Look for the module that provides VAR. */
631 local_var
= scm_hashq_ref (SCM_MODULE_OBARRAY (module
), sym
,
633 if (scm_is_eq (local_var
, var
))
637 /* Look for VAR among the used modules. */
638 SCM uses
, imported_var
;
640 for (uses
= SCM_MODULE_USES (module
);
641 scm_is_pair (uses
) && scm_is_false (result
);
642 uses
= SCM_CDR (uses
))
644 imported_var
= scm_module_variable (SCM_CAR (uses
), sym
);
645 if (scm_is_eq (imported_var
, var
))
646 result
= SCM_CAR (uses
);
656 scm_module_public_interface (SCM module
)
658 return scm_call_1 (SCM_VARIABLE_REF (module_public_interface_var
), module
);
663 * looks up the variable bound to SYM according to PROC. PROC should be
664 * a `eval closure' of some module.
666 * When no binding exists, and DEFINEP is true, create a new binding
667 * with a initial value of SCM_UNDEFINED. Return `#f' when DEFINEP as
668 * false and no binding exists.
670 * When PROC is `#f', it is ignored and the binding is searched for in
671 * the scm_pre_modules_obarray (a `eq' hash table).
675 scm_sym2var (SCM sym
, SCM proc
, SCM definep
)
676 #define FUNC_NAME "scm_sym2var"
682 if (SCM_EVAL_CLOSURE_P (proc
))
684 /* Bypass evaluator in the standard case. */
685 var
= scm_eval_closure_lookup (proc
, sym
, definep
);
688 var
= scm_call_2 (proc
, sym
, definep
);
694 if (scm_is_false (definep
))
695 var
= scm_hashq_ref (scm_pre_modules_obarray
, sym
, SCM_BOOL_F
);
698 handle
= scm_hashq_create_handle_x (scm_pre_modules_obarray
,
700 var
= SCM_CDR (handle
);
701 if (scm_is_false (var
))
703 var
= scm_make_variable (SCM_UNDEFINED
);
704 SCM_SETCDR (handle
, var
);
709 if (scm_is_true (var
) && !SCM_VARIABLEP (var
))
710 SCM_MISC_ERROR ("~S is not bound to a variable", scm_list_1 (sym
));
717 scm_c_module_lookup (SCM module
, const char *name
)
719 return scm_module_lookup (module
, scm_from_locale_symbol (name
));
723 scm_module_lookup (SCM module
, SCM sym
)
724 #define FUNC_NAME "module-lookup"
727 SCM_VALIDATE_MODULE (1, module
);
729 var
= scm_sym2var (sym
, scm_module_lookup_closure (module
), SCM_BOOL_F
);
730 if (scm_is_false (var
))
731 unbound_variable (FUNC_NAME
, sym
);
737 scm_c_lookup (const char *name
)
739 return scm_lookup (scm_from_locale_symbol (name
));
746 scm_sym2var (sym
, scm_current_module_lookup_closure (), SCM_BOOL_F
);
747 if (scm_is_false (var
))
748 unbound_variable (NULL
, sym
);
753 scm_c_module_define (SCM module
, const char *name
, SCM value
)
755 return scm_module_define (module
, scm_from_locale_symbol (name
), value
);
759 scm_module_define (SCM module
, SCM sym
, SCM value
)
760 #define FUNC_NAME "module-define"
763 SCM_VALIDATE_MODULE (1, module
);
765 var
= scm_sym2var (sym
, scm_module_lookup_closure (module
), SCM_BOOL_T
);
766 SCM_VARIABLE_SET (var
, value
);
772 scm_c_define (const char *name
, SCM value
)
774 return scm_define (scm_from_locale_symbol (name
), value
);
777 SCM_DEFINE (scm_define
, "define!", 2, 0, 0,
778 (SCM sym
, SCM value
),
779 "Define @var{sym} to be @var{value} in the current module."
780 "Returns the variable itself. Note that this is a procedure, "
782 #define FUNC_NAME s_scm_define
785 SCM_VALIDATE_SYMBOL (SCM_ARG1
, sym
);
786 var
= scm_sym2var (sym
, scm_current_module_lookup_closure (), SCM_BOOL_T
);
787 SCM_VARIABLE_SET (var
, value
);
792 SCM_DEFINE (scm_module_reverse_lookup
, "module-reverse-lookup", 2, 0, 0,
793 (SCM module
, SCM variable
),
794 "Return the symbol under which @var{variable} is bound in "
795 "@var{module} or @var{#f} if @var{variable} is not visible "
796 "from @var{module}. If @var{module} is @code{#f}, then the "
797 "pre-module obarray is used.")
798 #define FUNC_NAME s_scm_module_reverse_lookup
803 if (scm_is_false (module
))
804 obarray
= scm_pre_modules_obarray
;
807 SCM_VALIDATE_MODULE (1, module
);
808 obarray
= SCM_MODULE_OBARRAY (module
);
811 SCM_VALIDATE_VARIABLE (SCM_ARG2
, variable
);
813 if (!SCM_HASHTABLE_P (obarray
))
816 /* XXX - We do not use scm_hash_fold here to avoid searching the
817 whole obarray. We should have a scm_hash_find procedure. */
819 n
= SCM_HASHTABLE_N_BUCKETS (obarray
);
820 for (i
= 0; i
< n
; ++i
)
822 SCM ls
= SCM_HASHTABLE_BUCKET (obarray
, i
), handle
;
823 while (!scm_is_null (ls
))
825 handle
= SCM_CAR (ls
);
827 if (SCM_CAR (handle
) == SCM_PACK (NULL
))
829 /* FIXME: We hit a weak pair whose car has become unreachable.
830 We should remove the pair in question or something. */
834 if (SCM_CDR (handle
) == variable
)
835 return SCM_CAR (handle
);
842 if (!scm_is_false (module
))
844 /* Try the `uses' list. */
845 SCM uses
= SCM_MODULE_USES (module
);
846 while (scm_is_pair (uses
))
848 SCM sym
= scm_module_reverse_lookup (SCM_CAR (uses
), variable
);
849 if (scm_is_true (sym
))
851 uses
= SCM_CDR (uses
);
859 SCM_DEFINE (scm_get_pre_modules_obarray
, "%get-pre-modules-obarray", 0, 0, 0,
861 "Return the obarray that is used for all new bindings before "
862 "the module system is booted. The first call to "
863 "@code{set-current-module} will boot the module system.")
864 #define FUNC_NAME s_scm_get_pre_modules_obarray
866 return scm_pre_modules_obarray
;
870 SCM_SYMBOL (scm_sym_system_module
, "system-module");
873 scm_modules_prehistory ()
875 scm_pre_modules_obarray
= scm_c_make_hash_table (1533);
881 #include "libguile/modules.x"
882 module_make_local_var_x_var
= scm_c_define ("module-make-local-var!",
884 scm_tc16_eval_closure
= scm_make_smob_type ("eval-closure", 0);
885 scm_set_smob_apply (scm_tc16_eval_closure
, scm_eval_closure_lookup
, 2, 0, 0);
887 the_module
= scm_make_fluid ();
891 scm_post_boot_init_modules ()
893 SCM module_type
= SCM_VARIABLE_REF (scm_c_lookup ("module-type"));
894 scm_module_tag
= (SCM_CELL_WORD_1 (module_type
) + scm_tc3_struct
);
896 resolve_module_var
= scm_c_lookup ("resolve-module");
897 define_module_star_var
= scm_c_lookup ("define-module*");
898 process_use_modules_var
= scm_c_lookup ("process-use-modules");
899 module_export_x_var
= scm_c_lookup ("module-export!");
900 the_root_module_var
= scm_c_lookup ("the-root-module");
901 default_duplicate_binding_procedures_var
=
902 scm_c_lookup ("default-duplicate-binding-procedures");
903 module_public_interface_var
= scm_c_lookup ("module-public-interface");
905 scm_module_system_booted_p
= 1;