The following program demonstrates a bug in the SPAD compiler.
The file compiles fine with r1168.
The compiler should actually refuse this program, because in
if R has Algebra(R)
it is only known that "R has SetCategory". So in my understanding
it is not known that R satisfies the conditions to be an argument for
the
"Algebra" constructor.
And even if the category part were OK, the add part misses
implementations
for the functions exported by Algebra(R).
Ralf
---rhxBEGIN parametricConditional.spad
)abbrev package PCXX ParametricXConditional
ParametricXConditional(R: BasicType): Exports == Implementation where
Exports ==> with
order: R -> R
if R has SetCategory then
if R has Algebra(R) then Algebra(R)
Implementation ==> add
order(r: R): R == r
---rhxEND parametricConditional.spad
--
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.