[Aldor-l] exporting a domain in aldor - final update
Martin Rubey
martin.rubey at univie.ac.at
Tue Jan 2 07:31:55 EST 2007
By chance, I figured out how to make my original plan work out. One has to add
a "local" to make the compiler happy:
Martin Rubey <martin.rubey at univie.ac.at> writes:
#include "aldor"
define MyCat: Category == OutputType with f: () -> %;
define Cat: Category == with {
Dom: MyCat;
}
DomA: Cat == add {
local MyDom: MyCat == Integer add {
Rep == Integer;
f(): % == 1783 pretend %;
}
Dom: MyCat == MyDom;
}
Note that aldor doesn't like Rep, so one has to use pretend %, but I think
that's something rather minor.
This works for Axiom, too.
Happy now.
Martin
More information about the Aldor-l
mailing list