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 p2PJ38Ai032244 for ; Fri, 25 Mar 2011 20:03:08 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj8EANzljE1V2gB4h2dsb2JhbACldgEBCgsJBxYlxBcNhVwEkGM X-IronPort-AV: E=Sophos;i="4.63,244,1299452400"; d="scan'208";a="94899472" Received: from emailfrontal1.citycable.ch ([85.218.0.120]) by mail2-smtp-roc.national.inria.fr with SMTP; 25 Mar 2011 20:03:03 +0100 X-Alinto-smtpauth-localdomain: Yes Received: from seldon (unknown [85.218.93.111]) (Authenticated sender: guillaume.yziquel@citycable.ch) by emailfrontal1.citycable.ch (Postfix) with ESMTPA id 0701412C76D; Fri, 25 Mar 2011 20:03:00 +0100 (CET) Received: from yziquel by seldon with local (Exim 4.72) (envelope-from ) id 1Q3CGI-0002IF-6j; Fri, 25 Mar 2011 20:01:30 +0100 Date: Fri, 25 Mar 2011 20:01:29 +0100 From: Guillaume Yziquel To: Andreas Rossberg Cc: Joel Reymont , caml-list Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <46B666E2-4575-4E79-ACF1-FE0789C0C76B@mpi-sws.org> User-Agent: Mutt/1.5.20 (2009-06-14) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p2PJ38Ai032244 Subject: Re: [Caml-list] Re: module typing issue 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? > > /Andreas 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. -- Guillaume Yziquel