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

On Wed, 18 Mar 2015 10:24:34 +0000
Jeremy Yallop <yallop@gmail.com> wrote:

> 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

Nice, thanks !

- m

      reply	other threads:[~2015-03-18 10:28 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
2015-03-18 10:28   ` Maxence Guesdon [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=20150318112800.35998716@alcazar2 \
    --to=maxence.guesdon@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=yallop@gmail.com \
    /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).