Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Type abstraction and (polymorphic) equality
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: sejourne_kevin <sejourne_kevin@y...>
Subject: Re: [Caml-list] Type abstraction and (polymorphic) equality
Christophe TROESTLER a écrit :
>   - One introduces the same capability of providing a special equality
>     (comparison) for certain types but, during compilation, "expand"
>     functions till the type for "=" is given by known functions
>     (something like a "generic" equality).  I guess however that that
>     may cause problems with separate compilation...

A generic equality should be one that work with recursives. A such
equality is slower than the Pervasives.(=) one. So (=) is just an
optimisation of a generic one that don't have been fully implemented.
When the compiler generate code he have the complete type, no ? so he
can know if a type is recursives or not, so he can select the slow but
recursives compliant version are the actual.
Maybe that it is more complex than this, no?


Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur