caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: Ben Millwood <bmillwood@janestreet.com>
Cc: OCaML List Mailing <caml-list@inria.fr>
Subject: Re: [Caml-list] Can we have more flexible destructive type substitution?
Date: Fri, 24 Jul 2015 23:37:24 +0900	[thread overview]
Message-ID: <BE5AB67C-B4C6-4FFA-A2C5-54B2827B8368@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <CA+MHO51FYs9xwQ-XJ6O86sUL7Xi3A5xKM8QEhN3a7Et6bYGJ4g@mail.gmail.com>

On 2015/07/24 23:25, Ben Millwood wrote:
> 
> Currently, for [sig ... end with type lhs := rhs] to be valid, rhs needs to be an application of a type constructor to the same type parameters as lhs.
> 
> I'd like to do, at a minimum, [sig ... end with type 'a t := 'a], but this is currently forbidden. Are there conceptual obstacles to permitting arbitrary type expressions on the RHS, or are they simply not implemented yet?

I think there is no problem in theory.
The reason it is not allowed currently is that substitution relies on the path substitution code, which allows only replacing a path by another path.
Would have to think about how much new code this would require to implement. It might not be that much in practice.

Jacques Garrigue


      reply	other threads:[~2015-07-24 14:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 14:25 Ben Millwood
2015-07-24 14:37 ` 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=BE5AB67C-B4C6-4FFA-A2C5-54B2827B8368@math.nagoya-u.ac.jp \
    --to=garrigue@math.nagoya-u.ac.jp \
    --cc=bmillwood@janestreet.com \
    --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).