The strange thing is, that *now* there's no need to get the macros out of the
body ;) Hence, I guess the problem is related to type coercion. If you could
rewrite the macros to local functions (w. types), e.g. minrootpol(X:Type):?,
then ... maybe.
f2(): Void ==
minrootpol(X) ==> monomial(1,2)$SUP(X) + 1
CX(Y) ==> SimpleAlgebraicExtension(Y, SUP Y, minrootpol Y)
px2 := px()$Foo(CX(C), L1 CX(C))
dbgPrint("px2", px2)
On 04.11.2020 17:45, Ralf Hemmecke wrote:
>> Seemingly it also works by using macros, so this may be a work-around?
>> Not nice perhaps, but ...
>
> Great. Thank you for this suggestion. Unfortunately, it only helps in my
> cut-down example for the demonstration of the problem, but my actual
> code is more complicated and there it's not so easy to use macros. It
> would lead to re-evaluation of functions that I only want to compute
> once. Also introducing a new function and passing the respective
> function values as parameters did not work. But maybe I was not careful
> enough.
>
> I'll try to figure out what Waldek's suggestion might mean for my code.
> It is unfortunate anyway that this restriction and its possible
> workaround is not documented. :-(
>
> Ralf
>
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/5c048e79-6c0f-f2bc-c183-d6ccfbd34b94%40gmail.com.