From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p2PJDW4i000638 for ; Fri, 25 Mar 2011 20:13:32 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnEAAHDojE2LEwExkWdsb2JhbAClYRUBAQEJCwsHFAUgtWwBji8FhWk X-IronPort-AV: E=Sophos;i="4.63,244,1299452400"; d="scan'208";a="79095347" Received: from hera.mpi-sb.mpg.de ([139.19.1.49]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 25 Mar 2011 20:13:27 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mpi-sb.mpg.de; s=mail200803; h=From:To:In-Reply-To:Subject: References:Message-Id:Content-Type:Content-Transfer-Encoding: Mime-Version:Date:Cc; bh=9/o6hi3blNXmE6YEK+bzegRpVK0kLDWk4HAKxif zcmc=; b=OPQSdEdOCeE8aF2fRvA1VrheGn+8TAPchWoiFygry6KHZZDnXfqY36q 5UZD8QVE/u0asD958l9PichhVEfOhIzoxCvTyyDS1kYrq6cMFkoyhRVVbByzOn6X 9qAnbmTWUzoFpH+zjHgopVXy0U0/VUDPDcvfw+5bgNk6leEZHgwI= Received: from infao0710.mpi-klsb.mpg.de ([139.19.1.27]:33945 helo=zak.mpi-klsb.mpg.de) by hera.mpi-sb.mpg.de (envelope-from ) with esmtp (Exim 4.69) id 1Q3CRm-0006R7-HQ; Fri, 25 Mar 2011 20:13:25 +0100 Received: from mnch-5d87b711.pool.mediaways.net ([93.135.183.17]:54406 helo=[192.168.178.21]) by zak.mpi-klsb.mpg.de (envelope-from ) with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) id 1Q3CRl-0007Bx-TQ; Fri, 25 Mar 2011 20:13:22 +0100 From: Andreas Rossberg To: Guillaume Yziquel In-Reply-To: <20110325190129.GU10028@localhost> References: <89643D7F-B0F9-4452-BBAF-0445D9D3CA4E@gmail.com> <639CCD2C-402F-4754-B942-B460FD908A95@gmail.com> <63968844-AD95-4359-80F0-E9E071CF6518@mpi-sws.org> <20110325164240.GT10028@localhost> <46B666E2-4575-4E79-ACF1-FE0789C0C76B@mpi-sws.org> <20110325190129.GU10028@localhost> Message-Id: <171B1B62-3D47-42EC-AAF9-7DCD3E9BE3C7@mpi-sws.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v936) Date: Fri, 25 Mar 2011 20:13:20 +0100 Cc: Joel Reymont , caml-list X-Mailer: Apple Mail (2.936) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p2PJDW4i000638 Subject: Re: [Caml-list] Re: module typing issue On Mar 25, 2011, at 20.01 h, Guillaume Yziquel wrote: > Le Friday 25 Mar 2011 à 17:59:41 (+0100), Andreas Rossberg a écrit : >> On Mar 25, 2011, at 17.42 h, Guillaume Yziquel wrote: >>> Le Friday 25 Mar 2011 à 16:46:47 (+0100), Andreas Rossberg a écrit : >>>> I don't think it ever makes sense to define private type >>>> abbreviations in a structure - they are intended for use in >>>> signatures. Just drop the private from your example. >>> >>> Uuh... It does make some sense, sometimes: In bindings, as output of >>> external stubs, and as phantom type arguments for instance... >>> 'ever' is >>> somewhat too restrictive. >> >> Well, fully abstract type definitions are sometimes handy for these >> purposes. But how do private type abbreviations help there? > > type error = private int > > external get_error : unit -> error = "zzz" > > You get some error level that you can pattern match as an int, and > this > also enforces that all values of type error come from a call to > get_error. This is sometimes handy. Depends on your specific use cases > to know if it's really worth it however. I see - I didn't think of such a case. Thanks, /Andreas