From aggcat.spad.pamphlet:
if Entry has SetCategory and % has finiteAggregate then
entry?: (Entry,%) -> Boolean
++ entry?(x,u) tests if x equals \axiom{u . i} for some index i.
Form aggcat2.spad.pamphlet:
if B has ListAggregate(R) or not(B has shallowlyMutable) then
-- A is a list-oid, and B is either list-oids or not mutable
map(f, l) == construct [f s for s in entries l]
So, as Martin wrote simple boolean operators already work. I belive
that there are restrictions, namely that more complicated expressions
do not work.
Martin, correct me if I am wrong... But I guess Martin meant that
something like
define ResidueClassRing(R: CommutativeRing, p: R): Category == with {
Ring;
if prime? p then Field;
...
}
which would be perfectly fine in Aldor does not work in SPAD.
In contrast to "has", "is", "and", etc. the function "prime?" is not
defined by the language and thus cannot be evaluated at compile time.
In Aldor that is delayed until the time that category is first used (at
runtime). Only then the actual exports are computed.
Ralf
_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer