]> git.eshelyaron.com Git - dict.git/commitdiff
FIXED: premature cut in sweep_predicate_location/2
authorEshel Yaron <me@eshelyaron.com>
Sun, 11 Sep 2022 14:46:55 +0000 (17:46 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 11 Sep 2022 14:46:55 +0000 (17:46 +0300)
sweep.pl

index 78f5dec08bd0e63e5a2feec99d2e175ed0470ba4..97241d4f6e8ee078c0486e7c578312f67af92465 100644 (file)
--- a/sweep.pl
+++ b/sweep.pl
@@ -377,13 +377,16 @@ sweep_predicate_references(MFN, Refs) :-
 
 
 sweep_predicate_location(MFN, [Path|Line]) :-
-    !,
     term_string(M:F/N, MFN),
+    !,
     pi_head(F/N, H),
-    sweep_predicate_location_(M, H, Path, Line).
+    (   sweep_predicate_location_(M, H, Path, Line)
+    ->  true
+    ;   sweep_predicate_location_(H, Path, Line)
+    ).
 sweep_predicate_location(FN, [Path|Line]) :-
-    !,
     term_string(F/N, FN),
+    !,
     pi_head(F/N, H),
     sweep_predicate_location_(H, Path, Line).