ReScript v11 Belt.Id.MakeComparable compile error

Hello,
I am trying ReScript V11, and got some Signature mismatch: Type Errors with bellow code:

module IntCmp = Belt.Id.MakeComparable({
  type t = int
  let cmp = (a, b) => a - b
})

It works find in 10, is any break change in v11?

Here is a simple demo

ReScript 11 defaults to uncurried mode, so you need to use the uncurried variant of the MakeComparable functor: MakeComparableU.

module IntCmp = Belt.Id.MakeComparableU({
  type t = int
  let cmp = (a, b) => a -b
})

If for some reason you want to keep the old curried behavior, you can opt-out by adding

{
  ...
  "uncurried": false
}

to your bsconfig.json.

4 Likes

Thanks for your quick response!