]> Repositorios git - scryer-prolog.git/commitdiff
correct #68 in variable_names conformity tests
authorMark Thom <[email protected]>
Tue, 14 May 2019 03:37:03 +0000 (23:37 -0400)
committerMark Thom <[email protected]>
Tue, 14 May 2019 03:37:03 +0000 (23:37 -0400)
Cargo.toml
src/prolog/lib/builtins.pl

index 72ea5275c2a2e43c6bafe951a9723fd2dbad1076..cd90aa1005a5c045165bcb0050f235a4984db2a0 100644 (file)
@@ -1,6 +1,6 @@
 [package]
 name = "scryer-prolog"
-version = "0.8.83"
+version = "0.8.84"
 authors = ["Mark Thom <[email protected]>"]
 repository = "https://github.com/mthom/scryer-prolog"
 description = "A modern Prolog implementation written mostly in Rust."
index 32af6703b44023d67b35325d38e93b911ba73893..d145deaca2c4eadee1a34eb6ead5822f91eb52b1 100644 (file)
@@ -247,12 +247,15 @@ must_be_var_names_list(VarNames) :-
 
 must_be_var_names_list_([], List).
 must_be_var_names_list_([VarName | VarNames], List) :-
-    (  nonvar(VarName), VarName = (Atom = _) ->
-       (  atom(Atom) -> must_be_var_names_list_(VarNames, List)
-       ;  var(Atom)  -> throw(error(instantiation_error, write_term/2))
+    (  nonvar(VarName) ->
+       (  VarName = (Atom = _) ->
+             (  atom(Atom) -> must_be_var_names_list_(VarNames, List)
+             ;  var(Atom)  -> throw(error(instantiation_error, write_term/2))
+             ;  throw(error(domain_error(write_options, variable_names(List)), write_term/2))
+             )
        ;  throw(error(domain_error(write_options, variable_names(List)), write_term/2))
        )
-    ;  throw(error(domain_error(write_options, variable_names(List)), write_term/2))
+    ;  throw(error(instantiation_error, write_term/2)) % throw(error(domain_error(write_options, variable_names(List)), write_term/2))
     ).
 
 write_term(_, Options) :-