Skip to content

Commit 29d3ff3

Browse files
committed
Align code
1 parent bdc9357 commit 29d3ff3

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/FSharpPlus/Control/Parallel.fs

+4-5
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ type ParReturn =
4545
static member inline ParReturn (x: 'm * 'a , _: ParReturn) = Return.Return (x, Unchecked.defaultof<Return>)
4646
static member inline ParReturn (x: struct ('m * 'a), _: ParReturn) = Return.Return (x, Unchecked.defaultof<Return>)
4747
static member ParReturn (_: 'a Async , _: ParReturn) = fun (x: 'a) -> async.Return x
48-
static member inline ParReturn (_: Result<'t, 'e> , _: ParReturn) = fun x -> if opaqueId false then Error (Plus.Invoke Unchecked.defaultof<'e> Unchecked.defaultof<'e> : 'e) else Ok x : Result<'t,'e>
49-
static member inline ParReturn (_: Choice<'t, 'e> , _: ParReturn) = fun x -> if opaqueId false then Choice2Of2 (Plus.Invoke Unchecked.defaultof<'e> Unchecked.defaultof<'e> : 'e) else Choice1Of2 x : Choice<'t,'e>
48+
static member inline ParReturn (_: Result<'t, 'e> , _: ParReturn) = fun x -> if opaqueId false then Error (Plus.Invoke Unchecked.defaultof<'e> Unchecked.defaultof<'e>) else Ok x : Result<'t, 'e>
49+
static member inline ParReturn (_: Choice<'t, 'e> , _: ParReturn) = fun x -> if opaqueId false then Choice2Of2 (Plus.Invoke Unchecked.defaultof<'e> Unchecked.defaultof<'e>) else Choice1Of2 x : Choice<'t, 'e>
5050
#if !FABLE_COMPILER
5151
static member ParReturn (x: Expr<'a> , _: ParReturn) = Return.Return (x, Unchecked.defaultof<Return>)
5252
#endif
@@ -120,7 +120,6 @@ type ParApply =
120120
#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4
121121

122122
type ParApply with
123-
124123
static member inline ``</>`` (struct (_: ^t when ^t : null and ^t: struct, _: ^u when ^u : null and ^u: struct), _output: ^r when ^r : null and ^r: struct, _mthd: Default1) = id
125124
static member inline ``</>`` (struct (f: '``Applicative<'T->'U>``, x: '``Applicative<'T>``), _output: '``Applicative<'U>``, [<Optional>]_mthd: Default1) : '``Applicative<'U>`` =
126125
((^``Applicative<'T->'U>`` or ^``Applicative<'T>`` or ^``Applicative<'U>``) : (static member (</>) : _*_ -> _) f, x)
@@ -137,7 +136,7 @@ type ParLift2 =
137136
static member ParLift2 (f, (x: _ [] , y: _ [] ), _mthd: ParLift2) = Array.map2Shortest f x y
138137
static member ParLift2 (f, (x: 'R -> 'T , y: 'R -> 'U ), _mthd: ParLift2) = Lift2.Lift2 (f, (x, y), Unchecked.defaultof<Lift2>)
139138
static member inline ParLift2 (f, (x: 'Monoid * 'T , y: 'Monoid * 'U ), _mthd: ParLift2) = Lift2.Lift2 (f, (x, y), Unchecked.defaultof<Lift2>)
140-
static member inline ParLift2 (f, (x: struct ('Monoid * 'T), y: struct ('Monoid * 'U)), _mthd: ParLift2) = Lift2.Lift2 (f, (x, y), Unchecked.defaultof<Lift2>)
139+
static member inline ParLift2 (f, (x: struct ('Monoid*'T), y: struct ('Monoid*'U)), _mthd: ParLift2) = Lift2.Lift2 (f, (x, y), Unchecked.defaultof<Lift2>)
141140
#if !FABLE_COMPILER
142141
static member ParLift2 (f, (x: Task<'T> , y: Task<'U> ), _mthd: ParLift2) = Task.pmap2 f x y
143142
#endif
@@ -184,7 +183,7 @@ type ParLift3 =
184183
static member ParLift3 (f, (x: _ [] , y: _ [] , z: _ [] ), _mthd: ParLift3) = Array.map3Shortest f x y z
185184
static member ParLift3 (f, (x: 'R -> 'T , y: 'R -> 'U , z: 'R -> 'V ), _mthd: ParLift3) = Lift3.Lift3 (f, (x, y, z), Unchecked.defaultof<Lift3>)
186185
static member inline ParLift3 (f, (x: 'Monoid * 'T , y: 'Monoid * 'U , z: 'Monoid * 'V ), _mthd: ParLift3) = Lift3.Lift3 (f, (x, y, z), Unchecked.defaultof<Lift3>)
187-
static member inline ParLift3 (f, (x: struct ('Monoid * 'T), y: struct ('Monoid * 'U), z: struct ('Monoid * 'T)), _mthd: ParLift3) = Lift3.Lift3 (f, (x, y, z), Unchecked.defaultof<Lift3>)
186+
static member inline ParLift3 (f, (x: struct ('Monoid*'T), y: struct ('Monoid*'U), z: struct ('Monoid* 'T)), _mthd: ParLift3) = Lift3.Lift3 (f, (x, y, z), Unchecked.defaultof<Lift3>)
188187
#if !FABLE_COMPILER
189188
static member ParLift3 (f, (x: Task<'T> , y: Task<'U> , z: Task<'V> ), _mthd: ParLift3) = Task.pmap3 f x y z
190189
#endif

src/FSharpPlus/Extensions/Extensions.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ module Extensions =
207207
| ValueNone -> Choice1Of2 (accumulator.Close () |> Array.toSeq)
208208
| ValueSome x -> Choice2Of2 x
209209
#endif
210-
210+
211211
/// Returns all Errors combined, otherwise a sequence of all elements.
212212
static member Parallel (combiner, t: seq<Choice<_, _>>) =
213213
let mutable error = ValueNone

0 commit comments

Comments
 (0)