caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jeremy Yallop <yallop@gmail.com>
To: Maxence Guesdon <Maxence.Guesdon@inria.fr>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] mixing GADTs and first class modules
Date: Wed, 18 Mar 2015 10:24:34 +0000	[thread overview]
Message-ID: <CAAxsn=G1BYLcQs9R9zNnTUk6fXCEMsHeWGNB+AmhQQXCxFg-CQ@mail.gmail.com> (raw)
In-Reply-To: <20150318111918.1a97f7d4@alcazar2>

On 18 March 2015 at 10:19, Maxence Guesdon <Maxence.Guesdon@inria.fr> wrote:
> module type M = sig type t end;;
> type _ foo = T : (module M) -> M.t foo;;
>
> but it does not seem so, as I can't refer to type t of the module
> parameter:
> Error: Unbound type constructor M.t
>
> Is there a workaround ?

Yes:

  type _ foo = T : (module M with type t = 'a) -> 'a foo

  reply	other threads:[~2015-03-18 10:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 10:19 Maxence Guesdon
2015-03-18 10:24 ` Jeremy Yallop [this message]
2015-03-18 10:28   ` Maxence Guesdon

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='CAAxsn=G1BYLcQs9R9zNnTUk6fXCEMsHeWGNB+AmhQQXCxFg-CQ@mail.gmail.com' \
    --to=yallop@gmail.com \
    --cc=Maxence.Guesdon@inria.fr \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).