add ordsets library, domain.pl attributed variables example

This commit is contained in:
Mark Thom
2019-03-10 22:33:09 -06:00
parent b1d061f76b
commit a6d3f39152
4 changed files with 681 additions and 2 deletions

View File

@@ -192,8 +192,8 @@ fn add_hooks_to_mockup(code_repo: &mut CodeRepo, hook: CompileTimeHook,
let preds = code_repo.term_dir.entry(key.clone())
.or_insert((Predicate::new(), VecDeque::from(vec![])));
(preds.0).0.extend((expansions.0).0.iter().cloned());
preds.1.extend(expansions.1.iter().cloned());
(preds.0).0.extend((expansions.0).0.into_iter());
preds.1.extend(expansions.1.into_iter());
}
fn setup_module_expansions(wam: &mut Machine, module_name: ClauseName)

View File

@@ -154,6 +154,7 @@ static DIF: &str = include_str!("../lib/dif.pl");
static FREEZE: &str = include_str!("../lib/freeze.pl");
static REIF: &str = include_str!("../lib/reif.pl");
static ASSOC: &str = include_str!("../lib/assoc.pl");
static ORDSETS: &str = include_str!("../lib/ordsets.pl");
impl Machine {
fn compile_special_forms(&mut self) {
@@ -186,6 +187,7 @@ impl Machine {
compile_user_module(self, FREEZE.as_bytes());
compile_user_module(self, REIF.as_bytes());
compile_user_module(self, ASSOC.as_bytes());
compile_user_module(self, ORDSETS.as_bytes());
}
pub fn new() -> Self {