]> Repositorios git - scryer-prolog.git/commitdiff
correct conformity error
authorMark Thom <[email protected]>
Sun, 16 Sep 2018 20:21:50 +0000 (14:21 -0600)
committerMark Thom <[email protected]>
Sun, 16 Sep 2018 20:21:50 +0000 (14:21 -0600)
Cargo.lock
Cargo.toml
src/prolog/heap_print.rs
src/tests.rs

index a97c8e3367f274e5dbba8314351b92e9ea993306..5053b63bc29dca0a40b6afa05c6066d62f50da7c 100644 (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)",
index 359129697f7113d069f0d2fb853ff6aaea89eae7..8fb7c224f1c2d92d7c8f279f3e837668888ba237 100644 (file)
@@ -1,6 +1,6 @@
 [package]
 name = "rusty-wam"
-version = "0.7.12"
+version = "0.7.13"
 authors = ["Mark Thom <[email protected]>"]
 repository = "https://github.com/mthom/rusty-wam"
 description = "The Warren Abstract Machine in Rust."
index 4b111c45a072bcbd527894c7d5e9c5602e22080e..94549c4bc55f32bc6af6ad13ecfdccca8baa75ba 100644 (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 {
index b581bd702475c9ec11513bd14b8356d22a1ffdfb..c2a139ea60f2b25eaf52585a8820016744e78cf4 100644 (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]