[Aldor-l] with issue
Ralf Hemmecke
ralf at hemmecke.de
Sat Jul 5 05:58:44 EDT 2008
Hi Peter, hi Stephen
I remember that long time ago I was told that an instance where
A with B
behaves different from
with {A; B}
is a bug.
What would you say about the following?
---BEGIN aaa.as
#include "aldor"
A: with == add;
Cat: Category == with;
Cat2: Category == with;
extend IntegerSegment(Z: IntegerType) : with {
Cat with {Cat2; foo: A -> A};
} == add {foo(a: A): A == a;}
---END aaa.as
Compiling with
aldor aaa.as
results in
"aaa.as", line 5: extend IntegerSegment(Z: IntegerType) : with {
.............................................^
[L5 C46] #1 (Error) Improper form appearing in `with' statement.
Well, of course in that case it is easy to fix the sources, but the
question is whether the above program should be considered a well-formed
Aldor program. Is it?
Ralf
More information about the Aldor-l
mailing list