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
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