[Aldor-l] Recursively defined constant???

Ralf Hemmecke ralf at hemmecke.de
Tue Aug 19 12:51:53 EDT 2008


Dear Stephen,

What could possibly be wrong with the following program?
I have no idea why the compiler thinks that I am doing something recursive.

 >aldor -laldor aaa.as
"aaa.as", line 6:         const: Dom == const$D;
                   ........^
[L10 C9] #1 (Warning) Illegal recursive definition: <const:Dom, const:Dom>

Interestingly, the compiler points to something different if I put --
at the beginning of the Rep line.

 >aldor -laldor aaa.as
"aaa.as", line 4: Fun(D: Cat): Cat == add {
                   ........................^
[L4 C25] #1 (Warning) Illegal recursive definition: <const:Dom, const:Dom>

Ralf

---BEGIN aaa.as
#include "aldor"
Dom: with == add;
Cat: Category == with {	const: Dom }
Fun(D: Cat): Cat == add {
	Rep == D;
	const: Dom == const$D;
}
---END aaa.as




More information about the Aldor-l mailing list