From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 832A5BC0A for ; Thu, 24 May 2007 11:51:07 +0200 (CEST) Received: from ipmail01.adl2.internode.on.net (ipmail01.adl2.internode.on.net [203.16.214.140]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4O9p5oV016471 for ; Thu, 24 May 2007 11:51:06 +0200 X-IronPort-AV: E=Sophos;i="4.14,573,1170595800"; d="scan'208";a="133552719" Received: from ppp59-172.lns2.syd6.internode.on.net (HELO [192.168.1.201]) ([121.44.59.172]) by ipmail01.adl2.internode.on.net with ESMTP; 24 May 2007 19:21:03 +0930 Subject: Re: [Caml-list] Teaching bottomline, part 3: what should improve. From: skaller To: Vincent Hanquez Cc: "Markus E.L." , caml-list@yquem.inria.fr In-Reply-To: <20070524083217.GA20963@snarc.org> References: <1179871823.6966.78.camel@Blefuscu> <1179875804.17533.33.camel@rosella.wigram> <20070523091909.GA8019@snarc.org> <46543875.9010305@janestcapital.com> <20070523214823.GA16180@snarc.org> <20070524083217.GA20963@snarc.org> Content-Type: text/plain Date: Thu, 24 May 2007 19:51:02 +1000 Message-Id: <1180000262.10335.15.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 46556009.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0200,:01 0200,:01 markus:01 ocaml:01 sig:01 struct:01 mli:01 sig:01 struct:01 val:01 decl:01 decl:01 sourceforge:01 wrote:01 wrote:01 On Thu, 2007-05-24 at 10:32 +0200, Vincent Hanquez wrote: > On Thu, May 24, 2007 at 10:04:21AM +0200, Markus E.L. wrote: > OCaml let you do that inline when you > create a module in a file: > > module xx : sig > .... > end = struct > .... > end > > but for a file (which is also a module), you need to have a separate > file (a .mli) to do that.. and that's my point. Can't you can fix that by: module xx : sig .. end = struct .. end include xx That way all the symbols you want are in the .ml file. However this isn't really the same as private val f: int -> int let f x = .. which can be done by: let f (x:int):int = .. the problem being it is invasive (you have to edit the function decl instead of writing a separate type decl). -- John Skaller Felix, successor to C++: http://felix.sf.net