caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Kerneis <kerneis@pps.univ-paris-diderot.fr>
To: Jeremy Yallop <yallop@gmail.com>
Cc: caml-list@yquem.inria.fr, markus.mottl@gmail.com
Subject: Re: [Caml-list] Signature substitution and type parameters
Date: Mon, 12 Aug 2013 13:25:13 +0100	[thread overview]
Message-ID: <20130812122513.GA4129@kerneis.info> (raw)
In-Reply-To: <CAAxsn=GzCM=9ZmvaQj+iZkmGy=ba6hJfQ+p4DuRpne96Bhv6og@mail.gmail.com>

On Mon, Aug 12, 2013 at 11:20:17AM +0100, Jeremy Yallop wrote:
> If you use 'include' instead of 'let' it generalizes nicely to the
> many-function case:
> 
>   module MonoM : Mono = struct
>     type t = int PolyM.t
>     include (PolyM : Mono with type t := t)
>   end

Ha! I tried it written as "include PolyM with ...", which is
invalid syntax, and didn't get any further. Thanks Jeremy. 

> Your other approach can be made to work, too.  The key is to define a
> type alias with no parameters (type t = int PolyM.t), then use
> destructive substitution (:=).

By the way, there is an unanswered question from June by Markus Mottl
about the root causes of this limitation:

  https://sympa.inria.fr/sympa/arc/caml-list/2013-06/msg00147.html

Maybe you can shed some light on it?

Best regards,
-- 
Gabriel

      reply	other threads:[~2013-08-12 12:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12  7:45 Gabriel Kerneis
2013-08-12  9:57 ` Raphaël Proust
2013-08-12 10:20 ` Jeremy Yallop
2013-08-12 12:25   ` Gabriel Kerneis [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=20130812122513.GA4129@kerneis.info \
    --to=kerneis@pps.univ-paris-diderot.fr \
    --cc=caml-list@yquem.inria.fr \
    --cc=markus.mottl@gmail.com \
    --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).