From 90d418a181397d5cc19991295c93d66c83b566fb Mon Sep 17 00:00:00 2001 From: bakaq Date: Sat, 12 Oct 2024 23:37:58 -0300 Subject: [PATCH] Fix priority in op/3 --- src/toplevel.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/toplevel.pl b/src/toplevel.pl index 090d2094..e6079106 100644 --- a/src/toplevel.pl +++ b/src/toplevel.pl @@ -170,14 +170,14 @@ repl :- %% 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 :- -- 2.54.0