Just curious: can something of type Generator(Something) ever be a domain?
(Probably yes...)
>aldor -fx -laldor aaa.as
>aaa
MachineInteger
123
---BEGIN aaa.as
#include "aldor"
#include "aldorio"
CAT ==> OutputType with {integer: Literal -> %}
g(): Generator(CAT) == generate {
yield MachineInteger;
-- yield Integer;
}
foo(D: CAT): () == {
import from D, TextWriter, String, Character;
stdout << name(D)$Trace << newline;
stdout << ([EMAIL PROTECTED]) << newline;
}
for D in g() repeat foo(D);
---END aaa.as
But don't remove the -- before "yield Integer", because then the
compiler tells you... :-(
"aaa.as", line 5: g(): Generator(CAT) == generate {
................................^
[L5 C33] #1 (Fatal Error) Compiler bug: no exit list for terrorSequence
(ooops).
Since in Aldor domains are first class, it should be possible to return
them by a generator. (Compare to lists of domains.)
However, your question asks whether g is a domain if
g: Generator(Something)
and I would tend to say that this is not a domain. Why? Well,
"Generator(Something)" should be a category then, right? But if you look
int sal_gener.as you clearly see that Generator(T) is a domain.
Ralf
_______________________________________________
Axiom-math mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-math