When I compile this ...

========================
)abbrev package FOO Foo
ZZ ==> Integer
LZZ ==> List ZZ
LLZZ ==> List LZZ
Foo: with
    kleiner: (LLZZ, LLZZ) -> Boolean
  == add
    kleiner(x: LLZZ, y: LLZZ): Boolean == x <$LLZZ y
========================

I get

   FOO abbreviates package Foo
------------------------------------------------------------------------
   initializing NRLIB FOO for Foo
   compiling into NRLIB FOO
compiling exported kleiner : (List List Integer,List List Integer) -> Boolean
****** comp fails at level 1 with expression: ******
error in function kleiner

(((|Sel| (|List| (|List| (|Integer|))) <) |x| |y|))
****** level 1  ******
x:= ((Sel (List (List (Integer))) <) x y)
m:= (Boolean)
f:=
((((|y| # . #1=#) (|x| # . #2=#) (|y| . #1#) (|x| . #2#) ...)))

   >> Apparent user error:
not known that (List (List (Integer))) has (AND (has (List (List (Integer))) (finiteAggregate)) (has (List (Integer)) (OrderedSet)))

The compiler obviously has problems figuring out that List List Integer must export <, because Integer and, therefore, also List(Integer) has OrderedSet.

How can do I convince the compiler to produce the right code?

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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/448419f1-c8db-4dd3-abd8-b4d78adb62b7%40hemmecke.org.

Reply via email to