Hi, I post this issue last week but it seems to be ignore, so I repost it here:
// Curry.res
type test<'a> =
| One(('a) => bool)
let testor = (test, a) =>
switch test {
| One(r) => r(a)
}
result in:
// Curry.bs.js
// Generated by ReScript, PLEASE EDIT WITH CARE
'use strict';
var Curry = require("rescript/lib/js/curry.js");
function testor(test, a) {
return Curry._1(test._0, a);
}
exports.testor = testor;
/* No side effect */
In this case, no need to add a curry in the result, as it’s a one parameter function and the compiler is supose to does a best-effort job at removing those currying whenever possible, it should be removed in this case also.
Or did I miss something ?