}
private static void addImportToCurrentModule(ISourceLocation src, String name, IEvaluator<Result<IValue>> eval) {
ModuleEnvironment module = eval.getHeap().getModule(name);
if (module == null) {
throw new UndeclaredModule(name, src);
}
ModuleEnvironment current = eval.getCurrentModuleEnvironment();
current.addImport(name, module);
current.setSyntaxDefined(current.definesSyntax() || module.definesSyntax());
}