-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dock indent a fun passed as a labelled argument (#2271)
Avoid adding breaks inside '~label:(fun' and base the indentation on the label. This is similar to what we've done to functions in 92ba086. Some care is needed for comments between the ':' and the '(fun'
- Loading branch information
Showing
8 changed files
with
76 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
let _ = | ||
let f ~y = y + 1 in | ||
f ~(y : int) | ||
|
||
let () = | ||
very_long_function_name | ||
~very_long_argument_label:(fun | ||
very_long_argument_name_one | ||
very_long_argument_name_two | ||
very_long_argument_name_three | ||
-> () ) | ||
|
||
let () = | ||
very_long_function_name | ||
~very_long_argument_label:(* foo *) | ||
(fun | ||
very_long_argument_name_one | ||
very_long_argument_name_two | ||
very_long_argument_name_three | ||
-> () ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
let _ = | ||
let f ~y = y + 1 in | ||
f ~y:(y : int) | ||
|
||
let () = | ||
very_long_function_name | ||
~very_long_argument_label:(fun | ||
very_long_argument_name_one | ||
very_long_argument_name_two | ||
very_long_argument_name_three | ||
-> () ) | ||
|
||
let () = | ||
very_long_function_name | ||
~very_long_argument_label:(* foo *) | ||
(fun | ||
very_long_argument_name_one | ||
very_long_argument_name_two | ||
very_long_argument_name_three | ||
-> () ) |