melange-re.github.io
melange-re.github.io copied to clipboard
Add guideline for being explicit when defining types in externals
Externals should list all the params of the function, and type aliases should be avoided:
external foo : int -> unit = "foo"
let () = foo 2 (* foo(2); *)
type t = int -> unit
external bar : t = "bar"
let () = bar 2 (* Curry._1(bar, 2); *)
The docs should list this guideline somehow, somewhere.