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