According to
http://fricas.github.io/api/Point.html
Point K exports OrderedSet if K does.
So we have:
(293) -> List Point Fraction Integer has finiteAggregate
(293) true
(294) -> Point Fraction Integer has OrderedSet
(294) true
But then, why does the attached program not compile?
You can even use
K ==> Fraction Integer
and it still does not compile.
Am I doing something wrong?
Ralf
(295) -> )co ../src/foo.spad
Compiling FriCAS source code from file
/home/hemmecke/backup/git/qeta/tmp/../src/foo.spad using old
system compiler.
FOO abbreviates package Foo
------------------------------------------------------------------------
initializing NRLIB FOO for Foo
compiling into NRLIB FOO
****** Domain: F already in scope
compiling exported foo : List Point F -> List Point F
****** comp fails at level 1 with expression: ******
error in function foo
((|sort| |pts|))
****** level 1 ******
$x:= (sort pts)
$m:= (List (Point F))
$f:=
((((|pts| # #) (|#| #) (< #) (<= #) ...)))
>> Apparent user error:
not known that (List (Point F)) has (AND (has (List (Point F))
(finiteAggregate)) (has (Point F) (OrderedSet)))
--
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/e25ca3ab-a3c6-2500-6260-072a879e2db0%40hemmecke.org.
)abbrev package FOO Foo
Foo(F: Join(OrderedSet, Field)): Exports == Implementation where
K ==> F
-- K ==> Fraction Integer
Exports ==> with
foo: List Point K -> List Point K
Implementation ==> add
foo(pts: List Point K): List Point K == sort(pts)