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
Merging object signatures
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-11-05 (12:58)
From: Dario Teixeira <darioteixeira@y...>
Subject: Re: [Caml-list] Merging object signatures

> Can't you make foo_t and bar_t class types and foobar_t inherits them
> both?

Thanks for the reply.  Yes, in the toy example I posted that would indeed
be an alternative.  Still, I'm wondering about the most general case;
suppose I had a function that took an object satisfying both foo_t and bar_t:

val do_something: < foo_t; bar_t; .. > -> bool

This is what I'm wondering if it's possible to express.

Best regards,
Dario Teixeira