emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/sweeprolog 5b9e2d7d7c 126/166: ADDED: sweep_op_info/2: new


From: ELPA Syncer
Subject: [nongnu] elpa/sweeprolog 5b9e2d7d7c 126/166: ADDED: sweep_op_info/2: new_predicate
Date: Fri, 30 Sep 2022 04:59:31 -0400 (EDT)

branch: elpa/sweeprolog
commit 5b9e2d7d7c13b78fc3be92a4a94553bdefc0b3ab
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>

    ADDED: sweep_op_info/2: new_predicate
---
 sweep.pl | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sweep.pl b/sweep.pl
index 8d6297420a..4ee0b66978 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,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]