rem: scheme_wrong_syntax("module", name, e, "duplicate definition for identifier");
add: scheme_wrong_syntax("module", orig_name, e, "duplicate definition for identifier");
context: static Scheme_Object *do_module_begin(Scheme_Object *form, Scheme_Comp_Env *env, 				      Scheme_Compile_Expand_Info *rec, int drec){  Scheme_Object *fm, *first, *last, *p, *rn, *exp_body, *et_rn, *tt_rn, *self_modidx, *prev_p;  Scheme_Comp_Env *xenv, *cenv, *rhs_env;  Scheme_Hash_Table *et_required; /* just to avoid duplicates */  Scheme_Hash_Table *tt_required; /* just to avoid duplicates */  Scheme_Hash_Table *required;    /* name -> (vector nominal-modidx-list modidx srcname var? prntname) */  /**/                            /*   first nominal-modidx goes with modidx, rest are for re-provides */  Scheme_Hash_Table *provided;    /* exname -> (cons locname-stx-or-sym protected?) */  Scheme_Object *reprovided;      /* list of (list modidx syntax except-name ...) */  Scheme_Object *all_defs_out;    /* list of (cons protected? (stx-list except-name ...)) */  Scheme_Object *all_defs;        /* list of stxid; this is almost redundant to the syntax and toplevel				     tables, but it preserves the original name for exporting */  Scheme_Object *post_ex_rn, *post_ex_et_rn, *post_ex_tt_rn; /* renames for ids introduced by expansion */  void *tables[3], *et_tables[3], *tt_tables[3];  Scheme_Object **exs, **exsns, **exss, **exis, *exclude_hint = scheme_false, *lift_data;  Scheme_Hash_Table *et_mn;  char *exps;  int excount, exvcount, exicount;  int reprovide_kernel;  int max_let_depth;  int all_simple_renames = 1, et_all_simple_renames = 1, tt_all_simple_renames = 1;  Scheme_Object *redef_modname;  if (!(env->flags & SCHEME_MODULE_FRAME))    scheme_wrong_syntax(NULL, NULL, form, "illegal use (not a module body)");  if (scheme_stx_proper_list_length(form) < 0)    scheme_wrong_syntax(NULL, NULL, form, "bad syntax (" IMPROPER_LIST_FORM ")");  /* Redefining a module? */  redef_modname = env->genv->module->modname;  if (!scheme_hash_get(env->genv->module_registry, redef_modname))    redef_modname = NULL;  /* Expand each expression in form up to `begin', `define-values', `define-syntax',      `require', `provide', `#%app', etc. */  xenv = scheme_new_compilation_frame(0, (SCHEME_CAPTURE_WITHOUT_RENAME 					  | SCHEME_MODULE_BEGIN_FRAME					  | SCHEME_FOR_STOPS), 				      env, NULL);  {    Scheme_Object *stop;    stop = scheme_get_stop_expander();    scheme_add_local_syntax(20, xenv);    scheme_set_local_syntax(0, scheme_begin_stx, stop, xenv);    scheme_set_local_syntax(1, scheme_define_values_stx, stop, xenv);    scheme_set_local_syntax(2, scheme_define_syntaxes_stx, stop, xenv);    scheme_set_local_syntax(3, define_for_syntaxes_stx, stop, xenv);    scheme_set_local_syntax(4, require_stx, stop, xenv);    scheme_set_local_syntax(5, require_for_syntax_stx, stop, xenv);    scheme_set_local_syntax(6, require_for_template_stx, stop, xenv);    scheme_set_local_syntax(7, provide_stx, stop, xenv);    scheme_set_local_syntax(8, set_stx, stop, xenv);    scheme_set_local_syntax(9, app_stx, stop, xenv);    scheme_set_local_syntax(10, top_stx, stop, xenv);    scheme_set_local_syntax(11, case_lambda_stx, stop, xenv);    scheme_set_local_syntax(12, let_values_stx, stop, xenv);    scheme_set_local_syntax(13, letrec_values_stx, stop, xenv);    scheme_set_local_syntax(14, if_stx, stop, xenv);    scheme_set_local_syntax(15, begin0_stx, stop, xenv);    scheme_set_local_syntax(16, set_stx, stop, xenv);    scheme_set_local_syntax(17, with_continuation_mark_stx, stop, xenv);    scheme_set_local_syntax(18, letrec_syntaxes_stx, stop, xenv);    scheme_set_local_syntax(19, fluid_let_syntax_stx, stop, xenv);  }  first = scheme_null;  last = NULL;  required = scheme_make_hash_table(SCHEME_hash_ptr);  /* Put initial requires into the table: */  {    int i, numvals;    Scheme_Module *iim;    Scheme_Object *midx, *nmidx, *vec, *nml;    nmidx = SCHEME_CAR(env->genv->module->requires);    iim = module_load(scheme_module_resolve(nmidx), env->genv, NULL);    exs = iim->provides;    exsns = iim->provide_src_names;    exss = iim->provide_srcs;    numvals = iim->num_var_provides;    for (i = iim->num_provides; i--; ) {      if (exss) {	midx = exss[i];	if (SCHEME_FALSEP(midx))	  midx = nmidx;	else	  midx = scheme_modidx_shift(midx, iim->src_modidx, nmidx);      } else	midx = nmidx;      vec = scheme_make_vector(5, NULL);      nml = scheme_make_pair(nmidx, scheme_null);      SCHEME_VEC_ELS(vec)[0] = nml;      SCHEME_VEC_ELS(vec)[1] = midx;      SCHEME_VEC_ELS(vec)[2] = exsns[i];      SCHEME_VEC_ELS(vec)[3] = ((i < numvals) ? scheme_true : scheme_false);      SCHEME_VEC_ELS(vec)[4] = exs[i];      scheme_hash_set(required, exs[i], vec);    }    if (iim->reprovide_kernel) {      exs = kernel->provides;      numvals = kernel->num_var_provides;      for (i = kernel->num_provides; i--; ) {	if (!SAME_OBJ(iim->kernel_exclusion, exs[i])) {	  vec = scheme_make_vector(5, NULL);	  nml = scheme_make_pair(nmidx, scheme_null);	  SCHEME_VEC_ELS(vec)[0] = nml;	  SCHEME_VEC_ELS(vec)[1] = kernel_symbol;	  SCHEME_VEC_ELS(vec)[2] = exs[i];	  SCHEME_VEC_ELS(vec)[3] = ((i < numvals) ? scheme_true : scheme_false);	  SCHEME_VEC_ELS(vec)[4] = exs[i];	  scheme_hash_set(required, exs[i], vec);	}      }     }  }  rn = env->genv->rename;  et_rn = env->genv->et_rename;  tt_rn = env->genv->tt_rename;  /* rename tables no longer needed; NULL them out */  env->genv->rename = NULL;  env->genv->et_rename = NULL;  env->genv->tt_rename = NULL;  {    Scheme_Object *v;    v = scheme_rename_to_stx(rn);    env->genv->module->rn_stx = v;    v = scheme_rename_to_stx(et_rn);    env->genv->module->et_rn_stx = v;    v = scheme_rename_to_stx(tt_rn);    env->genv->module->tt_rn_stx = v;  }  tables[0] = env->genv->toplevel;  tables[1] = required;  tables[2] = env->genv->syntax;  et_required = scheme_make_hash_table(SCHEME_hash_ptr);  et_tables[0] = NULL;  et_tables[1] = et_required;  et_tables[2] = NULL;  tt_required = scheme_make_hash_table(SCHEME_hash_ptr);  tt_tables[0] = NULL;  tt_tables[1] = tt_required;  tt_tables[2] = NULL;  provided = scheme_make_hash_table(SCHEME_hash_ptr);  reprovided = scheme_null;  all_defs_out = scheme_null;  all_defs = scheme_null;  exp_body = scheme_null;  self_modidx = env->genv->module->self_modidx;  post_ex_rn = scheme_make_module_rename(0, mzMOD_RENAME_MARKED, env->genv->marked_names);  post_ex_et_rn = scheme_make_module_rename(1, mzMOD_RENAME_MARKED, env->genv->exp_env->marked_names);  post_ex_tt_rn = scheme_make_module_rename(-1, mzMOD_RENAME_MARKED, env->genv->exp_env->marked_names);  /* For syntax-local-context, etc., in a d-s RHS: */  rhs_env = scheme_new_comp_env(env->genv, env->insp, SCHEME_TOPLEVEL_FRAME);  scheme_rec_add_certs(rec, drec, form);  /* It's possible that #%module-begin expansion introduces     marked identifiers for definitions. */  form = scheme_add_rename(form, post_ex_rn);  form = scheme_add_rename(form, post_ex_et_rn);  form = scheme_add_rename(form, post_ex_tt_rn);    /* Partially expand all expressions, and process definitions, requires,     and provides. Also, flatten top-level `begin' expressions: */  for (fm = SCHEME_STX_CDR(form); !SCHEME_STX_NULLP(fm); fm = SCHEME_STX_CDR(fm)) {    Scheme_Object *e;    int normal;    while (1) {      Scheme_Object *fst;      e = SCHEME_STX_CAR(fm);      scheme_frame_captures_lifts(xenv, scheme_make_lifted_defn, scheme_sys_wraps(xenv));      {	Scheme_Expand_Info erec1;	erec1.comp = 0;	erec1.depth = -1;	erec1.value_name = scheme_false;	erec1.certs = rec[drec].certs;	e = scheme_expand_expr(e, xenv, &erec1, 0);	      }      fst = scheme_frame_get_lifts(xenv);      if (!SCHEME_NULLP(fst)) {	/* Expansion lifted expressions, so add them to	   the front and try again. */	fm = SCHEME_STX_CDR(fm);	/* Why don't we need post_ex renames on fst and e? */	fm = scheme_append(fst, scheme_make_pair(e, fm));      } else {	/* No lifts added... */	if (SCHEME_STX_PAIRP(e))	  fst = SCHEME_STX_CAR(e);	else	  fst = NULL;		if (fst && SCHEME_STX_SYMBOLP(fst) && scheme_stx_module_eq(scheme_begin_stx, fst, 0)) {	  fm = SCHEME_STX_CDR(fm);	  e = scheme_add_rename(e, post_ex_rn);	  e = scheme_add_rename(e, post_ex_et_rn);	  e = scheme_add_rename(e, post_ex_tt_rn);	  fm = scheme_flatten_begin(e, fm);	  if (SCHEME_STX_NULLP(fm)) {	    e = NULL;	    break;	  }	} else	  break;      }    }    if (!e) break; /* (begin) expansion at end */    e = scheme_add_rename(e, post_ex_rn);    e = scheme_add_rename(e, post_ex_et_rn);    e = scheme_add_rename(e, post_ex_tt_rn);        if (SCHEME_STX_PAIRP(e)) {      Scheme_Object *fst;      fst = SCHEME_STX_CAR(e);      if (SCHEME_STX_SYMBOLP(fst)) {	Scheme_Object *n;	n = SCHEME_STX_CAR(e);	if (scheme_stx_module_eq(scheme_define_values_stx, fst, 0)) {	  /************ define-values *************/	  Scheme_Object *vars, *val;	  /* Create top-level vars */	  scheme_define_parse(e, &vars, &val, 0, env);	  while (SCHEME_STX_PAIRP(vars)) {	    Scheme_Object *name, *orig_name;	    name = SCHEME_STX_CAR(vars);	    orig_name = name;	    	    /* Remember the original: */	    all_defs = scheme_make_pair(name, all_defs);	    	    name = scheme_tl_id_sym(env->genv, name, 2);	    /* Check that it's not yet defined: */	    if (scheme_lookup_in_table(env->genv->toplevel, (const char *)name)) {	      scheme_wrong_syntax("module", name, e, "duplicate definition for identifier");	      return NULL;	    }	    /* Not required: */	    if (scheme_hash_get(required, name)) {	      scheme_wrong_syntax("module", name, e, "identifier is already imported");	      return NULL;	    }	    /* Not syntax: */	    if (scheme_lookup_in_table(env->genv->syntax, (const char *)name)) {	      scheme_wrong_syntax("module", name, e, "duplicate definition for identifier");	      return NULL;	    }	    /* Create the bucket, indicating that the name will be defined: */	    scheme_add_global_symbol(name, scheme_undefined, env->genv);	    /* Add a renaming: */	    if (!SAME_OBJ(SCHEME_STX_VAL(orig_name), name))	      scheme_extend_module_rename(post_ex_rn, self_modidx, name, name, self_modidx, name, 0);	    else	      scheme_extend_module_rename(rn, self_modidx, name, name, self_modidx, name, 0);	      	    	    vars = SCHEME_STX_CDR(vars);	  }		  normal = 1;	} else if (scheme_stx_module_eq(scheme_define_syntaxes_stx, fst, 0)		   || scheme_stx_module_eq(define_for_syntaxes_stx, fst, 0)) {	  /************ define-syntaxes & define-values-for-syntax *************/	  /* Define the macro: */	  Scheme_Compile_Info mrec;	  Scheme_Object *names, *l, *code, *m, *vec, *boundname;	  Resolve_Prefix *rp;	  Scheme_Comp_Env *oenv, *eenv;	  int count = 0;	  int for_stx;	  for_stx = scheme_stx_module_eq(define_for_syntaxes_stx, fst, 0);	  scheme_define_parse(e, &names, &code, 1, env);	  if (SCHEME_STX_PAIRP(names) && SCHEME_STX_NULLP(SCHEME_STX_CDR(names)))	    boundname = SCHEME_STX_CAR(names);	  else	    boundname = scheme_false;	  	  scheme_prepare_exp_env(env->genv);	  eenv = scheme_new_comp_env(env->genv->exp_env, env->insp, 0);	  oenv = (for_stx ? eenv : env);	  	  for (l = names; SCHEME_STX_PAIRP(l); l = SCHEME_STX_CDR(l)) {	    Scheme_Object *name, *orig_name;	    name = SCHEME_STX_CAR(l);	    orig_name = name;	    	    /* Remember the original: */	    if (!for_stx)	      all_defs = scheme_make_pair(name, all_defs);	    	    name = scheme_tl_id_sym(oenv->genv, name, 2);	    	    if (scheme_lookup_in_table(oenv->genv->syntax, (const char *)name)) {	      scheme_wrong_syntax("module", name, e, 				  (for_stx				   ? "duplicate for-syntax definition for identifier"				   : "duplicate definition for identifier"));	      return NULL;	    }	    	    /* Check that it's not yet defined: */	    if (scheme_lookup_in_table(oenv->genv->toplevel, (const char *)name)) {	      scheme_wrong_syntax("module", name, e, 				  (for_stx				   ? "duplicate for-syntax definition for identifier"				   : "duplicate definition for identifier"));	      return NULL;	    }	    /* Not required: */	    if (scheme_hash_get(for_stx ? et_required : required, name)) {	      scheme_wrong_syntax("module", name, e, 				  (for_stx				   ? "identifier is already imported for syntax"				   : "identifier is already imported"));	      return NULL;	    }	    if (!SAME_OBJ(SCHEME_STX_VAL(orig_name), name))	      scheme_extend_module_rename(for_stx ? post_ex_et_rn : post_ex_rn, self_modidx, name, name, self_modidx, name,					  for_stx ? 1 : 0);	    else	      scheme_extend_module_rename(for_stx ? et_rn : rn, self_modidx, name, name, self_modidx, name,					  for_stx ? 1 : 0);	    count++;	  }	  names = scheme_named_map_1(NULL, stx_sym, names, (Scheme_Object *)oenv->genv);	  	  mrec.comp = 1;	  mrec.dont_mark_local_use = 0;	  mrec.resolve_module_ids = 0;	  mrec.value_name = NULL;	  mrec.certs = rec[drec].certs;	  if (!rec[drec].comp) {	    Scheme_Expand_Info erec1;	    erec1.comp = 0;	    erec1.depth = -1;	    erec1.value_name = boundname;	    erec1.certs = rec[drec].certs;	    code = scheme_expand_expr_lift_to_let(code, eenv, &erec1, 0);	  }	  m = scheme_compile_expr_lift_to_let(code, eenv, &mrec, 0);	  	  /* Simplify only in compile mode; it is too slow in expand mode. */	  rp = scheme_resolve_prefix(1, eenv->prefix, rec[drec].comp);	  m = scheme_resolve_expr(m, scheme_resolve_info_create(rp));	  /* Add code with names and lexical depth to exp-time body: */	  vec = scheme_make_vector(5, NULL);	  SCHEME_VEC_ELS(vec)[0] = names;	  SCHEME_VEC_ELS(vec)[1] = m;	  SCHEME_VEC_ELS(vec)[2] = scheme_make_integer(mrec.max_let_depth);	  SCHEME_VEC_ELS(vec)[3] = (Scheme_Object *)rp;	  SCHEME_VEC_ELS(vec)[4] = (for_stx ? scheme_true : scheme_false);	  exp_body = scheme_make_pair(vec, exp_body);		  eval_defmacro(names, count, m, eenv->genv, rhs_env, rp, mrec.max_let_depth, 0, 			(for_stx ? env->genv->exp_env->toplevel : env->genv->syntax), for_stx,			rec[drec].certs);	  if (rec[drec].comp)	    e = NULL;	  else {	    m = SCHEME_STX_CDR(e);	    m = SCHEME_STX_CAR(m);	    m = scheme_make_pair(SCHEME_CAR(fst),				 scheme_make_pair(m, scheme_make_pair(code, scheme_null)));	    e = scheme_datum_to_syntax(m, e, e, 0, 2);	  }	  normal = 0;	} else if (scheme_stx_module_eq(require_stx, fst, 0)) {		  /************ require *************/	  Scheme_Object *imods;	  /* Add requires to renaming: */	  imods = parse_requires(e, self_modidx, env->genv, 				 rn, post_ex_rn, check_require_name, tables, 0, 1,				 redef_modname, 0, 0,				 &all_simple_renames);		  /* Add required modules to requires list: */	  add_req(imods, env->genv->module->requires);	  if (rec[drec].comp)	    e = NULL;	  normal = 0;	} else if (scheme_stx_module_eq(require_for_syntax_stx, fst, 0)) {		  /************ require-for-syntax *************/	  Scheme_Object *imods;	  scheme_prepare_exp_env(env->genv);	  /* Add requires to renaming: */	  imods = parse_requires(e, self_modidx, env->genv->exp_env,				 et_rn, post_ex_et_rn, check_require_name, et_tables, 1, 0,				 redef_modname, 0, 0,				 &et_all_simple_renames);	  /* Add required modules to et_requires list: */	  {	    Scheme_Object *reqs;	    reqs = add_req(imods, env->genv->module->et_requires);	    env->genv->module->et_requires = reqs;	  }	  if (rec[drec].comp)	    e = NULL;	  normal = 0;	} else if (scheme_stx_module_eq(require_for_template_stx, fst, 0)) {		  /************ require-for-template *************/	  Scheme_Object *imods;	  scheme_prepare_template_env(env->genv);	  /* Add requires to renaming: */	  imods = parse_requires(e, self_modidx, env->genv->template_env,				 tt_rn, post_ex_tt_rn, check_require_name, tt_tables, 0, 0,				 redef_modname, 0, 0,				 &tt_all_simple_renames);	  /* Add required modules to tt_requires list: */	  {	    Scheme_Object *reqs;	    reqs = add_req(imods, env->genv->module->tt_requires);	    env->genv->module->tt_requires = reqs;	  }	  if (rec[drec].comp)	    e = NULL;	  normal = 0;	} else if (scheme_stx_module_eq(provide_stx, fst, 0)) {	  /************ provide *************/	  /* Add provides to table: */	  Scheme_Object *l;	  int protect_cnt = 0;	  if (scheme_stx_proper_list_length(e) < 0)	    scheme_wrong_syntax(NULL, e, form, "bad syntax (" IMPROPER_LIST_FORM ")");	  for (l = SCHEME_STX_CDR(e); !SCHEME_STX_NULLP(l); l = SCHEME_STX_CDR(l)) {	    Scheme_Object *a, *midx, *name;	    a = SCHEME_STX_CAR(l);	    if (SCHEME_STX_PAIRP(a) && (scheme_stx_proper_list_length(a) > 0)) {	      fst = SCHEME_STX_CAR(a);	      if (SCHEME_STX_SYMBOLP(fst)		  && (SAME_OBJ(protect_symbol, SCHEME_STX_VAL(fst)))) {		if (protect_cnt)		  scheme_wrong_syntax(NULL, a, e, "bad syntax (nested protect)");		a = SCHEME_STX_CDR(a);		a = scheme_flatten_syntax_list(a, NULL);		l = SCHEME_STX_CDR(l);		l = scheme_append(a, l);		protect_cnt = scheme_list_length(a);		/* In case a provide ends with an empty protect: */		if (SCHEME_STX_NULLP(l))		  break;		a = SCHEME_STX_CAR(l);	      }	    }	    if (SCHEME_STX_SYMBOLP(a)) {	      /* <id> */	      name = SCHEME_STX_VAL(a);	      if (scheme_hash_get(provided, name))		scheme_wrong_syntax("module", a, form, "identifier already provided");	      /* Provide a: */	      scheme_hash_set(provided, name, scheme_make_pair(a, protect_cnt ? scheme_true : scheme_false));	    } else if (SCHEME_STX_PAIRP(a)) {	      Scheme_Object *rest;	      fst = SCHEME_STX_CAR(a);	      rest = SCHEME_STX_CDR(a);	      if (SAME_OBJ(rename_symbol, SCHEME_STX_VAL(fst))) {		/* (rename <id> <id>) */		Scheme_Object *inm, *enm;		if (!SCHEME_STX_PAIRP(rest)		    || !SCHEME_STX_PAIRP(SCHEME_STX_CDR(rest)))		  scheme_wrong_syntax(NULL, a, e, "bad syntax");		inm = SCHEME_STX_CAR(rest);		rest = SCHEME_STX_CDR(rest);		enm = SCHEME_STX_CAR(rest);		if (!SCHEME_STX_SYMBOLP(inm))		  scheme_wrong_syntax(NULL, a, e, "bad syntax (internal name is not an identifier)");		if (!SCHEME_STX_SYMBOLP(enm))		  scheme_wrong_syntax(NULL, a, e, "bad syntax (external name is not an identifier)");		rest = SCHEME_STX_CDR(rest);		if (!SCHEME_STX_NULLP(rest))		  scheme_wrong_syntax(NULL, a, e, "bad syntax (data following external name)");				enm = SCHEME_STX_VAL(enm);				if (scheme_hash_get(provided, enm))		  scheme_wrong_syntax("module", enm, a, "identifier already provided");		/* Provide enm: */		scheme_hash_set(provided, enm, scheme_make_pair(inm, protect_cnt ? scheme_true : scheme_false));	      } else if (SAME_OBJ(all_from_symbol, SCHEME_STX_VAL(fst))) {		/* (all-from <modname>) */		if (protect_cnt)		  scheme_wrong_syntax(NULL, a, e, "bad syntax (not allowed as protected)");		if (!SCHEME_STX_PAIRP(rest))		  scheme_wrong_syntax(NULL, a, e, "bad syntax");		if (!SCHEME_STX_NULLP(SCHEME_STX_CDR(rest)))		  scheme_wrong_syntax(NULL, a, e, "bad syntax (data following `all-from')");				midx = SCHEME_STX_CAR(rest);		midx = scheme_make_modidx(scheme_syntax_to_datum(midx, 0, NULL),					  self_modidx,					  scheme_false);				reprovided = scheme_make_pair(scheme_make_pair(midx, scheme_make_pair(e, scheme_null)), 					      reprovided);	      } else if (SAME_OBJ(all_from_except_symbol, SCHEME_STX_VAL(fst))) {		/* (all-from-except <modname> <id> ...) */		Scheme_Object *exns, *el;		int len;				if (protect_cnt)		  scheme_wrong_syntax(NULL, a, e, "bad syntax (not allowed as protected)");				len = scheme_stx_proper_list_length(a);		if (len < 0)		  scheme_wrong_syntax(NULL, a, e, "bad syntax (" IMPROPER_LIST_FORM ")");		else if (len == 1)		  scheme_wrong_syntax(NULL, a, e, "bad syntax (missing module name)");				midx = SCHEME_STX_CAR(rest);		midx = scheme_make_modidx(scheme_syntax_to_datum(midx, 0, NULL),					  self_modidx,					  scheme_false);		exns = SCHEME_STX_CDR(rest);				/* Check all exclusions are identifiers: */		for (el = exns; SCHEME_STX_PAIRP(el); el = SCHEME_STX_CDR(el)) {		  p = SCHEME_STX_CAR(el);		  if (!SCHEME_STX_SYMBOLP(p)) {		    scheme_wrong_syntax(NULL, p, e,					"bad syntax (excluded name is not an identifier)");		  }		}				reprovided = scheme_make_pair(scheme_make_pair(midx, scheme_make_pair(e, exns)), 					      reprovided);	      } else if (SAME_OBJ(struct_symbol, SCHEME_STX_VAL(fst))) {		/* (struct <id> (<id> ...)) */		int len, i;		Scheme_Object *prnt_base, *base, *fields, *el, **names;				len = scheme_stx_proper_list_length(rest);		if (len != 2) {		  if (len < 0)		    scheme_wrong_syntax(NULL, a, e, "bad syntax (" IMPROPER_LIST_FORM ")");		  else		    scheme_wrong_syntax(NULL, a, e, "bad syntax "					"(not a struct identifier followed by "					"a sequence of field identifiers)");		}		base = SCHEME_STX_CAR(rest);		fields = SCHEME_STX_CDR(rest);		fields = SCHEME_STX_CAR(fields);				if (!SCHEME_STX_SYMBOLP(base))		  scheme_wrong_syntax(NULL, base, e,				      "bad syntax (struct name is not an identifier)");		/* Check all field names are identifiers: */		for (el = fields; SCHEME_STX_PAIRP(el); el = SCHEME_STX_CDR(el)) {		  p = SCHEME_STX_CAR(el);		  if (!SCHEME_STX_SYMBOLP(p)) {		    scheme_wrong_syntax(NULL, p, e,					"bad syntax (field name is not an identifier)");		  }		}		if (!SCHEME_STX_NULLP(el))		  scheme_wrong_syntax(NULL, fields, e,				      "bad syntax (" IMPROPER_LIST_FORM ")");				prnt_base = base;		base = SCHEME_STX_VAL(base);		fields = scheme_syntax_to_datum(fields, 0, NULL);		names = scheme_make_struct_names(base, fields, SCHEME_STRUCT_EXPTIME, &len);		for (i = 0; i < len; i++) {		  if (scheme_hash_get(provided, names[i]))		    scheme_wrong_syntax("module", names[i], e, "identifier already provided");		  /* Wrap local name with prnt_base in case there are marks that 		     trigger "gensym"ing */		  scheme_hash_set(provided, names[i], 				  scheme_make_pair(scheme_datum_to_syntax(names[i], scheme_false, prnt_base, 0, 0),						   protect_cnt ? scheme_true : scheme_false));		}	      } else if (SAME_OBJ(all_defined_symbol, SCHEME_STX_VAL(fst))) {		/* (all-defined) */		if (!SCHEME_STX_NULLP(rest))		  scheme_wrong_syntax(NULL, a, e, "bad syntax");				all_defs_out = scheme_make_pair(scheme_make_pair(scheme_make_pair(e, 										  scheme_make_pair(scheme_null, 												   scheme_false)),								 protect_cnt ? scheme_true : scheme_false),						all_defs_out);	      } else if (SAME_OBJ(prefix_all_defined_symbol, SCHEME_STX_VAL(fst))) {		/* (prefix-all-defined <prefix>) */		Scheme_Object *prefix;		if (!SCHEME_STX_PAIRP(rest))		  scheme_wrong_syntax(NULL, a, e, "bad syntax");		prefix = SCHEME_STX_CAR(rest);		rest = SCHEME_STX_CDR(rest);		if (!SCHEME_STX_NULLP(rest))		  scheme_wrong_syntax(NULL, a, e, "bad syntax");				if (!SCHEME_STX_SYMBOLP(prefix)) {		  scheme_wrong_syntax(NULL, a, e,				      "bad syntax (prefix is not an identifier)");		}		prefix = SCHEME_STX_VAL(prefix);		all_defs_out = scheme_make_pair(scheme_make_pair(scheme_make_pair(e, 										  scheme_make_pair(scheme_null, 												   prefix)),								 protect_cnt ? scheme_true : scheme_false),						all_defs_out);	      } else if (SAME_OBJ(all_defined_except_symbol, SCHEME_STX_VAL(fst))			 || SAME_OBJ(prefix_all_defined_except_symbol, SCHEME_STX_VAL(fst))) {		/* ([prefix-]all-defined-except <id> ...) */		Scheme_Object *exns, *el, *prefix = scheme_false;		int len, is_prefix;				is_prefix = SAME_OBJ(prefix_all_defined_except_symbol, SCHEME_STX_VAL(fst));		len = scheme_stx_proper_list_length(a);		if (len < 0)		  scheme_wrong_syntax(NULL, a, e, "bad syntax (" IMPROPER_LIST_FORM ")");				if (is_prefix && (len < 2))		  scheme_wrong_syntax(NULL, a, e, "bad syntax (missing prefix)");		if (is_prefix) {		  prefix = SCHEME_STX_CAR(rest);		  if (!SCHEME_STX_SYMBOLP(prefix))		    scheme_wrong_syntax(NULL, a, e, "bad syntax (prefix is not an identifier)");		  prefix = SCHEME_STX_VAL(prefix);		  rest = SCHEME_STX_CDR(rest);		}		exns = rest;				/* Check all exclusions are identifiers: */		for (el = exns; SCHEME_STX_PAIRP(el); el = SCHEME_STX_CDR(el)) {		  p = SCHEME_STX_CAR(el);		  if (!SCHEME_STX_SYMBOLP(p)) {		    scheme_wrong_syntax(NULL, p, e,					"bad syntax (excluded name is not an identifier)");		  }		}				all_defs_out = scheme_make_pair(scheme_make_pair(scheme_make_pair(e, 										  scheme_make_pair(exns,												   prefix)),								 protect_cnt ? scheme_true : scheme_false),						all_defs_out);	      } else {		scheme_wrong_syntax(NULL, a, e, NULL);	      }	    } else {	      scheme_wrong_syntax(NULL, a, e, NULL);	    }	    if (protect_cnt)	      --protect_cnt;	  }	  if (rec[drec].comp)	    e = NULL;	  normal = 0;	} else	  normal = 1;      } else	normal = 1;    } else      normal = 1;    if (e) {      p = scheme_make_pair(scheme_make_pair(e, normal ? scheme_true : scheme_false), scheme_null);      if (last)	SCHEME_CDR(last) = p;      else	first = p;      last = p;    }  }  /* first =  a list of (cons semi-expanded-expression normal?) */  if (rec[drec].comp) {    /* Module manages its own prefix. That's how we get       multiple instantiation of a module with "dynamic linking". */    cenv = scheme_new_comp_env(env->genv, env->insp, SCHEME_TOPLEVEL_FRAME);    rec[drec].max_let_depth = 0; /* since module executer takes care of it */  } else    cenv = scheme_extend_as_toplevel(env);  max_let_depth = 0;  lift_data = scheme_make_vector(3, NULL);  SCHEME_VEC_ELS(lift_data)[0] = (Scheme_Object *)cenv;  SCHEME_VEC_ELS(lift_data)[1] = self_modidx;  SCHEME_VEC_ELS(lift_data)[2] = rn;  prev_p = NULL;  for (p = first; !SCHEME_NULLP(p); ) {    Scheme_Object *e, *l, *ll;    int normal;    e = SCHEME_CAR(p);    normal = SCHEME_TRUEP(SCHEME_CDR(e));    e = SCHEME_CAR(e);    if (normal) {      scheme_frame_captures_lifts(cenv, add_lifted_defn, lift_data);      if (rec[drec].comp) {	Scheme_Compile_Info crec1;	scheme_init_compile_recs(rec, drec, &crec1, 1);	crec1.resolve_module_ids = 0;	e = scheme_compile_expr(e, cenv, &crec1, 0);	if (crec1.max_let_depth > max_let_depth)	  max_let_depth = crec1.max_let_depth;      } else {	Scheme_Expand_Info erec1;	scheme_init_expand_recs(rec, drec, &erec1, 1);	erec1.value_name = scheme_false;	e = scheme_expand_expr(e, cenv, &erec1, 0);      }            l = scheme_frame_get_lifts(cenv);      if (SCHEME_NULLP(l)) {	/* No lifts - continue normally */	SCHEME_CAR(p) = e;	prev_p = p;	p = SCHEME_CDR(p);      } else {	/* Lifts - insert them and try again */	e = scheme_make_pair(e, scheme_false); /* don't re-compile/-expand */	SCHEME_CAR(p) = e;	for (ll = l; SCHEME_PAIRP(ll); ll = SCHEME_CDR(ll)) {	  e = scheme_make_pair(SCHEME_CAR(ll), scheme_true);	  SCHEME_CAR(ll) = e;	}	p = scheme_append(l, p);	if (prev_p) {	  SCHEME_CDR(prev_p) = p;	} else {	  first = p;	}      }    } else {      SCHEME_CAR(p) = e;      prev_p = p;      p = SCHEME_CDR(p);    }  }  /* first =  a list of expanded/compiled expressions */  et_mn = env->genv->exp_env->marked_names;  scheme_clean_dead_env(env->genv);  /* If compiling, drop expressions that are constants: */  if (rec[drec].comp) {    Scheme_Object *prev = NULL, *next;    for (p = first; !SCHEME_NULLP(p); p = next) {      next = SCHEME_CDR(p);      if (scheme_omittable_expr(SCHEME_CAR(p), 1)) {	if (prev)	  SCHEME_CDR(p) = next;	else	  first = next;      } else	prev = p;    }  }  /* Compute provides for re-provides and all-defs-out: */  {    int i;    Scheme_Object *rx;    reprovide_kernel = 0;    /* First, check the sanity of the re-provide specifications: */    for (rx = reprovided; !SCHEME_NULLP(rx); rx = SCHEME_CDR(rx)) {      Scheme_Object *midx = SCHEME_CAR(SCHEME_CAR(rx)), *l, *exns;	      for (l = env->genv->module->requires; SCHEME_PAIRP(l); l = SCHEME_CDR(l)) {	if (same_modidx(midx, SCHEME_CAR(l)))	  break;      }      if (SCHEME_NULLP(l)) {	/* Didn't require the named module */	Scheme_Object *name;	name = SCHEME_CAR(rx);	name = SCHEME_STX_CDR(name);	name = SCHEME_STX_CAR(name);	scheme_wrong_syntax("module", 			    SCHEME_SYMBOLP(midx) ? midx : ((Scheme_Modidx *)midx)->path, 			    name,			    "cannot provide from a module without a matching `require'");      }      exns = SCHEME_CDR(SCHEME_CDR(SCHEME_CAR(rx)));      for (l = exns; !SCHEME_STX_NULLP(l); l = SCHEME_STX_CDR(l)) {	/* Make sure excluded name was required: */	Scheme_Object *a, *vec;	a = SCHEME_STX_VAL(SCHEME_STX_CAR(l));	vec = scheme_hash_get(required, a);	if (vec) {	  /* Check for nominal modidx in list */	  Scheme_Object *nml;	  nml = SCHEME_VEC_ELS(vec)[0];	  for (; SCHEME_PAIRP(nml); nml = SCHEME_CDR(nml)) {	    if (same_modidx(SCHEME_CAR(SCHEME_CAR(rx)), SCHEME_CAR(nml)))	      break;	  }	  if (!SCHEME_PAIRP(nml))	    vec = NULL; /* So it was provided, but not from the indicated module */	}	if (!vec) {	  a = SCHEME_STX_CAR(l);	  scheme_wrong_syntax("module", a, SCHEME_CADR(SCHEME_CAR(rx)),			      "excluded name was not required from the module");	}      }    }    /* Walk through requires, check for re-providing: */    for (i = required->size; i--; ) {      if (required->vals[i]) {	Scheme_Object *nominal_modidx, *name, *modidx, *srcname, *outname, *nml, *orig_nml;	int break_outer = 0;		name = required->keys[i];	orig_nml = SCHEME_VEC_ELS(required->vals[i])[0];	modidx = SCHEME_VEC_ELS(required->vals[i])[1];	srcname = SCHEME_VEC_ELS(required->vals[i])[2];	outname = SCHEME_VEC_ELS(required->vals[i])[4];	for (rx = reprovided; !SCHEME_NULLP(rx); rx = SCHEME_CDR(rx)) {	  for (nml = orig_nml; SCHEME_PAIRP(nml); nml = SCHEME_CDR(nml)) {	    nominal_modidx = SCHEME_CAR(nml);	    if (same_modidx(SCHEME_CAR(SCHEME_CAR(rx)), nominal_modidx)) {	      Scheme_Object *exns, *ree;	      	      break_outer = 1;	      	      ree = SCHEME_CDR(SCHEME_CAR(rx));	      exns = SCHEME_CDR(ree);	      if (SAME_OBJ(modidx, kernel_symbol))		if (!SCHEME_STX_NULLP(exns))		  exclude_hint = exns;	    	      for (; !SCHEME_STX_NULLP(exns); exns = SCHEME_STX_CDR(exns)) {		/* Was this name exluded? */		Scheme_Object *a;		a = SCHEME_STX_VAL(SCHEME_STX_CAR(exns));		if (SAME_OBJ(a, name))		  break;	      }	      if (SCHEME_STX_NULLP(exns)) {		/* Not excluded, so provide it. */		if (scheme_hash_get(provided, outname))		  scheme_wrong_syntax("module", outname, SCHEME_CAR(ree), "identifier already provided");	      		scheme_hash_set(provided, outname, scheme_make_pair(name, scheme_false));		if (SAME_OBJ(modidx, kernel_symbol) && SAME_OBJ(outname, srcname))		  reprovide_kernel++;	      }	    }	  }	  if (break_outer) break;	}      }    }    /* Do all-defined provides */    for (; !SCHEME_NULLP(all_defs_out); all_defs_out = SCHEME_CDR(all_defs_out)) {      Scheme_Object *exns, *ree, *ree_kw, *exl, *name, *a, *adl, *exname, *pfx;      int protected;	          ree = SCHEME_CAR(all_defs_out);      protected = SCHEME_TRUEP(SCHEME_CDR(ree));      ree = SCHEME_CAR(ree);      ree_kw = SCHEME_CAR(ree);      ree = SCHEME_CDR(ree);      exl = SCHEME_CAR(ree);      pfx = SCHEME_CDR(ree);      /* Make sure each excluded name was defined: */      for (exns = exl; !SCHEME_STX_NULLP(exns); exns = SCHEME_STX_CDR(exns)) {	a = SCHEME_STX_CAR(exns);	name = scheme_tl_id_sym(env->genv, a, 0);	if (!scheme_lookup_in_table(env->genv->toplevel, (const char *)name)	    && !scheme_lookup_in_table(env->genv->syntax, (const char *)name)) {	  scheme_wrong_syntax("module", a, ree_kw, "excluded identifier was not defined");	}      }      for (adl = all_defs; SCHEME_PAIRP(adl); adl = SCHEME_CDR(adl)) {	name = SCHEME_CAR(adl);	exname = SCHEME_STX_SYM(name);	name = scheme_tl_id_sym(env->genv, name, 0);		/* Was this one excluded? */	for (exns = exl; !SCHEME_STX_NULLP(exns); exns = SCHEME_STX_CDR(exns)) {	  a = SCHEME_STX_CAR(exns);	  a = scheme_tl_id_sym(env->genv, a, 0);	  if (SAME_OBJ(a, name))	    break;	}	if (SCHEME_STX_NULLP(exns)) {	  /* not excluded */	  	  /* But don't export uninterned: */	  if (!SCHEME_SYM_UNINTERNEDP(name)) {	    /* Also, check that ree_kw and the identifier have the same	       introduction (in case one or the other was introduced by	       a macro). We perform this check by getting exname's tl_id	       as if it had ree_kw's context, then comparing that result	       to the actual tl_id. */	    a = scheme_datum_to_syntax(exname, scheme_false, ree_kw, 0, 0);	    a = scheme_tl_id_sym(env->genv, a, 0);	    	    if (SAME_OBJ(a, name)) {	      /* Add prefix, if any */	      if (SCHEME_TRUEP(pfx)) {		exname = scheme_symbol_append(pfx, exname);	      }	      if (scheme_hash_get(provided, exname))		scheme_wrong_syntax("module", exname, ree_kw, "identifier already provided");	      	      scheme_hash_set(provided, exname, 			      scheme_make_pair(name, protected ? scheme_true : scheme_false));	    }	  }	}      }    }  }  /* Ad hoc optimization: mzscheme is everything from kernel except     #%module_begin */  if ((reprovide_kernel == (kernel->num_provides - 1))      && SCHEME_FALSEP(exclude_hint)) {    exclude_hint = scheme_make_pair(module_begin_symbol, scheme_null);    exclude_hint = scheme_datum_to_syntax(exclude_hint, scheme_false, top_stx, 0, 0);  }  /* Re-providing all of the kernel without prefixing? */  if (reprovide_kernel) {    if ((reprovide_kernel == (kernel->num_provides - 1))	&& SCHEME_TRUEP(exclude_hint)) {      if (SCHEME_STX_PAIRP(exclude_hint) && SCHEME_NULLP(SCHEME_STX_CDR(exclude_hint))) {	Scheme_Object *n;	exclude_hint = SCHEME_STX_CAR(exclude_hint);	exclude_hint = SCHEME_STX_VAL(exclude_hint);	n = scheme_hash_get(provided, exclude_hint);	if (n) {	  /* may be a single shadowed exclusion, now bound to exclude_hint... */	  n = SCHEME_CAR(n);	  if (SCHEME_STXP(n))	    n = scheme_tl_id_sym(env->genv, n, 0);	  n = scheme_hash_get(required, n);	  if (n && !SAME_OBJ(SCHEME_VEC_ELS(n)[1], kernel_symbol)) {	    /* there is a single shadowed exclusion. */	  } else	    reprovide_kernel = 0;	} else	  reprovide_kernel = 0;      } else	reprovide_kernel = 0;    } else if (reprovide_kernel != kernel->num_provides)      reprovide_kernel = 0;    else      exclude_hint = scheme_false;  }  /* If reprovide_kernel is non-zero, we re-provide all of it */  /* Compute provide arrays */  {    int i, count;        for (count = 0, i = provided->size; i--; ) {      if (provided->vals[i])	count++;    }        count -= reprovide_kernel;    exs = MALLOC_N(Scheme_Object *, count);    exsns = MALLOC_N(Scheme_Object *, count);    exss = MALLOC_N(Scheme_Object *, count);    exps = MALLOC_N_ATOMIC(char, count);    /* Do non-syntax first. */    for (count = 0, i = provided->size; i--; ) {      if (provided->vals[i]) {	Scheme_Object *name, *prnt_name, *v;	int protected;		v = provided->vals[i];	name = SCHEME_CAR(v);	protected = SCHEME_TRUEP(SCHEME_CDR(v));	if (SCHEME_STXP(name)) {	  prnt_name = SCHEME_STX_VAL(name);	  name = scheme_tl_id_sym(env->genv, name, 0);	} else	  prnt_name = name;	if (scheme_lookup_in_table(env->genv->toplevel, (const char *)name)) {	  /* Defined locally */	  exs[count] = provided->keys[i];	  exsns[count] = name;	  exss[count] = scheme_false; /* means "self" */	  exps[count] = protected;	  count++;	} else if (scheme_lookup_in_table(env->genv->syntax, (const char *)name)) {	  /* Skip for now. */	} else if ((v = scheme_hash_get(required, name))) {	  /* Required */	  if (protected) {	    name = SCHEME_CAR(provided->vals[i]);	    scheme_wrong_syntax("module", NULL, name, "cannot protect imported identifier with re-provide"); 	  }	  if (SCHEME_TRUEP(SCHEME_VEC_ELS(v)[3])) {	    /* If this is a kernel re-provide, don't provide after all. */	    if (reprovide_kernel		&& SAME_OBJ(SCHEME_VEC_ELS(v)[1], kernel_symbol)		&& SAME_OBJ(provided->keys[i], SCHEME_VEC_ELS(v)[2])) {	      /* skip */	    } else {	      exs[count] = provided->keys[i];	      exsns[count] = SCHEME_VEC_ELS(v)[2];	      exss[count] = SCHEME_VEC_ELS(v)[1];	      exps[count] = protected;	      count++;	    }	  }	} else {	  /* Not defined! */	  scheme_wrong_syntax("module", prnt_name, form, "provided identifier not defined or imported");	}      }    }    exvcount = count;    for (i = provided->size; i--; ) {      if (provided->vals[i]) {	Scheme_Object *name, *v;	int protected;	  	v = provided->vals[i];	name = SCHEME_CAR(v);	protected = SCHEME_TRUEP(SCHEME_CDR(v));	if (SCHEME_STXP(name))	  name = scheme_tl_id_sym(env->genv, name, 0);	if (scheme_lookup_in_table(env->genv->syntax, (const char *)name)) {	  /* Defined locally */	  exs[count] = provided->keys[i];	  exsns[count] = name;	  exss[count] = scheme_false; /* means "self" */	  exps[count] = protected;	  count++;	} else if ((v = scheme_hash_get(required, name))) {	  /* Required */	  if (SCHEME_FALSEP(SCHEME_VEC_ELS(v)[3])) {	    /* If this is a kernel re-provide, don't provide after all. */	    if (reprovide_kernel		&& SAME_OBJ(SCHEME_VEC_ELS(v)[1], kernel_symbol)		&& SAME_OBJ(provided->keys[i], SCHEME_VEC_ELS(v)[2])) {	      /* skip */	    } else {	      exs[count] = provided->keys[i];	      exsns[count] = SCHEME_VEC_ELS(v)[2];	      exss[count] = SCHEME_VEC_ELS(v)[1];	      exps[count] = protected;	      count++;	    }	  }	}      }    }    excount = count;    /* Sort provide array for variables: interned followed by       uninterned, alphabetical within each. This is important for       having a consistent provide arrays. */    qsort_provides(exs, exsns, exss, exps, 0, exvcount, 1);  }  /* Compute indirect provides (which is everything at the top-level): */  {    int i, count, j;    Scheme_Bucket **bs, *b;        bs = env->genv->toplevel->buckets;    for (count = 0, i = env->genv->toplevel->size; i--; ) {      b = bs[i];      if (b && b->val)	count++;    }    exis = MALLOC_N(Scheme_Object *, count);    for (count = 0, i = env->genv->toplevel->size; i--; ) {      b = bs[i];      if (b && b->val) {	Scheme_Object *name;	  	name = (Scheme_Object *)b->key;		/* If the name is directly provided, no need for indirect... */	for (j = 0; j < exvcount; j++) {	  if (SAME_OBJ(name, exsns[j]))	    break;	}		if (j == exvcount)	  exis[count++] = name;      }    }    exicount = count;    qsort_provides(exis, NULL, NULL, NULL, 0, exicount, 1);  }  if (!rec[drec].comp) {    /* Produce annotations (in the form of properties)       for module information:         'module-variable-provides = '(item ...)         'module-syntax-provides = '(item ...)	 'module-indirect-provides = '(id ...)         'module-kernel-reprovide-hint = 'kernel-reexport      item = name           | (ext-id . def-id)           | (modidx ext-id . def-id)     kernel-reexport = #f                     | #t                     | exclusion-id    */    int j;    Scheme_Object *e, *a, *result;    result = scheme_null;    /* kernel re-export info: */    if (reprovide_kernel) {      if (exclude_hint)	result = scheme_make_immutable_pair(exclude_hint, result);      else	result = scheme_make_immutable_pair(scheme_true, result);    } else      result = scheme_make_immutable_pair(scheme_false, result);    /* Indirect provides */     a = scheme_null;    for (j = 0; j < exicount; j++) {      a = scheme_make_immutable_pair(exis[j], a);    }    result = scheme_make_immutable_pair(a, result);        /* add syntax and value exports: */    for (j = 0; j < 2; j++) {      int top, i;      e = scheme_null;      if (reprovide_kernel) {	if (!j) {	  i = kernel->num_var_provides;	  top = kernel->num_provides;	} else {	  i = 0;	  top = kernel->num_var_provides;	}	for (; i < top; i++) {	  if (!SAME_OBJ(kernel->provides[i], exclude_hint)) {	    a = scheme_make_immutable_pair(kernel->provides[i], kernel->provides[i]);	    a = scheme_make_immutable_pair(kernel_symbol, a);	    e = scheme_make_immutable_pair(a, e);	  }	}      }      if (!j) {	i = exvcount;	top = excount;      } else {	i = 0;	top = exvcount;      }            for (; i < top; i++) {	if (SCHEME_FALSEP(exss[i])	    && SAME_OBJ(exs[i], exsns[i]))	  a = exs[i];	else {	  a = scheme_make_immutable_pair(exs[i], exsns[i]);	  if (!SCHEME_FALSEP(exss[i])) {	    a = scheme_make_immutable_pair(exss[i], a);	  }	}	e = scheme_make_immutable_pair(a, e);      }      result = scheme_make_immutable_pair(e, result);    }    env->genv->module->hints = result;  }  if (rec[drec].comp) {    Scheme_Object *exp_body_r = scheme_null;        /* Reverse exp_body */    while (!SCHEME_NULLP(exp_body)) {      exp_body_r = scheme_make_pair(SCHEME_CAR(exp_body),				    exp_body_r);      exp_body = SCHEME_CDR(exp_body);    }    env->genv->module->body = first;    env->genv->module->et_body = exp_body_r;    /* Install final provides: */    env->genv->module->num_provides = excount;    env->genv->module->num_var_provides = exvcount;    env->genv->module->provides = exs;    env->genv->module->provide_src_names = exsns;    env->genv->module->provide_srcs = exss;    env->genv->module->provide_protects = exps;    env->genv->module->reprovide_kernel = reprovide_kernel;    env->genv->module->kernel_exclusion = exclude_hint;    env->genv->module->indirect_provides = exis;    env->genv->module->num_indirect_provides = exicount;    env->genv->module->comp_prefix = cenv->prefix;    env->genv->module->max_let_depth = max_let_depth;    if (all_simple_renames && (env->genv->marked_names->count == 0)) {      env->genv->module->rn_stx = scheme_true;    }    if (et_all_simple_renames && (et_mn->count == 0)) {      env->genv->module->et_rn_stx = scheme_true;    }    if (tt_all_simple_renames) {      env->genv->module->tt_rn_stx = scheme_true;    }    return (Scheme_Object *)env->genv->module;  } else {    p = SCHEME_STX_CAR(form);    return scheme_datum_to_syntax(cons(p, first), form, form, 0, 2);  }}