caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christian Sternagel <christian.sternagel@uibk.ac.at>
To: Zheng Li <li@pps.jussieu.fr>, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Re: type constraints involving variant types
Date: Fri, 16 Mar 2007 16:44:41 +0100	[thread overview]
Message-ID: <20070316154440.GB3202@pc6197-c703.uibk.ac.at> (raw)
In-Reply-To: <87abydl4k9.fsf@pps.jussieu.fr>

On Fri, Mar 16, 2007 at 02:07:50PM +0100, Zheng Li wrote:
> 
> Not sure if this is what you want:
> 
> # module type C = sig
>     module A: A
>     module B: B with module A = A
>   end;;
> module type C =
>   sig
>     module A : A
>     module B : sig module A : sig type t = A.t = A of int | B of string end end
>   end
Thanks a lot! That finally worked... after days of type contraints, the obvious solutions get somehow lost.

cheers

christian
> 
> Christian Sternagel <christian.sternagel@uibk.ac.at> writes:
> > module type A = sig
> >  type t = A of 'a | B of 'b
> > end
> >
> > module type B = sig
> >  module A : A
> > end
> >
> > Can I then do something like
> >
> > module type C = sig
> >  module B : B
> >  module A : A
> >   with type t = B.A.t = A of 'a | B of 'b
> > end
> >
> 
> -- 
> Zheng Li
> http://www.pps.jussieu.fr/~li
> 
> _______________________________________________
> 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:[~2007-03-16 15:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-16 10:43 Christian Sternagel
2007-03-16 13:07 ` Zheng Li
2007-03-16 15:44   ` Christian Sternagel [this message]

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=20070316154440.GB3202@pc6197-c703.uibk.ac.at \
    --to=christian.sternagel@uibk.ac.at \
    --cc=caml-list@yquem.inria.fr \
    --cc=li@pps.jussieu.fr \
    /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).