On Sat, 2006-10-07 at 16:59 +1000, Jonathan Kelly wrote:
> Erick Tryzelaar wrote:

> Just for posterity ... what Eric suggested worked like this
> 
> fun eq[T]: ptr[T] * ptr[T] -> bool = "$1==$2";
> fun eql[T] (x:&T) (y:&T):bool => eq(x, y);

This doesn't work the way you think. The type

        &T // Felix pointer

is 'unrelated' to the type 

        ptr[T] // C pointer


The function eql calls eq: &T * &T, which is here:

open module Pointer
{
  fun eq[t]: &t * &t -> 2 = "$1==$2";
  fun ne[t]: &t * &t -> 2 = "$1!=$2";
}


-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to