]> Repositorios git - scryer-prolog.git/commitdiff
do not check for non-unifiability in dif:attribute_goals, which is sure to succeed...
authorMark Thom <[email protected]>
Tue, 2 Mar 2021 16:50:25 +0000 (09:50 -0700)
committerMark Thom <[email protected]>
Tue, 2 Mar 2021 17:34:25 +0000 (10:34 -0700)
src/lib/dif.pl

index 9c3b8ed837272f270b603d726a63d029b7228374..d9c475eb5dae820d2a38ffedfa2e818cd77c3f6b 100644 (file)
@@ -41,7 +41,8 @@ verify_attributes(Var, Value, Goals) :-
 dif(X, Y) :-
     X \== Y,
     (   X \= Y -> true
-    ;   (   term_variables(X, XVars), term_variables(Y, YVars),
+    ;   (   term_variables(X, XVars),
+            term_variables(Y, YVars),
             dif_set_variables(XVars, X, Y),
             dif_set_variables(YVars, X, Y)
         )
@@ -49,9 +50,7 @@ dif(X, Y) :-
 
 gather_dif_goals([]) --> [].
 gather_dif_goals([(X \== Y) | Goals]) -->
-    (   { X \= Y } -> []
-    ;   [dif:dif(X, Y)]
-    ),
+    [dif:dif(X, Y)],
     gather_dif_goals(Goals).
 
 attribute_goals(X) -->