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
20 changes: 19 additions & 1 deletion docs/fsharp/style-guide/formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ val SampleMixedFunction:

### Formatting explicit generic type arguments and constraints

The guidelines below apply to function definitions, member definitions, and type definitions.
The guidelines below apply to function definitions, member definitions, type definitions, and function applications.

Keep generic type arguments and constraints on a single line if it’s not too long:

Expand Down Expand Up @@ -1614,6 +1614,24 @@ let inline f<^T1, ^T2
// function body
```

The same rules apply for function applications:

```fsharp
// ✔️ OK
myObj
|> Json.serialize<
{| child: {| displayName: string; kind: string |}
newParent: {| id: string; displayName: string |}
requiresApproval: bool |}>

// ✔️ OK
Json.serialize<
{| child: {| displayName: string; kind: string |}
newParent: {| id: string; displayName: string |}
requiresApproval: bool |}>
myObj
```

## Formatting attributes

[Attributes](../language-reference/attributes.md) are placed above a construct:
Expand Down