Ralf, Apparently you can avoid triggering this bug by writing:
Rep == X (using == instead of :=). Perhaps this avoids trigger the automatic coercions that normally make rep and per unnecessary in Spad. Regards, Bill Page. On Sun, Jan 15, 2012 at 4:05 PM, Ralf Hemmecke <r...@hemmecke.de> wrote: > > Also the following I find somehow problematic (although it's not dramatic > since there is an easy workaround). > > ---rhxBEGIN tst.spad > )abbrev domain MEX MExpression > > Z ==> Integer > X ==> Expression Z > > MExpression: with > 0: () -> % > coerce: % -> OutputForm > == add > Rep := X > > -- auxiliary functions > rep(x: %): Rep == x pretend Rep > per(x: Rep): % == x pretend % > > 0: % == per((0$Z)::X) > coerce(x: %): OutputForm == coerce(rep x)$X > ---rhxEND tst.spad > > The addition of "$X" in the last line is superfluous since the input type > for coerce in (coerce rep x) is Rep and the return time could be extracted > from the lefthand side. So it should be clear which coerce to select. > Unfortunately, without the "$X" the code compiles, but then asking for > > 0$MEX > > seems to run forever. > > 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 fricas-devel@googlegroups.com. > To unsubscribe from this group, send email to > fricas-devel+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/fricas-devel?hl=en. > -- 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 fricas-devel@googlegroups.com. To unsubscribe from this group, send email to fricas-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.