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=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id AE211BC0A for ; Tue, 2 Jan 2007 23:56:50 +0100 (CET) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l02Muogm001563 for ; Tue, 2 Jan 2007 23:56:50 +0100 Received: by nf-out-0910.google.com with SMTP id q29so7607719nfc for ; Tue, 02 Jan 2007 14:56:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dqdO2jplvulUBUFT3LpIs09iwEpmX5uk+7OdRJR0cVANfWyiHhMDTAA0jAaqPRylMGjUJesvcZuOcM2Bb8ozIiZUcZb6NRX+qP6QKlsb46vywQwy71rp6ojLCsFH06hw/KvMdv8zzSDAeXOsKP24fd2cLdTcFCdt8JoOixL4SZk= Received: by 10.82.114.3 with SMTP id m3mr1622359buc.1167778609974; Tue, 02 Jan 2007 14:56:49 -0800 (PST) Received: by 10.82.152.3 with HTTP; Tue, 2 Jan 2007 14:56:49 -0800 (PST) Message-ID: <9d3ec8300701021456q5a8475bbkc5165ee5572ae7eb@mail.gmail.com> Date: Tue, 2 Jan 2007 23:56:49 +0100 From: "Till Varoquaux" To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Type equalities in sub modules In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-j-chkmail-Score: MSGID : 459AE332.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 459AE332.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; recursive:01 inference:01 recursive:01 sig:01 sig:01 struct:01 struct:01 ens-lyon:01 hendrik:01 tews:01 tews:01 bunzli:01 buenzli:01 beginner's:01 ocaml:01 You seem to be looking for recursive modules, this might prove quite a painful solution since you have to explicitly write the signature (there's no type inference on recursive modules, this is a rather complicated issue. Information can be found in [1])...: module rec M : sig type t =3D int module B : sig type t =3D M.t end end=3D struct type t =3D int module B =3D struct type mt =3D t type t =3D mt end end;; Happy new year, Till [1]:http://perso.ens-lyon.fr/tom.hirschowitz/ On 1/2/07, Hendrik Tews wrote: > Daniel B=FCnzli writes: > > In the example below, is there any way to achieve M.B.t =3D M.t withou= t > introducing the intermediate mt type ? > > > module M =3D struct > > type t =3D int > > module B =3D struct > > type mt =3D t > > type t =3D mt > > end > > end > > How about > > module M =3D struct > type t =3D int > module BF(T : sig type mt end) =3D struct > type t =3D T.mt > end > module B =3D BF(struct type mt =3D t end) > end > > ?? > > Hendirk > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >