On 01.09.2022 19:11, Waldek Hebisch wrote:
> On Thu, Sep 01, 2022 at 09:11:33AM -0700, Kurt Pagani wrote:
>> Problem: when using a type A(p:Polynomial Integer) in another type B, then 
...
> 
> ATM I see no chance to make this working.  Let me recall what I wrote
> im March 2021:
> 
> : However, as long as use is strictly at
> : Spad level, types are not used in conditions and
> : parameters are first assigned to variables and
> : only variables are passed to constructors, then arbitrary
> : non-type parameters probably should work (I know of no obstacle
> : to such use).

I had this vaguely in the back of my head, but did not find the page.
Now I can remember that only variables may be passed ... that's why the function
"g" is working.

> 
> You violated one of rules above, namely you are passing nontrivial
> constants directly to constructor.

Yes, indeed :(

> 
> BTW: '2 pretend PINT' is really bad code.  It works only when
> '2@PINT' works and otherwise silently produces wrong result.

I only wanted to build an A(0) type and was surprised by the
 "The value 0 is not of type CONS", so I tried other things (numbers),
which I don't need, actually.

Perhaps I'll find a work-around (quite confident).

Thank you for the quick answer!
Kurt


> 

-- 
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/3d3ecc3a-8df9-4a69-6924-2c314b904ae4%40gmail.com.

Reply via email to