lib(ech) and label_with : maybe a trivial question

From: Sandrine-Dominique Gouraud <gouraud_at_irisa.fr>
Date: Tue 25 Jan 2005 02:42:01 PM GMT
Message-ID: <41F65AB9.8090407@irisa.fr>
Dear all,

I'm looking for someone would can explain me why this code does not compile.

:- lib(ech).
:- lib(fd).

:-handler my_plus.
:-constraints my_plus/3.

my_plus(P, N, R) <=> P = zero    | write('regle 1'), nl, R = N.
my_plus(P, N, R) <=> N = zero    | write('regle 2'), nl, R = P.
my_plus(P, N, R) <=> P = succ(Q) | write('regle 3'), nl, my_plus(Q, N,
R1), R = succ(R1).
my_plus(P, N, R) <=> N = succ(Q) | write('regle 4'), nl, my_plus(P, Q,
R1), R = succ(R1).

label_with my_plus(P,N,R) if true.
my_plus(P,N,R):- (P=zero;N=zero).


Compiler message:
lists.pl   compiled traceable 5360 bytes in 0.00 seconds
strings.eco loaded traceable 0 bytes in 0.01 seconds
numbervars.pl compiled traceable 788 bytes in 0.00 seconds
ech.eco    loaded traceable 0 bytes in 0.03 seconds
fd_domain.eco loaded traceable 0 bytes in 0.00 seconds
fd_arith.eco loaded traceable 0 bytes in 0.02 seconds
fd_util.eco loaded traceable 0 bytes in 0.00 seconds
fd_chip.eco loaded traceable 0 bytes in 0.00 seconds
fd_elipsys.eco loaded traceable 0 bytes in 0.01 seconds
fd.eco     loaded traceable 0 bytes in 0.03 seconds
file try_CHR.pl, line 16: syntax error: postfix/infix operator expected
| label_with my_plus(P,N,R) if true.
|                  ^ here


Thanks,

Sandrine-Dominique Gouraud
IRISA
Campus Universitaire de Beaulieu
35042 RENNES Cedex
FRANCE
Received on Tue Jan 25 16:35:10 2005

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:33 PM GMT GMT