copy operator exports to impromptu modules (#307)

This commit is contained in:
Mark Thom
2020-04-14 01:03:49 -06:00
parent b74a4d5225
commit 082c6a9e64
2 changed files with 18 additions and 7 deletions

View File

@@ -1279,6 +1279,17 @@ fn compile_work_impl(
.filter(|(name, _)| name.owning_module().as_str() != "builtins") .filter(|(name, _)| name.owning_module().as_str() != "builtins")
.map(ModuleExport::PredicateKey) .map(ModuleExport::PredicateKey)
.collect(); .collect();
module.module_decl.exports.extend(
indices.op_dir.iter()
.map(|((name, _), OpDirValue (shared_op_desc, _))|
ModuleExport::OpDecl(OpDecl(
shared_op_desc.prec(),
shared_op_desc.assoc(),
name.clone(),
))
)
);
} }
let mut clause_code_generator = let mut clause_code_generator =