On 11/15/2008 11:09 AM, Martin Rubey wrote:
> Ralf Hemmecke <[EMAIL PROTECTED]> writes:
> 
>>> But I hesitate to write
>>> UnivariatePolynomial(var, R) == with Join(CoercibleTo SUP R,
>>> CoercibleTo Polynomial R,
>>> CoercibleTo DMP([var], R),
>>> CoercibleTo MPOLY([var], R) ...)
>>> This doesn't look right.
>> Doesn't seem to look right. But how else would you want to export
>>
>>    coerce: % -> X
>>
>> for any of the replacements for X from above? They must statically be given 
>> at
>> compile time or (if "extend" where available) could be added later (but also 
>> at
>> compile time).
> 
> Yes, *exactly* this was my question.  And since I think it's a language
> problem, I also sent it to aldor-l.

What about putting

   toHere: (X: UPOLYC) -> X -> %

into the category of UPOLYC and then

   toHere(X: UPOLYC)(x: X): % == coerce(x)$UPOLYCoerce(X, %)

as default implementation?

It's not exactly like a simple coerce, but you get rid of explicitly 
stating all the CoercibleTo X exports.

Ralf

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to