Hello,
I am having some issue with the eval function, any ideas ?
I have reduced my problem to the simplest form.
It is making me crazy !!!
Because UP, which is a PolynomialCat, has InnerEvalable
PolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, VarSet:OrderedSet):
Category ==
Join(PartialDifferentialRing VarSet, FiniteAbelianMonoidRing(R, E),
Evalable %, InnerEvalable(VarSet, R),
InnerEvalable(VarSet, %), RetractableTo VarSet,
FullyLinearlyExplicitRingOver R)
What am I missing ?
Prog :
#include "axiom.as <http://axiom.as>"
TestEval( x:Symbol , F:Field): with {}
== add {
import from UnivariatePolynomial(x,F) ;
import from Fraction UnivariatePolynomial(x,F) ;
test(a:Fraction UnivariatePolynomial(x,F)):Fraction
UnivariatePolynomial(x,F) == {
eval(a, x, 1)
}
And here his the error message :
aldor -M no-abbrev -O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete
-DAxiom -Y $AXIOM/algebra eval.as <http://eval.as>
#1 (Warning) Deprecated message prefix: use `ALDOR_' instead of `_AXL'
"eval.as <http://eval.as>", line 11: eval(a, x, 1)
................^
[L11 C17] #2 (Error) No one possible return type satisfies the context type.
These possible return types were rejected:
-- Fraction(UnivariatePolynomial(x, F))
The context requires an expression of type
Fraction(UnivariatePolynomial(x, F)).
The following could be suitable if imported:
eval: (Fraction(UnivariatePolynomial(x, F)), Symbol pretend
SetCategory, UnivariatePolynomial(x, F) pretend Type) ->
Fraction(UnivariatePolynomial(x, F)) from
Fraction(UnivariatePolynomial(x, F)), if UnivariatePolynomial(x, F) has
InnerEvalable(Symbol, UnivariatePolynomial(x, F))
Thanks
Antoine Hersen
}
------------------------------------------------------------------------
_______________________________________________
Axiom-developer mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/axiom-developer