]> Repositorios git - scryer-prolog.git/commitdiff
Fix retractall/1 predicate to retract both facts and rules
authorPaulo Moura <[email protected]>
Wed, 12 May 2021 22:46:05 +0000 (23:46 +0100)
committerPaulo Moura <[email protected]>
Wed, 12 May 2021 22:46:05 +0000 (23:46 +0100)
src/lib/builtins.pl

index d96e0a163abf6fb556703610284227334152700d..89a50e7dd89a12acec709c41dfa0c5d4fc08b6fc 100644 (file)
@@ -1016,7 +1016,7 @@ retract(Clause) :-
 :- meta_predicate retractall(0).
 
 retractall(Head) :-
-   retract((Head :- _)),
+   retract_clause(Head, _),
    false.
 retractall(_).