Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Yann Régis-Gianas" <yrg@irif.fr>
To: "Frédéric Bour" <defree@gmail.com>
Cc: danny.gratzer@gmail.com, caml-list@inria.fr
Subject: Re: [Caml-list] include two module implementations sharing the same type definitions
Date: Thu, 29 Nov 2018 10:12:43 +0100	[thread overview]
Message-ID: <CAM+Uc3VAq4f9oeqmH5TCD-wcGEeYtGeC+C3ePf_fsMiDx3fO7g@mail.gmail.com> (raw)
In-Reply-To: <CAMp_u=dH5t9JD=rq7o0ui2AzksJMATe9NvaBRyxK+zMQD-vrUA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 826 bytes --]

Thank you Frédéric!

Le jeu. 29 nov. 2018 à 10:08, Frédéric Bour <defree@gmail.com> a écrit :

> 1) In all generality,
>
>   include (BI : module type of struct include BI end with type t := t)
>
> will work if you haven't defined `module type B` or if `BI` exports other
> types (say u) and you need to preserve equalities (BI.u = B.u).
>
> 2) Changes have been made to the module system in the trunk version of
> OCaml. The original code should be accepted without any change.
>
> On Thu, Nov 29, 2018 at 10:03 AM Danny Gratzer <danny.gratzer@gmail.com>
> wrote:
>
>> Hello,
>>
>> Perhaps I'm overlooking something but replacing
>>
>>     include BI
>>
>> with
>>
>>     include (BI : B with type t := t)
>>
>> seems like a reasonable fix to me.
>>
>> Danny
>>
> --
Yann Régis-Gianas

[-- Attachment #2: Type: text/html, Size: 1661 bytes --]

      reply	other threads:[~2018-11-29  9:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29  8:52 Yann Régis-Gianas
2018-11-29  9:02 ` Danny Gratzer
2018-11-29  9:07   ` Yann Régis-Gianas
2018-11-29  9:08   ` Frédéric Bour
2018-11-29  9:12     ` Yann Régis-Gianas [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=CAM+Uc3VAq4f9oeqmH5TCD-wcGEeYtGeC+C3ePf_fsMiDx3fO7g@mail.gmail.com \
    --to=yrg@irif.fr \
    --cc=caml-list@inria.fr \
    --cc=danny.gratzer@gmail.com \
    --cc=defree@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