heap.addModule(new ModuleEnvironment(name, heap));
other = loadModule(x, name, eval);
}
else if (eval.getCurrentEnvt() == eval.__getRootScope()) {
// in the root scope we treat an extend as a "reload"
heap.resetModule(name);
other = loadModule(x, name, eval);
}
// now simply extend the current module
eval.getCurrentModuleEnvironment().extend(other); //heap.getModule(name));