From: Eshel Yaron Date: Wed, 21 Sep 2022 16:30:34 +0000 (+0300) Subject: ADDED: sweep_op_info/2: new_predicate X-Git-Tag: v0.3.0~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5b9e2d7d7c13b78fc3be92a4a94553bdefc0b3ab;p=dict.git ADDED: sweep_op_info/2: new_predicate --- diff --git a/sweep.pl b/sweep.pl index 8d62974..4ee0b66 100644 --- a/sweep.pl +++ b/sweep.pl @@ -52,6 +52,7 @@ sweep_packs_collection/2, sweep_pack_install/2, sweep_prefix_ops/2, + sweep_op_info/2, sweep_module_path/2 ]). @@ -678,6 +679,18 @@ sweep_prefix_ops(Path0, Ops) :- maplist(atom_string, Ops0, Ops1), list_to_set(Ops1, Ops). +sweep_op_info([Op0|Path0], Info) :- + atom_string(Path, Path0), + atom_string(Op, Op0), + sweep_op_info_(Op, Path, Info). + +sweep_op_info_(Op, Path, [Type|Pred]) :- + xref_op(Path, op(Pred, Type0, Op)), + atom_string(Type0, Type). +sweep_op_info_(Op, _Path, [Type|Pred]) :- + current_op(Pred, Type0, Op), + atom_string(Type0, Type). + sweep_load_buffer([String|Path0], Result) :- atom_string(Path, Path0), with_buffer_stream(Stream,