From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p1MGFx0H009978 for ; Tue, 22 Feb 2011 17:15:59 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvUHAA5wY01ii1vWXGdsb2JhbACXYo5HFwoLBRAGIa1nghyEdokJAQQEAYVZBIUNikE X-IronPort-AV: E=Sophos;i="4.62,207,1297033200"; d="scan'208";a="91820386" Received: from nm18-vm0.bullet.mail.sp2.yahoo.com ([98.139.91.214]) by mail2-smtp-roc.national.inria.fr with SMTP; 22 Feb 2011 17:15:53 +0100 Received: from [98.139.91.69] by nm18.bullet.mail.sp2.yahoo.com with NNFMP; 22 Feb 2011 16:15:52 -0000 Received: from [98.139.91.53] by tm9.bullet.mail.sp2.yahoo.com with NNFMP; 22 Feb 2011 16:15:52 -0000 Received: from [127.0.0.1] by omp1053.mail.sp2.yahoo.com with NNFMP; 22 Feb 2011 16:15:52 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 311776.88926.bm@omp1053.mail.sp2.yahoo.com Received: (qmail 43538 invoked by uid 60001); 22 Feb 2011 16:15:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1298391352; bh=/lK2RMKrsNV6CzvwuUrWZVDSZ4ss7FFwerQPjqrzFsE=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=R/zOP+wSrnQhBkCmXe7MrkuSV45q6CcQ19SA+dzpuwrwP/98DpeyxYDEJgfpaQtCiOWoQN6c73QJFGimtgyDRNatynAecrjSqya+lCTzfNxMA9wpqAbunAN8Jx2/PF2ETe9/J/92Eg1G3o2XzYP2agaWiD+z346oOtzQzplin2E= 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:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=EFNJH+X88uSSTQovnfn2bPLr5AsMBD2gDWKnyEu7oHum2Yaq7tAaUVtUsNn8L3stictGqQv0b/PnD6/gOOOjQRlOny3HDPoMyaMNj4sGzZB9/WO2LkKcvNninIFzWWTyZWZsz8HyV66TyRoS09qUHzTzCfrZKDUqmhy6UKRERAM=; Message-ID: <991458.43212.qm@web111507.mail.gq1.yahoo.com> X-YMail-OSG: .BoD5vgVM1lJfLqAAeonrvjtclfApiIBZrlC06da0tjB_3e .g5W2tmTsmMs37h5jYM3oUZHBIrgpn53NyM6W.L1SRx.lgDt7mLPQ2i28qBg DwCXIL38mUDHwAZlz3Ou1eAWdlAfgQld6hVOs__IoJcP4pulV0gCYlfuEtke YdjUE6cojZOHYcRHpgUITvWTsSehS2gYVO2nfRoJrLyt057Qn4OZ5QmtKFe0 x8bLT9aZsTRpc4W6LvpjnLvAN5yG8wu0ftmBVuRj6nTkCYRUl78R4UHWTa3x ISXCaoYklzdYq2wWDt8g2.rKhDCFDoybgvaECHKPVtMSjx_eG_nr4aM.z_pN M7kaoaRy6BqtIHIgclCxFb88R3TlEFK2KxaIueU2nwMOZAAv.fESy5i24Zlg IHKQYlX1P6IZF Received: from [213.205.70.197] by web111507.mail.gq1.yahoo.com via HTTP; Tue, 22 Feb 2011 08:15:51 PST X-Mailer: YahooMailClassic/11.4.20 YahooMailWebService/0.8.109.292656 Date: Tue, 22 Feb 2011 08:15:51 -0800 (PST) From: Dario Teixeira To: =?iso-8859-1?Q?Daniel_B=FCnzli?= Cc: caml-list@inria.fr In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p1MGFx0H009978 Subject: Re: [Caml-list] Constraining abstract type to be of a given subtype Hi Daniel, > Ok last message I promise. No problem -- I appreciate the help, thanks! > I don't know exactly what you want but you may prefer the following > FOO (see the signature of kind_to_kind)  : I decided to take a step back and forgo the constraint. That is, I'm making the type really abstract, even if in practice all the concrete implementations of signature FOO will have a kind_t that is a subtype of Kind.t. Though it's nice to use the type system to ensure correctness by construction, in situations (like this one) where one is pushing against the limits of the type system, the solution can end up being too cumbersome to use in practice. Cf, per example, the pre-3.13 type system tricks to encode GADTs that have been presented in this list: though brilliant, they haven't gained that much traction in actual usage because of the associated overhead. Best regards, Dario Teixeira