> 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

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/8999974a-33f9-38d6-28b7-47bdc154e491%40hemmecke.org.
per x ==> (x@Rep) pretend %

)abbrev domain FOO Foo
Foo: Exports == Implementation
 where
  Exports ==> AbelianGroup with
    qetaGrades: % -> List Integer
  Implementation ==> add
    import from PositiveInteger
    Rep ==> DirectProduct(2, Integer)
    0: % == per(0$Rep)
    zero?(x: %): Boolean == true
    qetaGrades(x: %): List Integer ==
        zero? x => [-1 for k in 1..2]
        [0]

Reply via email to