axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Aldor extend for extending Axiom code


From: Martin Rubey
Subject: [Axiom-developer] Aldor extend for extending Axiom code
Date: 21 Oct 2006 21:35:07 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]