In OCaml, I have two module types defining a type t:
t
module type Asig = sig type t val a : t end module type Bsig = sig type t
Here is the way to do it :
module type Asig = sig type t val a : t end module type Bsig = sig type t val b : t end module type ABsig = sig include Asig include Bsig with type t := t end
It's called "destructive substitution".