caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Hugo Ferreira <hmf@inescporto.pt>
To: Andreas Rossberg <rossberg@mpi-sws.org>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Shared types: dependency in modules with polymorphic type
Date: Thu, 14 May 2009 16:06:50 +0100	[thread overview]
Message-ID: <4A0C338A.5070704@inescporto.pt> (raw)
In-Reply-To: <4955C3A2-8E43-460E-BEB6-44141E300098@mpi-sws.org>

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


  reply	other threads:[~2009-05-14 15:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-13 19:12 Hugo Ferreira
2009-05-13 19:40 ` [Caml-list] " Jacques Carette
2009-05-14  7:58   ` Hugo Ferreira
2009-05-14 14:42     ` Andreas Rossberg
2009-05-14 15:06       ` Hugo Ferreira [this message]
2009-05-14 11:41   ` Shared types: circular " Hugo Ferreira
2009-05-14 12:11     ` [Caml-list] " Peng Zang
2009-05-14 12:46       ` Hugo Ferreira
2009-05-14 13:20         ` Peng Zang
2009-05-14 13:28           ` Hugo Ferreira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A0C338A.5070704@inescporto.pt \
    --to=hmf@inescporto.pt \
    --cc=caml-list@yquem.inria.fr \
    --cc=rossberg@mpi-sws.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).