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.5 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 6AF70BC37 for ; Thu, 14 May 2009 17:06:52 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmACAK/QC0rVhjEYkGdsb2JhbACNUYlOAQEBAQkJDAcRA7lehAIF X-IronPort-AV: E=Sophos;i="4.38,431,1233529200"; d="scan'208";a="29320248" Received: from ihsmtp02voda.lis.interhost.com (HELO ihsmtp02cons.lis.interhost.com) ([213.134.49.24]) by mail1-smtp-roc.national.inria.fr with ESMTP; 14 May 2009 17:06:51 +0200 Received: from [192.168.1.64] ([77.54.249.136]) by ihsmtp02cons.lis.interhost.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 14 May 2009 16:03:48 +0100 Message-ID: <4A0C338A.5070704@inescporto.pt> Date: Thu, 14 May 2009 16:06:50 +0100 From: Hugo Ferreira User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: Andreas Rossberg Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Shared types: dependency in modules with polymorphic type References: <4A0B1B81.8090700@inescporto.pt> <4A0B2218.2050305@mcmaster.ca> <4A0BCF0D.6060207@inescporto.pt> <4955C3A2-8E43-460E-BEB6-44141E300098@mpi-sws.org> In-Reply-To: <4955C3A2-8E43-460E-BEB6-44141E300098@mpi-sws.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 14 May 2009 15:03:48.0164 (UTC) FILETIME=[2F192840:01C9D4A5] X-Spam: no; 0.00; rossberg:01 annotations:01 fwiw:01 functor:01 beginner's:01 ocaml:01 bug:01 polymorphic:01 beginners:01 wrote:01 wrote:01 andreas:01 andreas:01 caml-list:01 caml-list:01 Andreas Rossberg wrote: > On May 14, 2009, at 09.58 h, Hugo Ferreira wrote: >> >>>> My question is: is their any way I may organize the modules or >>>> indicate shared types in order to use a (very extensive) VB >>>> interface (Or VB1 module)? Specifically how do I enforce the >>>> shared type: >>>> >>>> U1.instance VB1.t = U1.t = Make_U(VB1).t >>> First, try the above. It may help. If it does not, then you will >>> need to add explicit sharing constraints. But which sharing >>> constraints are *really* needed will be the ones revealed by first >>> removing the type annotations you currently have. >> >> Worked correctly. However I need only remove the U in Make_U : U and >> change it to a simple Make_U. "U1.t" now becomes visible and binds >> correctly. > > FWIW, the "proper" solution is not to drop the annotation, but to refine > it to "U with type t = int Vb.t" in the definition of the functor. > I agree. I finally had to go that route. However that means I have to change my modules. This is taking some time to do. I was hoping to avoid such reworking. Thanks, Hugo F. > - Andreas > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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