On 7/3/25 03:15, Waldek Hebisch wrote:
You are exploring land of bugs.
As usual. ;-)
I don't even know whether such a construction is specified to work even
in Aldor.
The following compiles
)abbrev package RHX RHx
RHx(R: Ring, POL: R -> UnivariatePolynomialCategory R): with
var: () -> OutputForm
== add
fT := POL(R)
mon ==> monomial$fT
var(): OutputForm == mon(1$R, 1$NonNegativeInteger)::OutputForm
but generated code is wrong.
In general, your code here is quite different than current algebra
code. That is normally caller would evaluate POL(R) nad RHx would
use its value.
Hmmm... but that seems to tell my that I would have to make a part of
the respective (RHx) package explicit to the caller.
Actually, I oversimplified. What I really want inside RHx is calling
functions from POL(Matrix R), i.e., I should have given
RHx(R: Ring, POL: (X:Ring) -> UnivariatePolynomialCategory X): with
as the initial line of definition. In my current setup the respective
POL constructor would even have a second parameter that depends on X.
I wanted to hide the (respective) "Matrix" constructur from the caller
as implementation detail.
Also, do I guess correctly that you want to pass
RHSparseUnivariatePolynomial as an argument to RHx?
Yes, that is exactly my wish, but good to know that it doesn't work.
I somehow wanted to avoid doubling the code for RHx, by factoring out
this POL constructor
Thank you for your quick reply.
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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/fricas-devel/acbf8190-6dd6-4123-bf75-68758c341f04%40hemmecke.org.