caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dario Teixeira <dario.teixeira@nleyten.com>
To: Christophe Raffalli <christophe@raffalli.eu>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] module equality
Date: Tue, 20 Jun 2017 11:03:13 +0100	[thread overview]
Message-ID: <6cd8705bcf05d1cfb4e21d132fd9ee1b@nleyten.com> (raw)
In-Reply-To: <20170620093641.ovz6dnsghtdj6tv6@delli7.univ-savoie.fr>

Hi,

> I thought that two applications of Set.Make to
> the same module would result in two distinct
> modules with two distinct types 't'.
> 
> This is not the case, and I am no sure it is a
> good choice as it allows to write the following,
> where you can break the invariant of a functor:

OCaml functors have always been applicative.  However,
since 4.02 you can also declare generative functors,
which have the behaviour that you want:
http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec253

Hope this helps. Cheers!
Dario Teixeira


  reply	other threads:[~2017-06-20 10:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20  9:36 Christophe Raffalli
2017-06-20 10:03 ` Dario Teixeira [this message]
2017-06-20 10:05 ` Jeremy Yallop

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=6cd8705bcf05d1cfb4e21d132fd9ee1b@nleyten.com \
    --to=dario.teixeira@nleyten.com \
    --cc=caml-list@inria.fr \
    --cc=christophe@raffalli.eu \
    /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).