Recently came to ReScript? Give us your thoughts on error messages!

I did some work on this too, now that we have some better error infra after the latest changes: Improve error message when concatenating strings by zth · Pull Request #6416 · rescript-lang/rescript-compiler · GitHub

1 Like

Here’s one that just caught me off guard for like half an hour. I have a manually curried function and couldn’t understand why my pipe wasn’t working

let decode = decoder => data =>
  decoder(data)->Result.map(x => "foo" ++ x)

let result = json->decode(decoder)
This uncurried function has type
    (
  'o => RescriptCore.Result.t<string, 'p>,
) => 'o => RescriptCore.Result.t<string, 'p>
  It is applied with 2 arguments but it requires 1.