English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
strange behavior with record type definition
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-12 (10:54)
From: Florent <florentflament@a...>
Subject: Re: [Caml-list] strange behavior with record type definition
Mmhh, why do we have to use differents label names in distinct record 
types ?
It makes record types not easy to use when a lot of them are needed ...

Martin Jambon wrote:

> On Fri, 11 Nov 2005, Florent wrote:
>> Hi, I have defined two distinct record's types with a field's name in 
>> common. But when I try to define a function that uses the first of 
>> the types, the compiler gives me a type error.
>> How can I use my first type in a function ??
> The answer is there: 
> http://pauillac.inria.fr/caml/FAQ/FAQ_EXPERT-eng.html#labels_surcharge
> Martin