change goal and term expansions, change call/N to use goal expansions

This commit is contained in:
Mark Thom
2019-12-10 21:36:02 -07:00
parent b0fa45cd33
commit 196784bd09
20 changed files with 424 additions and 243 deletions

View File

@@ -693,13 +693,11 @@ impl RelationWorker {
let ct = indices.get_clause_type(name, terms.len(), fixity);
Ok(QueryTerm::Clause(Cell::default(), ct, terms, false))
}
},
Term::Var(..) => Ok(QueryTerm::Clause(
Cell::default(),
ClauseType::CallN,
vec![Box::new(term)],
false,
)),
}
arg @ Term::Var(..) => {
let ct = ClauseType::Named(clause_name!("call"), 1, CodeIndex::default());
Ok(QueryTerm::Clause(Cell::default(), ct, vec![Box::new(arg)], false))
}
_ => Err(ParserError::InadmissibleQueryTerm),
}
}