1:- module(pac_op, [
2 op(5, xfy, (.)),
3 op(5, fy, (.)),
4 op(6, fy, '`'), 5 op(10, fy, (!)),
7 op(10, fy, *),
8 op(10, fy, ?),
9 op(10, fy, @),
10 op(10, fy, :),
11 op(200, yfx, @),
12 op(450, xfx, (..)),
13 op(650, xfy, (::)),
14 op(670, yfx, (\)),
15 op(700, xfx, in),
16 op(710, fy, (~)),
17 op(750, yfx, (&))
18 ]). 19
20:- current_op(X,Y,=), op(X,Y,#=). 21:- current_op(X,Y,\=), op(X,Y,#\=). 22:- current_op(X,Y,>), op(X,Y,#>). 23:- current_op(X,Y,<), op(X,Y,#<). 24:- current_op(X, Y, =), op(X, Y, :=). 25:- current_op(P, F, =), op(P, F, =>). 26:- current_op(X, Y, ->), op(X, Y, \). 27:- current_op(X, Y, \), op(X, Y, \\). 28:- current_op(P, T, \), op(P, T, <-). 29:- current_op(P, T, \), op(P, T, <--). 30:- current_op(P, T, \), op(P, T, <->). 31:- current_op(P, T, \), op(P, T, <>). 32:- current_op(P, T, \), op(P, T, <-->). 33:- current_op(X, Y, user:($)), op(X, Y, $$). 34:- current_op(X, Y, (+)), memberchk(Y, [xfy,yfx]),
35 X0 is X + 10,
36 op(X0, Y, (++)). 37:- current_op(X, Y, (?-)), op(X, Y, (??-)). 38:- current_op(P, _, :-), Q is P - 100, op(Q, fy, include).