I am trying to write the following types but I am getting a compiler error.
module Statement = {
module Block = {
type t = {body: list(Statement.t)};
};
type t =
| Block(Block.t);
};
I read about module rec
and module type
but I can’t understand how to apply it here. I also searched for examples in github but I didn’t find any that could help me.