From: "Frédéric Bour" <defree@gmail.com>
To: danny.gratzer@gmail.com
Cc: yrg@irif.fr, caml-list@inria.fr
Subject: Re: [Caml-list] include two module implementations sharing the same type definitions
Date: Thu, 29 Nov 2018 10:08:08 +0100 [thread overview]
Message-ID: <CAMp_u=dH5t9JD=rq7o0ui2AzksJMATe9NvaBRyxK+zMQD-vrUA@mail.gmail.com> (raw)
In-Reply-To: <CACbeAXDR2KMzyZY-SPowqyLMSAeK_Vc8T5Y-ZAhemUiEC1Fmaw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 633 bytes --]
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
>
[-- Attachment #2: Type: text/html, Size: 1134 bytes --]
next prev parent reply other threads:[~2018-11-29 9:08 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 [this message]
2018-11-29 9:12 ` Yann Régis-Gianas
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='CAMp_u=dH5t9JD=rq7o0ui2AzksJMATe9NvaBRyxK+zMQD-vrUA@mail.gmail.com' \
--to=defree@gmail.com \
--cc=caml-list@inria.fr \
--cc=danny.gratzer@gmail.com \
--cc=yrg@irif.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