The module type for B will need an abstract type in order to have something to substitute, but the substitution can be destructive so that the module doesn’t have to define it:
module type B = {
type t
let value: t
}
module M: B with type t := int = {
let value = 42
}
Note that := is used for the type substitution, instead of =, to specify that the substitution is destructive.