Given these module types:
module type CodecTypes = {
type t;
type token;
};
module type Decode = {
include CodecTypes;
let decode: BsGenericParser.Parse.parser(token, t);
};
module type Encode = {
include CodecTypes;
let encode: t => list(token);
};
Is there a way to share the abstract types t
and token
between the two module types?
I tried:
module type Codec = {
include Encode;
include Decode;
}
but the compiler complains about name clashes.