nkrkv / jzon

ReScript library to encode and decode JSON data with type safety.
https://nkrkv.github.io/jzon/
Other
76 stars 4 forks source link

Compiler error with ReScript v11 / uncurried mode #18

Closed Minnozz closed 5 months ago

Minnozz commented 10 months ago

I tried upgrading our codebase to ReScript v11 with uncurried mode, but jzon does not compile:

We've found a bug for you!
<snip>/node_modules/rescript-jzon/src/Jzon.res:84:47-52

82 ┆ 
83 ┆ let encode = codec => codec.encode
84 ┆ let encodeString = (codec, value) => codec->encode(value)->Js.Json.stri
   ┆ ngify
85 ┆ 
86 ┆ let decode = codec => codec.decode

This uncurried function has type t<'a> => encode<'a>
It is applied with 2 arguments but it requires 1.