[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog ebd42adc30 1/9: ; Recognize ext-quantified goal
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog ebd42adc30 1/9: ; Recognize ext-quantified goal positions as callable |
Date: |
Sat, 7 Oct 2023 10:01:34 -0400 (EDT) |
branch: elpa/sweeprolog
commit ebd42adc3087c7006f2d4c1a3801d992b4d3f966
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
; Recognize ext-quantified goal positions as callable
---
sweep.pl | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/sweep.pl b/sweep.pl
index fa16037f4c..abe7cfe460 100644
--- a/sweep.pl
+++ b/sweep.pl
@@ -1008,10 +1008,7 @@ name_variable(N, V) :- V = '$VAR'(N).
sweep_context_callable([H|T], R) :-
H = [F0|_],
atom_string(F, F0),
- ( xref_op(_, op(1200, _, F))
- -> true
- ; current_op(1200, _, F)
- ),
+ op_is_neck(F),
!,
( F == (-->)
-> R0 = 2
@@ -1021,6 +1018,12 @@ sweep_context_callable([H|T], R) :-
sweep_context_callable([_|T], R) :-
sweep_context_callable(T, R).
+op_is_neck(F) :-
+ ( xref_op(_, op(1200, _, F))
+ -> true
+ ; current_op(1200, _, F)
+ ).
+
sweep_context_callable_([], R0, R1, R) :- R is R0 + R1, !.
sweep_context_callable_([[":"|2]], R0, R1, R) :- R is R0 + R1, !.
sweep_context_callable_([["("|_]|T], R0, R1, R) :-
@@ -1036,11 +1039,9 @@ sweep_context_callable_([H|T], R0, _, R) :-
sweep_context_callable_(T, R0, R1, R).
sweep_context_callable_arg((-->), _, 2) :- !.
+sweep_context_callable_arg(^, _, 0) :- !.
sweep_context_callable_arg(Neck, _, 0) :-
- ( xref_op(_, op(1200, _, Neck))
- -> true
- ; current_op(1200, _, Neck)
- ),
+ op_is_neck(Neck),
!.
sweep_context_callable_arg(F, N, R) :-
sweep_current_module(Mod),
- [nongnu] elpa/sweeprolog updated (0dd67eba55 -> 6431074ee1), ELPA Syncer, 2023/10/07
- [nongnu] elpa/sweeprolog ebd42adc30 1/9: ; Recognize ext-quantified goal positions as callable,
ELPA Syncer <=
- [nongnu] elpa/sweeprolog 38d1326fee 2/9: ; Fix precedence calculation for unary operator arguments, ELPA Syncer, 2023/10/07
- [nongnu] elpa/sweeprolog 52b1f46bbb 4/9: ; Remove unused function 'sweeprolog-token-boundaries', ELPA Syncer, 2023/10/07
- [nongnu] elpa/sweeprolog abcafbc720 5/9: ; * sweeprolog.el (sweeprolog-query-replace-term): Update comment, ELPA Syncer, 2023/10/07
- [nongnu] elpa/sweeprolog 2bca5fbdc2 6/9: ; Improve user option docstring, ELPA Syncer, 2023/10/07
- [nongnu] elpa/sweeprolog 6431074ee1 9/9: Announce recent changes in NEWS.org and bump version to 0.25.3, ELPA Syncer, 2023/10/07
- [nongnu] elpa/sweeprolog 622c914dfd 3/9: ; New helper predicate 'pos_bounds/3', ELPA Syncer, 2023/10/07
- [nongnu] elpa/sweeprolog 6a9bfd3651 7/9: ENHANCED: Improve 'sweeprolog-extract-region-to-predicate', ELPA Syncer, 2023/10/07
- [nongnu] elpa/sweeprolog 6c1017d637 8/9: ; Fix excluding new predicate body from replacement after extraction, ELPA Syncer, 2023/10/07