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 p2O0mGKd006426 for ; Thu, 24 Mar 2011 01:48:16 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApABACcxik3RVdK2mGdsb2JhbAAvpQsIFAEBAQEBCAkNBxQliE2fOoxzhQuJCwEBAwWFZASFNYc6hEWEQTqBHA X-IronPort-AV: E=Sophos;i="4.63,234,1299452400"; d="scan'208";a="94734429" Received: from mail-iy0-f182.google.com ([209.85.210.182]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 24 Mar 2011 01:48:11 +0100 Received: by iyj12 with SMTP id 12so14912020iyj.27 for ; Wed, 23 Mar 2011 17:48:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer; bh=zriZNQZLYgmB12r8jkgoRcYxsR1FbVPhOlQSFFZuSVo=; b=ponadOjy6Qe43xoAoIMsa7x0IKm6shuIxjXvXIiH+9UUZYpKNBG2dWyll3Jc7O2Hhn z8XQ6LOS3W+izEBIFJNoGpx61cpJkdYXCXZQ+SONn8AkjIRRwTkuo5LHfgCgkFEWvGXU 22FSr2ayPzAguNUJXxnTwZhbawXtjCKAcAZuQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=qc0UOYJRujrKT61AgAszTBSJp2bRwr2sNidl4n1XVFitbsSx1UPSrPYnj6dxyGg0MN bygDZ+2Cd+otPCwTZZO+8BQd9dKOTxzZHbdTstQumE9ELNoLEOBsGyHH3437sR0nVi/e XcSUA+oK4/7ikGqgEHLi+tHzJqevpWS+VOdjk= Received: by 10.43.55.10 with SMTP id vw10mr4262286icb.151.1300927690047; Wed, 23 Mar 2011 17:48:10 -0700 (PDT) Received: from tet.garrigue.jp (58x158x128x157.ap58.ftth.ucom.ne.jp [58.158.128.157]) by mx.google.com with ESMTPS id c1sm5441381ibe.66.2011.03.23.17.48.07 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2011 17:48:09 -0700 (PDT) Sender: Jacques Garrigue Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Jacques Garrigue In-Reply-To: Date: Thu, 24 Mar 2011 09:48:05 +0900 Cc: caml-list@inria.fr Content-Transfer-Encoding: 7bit Message-Id: <59D72B1A-4A89-4A13-B585-70B57F45B4AD@math.nagoya-u.ac.jp> References: <07EE3576-E5F0-4187-AE8C-DEFEA5C92303@gmail.com> <622E23E3-5614-4ADE-B517-672577A406A2@math.nagoya-u.ac.jp> To: Joel Reymont X-Mailer: Apple Mail (2.1082) Subject: Re: [Caml-list] fighting the type system On 2011/03/24, at 9:16, Joel Reymont wrote: >> If you just want the Endpoint interface to specify an object type >> containing at least write, you could use a private row type: > > The private row type is what I was clearly missing. > > Why does it work with the private row type, though? Because if you just define a constrained type every occurrence is going to be a different instance of this type, while a private row type ensures that this is the same type throughout the module. > Are there other uses for 'private' in a module? > > Is the use of private row types described somewhere? They are described described in section 7.9.3 of the manual: http://caml.inria.fr/pub/docs/manual-ocaml/manual021.html#toc76 You can find more examples in my paper: http://www.math.nagoya-u.ac.jp/~garrigue/papers/privaterows-aplas2006.pdf Cheers, Jacques Garrigue