[Aldor-l] Aldor extend for extending Axiom code

Martin Rubey martin.rubey at univie.ac.at
Sat Oct 21 15:35:07 EDT 2006


Dear Peter,

since I managed to have axiom and aldor work together again (I HATE MAKE: 2
hours), I'm currently trying to get our aldor-combinat package running in
Axiom, by coding a compatibility layer to libaldor, i.e., reimplementing those
things we need from libaldor in axiom.

To this end, it would be great if the "extend" keyword would work. Currently,
it doesn't seem to.

Do you have an idea why and - to me probably more important - is there a chance
to get it running?

Here is an example file:

#include "axiom"

extend Integer: with {
	foo: % -> %
} == add {
	foo(a: %): % == {
		output("Hi")$OutputPackage; 
		output(coerce(a))$OutputPackage;
		output("Ho")$OutputPackage; 
		a;
	}
}

And here is what I get:

)co peter.as
   Compiling AXIOM source code from file peter.as using AXIOM-XL 
      compiler and options 
-O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom -Y $AXIOM/algebra
      Use the system command )set compiler args to change these 
      options.
#1 (Warning) Deprecated message prefix: use `ALDOR_' instead of `_AXL'
   Compiling Lisp source code from file ./peter.lsp
   Issuing )library command for peter
   Reading /users/rubey/martin/Axiom/peter.asy
   Integer is already explicitly exposed in frame frame0 
   Integer will be automatically loaded when needed from 
      /users/rubey/martin/Axiom/peter
(1) -> foo 2
   Hi
 
   >> System error:
   Bind stack overflow.

(1) -> 1+1

Integer
 
   >> System error:
   FOAM-USER::|fiRaiseException| is invalid as a function.

(1) -> foo 2
   Hi
Integer
 
   >> System error:
   FOAM-USER::|fiRaiseException| is invalid as a function.

Martin




More information about the Aldor-l mailing list