refmt moves the return types of anonymous functions after the body of the function, but I want it to put the type after the arguments of the function
Here is what I want:
(x: int): int => some_large_computation;
Here is what refmt produces:
(x: int) => (some_large_computation: int);
You can test this with:
echo '(x: int): int => some_large_computation' | refmt
I'd like refmt produce the first and not the second.
Note that ocamlformat recently made a similar change (see https://github.com/ocaml-ppx/ocamlformat/issues/1368). I don't know how much refmt piggybacks on ocamlformat so that change might already implement what I am requesting.
refmt
moves the return types of anonymous functions after the body of the function, but I want it to put the type after the arguments of the functionHere is what I want:
Here is what
refmt
produces:You can test this with:
I'd like
refmt
produce the first and not the second.Note that
ocamlformat
recently made a similar change (see https://github.com/ocaml-ppx/ocamlformat/issues/1368). I don't know how muchrefmt
piggybacks onocamlformat
so that change might already implement what I am requesting.