Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Hendrik Tews <H.Tews@cs.ru.nl>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Type equalities in sub modules
Date: Tue, 02 Jan 2007 13:50:45 +0100	[thread overview]
Message-ID: <wwu4pr94moq.fsf@tandem.cs.ru.nl> (raw)
In-Reply-To: <F62629D5-5795-45BA-9A12-2A5727334C66@epfl.ch> (Daniel =?iso-8859-1?Q?B=FCnzli's?= message of "Sun, 31 Dec 2006 10:35:29 +0100")

Daniel Bünzli <daniel.buenzli@epfl.ch> writes:

   In the example below, is there any way to achieve M.B.t = M.t without
   introducing the intermediate mt type ?

   > module M = struct
   >   type t = int
   >   module B = struct
   >     type mt = t
   >     type t = mt
   >   end
   > end

How about

module M = struct
  type t = int
  module BF(T : sig type mt end) = struct
    type t = T.mt
  end
  module B = BF(struct type mt = t end)
end

??

Hendirk


  reply	other threads:[~2007-01-02 12:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-31  9:35 Daniel Bünzli
2007-01-02 12:50 ` Hendrik Tews [this message]
2007-01-02 22:56   ` [Caml-list] " Till Varoquaux
2007-01-02 23:31     ` Daniel Bünzli

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=wwu4pr94moq.fsf@tandem.cs.ru.nl \
    --to=h.tews@cs.ru.nl \
    --cc=caml-list@yquem.inria.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