]> Repositorios git - scryer-prolog.git/commitdiff
print full list in erroneous variable_names
authorMark Thom <[email protected]>
Fri, 10 May 2019 02:56:15 +0000 (22:56 -0400)
committerMark Thom <[email protected]>
Fri, 10 May 2019 02:56:15 +0000 (22:56 -0400)
Cargo.toml
src/prolog/lib/builtins.pl

index 87a3cd2fd445570dcd4885c96a9b2c9b91d2f56e..493c2f02ba417a2956150c6171b9ce2dd593dd05 100644 (file)
@@ -1,6 +1,6 @@
 [package]
 name = "scryer-prolog"
-version = "0.8.80"
+version = "0.8.81"
 authors = ["Mark Thom <[email protected]>"]
 repository = "https://github.com/mthom/scryer-prolog"
 description = "A modern Prolog implementation written mostly in Rust."
index 7bff4c1c09a53133ba0a311964b3a97b58dae183..32af6703b44023d67b35325d38e93b911ba73893 100644 (file)
@@ -240,19 +240,19 @@ inst_member_or([], Y, Y).
 
 must_be_var_names_list(VarNames) :-
     '$skip_max_list'(_, -1, VarNames, Tail),
-    (  Tail == [] -> must_be_var_names_list_(VarNames)
+    (  Tail == [] -> must_be_var_names_list_(VarNames, VarNames)
     ;  var(Tail)  -> throw(error(instantiation_error, write_term/2))
     ;  throw(error(domain_error(write_options, variable_names(VarNames)), write_term/2))
     ).
 
-must_be_var_names_list_([]).
-must_be_var_names_list_([VarName | 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)
+       (  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([VarName | VarNames])), write_term/2))
+       ;  throw(error(domain_error(write_options, variable_names(List)), write_term/2))
        )
-    ;  throw(error(domain_error(write_options, variable_names([VarName | VarNames])), write_term/2))
+    ;  throw(error(domain_error(write_options, variable_names(List)), write_term/2))
     ).
 
 write_term(_, Options) :-