Tail).
sweep_predicate_location_(H, Path, Line) :-
+ xref_defined(Path0, H, How0),
+ xref_definition_line(How0, _),
+ xref_source(Path0, [comments(store)]),
xref_defined(Path0, H, How),
xref_definition_line(How, Line),
!,
atom_string(Path0, Path).
sweep_predicate_location_(M, H, Path, Line) :-
- ( xref_defined(Path0, M:H, How),
- xref_definition_line(How, Line)
+ ( xref_defined(Path0, M:H, How0),
+ xref_definition_line(How0, _)
-> true
- ; xref_defined(Path0, H, How),
- xref_definition_line(How, Line),
+ ; xref_defined(Path0, H, How0),
+ xref_definition_line(How0, _),
xref_module(Path0, M)
),
+ xref_source(Path0, [comments(store)]),
+ xref_defined(Path0, H, How),
+ xref_definition_line(How, Line),
!,
atom_string(Path0, Path).
sweep_predicate_location_(M, H, Path, Line) :-
For native built-in predicates, the behavior of this function
depends on the value of the user option
`sweeprolog-swipl-sources', which see."
- (sweeprolog-analyze-buffer)
(or (sweeprolog--query-once "sweep" "sweep_predicate_location" mfn)
(sweeprolog-native-predicate-location mfn)))