[snip]

However, the desirable query

 if R has QuotientField S

thus defining S is, I think, quite difficult to implement
sensibly. Throughout
Axiom, this effect is obtained by adding another parameter to the
Package/Domain signature like:

MyPackage(F: Field, S: IntegralDomain): ...

 if F is Fraction S then

Martin, do you really mean "is" instead of "has"? I don't think that your "if" expression works with Aldor.

Anyway, if I were a compiler/interpreter, what would I do with something like

if F is Fraction S then ...

I would first evaluate the function "Fraction" obtaining a type T and then check whether F and T are the same thing. S would be lost. One could only achieve your wish by pattern matching, but Axiom doesn't work that way, does it?

> I think that works only in function definition but not in function
> decalaration.

Greg, what do you mean by that?

Ralf


_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to