[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Am I buggy ? Internal error...
From: |
Francois Maltey |
Subject: |
Re: [Axiom-developer] Am I buggy ? Internal error... |
Date: |
21 Nov 2006 13:15:40 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Hello,
Here is a minimal package which recursively maps an expression.
I can compile it on the silver branch, but I can't use it.
In the interpreter I test :
EI := Expression Integer
pp (x:EI) : EI == x+1
mapRec (sin (sin x), pp)
-----------------------------------------------------------------
)abbrev package ESS EssaiMapRec
EssaiMapRec (R, F): Exports == Implementation where
R : Join(OrderedSet, GcdDomain)
F : Join(FunctionSpace R, TranscendentalFunctionCategory)
K ==> Kernel F
P ==> SparseMultivariatePolynomial (R, K)
Exports ==> with
mapRec : (F, F -> F) -> F
Implementation ==> add
import PolynomialCategoryLifting (IndexedExponents K, K, R, P, F)
mapRec (x, fct) ==
-- in must use a new variable fct1 because I can't compile with fct in fct3
fct1 := fct
fct (map (fct2, #1::F, numer x) / map (fct2, #1::F, denom x))
where
fct3 (xx:F):F == mapRec (xx, fct1)
fct2 (y:K):F ==
nullary? (op := operator y) => y::F
op (map (fct3, argument y))