Hi Ralf, On Thursday, September 10, 2015 at 10:50:47 AM UTC+5:30, Ralf Hemmecke 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. >
I just did that. [1] There was a Set FA in the code too, so I changed that also. [1] https://github.com/fandango-/fricas/commit/81ca9a8067d94c1287dd98f4dec3df02b8e199ac Thanks, Abhinav. -- 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.
