Hi I’m in the process of learning ReScript and I noticed some of the code examples in the Belt documentation are out of date.
On this page
this code example
module Comparable1 =
Belt.Id.MakeComparable(
{
type t = (int, int)
let cmp = ((a0, a1), (b0, b1)) =>
switch Pervasives.compare(a0, b0) {
| 0 => Pervasives.compare(a1, b1)
| c => c
}
}
)
results in this error
[E] Line 3, column 4:
Signature mismatch:
…
Values do not match:
let cmp: (('a, 'b), ('a, 'b)) => int (uncurried)
is not included in
let cmp: (t, t) => int (curried)
playground.res: Expected declaration
playground.res:5:11-13: Actual declaration
It’s not clear to me immediately what the problem is.
Thanks for any help, I’m enjoying learning and using ReScript so far.