-
Notifications
You must be signed in to change notification settings - Fork 217
Feature request: Return types on anonymous functions #1368
Copy link
Copy link
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
There might already be an option for this, but I haven't been able to find one. If there is, please let me know.
ocamlformat 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:
fun (x : int) : int -> some_large_computation
Here is what ocamlformat produces:
fun (x : int) -> (some_large_computation : int)
You can test this with:
echo 'fun (x: int): int -> some_large_computation' | ocamlformat --impl --enable-outside-detected-project -
Describe the solution you'd like
I'd like an option that makes ocamlformat produces the first and not the second.
Reactions are currently unavailable