It is almost possible in aldor, given Record(T: Tuple Type), one could say
'if _and(t has PrimitiveType for t in T) then PrimitiveType'. This won't
work at the moment, but I think the restriction on conditional exports
using 'has' isn't required.  I'll experiment a bit later.
On Sep 10, 2015 6:20 AM, "Ralf Hemmecke" <[email protected]> wrote:

> > If all fields have SetCategory, then record should have SetCategory
> > too.  Currently Spad cheats and unconditionally asserts SetCategory.
> > If Aldor unconditionally considers records to _not_ have
> > SetCategory, then this looks like serious limitation of Aldor.
>
> The SPAD compiler cheats. But even if it doesn't, your rule looks like
> "the spad compiler knows SetCategory" and so SetCategory would be more
> or less a type belonging to the Spad Language and not to the library.
>
> Would you agree that record should also export BasicType if all its
> fields have BasicType? Or Monoid if all its fields have Monoid? Where do
> you draw the line? What if I produce another library where my
> "SetCategory" type is called "Setcategory" or simply "Set"?
>
> Some properties can be lifted, but some not. You are right that Aldor
> does not allow to express such a lifting statement in terms of the
> language, but still I'd prefer rather extend the language to express
> such lifting (even if the number of fields of Record is arbitrary)
> rather than including library knowledge into the compiler.
>
> Just my 2 cents.
>
> Ralf
>
> PS: I'll try to produce a patch to change Set to List in lodof2.spad.
>
> --
> 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 post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to