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.4 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 48418BC0A for ; Fri, 16 Mar 2007 15:40:57 +0100 (CET) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2GEetfv014478 for ; Fri, 16 Mar 2007 15:40:56 +0100 Received: from localhost (orion [130.54.16.5]) by kurims.kurims.kyoto-u.ac.jp (8.13.7/8.13.7) with ESMTP id l2GEepiY012682; Fri, 16 Mar 2007 23:40:52 +0900 (JST) Date: Fri, 16 Mar 2007 23:40:47 +0900 (JST) Message-Id: <20070316.234047.45178984.garrigue@math.nagoya-u.ac.jp> To: joelr1@gmail.com Cc: caml-list@inria.fr Subject: Re: [Caml-list] ocamlbuild and automatic dependencies From: Jacques Garrigue In-Reply-To: References: <8FC891E5-C8B6-410F-B2EB-5E06594A0165@gmail.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 45FAAC77.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; dependencies:01 foo:01 mli:01 foo:01 mli:01 amusing:01 sig:01 cheers:01 rec:01 caml-list:01 define:01 define:01 garrigue:03 garrigue:03 types:03 From: Joel Reymont > It appears that simply copying foo.mli into foo.ml should solve the > issue. > > I kind of hate having two identical files that I'll need to update. > Do I have to get used to it? > > Thanks, Joel But... you don't need foo.mli. So having only foo.ml should be enough. I know this may feel a bit strange, but in this case the essential part is foo.ml. Note that this is partly due to the fact foo.mli does not define a module type, it just wraps some type definitions done in foo.ml. An amusing alternative is to define a module type in foo.mli. module type T = sig type t1 = ... type t2 = ... ... end Now you can define a module containing the types of Foo.T without any implementation: module rec FT : Foo.T = FT Of course this only works if T contains only type definitions. Cheers, Jacques Garrigue