correct conformity error

This commit is contained in:
Mark Thom
2018-09-16 14:21:50 -06:00
parent f226cb3dbd
commit 8eb327c735
4 changed files with 6 additions and 4 deletions

2
Cargo.lock generated
View File

@@ -108,7 +108,7 @@ dependencies = [
[[package]]
name = "rusty-wam"
version = "0.7.12"
version = "0.7.13"
dependencies = [
"downcast 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@@ -1,6 +1,6 @@
[package]
name = "rusty-wam"
version = "0.7.12"
version = "0.7.13"
authors = ["Mark Thom <markjordanthom@gmail.com>"]
repository = "https://github.com/mthom/rusty-wam"
description = "The Warren Abstract Machine in Rust."

View File

@@ -433,12 +433,12 @@ impl<'a, Formatter: HCValueFormatter, Outputter: HCValueOutputter>
};
match heap_val {
HeapCellValue::NamedStr(arity, name, Some(fixity)) => {
HeapCellValue::NamedStr(arity, ref name, Some(fixity)) if name.as_str() != "," => {
if composite_brackets {
self.state_stack.push(TokenOrRedirect::Close);
}
let ct = ClauseType::from(name, arity, Some(fixity));
let ct = ClauseType::from(name.clone(), arity, Some(fixity));
self.formatter.format_clause(iter, arity, ct, &mut self.state_stack);
if composite_brackets {

View File

@@ -1669,6 +1669,8 @@ fn test_queries_on_builtins()
[["X = (-)-(-)"]]);
assert_prolog_success!(&mut wam, "?- X = ((:-):-(:-)).",
[["X = (:-):-(:-)"]]);
assert_prolog_success!(&mut wam, "?- X = (a:-b,c).",
[["X = a:-b,c"]]);
}
#[test]