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 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 05193BC0A for ; Sat, 17 Mar 2007 04:01:36 +0100 (CET) Received: from yquem.inria.fr (yquem.inria.fr [128.93.8.37]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2H31Zaq008323 for ; Sat, 17 Mar 2007 04:01:35 +0100 Received: by yquem.inria.fr (Postfix, from userid 25991) id 9ADC6BC0A; Sat, 17 Mar 2007 04:01:35 +0100 (CET) Date: Sat, 17 Mar 2007 04:01:35 +0100 From: Daniel de Rauglaudre To: Caml List Subject: Re: [Caml-list] ocamlbuild and automatic dependencies Message-ID: <20070317030133.GB23992@yquem.inria.fr> References: <80E2E3A7-2603-4706-8186-566C6DA14452@gmail.com> <729DDA34-5FBE-4570-B10F-B2443B58A2F1@gmail.com> <8FC891E5-C8B6-410F-B2EB-5E06594A0165@gmail.com> <20070316142205.GB28353@yquem.inria.fr> <1174090706.10421.29.camel@rosella.wigram> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1174090706.10421.29.camel@rosella.wigram> User-Agent: Mutt/1.5.9i X-Miltered: at discorde with ID 45FB5A0F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; rauglaudre:01 rauglaudre:01 dependencies:01 foo:01 foo:01 struct:01 sig:01 wrote:01 abstract:01 caml-list:01 constraint:01 expression:02 types:03 module:03 module:03 Hi, On Sat, Mar 17, 2007 at 11:18:26AM +1100, skaller wrote: > So actually, this F is distinct from Foo, even though all the > members are the same. In particular, if Foo has an abstract type t, > is F.t the same type as Foo.t? Yes. If you write "module F = Foo", you say : the interface and the implementation of F are the same as the interface and the implementation of Foo. Therefore F.t is the same type as Foo.t. On the other hand, if you add a signature constraint, you can make the types different : module Foo = struct type t = A end module F = (Foo : sig type t = A end) let f (x : F.t) = (x : Foo.t) ^ This expression has type F.t but is here used with type Foo.t -- Daniel de Rauglaudre http://pauillac.inria.fr/~ddr/