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 
> Fricas complains if p is a number (Expression makes no difference). Is 
> there any method to tell the compiler that the number (if) is a "Polynomial 
> Integer"? I tried out as much as crossed my mind. Any clues highly 
> appreciated?
<snip>
> )abbrev domain BDOM B
> B : Exports == Implementation where 
>   BOP  ==> BasicOperator
>   PINT ==> Polynomial Integer
>   Exports == SetCategory with
>     coerce : Symbol -> % 
>     f : % -> A(0)
>     g : % -> A(r)
>     h : % -> A(2 pretend PINT)

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).

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

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

-- 
                              Waldek Hebisch

-- 
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/20220901171159.GA23265%40fricas.math.uni.wroc.pl.

Reply via email to