What you’re actually looking for is this:
module CmpInt: Comparable with type t = int = {
type t = int
let equal = (x: int, y: int) => x === y
}
Otherwise the type t
is abstract and the compiler can’t know it’s actually int
.
What you’re actually looking for is this:
module CmpInt: Comparable with type t = int = {
type t = int
let equal = (x: int, y: int) => x === y
}
Otherwise the type t
is abstract and the compiler can’t know it’s actually int
.