We've noticed while looking at https://github.com/reasonml/reason-react/pull/529 that uncurried functions don't seem to compile as expected when eval'd at a module level. This code will error in a way that implies that the bs annotation isn't read. I believe that it's related to uncurried(. a => a); desugaring to @@bs instead of @bs in this instance - so maybe this issue should be directed to the Reason repo. I'm actually not sure.
[@bs.val]
external retUncurried: unit => (. (unit => unit)) => unit = "retUncurried";
let uncurried = retUncurried();
uncurried(. a => a);
external retUncurried :
unit -> (((unit -> unit) -> unit)[@bs ]) = "retUncurried"[@@bs.val ]
let uncurried = retUncurried ()
let _ = uncurried (fun a -> a)[@@bs ]
This is an uncurried BuckleScript function. It must be applied with a dot.
Like this: foo(. a, b)
Not like this: foo(a, b)
We've noticed while looking at https://github.com/reasonml/reason-react/pull/529 that uncurried functions don't seem to compile as expected when eval'd at a module level. This code will error in a way that implies that the bs annotation isn't read. I believe that it's related to
uncurried(. a => a);
desugaring to@@bs
instead of@bs
in this instance - so maybe this issue should be directed to the Reason repo. I'm actually not sure.