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

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]