caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: Leo P White <lpw25@cam.ac.uk>
Cc: "Milan Stanojević" <milanst@gmail.com>,
	"Thomas Braibant" <thomas.braibant@gmail.com>,
	"OCaml Mailing List" <caml-list@inria.fr>
Subject: Re: [Caml-list] Quizz
Date: Thu, 15 Jan 2015 18:41:49 +0900	[thread overview]
Message-ID: <7A9D103C-132D-4614-A451-5C3E0F458F5B@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <y2aegqxp96h.fsf@kingston.cl.cam.ac.uk>

On 2015/01/15 02:24, Leo White wrote:
> 
> Milan Stanojević <milanst@gmail.com> writes:
> 
>>> The main problem is not so much syntax, as the fact it would require to make
>>> all definitions in the Types module mutually recursive. Not only that, but
>>> operations like path substitution need to be mutually recursive in the same
>>> way. So the question is whether the small gain in flexibility is worth making the
>>> implementation more complex.
>>> (Note that an extra gain is that it becomes possible to expand a module type
>>> definition when leaving its scope)
>> 
>> In my work I mostly just wanted to be able to just do something like
>> (module M : Intable with type t = t), i.e just specializing existing
>> module type with "with type =" or "with type :=".
>> Is this special case any easier to implement?
> 
> "with type t =" already works. I'm not sure, but I think that "with type
> t :=" could indeed be implemented without the increased implementation
> complexity that Jacques was referring to.


Indeed it could.
Module type names + non-parameterized constraints are ok, because you only have
to recurse on types, not concrete signatures.

	Jacques

      reply	other threads:[~2015-01-15  9:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 17:09 Thomas Braibant
2015-01-13 20:51 ` Leo White
2015-01-13 21:10   ` Milan Stanojević
2015-01-14  0:09     ` Leo White
2015-01-14  7:02       ` Jacques Garrigue
2015-01-14 16:32         ` Milan Stanojević
2015-01-14 17:24           ` Leo White
2015-01-15  9:41             ` Jacques Garrigue [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=7A9D103C-132D-4614-A451-5C3E0F458F5B@math.nagoya-u.ac.jp \
    --to=garrigue@math.nagoya-u.ac.jp \
    --cc=caml-list@inria.fr \
    --cc=lpw25@cam.ac.uk \
    --cc=milanst@gmail.com \
    --cc=thomas.braibant@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).