Skip to content

Commit

Permalink
Fix priority in op/3
Browse files Browse the repository at this point in the history
  • Loading branch information
bakaq committed Oct 13, 2024
1 parent 190929e commit 90d418a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/toplevel.pl
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@
%% Enable op declarations with lists of operands, i.e.,
%% :- op(900, fy, [$,@]).

user:term_expansion((:- op(Pred, Spec, Ops)), OpResults) :-
user:term_expansion((:- op(Pri, Spec, Ops)), OpResults) :-
ground(Ops),
Ops = [Op | OtherOps],
expand_op_list([Op | OtherOps], Pred, Spec, OpResults).
expand_op_list([Op | OtherOps], Pri, Spec, OpResults).

expand_op_list([], _, _, []).
expand_op_list([Op | OtherOps], Pred, Spec, [(:- op(Pred, Spec, Op)) | OtherResults]) :-
expand_op_list(OtherOps, Pred, Spec, OtherResults).
expand_op_list([Op | OtherOps], Pri, Spec, [(:- op(Pri, Spec, Op)) | OtherResults]) :-
expand_op_list(OtherOps, Pri, Spec, OtherResults).


read_and_match :-
Expand Down

0 comments on commit 90d418a

Please sign in to comment.