Ralf Hemmecke wrote:
> 
> 
> 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?

Compiler is not smart enough to see this at compile time.
When you make operation conditional, then it will compile,
like below:

)abbrev package FOO Foo
Foo(F: Join(OrderedSet, Field)): Exports == Implementation where
  K ==> F
  Exports ==> with
    foo: List Point K -> List Point K
  Implementation ==> add
    if Point(K) has OrderedSet then
       foo(pts: List Point K): List Point K == sort(pts)

-- 
                              Waldek Hebisch

-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/E1i37Mw-0007W0-D4%40hera.math.uni.wroc.pl.

Reply via email to