IIRC new exports introduced by `extend' are not visible to previous
definitions, except via `has' predicates which execute during runtime.  Are
there other issues involved?

I do not understand.  What is a "previous" definition in Aldor?

If you extend Integer then it will not be visible globally. Clearly, it is visible only for those things that "see" the extension.

Try the following via

aldor -laldor -fo -fao aaa.as
aldor -lalgebra -laldor -fx bbb.as aaa.o
bbb

The output is:
foo  == F
foo2 == T
although Integer gets extended in libalgebra. However, the package Pkg, was compiled before and does not "see" the extension.

Ralf

---BEGIN aaa.as
#include "aldor"
Pkg: with {
  foo: () -> Boolean;
} == add {
  foo(): Boolean == Integer has with {binomial: (%, %) -> %}
}
---END aaa.as


---BEGIN aaa.as
#include "algebra"
#include "aldorio"
#library AAA "aaa.ao"
import from AAA;

Pkg2: with {
  foo2: () -> Boolean;
} == add {
  foo2(): Boolean == Integer has with {binomial: (%, %) -> %}
}

main(): () == {
        stdout << "foo  == " << foo()$Pkg << newline;
        stdout << "foo2 == " << foo2()$Pkg2 << newline;
}

main();
---END aaa.as



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

Reply via email to