Version française
Home     About     Download     Resources     Contact us    
Browse thread
type of ==
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe DEHLINGER <christophe.dehlinger@i...>
Subject: type of ==
Hi all,

I was recently in a situation where I would have liked to be able to 
test physical equality on terms of possibly different types, but 
couldn't because of =='s 'a -> 'a -> bool type.
Why isn't its type 'a -> 'b -> bool ? Is there more to the 
implementation of == than a simple physical, asm-level equality test ?
Is it because of the semantics of == ? If so, is a 'a -> 'b -> bool 
equivalent possible / already existing ? I guess something like fun a b 
-> a == (Obj.magic b) should work, but regular posts on this list have 
gradually scared me off from ever using the obscure Obj module.

Christophe Dehlinger

__________________________

Ce message (et toutes ses pièces jointes éventuelles) est confidentiel et établi à l'intention exclusive de ses destinataires. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'IFP décline toute responsabilité au titre de ce message.

This message and any attachments (the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. IFP should not be liable for this message.

Visitez notre site Web / Visit our web site : http://www.ifp.fr
__________________________