From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 76D3DBC57 for ; Thu, 4 Nov 2010 19:55:51 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtMGANue0kxii1tJZGdsb2JhbACDJ5AiMY4mCgsFEQUfrSQ8gheFL4kHAQQEAYEdgzFzBIRXiQY X-IronPort-AV: E=Sophos;i="4.58,297,1286143200"; d="scan'208";a="64937761" Received: from nm3.bullet.mail.sp2.yahoo.com ([98.139.91.73]) by mail3-smtp-sop.national.inria.fr with SMTP; 04 Nov 2010 19:55:50 +0100 Received: from [98.139.91.61] by nm3.bullet.mail.sp2.yahoo.com with NNFMP; 04 Nov 2010 18:55:48 -0000 Received: from [98.139.91.20] by tm1.bullet.mail.sp2.yahoo.com with NNFMP; 04 Nov 2010 18:55:48 -0000 Received: from [127.0.0.1] by omp1020.mail.sp2.yahoo.com with NNFMP; 04 Nov 2010 18:55:48 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 762966.65361.bm@omp1020.mail.sp2.yahoo.com Received: (qmail 62258 invoked by uid 60001); 4 Nov 2010 18:55:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1288896947; bh=QGN/xRrVs7ZNDHVf2xaLr7P8LB8+k/caxvGe1enjwkA=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=imWQxd+E5nQKJWsqdgReUfdZl6gSyn00G1QZBQxPvk/fuwnfaPMWPr68d1oUFNTh0FqiQFu6q9OVPcLRFD6WGE+245R9MpwUI1T7wWEyL4fgmq7s5P3I9FrpdVE92AbN67BA7QyASyoh6V+nRBajyloQ4ZPW0NifzSyZVWHJq4U= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=5wBFLNHC8Ag+We+Ki7YsNio65jq+H6q+dkEEXVNmboXqmFmWcuTT8GBjZ5zptNyot/UQFzn3sPkrkfusuOdC4ogbB/Ik9RTsQn1XDLVaH0ebKJAWf71jP4MdB2FfQcbCJ3E9gxNBygCqhUcWEcHplrM3qEXlPIND5JDeIwAie1I=; Message-ID: <313968.60910.qm@web111509.mail.gq1.yahoo.com> X-YMail-OSG: H60eTXMVM1m.rDZs9eslssrRbNG3Q4GA2qep_IYa9.HJn0v GDS5KMjo1ouY35lbUkT2UT4d6OAUVRxsE_FZ2Al.w45v4X1g.PLQx9yU7ZXx KjtQ.6f39o8ehtZHNj8gAaIY.duM93mMjSwWd8dehq5S.xP6BXQQXBURG0wd PJlIf7POhZ8On.JM7KrFWnOl6YJuNENqRpHEArskp.P5whylZnF5ScjygYyZ 8MheEMj8Es59tc_pjvnahZN.Vs0r8aR932LhJ7aVdHT7GHA6ZTlHFPbkwOXo dqzItAXzXj1jsLYJBglDBmrnOiKDEIYWT378Hwi03MaunPZngG5FoT5I- Received: from [213.205.70.217] by web111509.mail.gq1.yahoo.com via HTTP; Thu, 04 Nov 2010 11:55:47 PDT X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.107.284920 Date: Thu, 4 Nov 2010 11:55:47 -0700 (PDT) From: Dario Teixeira Subject: Merging object signatures To: caml-list@yquem.inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; merging:01 variants:01 'val:01 foobar:01 foo:01 foo:01 sig:01 val:01 foobar:01 val:01 struct:01 polymorphic:01 signatures:01 signatures:01 inherit:01 Hi,=0A=0ASimilarly to polymorphic variants, is there a way for object signa= tures to=0Abe merged by type name? Consider the example at the end; I'm wo= ndering if=0Ait is possible for the declaration of 'foobar' to be something= along the=0Alines of 'val foobar: int -> int -> < foo_t; bar_t >' instead = of needing to=0Aexplicitly list all the methods in foo_t and bar_t.=0A=0ATh= anks in advance for your help!=0ABest regards,=0ADario Teixeira=0A=0A=0Amod= ule Test:=0Asig=0A=09type foo_t =3D < a: int >=0A=09type bar_t =3D < b: int= >=0A=0A=09val foobar: int -> int -> < a:int; b: int >=0A=0A=09(* val fooba= r: int -> int -> < foo_t; bar_t > *)=0Aend =3D=0Astruct=0A=09type foo_t =3D= < a: int >=0A=09type bar_t =3D < b: int >=0A=0A=09class foo a =3D object m= ethod a: int =3D a end=0A=09class bar b =3D object method b: int =3D b end= =0A=0A=09let foobar a b =3D=0A=09object=0A=09=09inherit foo a=0A=09=09inher= it bar b=0A=09end=0Aend=0A=0A=0A=0A