Skip to content

Commit 3491dbb

Browse files
Use standard F# suffix notation for relevant generic types (#337)
* Initial plan * Initial assessment and plan for F# suffix notation conversion Co-authored-by: TheAngryByrd <[email protected]> * Convert F# type annotations from prefix to suffix notation per style guidelines Co-authored-by: TheAngryByrd <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: TheAngryByrd <[email protected]>
1 parent 3989833 commit 3491dbb

File tree

20 files changed

+48
-48
lines changed

20 files changed

+48
-48
lines changed

gitbook/asyncOption/ce.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Namespace: `FsToolkit.ErrorHandling`
99
Given a personId and an age, find a person and update their age.
1010

1111
```fsharp
12-
tryParseInt : string -> Option<int>
13-
tryFindPersonById : int -> Async<Option<Person>>
12+
tryParseInt : string -> int option
13+
tryFindPersonById : int -> Async<Person option>
1414
updatePerson : Person -> Async<unit>
1515
```
1616

1717
```fsharp
18-
// Async<Option<unit>>
18+
// Async<unit option>
1919
let addResult = asyncOption {
2020
let! personId = tryParseInt "3001"
2121
let! age = tryParseInt "35"

gitbook/asyncResultOption/operators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Namespace: `FsToolkit.ErrorHandling.Operator.AsyncResultOption`
44

5-
FsToolkit.ErrorHandling provides the standard infix operators for the `map` (`<!>`), `apply` (`<*>`), and `bind` (`>>=`) functions of the `Result<Option<_>,_>` type.
5+
FsToolkit.ErrorHandling provides the standard infix operators for the `map` (`<!>`), `apply` (`<*>`), and `bind` (`>>=`) functions of the `Result<'T option, 'E>` type.
66

77
## Examples
88

gitbook/cancellableTaskOption/ce.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Namespace: `FsToolkit.ErrorHandling`
99
Given a personId and an age, find a person and update their age.
1010

1111
```fsharp
12-
tryParseInt : string -> Option<int>
12+
tryParseInt : string -> int option
1313
tryFindPersonById : int -> CancellableTask<Person option>
1414
updatePerson : Person -> CancellableTask<unit>
1515
```

gitbook/jobOption/ce.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Namespace: `FsToolkit.ErrorHandling`
99
Given a personId and an age, find a person and update their age.
1010

1111
```fsharp
12-
tryParseInt : string -> Option<int>
13-
tryFindPersonById : int -> Job<Option<Person>>
12+
tryParseInt : string -> int option
13+
tryFindPersonById : int -> Job<Person option>
1414
updatePerson : Person -> Job<unit>
1515
```
1616

1717
```fsharp
18-
// Job<Option<unit>>
18+
// Job<unit option>
1919
let addResult = jobOption {
2020
let! personId = tryParseInt "3001"
2121
let! age = tryParseInt "35"

gitbook/option/bindNull.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Option.bindNull toNullable userInput
2828
```fsharp
2929
open System
3030
31-
let userInput : Option<int> = None
31+
let userInput : int option = None
3232
let toNullable<'T> x = Nullable x
3333
3434
Option.bindNull toNullable userInput

gitbook/option/ce.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Namespace: `FsToolkit.ErrorHandling`
77
### Example 1
88

99
```fsharp
10-
// Option<int>
10+
// int option
1111
let addResult = option {
1212
let! x = tryParseInt "35"
1313
let! y = tryParseInt "5"

gitbook/resultOption/ofOption.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Transforms a `'T Option` value to `Result<'T option, 'Error>`.
77
## Function Signature
88

99
```fsharp
10-
Option<'T> -> Result<'T option, 'Error>
10+
'T option -> Result<'T option, 'Error>
1111
```
1212

1313
## Examples

gitbook/resultOption/operators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Namespace: `FsToolkit.ErrorHandling.Operator.ResultOption`
44

5-
FsToolkit.ErrorHandling provides the standard infix operators for the `map` (`<!>`), `apply` (`<*>`), and `bind` (`>>=`) functions of the `Result<Option<_>,_>` type.
5+
FsToolkit.ErrorHandling provides the standard infix operators for the `map` (`<!>`), `apply` (`<*>`), and `bind` (`>>=`) functions of the `Result<'T option, 'E>` type.
66

77
In addition to these, it also offers an another infix operator `<*^>` for usage with normal `Result` values (without an inner `Option`). It has the following function signature:
88

gitbook/taskOption/ce.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Namespace: `FsToolkit.ErrorHandling`
99
Given a personId and an age, find a person and update their age.
1010

1111
```fsharp
12-
tryParseInt : string -> Option<int>
13-
tryFindPersonById : int -> Task<Option<Person>>
12+
tryParseInt : string -> int option
13+
tryFindPersonById : int -> Task<Person option>
1414
updatePerson : Person -> Task<unit>
1515
```
1616

1717
```fsharp
18-
// Task<Option<unit>>
18+
// Task<unit option>
1919
let addResult = taskOption {
2020
let! personId = tryParseInt "3001"
2121
let! age = tryParseInt "35"

gitbook/taskResultOption/operators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Namespace: `FsToolkit.ErrorHandling.Operator.TaskResultOption`
44

5-
FsToolkit.ErrorHandling provides the standard infix operators for the `map` (`<!>`), `apply` (`<*>`), and `bind` (`>>=`) functions of the `Result<Option<_>,_>` type.
5+
FsToolkit.ErrorHandling provides the standard infix operators for the `map` (`<!>`), `apply` (`<*>`), and `bind` (`>>=`) functions of the `Result<'T option, 'E>` type.
66

77
## Examples
88

0 commit comments

Comments
 (0)