Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/fsharp/style-guide/formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,23 @@ with
printfn "A second that was a multiple of 3"
```

Always add a `|` for each clause, even when only having a single clause.

```fsharp
// OK
try
persistState currentState
with
| ex ->
printfn "Something went wrong: %A" ex

// Not OK
try
persistState currentState
with ex ->
printfn "Something went wrong: %A" ex
```

## Formatting function parameter application

In general, most arguments are provided on the same line:
Expand Down