> You posted incomplete code.
I know. It took, however some time to construct a sufficiently small
example, see attachment.
Compile via ")co foo.spad".
(1) -> qetaGrades(0$Foo)
Function: -? : % -> % is missing from domain: NonNegativeInteger
Internal Error
The function - with signature $$ is missing from domain
NonNegativeInteger
You might wonder why there is
import from PositiveInteger
but originally I had there a statement
ncusps: P := fun(cusps)
where cusps was a parameter of type List Fraction Integer in the
arguments of Foo.
Maybe you want to change AbelianGroup to AbelianMonoid. Then the output
is correctly [-1, -1]. Strange.
As I said, I don't need a fix, but you wanted a short example.
Ralf