Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Curried/uncurried single-argument functions

$
0
0

Single arity uncurried functions can be passed directly as an argument into another function. I think the weird error messages are because in ReScript 11 most of the standard library is still curried even if you set uncurried to true, and that causes some really weird error messages. I also don’t think it’s great that it behaves like this it is at least very confusing. That is also why we didn’t convert our 500kloc codebase to uncurried yet (we are at the latest ReScript 11 with uncurried set to false).

Also note that ppxs could still emit uncurried functions, that could cause these weird errors. (For instance decco for sure is not updated to support uncurried mode yet).

I think it makes sense to wait for rescript 12 where the standard library is 100% uncurried to make the transition to uncurried.


Viewing all articles
Browse latest Browse all 2592

Trending Articles