perform goal expansion in call/N (#788, #797)

This commit is contained in:
Mark Thom
2021-02-04 16:59:16 -07:00
parent a9e0a51059
commit 75a52f032b
9 changed files with 835 additions and 98 deletions

View File

@@ -863,7 +863,7 @@ impl ClauseType {
pub fn name(&self) -> ClauseName {
match self {
&ClauseType::BuiltIn(ref built_in) => built_in.name(),
&ClauseType::CallN => clause_name!("call"),
&ClauseType::CallN => clause_name!("$call"),
&ClauseType::Inlined(ref inlined) => clause_name!(inlined.name()),
&ClauseType::Op(ref name, ..) => name.clone(),
&ClauseType::Named(ref name, ..) => name.clone(),
@@ -882,7 +882,7 @@ impl ClauseType {
.unwrap_or_else(|| {
if let Some(spec) = spec {
ClauseType::Op(name, spec, CodeIndex::default())
} else if name.as_str() == "call" {
} else if name.as_str() == "$call" {
ClauseType::CallN
} else {
ClauseType::Named(name, arity, CodeIndex::default())