Hi,

getting errors about eq that used to work, obviously about the type 
classes thing ...

$ flx --force t2/fibheap.flx
CLIENT ERROR
[resolve_overload] Ambiguous call: Not expecting equal signatures
(1) fun 5476:<T5477> * <T5477>
(2) fun 1636:<T1632> * <T1632>
See: /usr/local/lib/felix/felix-1.1.3_rc1/lib/std.flx: line 895, cols 84 
to 96
894:
895:   fun find (s:string, e:string) : opt[int] => match stl_find (s, e) 
with | ?i when i == stl_npos => None[int] | ?i => Some i endmatch;
                                                                                
        
*************
896:   fun find (s:string, e:string, i:int) : opt[int] => match stl_find 
(s, e, i) with | ?i when i == stl_npos => None[int] | ?i => Some i endmatch;

See: /usr/local/lib/felix/felix-1.1.3_rc1/lib/flx_tclass.flxh: line 10, 
cols 11 to 32
 9: typeclass Eq[t] {
10:   virtual fun eq: t * t -> bool;
              **********************
11:   virtual fun ne (x:t,y:t):bool => not (eq (x,y));

See: t2/dll.flx: line 11, cols 5 to 40
10: module DLL {
11:     fun eq[T]: T * T -> bool = "$1==$2";
        ************************************
12:

//---------------

In my code I had this ...

    fun eq[T]: T * T -> bool = "$1==$2";

    fun eql[T] (x:T) (y:T):bool => eq(x, y);

to support this

                if (mem (eql head) been) == false do

if I change the eq to equal, I get this

$ flx --force t2/fibheap.flx
CLIENT ERROR
[lookup_name_with_sig] Can't find eq of bool^2
In t2/dll.flx: line 60, cols 42 to 43
59:             {
60:                 if (mem (eql head) been) == false do
                                             **
61:                     prnt head.item;

so I define ...

    fun eq:bool*bool->bool = "$1 == $2";

and then get

$ flx --force t2/fibheap.flx
CLIENT ERROR
[lookup_name_with_sig] Can't find eq of 
lvalue[(DLL::DLL_List<5499>[fibNode<5625>[<T5693>]])] * 
DLL::DLL_List<5499>[fibNode<5625>[<T5693>]]
In t2/fibheap.flx: line 174, cols 28 to 29
173:                     z.item.add_child(curr);
174:                     if min == curr do
                                **
175:                         min = z;

???

Jonathan.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to