Skip to content

Commit 5453582

Browse files
authored
Merge branch 'master' into gus/neseq-with-static-methods
2 parents e5ed940 + 52fa7b7 commit 5453582

File tree

10 files changed

+79
-44
lines changed

10 files changed

+79
-44
lines changed

src/FSharpPlus/Control/Applicative.fs

+39-32
Original file line numberDiff line numberDiff line change
@@ -12,56 +12,57 @@ open FSharpPlus
1212

1313
type Apply =
1414
inherit Default1
15-
15+
1616
#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4
1717

18-
static member inline ``<*>`` (f: '``Monad<'T->'U>`` , x: '``Monad<'T>`` , [<Optional>]_output: '``Monad<'U>`` , [<Optional>]_mthd:Default2) : '``Monad<'U>`` = Bind.InvokeOnInstance f (fun (x1: 'T->'U) -> Bind.InvokeOnInstance x (fun x2 -> Return.InvokeOnInstance (x1 x2)))
19-
static member inline ``<*>`` (f: '``Applicative<'T->'U>``, x: '``Applicative<'T>``, [<Optional>]_output: '``Applicative<'U>``, [<Optional>]_mthd:Default1) : '``Applicative<'U>`` = ((^``Applicative<'T->'U>`` or ^``Applicative<'T>`` or ^``Applicative<'U>``) : (static member (<*>) : _*_ -> _) f, x)
20-
21-
static member ``<*>`` (f: Lazy<'T->'U> , x: Lazy<'T> , [<Optional>]_output: Lazy<'U> , [<Optional>]_mthd: Apply) = Lazy.apply f x : Lazy<'U>
22-
static member ``<*>`` (f: seq<_> , x: seq<'T> , [<Optional>]_output: seq<'U> , [<Optional>]_mthd: Apply) = Seq.apply f x : seq<'U>
23-
static member ``<*>`` (f: IEnumerator<_> , x: IEnumerator<'T> , [<Optional>]_output: IEnumerator<'U> , [<Optional>]_mthd: Apply) = Enumerator.map2 id f x : IEnumerator<'U>
24-
static member ``<*>`` (f: list<_> , x: list<'T> , [<Optional>]_output: list<'U> , [<Optional>]_mthd: Apply) = List.apply f x : list<'U>
25-
static member ``<*>`` (f: _ [] , x: 'T [] , [<Optional>]_output: 'U [] , [<Optional>]_mthd: Apply) = Array.apply f x : 'U []
26-
static member ``<*>`` (f: 'r -> _ , g: _ -> 'T , [<Optional>]_output: 'r -> 'U , [<Optional>]_mthd: Apply) = fun x -> let f' = f x in f' (g x) : 'U
27-
static member inline ``<*>`` ((a: 'Monoid, f) , (b: 'Monoid, x: 'T) , [<Optional>]_output: 'Monoid * 'U , [<Optional>]_mthd: Apply) = (Plus.Invoke a b, f x) : 'Monoid *'U
28-
static member inline ``<*>`` (struct (a: 'Monoid, f), struct (b: 'Monoid, x: 'T), [<Optional>]_output: struct ('Monoid * 'U), [<Optional>]_mthd: Apply) = struct (Plus.Invoke a b, f x) : struct ('Monoid * 'U)
18+
static member ``<*>`` (struct (f: Lazy<'T->'U> , x: Lazy<'T> ) , _output: Lazy<'U> , [<Optional>]_mthd: Apply) = Lazy.apply f x : Lazy<'U>
19+
static member ``<*>`` (struct (f: seq<_> , x: seq<'T> ) , _output: seq<'U> , [<Optional>]_mthd: Apply) = Seq.apply f x : seq<'U>
20+
static member ``<*>`` (struct (f: IEnumerator<_> , x: IEnumerator<'T> ) , _output: IEnumerator<'U> , [<Optional>]_mthd: Apply) = Enumerator.map2 id f x : IEnumerator<'U>
21+
static member ``<*>`` (struct (f: list<_> , x: list<'T> ) , _output: list<'U> , [<Optional>]_mthd: Apply) = List.apply f x : list<'U>
22+
static member ``<*>`` (struct (f: _ [] , x: 'T [] ) , _output: 'U [] , [<Optional>]_mthd: Apply) = Array.apply f x : 'U []
23+
static member ``<*>`` (struct (f: 'r -> _ , g: _ -> 'T ) , _output: 'r -> 'U , [<Optional>]_mthd: Apply) = fun x -> let f' = f x in f' (g x) : 'U
24+
static member inline ``<*>`` (struct ((a: 'Monoid, f) , (b: 'Monoid, x: 'T) ) , _output: 'Monoid * 'U , [<Optional>]_mthd: Apply) = (Plus.Invoke a b, f x) : 'Monoid *'U
25+
static member inline ``<*>`` (struct (struct (a: 'Monoid, f), struct (b: 'Monoid, x: 'T)), _output: struct ('Monoid * 'U), [<Optional>]_mthd: Apply) = struct (Plus.Invoke a b, f x) : struct ('Monoid * 'U)
2926
#if !FABLE_COMPILER
30-
static member ``<*>`` (f: Task<_> , x: Task<'T> , [<Optional>]_output: Task<'U> , [<Optional>]_mthd: Apply) = Task.apply f x : Task<'U>
27+
static member ``<*>`` (struct (f: Task<_> , x: Task<'T> ), _output: Task<'U> , [<Optional>]_mthd: Apply) = Task.apply f x : Task<'U>
3128
#endif
32-
#if NETSTANDARD2_1 && !FABLE_COMPILER
33-
static member ``<*>`` (f: ValueTask<_> , x: ValueTask<'T> , [<Optional>]_output: ValueTask<'U> , [<Optional>]_mthd: Apply) = ValueTask.apply f x : ValueTask<'U>
29+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
30+
static member ``<*>`` (struct (f: ValueTask<_> , x: ValueTask<'T> ), _output: ValueTask<'U> , [<Optional>]_mthd: Default2) = ValueTask.apply f x : ValueTask<'U>
3431
#endif
35-
static member ``<*>`` (f: Async<_> , x: Async<'T> , [<Optional>]_output: Async<'U> , [<Optional>]_mthd: Apply) = Async.apply f x : Async<'U>
36-
static member ``<*>`` (f: option<_> , x: option<'T> , [<Optional>]_output: option<'U> , [<Optional>]_mthd: Apply) = Option.apply f x : option<'U>
37-
static member ``<*>`` (f: voption<_> , x: voption<'T> , [<Optional>]_output: voption<'U> , [<Optional>]_mthd: Apply) = ValueOption.apply f x : voption<'U>
38-
static member ``<*>`` (f: Result<_,'E> , x: Result<'T,'E> , [<Optional>]_output: Result<'b,'E> , [<Optional>]_mthd: Apply) = Result.apply f x : Result<'U,'E>
39-
static member ``<*>`` (f: Choice<_,'E> , x: Choice<'T,'E> , [<Optional>]_output: Choice<'b,'E> , [<Optional>]_mthd: Apply) = Choice.apply f x : Choice<'U,'E>
40-
static member inline ``<*>`` (KeyValue(a: 'Key, f), KeyValue(b: 'Key, x: 'T), [<Optional>]_output: KeyValuePair<'Key,'U>, [<Optional>]_mthd: Apply) : KeyValuePair<'Key,'U> = KeyValuePair (Plus.Invoke a b, f x)
41-
42-
static member ``<*>`` (f: Map<'Key,_> , x: Map<'Key,'T> , [<Optional>]_output: Map<'Key,'U> , [<Optional>]_mthd: Apply) : Map<'Key,'U> = Map (seq {
32+
static member ``<*>`` (struct (f: Async<_> , x: Async<'T> ), _output: Async<'U> , [<Optional>]_mthd: Apply) = Async.apply f x : Async<'U>
33+
static member ``<*>`` (struct (f: option<_> , x: option<'T> ), _output: option<'U> , [<Optional>]_mthd: Apply) = Option.apply f x : option<'U>
34+
static member ``<*>`` (struct (f: voption<_> , x: voption<'T> ), _output: voption<'U> , [<Optional>]_mthd: Apply) = ValueOption.apply f x : voption<'U>
35+
static member ``<*>`` (struct (f: Result<_,'E> , x: Result<'T,'E> ), _output: Result<'b,'E> , [<Optional>]_mthd: Apply) = Result.apply f x : Result<'U,'E>
36+
static member ``<*>`` (struct (f: Choice<_,'E> , x: Choice<'T,'E> ), _output: Choice<'b,'E> , [<Optional>]_mthd: Apply) = Choice.apply f x : Choice<'U,'E>
37+
static member inline ``<*>`` (struct (KeyValue(a: 'Key, f), KeyValue(b: 'Key, x: 'T)), _output: KeyValuePair<'Key,'U>, [<Optional>]_mthd: Default2) : KeyValuePair<'Key,'U> = KeyValuePair (Plus.Invoke a b, f x)
38+
static member inline ``<*>`` (struct (f: KeyValuePair2<_,_>, x: KeyValuePair2<_,'T> ), _output: KeyValuePair2<_,'U> , [<Optional>]_mthd: Default2) : KeyValuePair2<'Key,'U> =
39+
let a, b = f.Key, x.Key
40+
let f, x = f.Value, x.Value
41+
KeyValuePair2 (Plus.Invoke a b, f x)
42+
43+
static member ``<*>`` (struct (f: Map<'Key,_> , x: Map<'Key,'T> ) , _output: Map<'Key,'U> , [<Optional>]_mthd: Apply) : Map<'Key,'U> = Map (seq {
4344
for KeyValue(k, vf) in f do
4445
match Map.tryFind k x with
4546
| Some vx -> yield k, vf vx
4647
| _ -> () })
4748

48-
static member ``<*>`` (f: Dictionary<'Key,_>, x: Dictionary<'Key,'T> , [<Optional>]_output: Dictionary<'Key,'U> , [<Optional>]_mthd: Apply) : Dictionary<'Key,'U> =
49+
static member ``<*>`` (struct (f: Dictionary<'Key,_>, x: Dictionary<'Key,'T>) , _output: Dictionary<'Key,'U> , [<Optional>]_mthd: Apply) : Dictionary<'Key,'U> =
4950
let dct = Dictionary ()
5051
for KeyValue(k, vf) in f do
5152
match x.TryGetValue k with
5253
| true, vx -> dct.Add (k, vf vx)
5354
| _ -> ()
5455
dct
5556

56-
static member ``<*>`` (f: IDictionary<'Key,_>, x: IDictionary<'Key,'T> , [<Optional>]_output: IDictionary<'Key,'U> , [<Optional>]_mthd: Apply) : IDictionary<'Key,'U> =
57+
static member ``<*>`` (struct (f: IDictionary<'Key,_>, x: IDictionary<'Key,'T>) , _output: IDictionary<'Key,'U> , [<Optional>]_mthd: Apply) : IDictionary<'Key,'U> =
5758
let dct = Dictionary ()
5859
for KeyValue(k, vf) in f do
5960
match x.TryGetValue k with
6061
| true, vx -> dct.Add (k, vf vx)
6162
| _ -> ()
6263
dct :> IDictionary<'Key,'U>
6364

64-
static member ``<*>`` (f: IReadOnlyDictionary<'Key,_>, x: IReadOnlyDictionary<'Key,'T> , [<Optional>]_output: IReadOnlyDictionary<'Key,'U> , [<Optional>]_mthd: Apply) : IReadOnlyDictionary<'Key,'U> =
65+
static member ``<*>`` (struct (f: IReadOnlyDictionary<'Key,_>, x: IReadOnlyDictionary<'Key,'T>) , _output: IReadOnlyDictionary<'Key,'U> , [<Optional>]_mthd: Apply) : IReadOnlyDictionary<'Key,'U> =
6566
let dct = Dictionary ()
6667
for KeyValue(k, vf) in f do
6768
match x.TryGetValue k with
@@ -70,23 +71,29 @@ type Apply =
7071
dct :> IReadOnlyDictionary<'Key,'U>
7172

7273
#if !FABLE_COMPILER
73-
static member ``<*>`` (f: Expr<'T->'U>, x: Expr<'T>, [<Optional>]_output: Expr<'U>, [<Optional>]_mthd: Apply) = Expr.Cast<'U> (Expr.Application (f, x))
74+
static member ``<*>`` (struct (f: Expr<'T->'U>, x: Expr<'T>), _output: Expr<'U>, [<Optional>]_mthd: Apply) = Expr.Cast<'U> (Expr.Application (f, x))
7475
#endif
75-
static member ``<*>`` (f: ('T->'U) ResizeArray, x: 'T ResizeArray, [<Optional>]_output: 'U ResizeArray, [<Optional>]_mthd: Apply) = ResizeArray.apply f x : 'U ResizeArray
76+
static member ``<*>`` (struct (f: ('T->'U) ResizeArray, x: 'T ResizeArray), _output: 'U ResizeArray, [<Optional>]_mthd: Apply) = ResizeArray.apply f x : 'U ResizeArray
7677

7778
static member inline Invoke (f: '``Applicative<'T -> 'U>``) (x: '``Applicative<'T>``) : '``Applicative<'U>`` =
7879
let inline call (mthd : ^M, input1: ^I1, input2: ^I2, output: ^R) =
79-
((^M or ^I1 or ^I2 or ^R) : (static member ``<*>`` : _*_*_*_ -> _) input1, input2, output, mthd)
80+
((^M or ^I1 or ^I2 or ^R) : (static member ``<*>`` : struct (_*_) * _ * _ -> _) (struct (input1, input2)), output, mthd)
8081
call(Unchecked.defaultof<Apply>, f, x, Unchecked.defaultof<'``Applicative<'U>``>)
8182

82-
8383
#endif
8484

8585
static member inline InvokeOnInstance (f: '``Applicative<'T->'U>``) (x: '``Applicative<'T>``) : '``Applicative<'U>`` =
8686
((^``Applicative<'T->'U>`` or ^``Applicative<'T>`` or ^``Applicative<'U>``) : (static member (<*>) : _*_ -> _) (f, x))
8787

8888
#if (!FABLE_COMPILER || FABLE_COMPILER_3) && !FABLE_COMPILER_4
8989

90+
type Apply with
91+
static member inline ``<*>`` (struct (f: '``Monad<'T->'U>`` , x: '``Monad<'T>`` ) , _output: '``Monad<'U>`` , [<Optional>]_mthd:Default2) : '``Monad<'U>`` = Bind.InvokeOnInstance f (fun (x1: 'T->'U) -> Bind.InvokeOnInstance x (fun x2 -> Return.InvokeOnInstance (x1 x2)))
92+
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
93+
94+
static member inline ``<*>`` (struct (f: '``Applicative<'T->'U>``, x: '``Applicative<'T>``), _output: '``Applicative<'U>``, [<Optional>]_mthd: Default1) : '``Applicative<'U>`` = ((^``Applicative<'T->'U>`` or ^``Applicative<'T>`` or ^``Applicative<'U>``) : (static member (<*>) : _*_ -> _) f, x)
95+
96+
9097
type Lift2 =
9198
inherit Default1
9299

@@ -101,7 +108,7 @@ type Lift2 =
101108
#if !FABLE_COMPILER
102109
static member Lift2 (f, (x: Task<'T> , y: Task<'U> ), _mthd: Lift2) = Task.map2 f x y
103110
#endif
104-
#if NETSTANDARD2_1 && !FABLE_COMPILER
111+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
105112
static member Lift2 (f, (x: ValueTask<'T> , y: ValueTask<'U> ), _mthd: Lift2) = ValueTask.map2 f x y
106113
#endif
107114
static member Lift2 (f, (x , y ), _mthd: Lift2) = Async.map2 f x y
@@ -147,7 +154,7 @@ type Lift3 =
147154
#if !FABLE_COMPILER
148155
static member Lift3 (f, (x: Task<'T> , y: Task<'U> , z: Task<'V> ), _mthd: Lift3) = Task.map3 f x y z
149156
#endif
150-
#if NETSTANDARD2_1 && !FABLE_COMPILER
157+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
151158
static member Lift3 (f, (x: ValueTask<'T> , y: ValueTask<'U> , z: ValueTask<'V> ), _mthd: Lift3) = ValueTask.map3 f x y z
152159
#endif
153160
static member Lift3 (f, (x , y , z ), _mthd: Lift3) = Async.map3 f x y z

src/FSharpPlus/Control/Comonad.fs

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type Extract =
2929
#if !FABLE_COMPILER
3030
static member Extract (f: Task<'T> ) = f.Result
3131
#endif
32-
#if NETSTANDARD2_1 && !FABLE_COMPILER
32+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
3333
static member Extract (f: ValueTask<'T> ) = f.Result
3434
#endif
3535
static member inline Invoke (x: '``Comonad<'T>``) : 'T =
@@ -66,7 +66,7 @@ type Extend =
6666
tcs.Task
6767
#endif
6868

69-
#if NETSTANDARD2_1 && !FABLE_COMPILER
69+
#if (!NET45 && !NETSTANDARD2_0) && !FABLE_COMPILER
7070
static member (=>>) (g: ValueTask<'T> , f: ValueTask<'T> -> 'U ) : ValueTask<'U> =
7171
if g.IsCompletedSuccessfully then
7272
try

src/FSharpPlus/Control/Functor.fs

+4-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ type Map =
6666
#if !FABLE_COMPILER
6767
static member Map ((x: Task<'T> , f: 'T->'U), _mthd: Map) = Task.map f x : Task<'U>
6868
#endif
69-
#if NETSTANDARD2_1 && !FABLE_COMPILER
69+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
7070
static member Map ((x: ValueTask<'T> , f: 'T->'U), _mthd: Map) = ValueTask.map f x : ValueTask<'U>
7171
#endif
7272
static member Map ((x: option<_> , f: 'T->'U), _mthd: Map) = Option.map f x
@@ -88,6 +88,7 @@ type Map =
8888
static member Map ((x: Result<_,'E> , f: 'T->'U), _mthd: Map) = Result.map f x
8989
static member Map ((x: Choice<_,'E> , f: 'T->'U), _mthd: Map) = Choice.map f x
9090
static member Map ((KeyValue(k, x) , f: 'T->'U), _mthd: Map) = KeyValuePair (k, f x)
91+
static member Map ((x: KeyValuePair2<_, _> , f: 'T->'U), _mthd: Map) = let k, x = x.Key, x.Value in KeyValuePair2 (k, f x)
9192
static member Map ((x: Map<'Key,'T> , f: 'T->'U), _mthd: Map) = Map.map (const' f) x : Map<'Key,'U>
9293
static member Map ((x: Dictionary<_,_> , f: 'T->'U), _mthd: Map) = Dictionary.map f x : Dictionary<'Key,'U>
9394
#if !FABLE_COMPILER
@@ -150,7 +151,7 @@ type Unzip =
150151
#if !FABLE_COMPILER
151152
static member Unzip ((source: Task<'T * 'U> , _output: Task<'T> * Task<'U> ) , _mthd: Unzip ) = Map.Invoke fst source, Map.Invoke snd source
152153
#endif
153-
#if NETSTANDARD2_1 && !FABLE_COMPILER
154+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
154155
static member Unzip ((source: ValueTask<'T * 'U> , _output: ValueTask<'T> * ValueTask<'U> ) , _mthd: Unzip ) = Map.Invoke fst source, Map.Invoke snd source
155156
#endif
156157
static member Unzip ((source: option<'T * 'U> , _output: option<'T> * option<'U> ) , _mthd: Unzip ) = Option.unzip source
@@ -218,7 +219,7 @@ type Zip =
218219
#if !FABLE_COMPILER
219220
static member Zip ((x: Task<'T> , y: Task<'U> , _output: Task<'T*'U> ), _mthd: Zip) = Task.zip x y
220221
#endif
221-
#if NETSTANDARD2_1 && !FABLE_COMPILER
222+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
222223
static member Zip ((x: ValueTask<'T> , y: ValueTask<'U> , _output: ValueTask<'T*'U> ), _mthd: Zip) = ValueTask.zip x y
223224
#endif
224225

src/FSharpPlus/Control/Monad.fs

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type Bind =
2121
static member (>>=) (source: Task<'T> , f: 'T -> Task<'U> ) = Task.bind f source : Task<'U>
2222
static member (>>=) (source , f: 'T -> _ ) = Nullable.bind f source : Nullable<'U>
2323
#endif
24-
#if NETSTANDARD2_1 && !FABLE_COMPILER
24+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
2525
static member (>>=) (source: ValueTask<'T> , f: 'T -> ValueTask<'U> ) = ValueTask.bind f source : ValueTask<'U>
2626
#endif
2727

@@ -80,7 +80,7 @@ type Join =
8080
#if !FABLE_COMPILER
8181
static member Join (x: Task<Task<_>> , [<Optional>]_output: Task<'T> , [<Optional>]_mthd: Join ) = Task.join x : Task<'T>
8282
#endif
83-
#if NETSTANDARD2_1 && !FABLE_COMPILER
83+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
8484
static member Join (x: ValueTask<ValueTask<_>> , [<Optional>]_output: ValueTask<'T> , [<Optional>]_mthd: Join ) = ValueTask.join x : ValueTask<'T>
8585
#endif
8686
static member Join (x , [<Optional>]_output: option<'T> , [<Optional>]_mthd: Join ) = Option.flatten x : option<'T>
@@ -138,7 +138,7 @@ type Return =
138138
#if !FABLE_COMPILER
139139
static member Return (_: 'T Task , _: Return ) = fun x -> Task.FromResult x : 'T Task
140140
#endif
141-
#if NETSTANDARD2_1 && !FABLE_COMPILER
141+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
142142
static member Return (_: 'T ValueTask , _: Return ) = fun (x: 'T) -> ValueTask<'T> x : 'T ValueTask
143143
#endif
144144
static member Return (_: option<'a> , _: Return ) = fun x -> Some x : option<'a>
@@ -188,7 +188,7 @@ type Delay =
188188

189189
#endif
190190

191-
#if NETSTANDARD2_1 && !FABLE_COMPILER
191+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
192192
static member Delay (_mthd: Delay , x: unit-> ValueTask<_> , _ ) = x () : ValueTask<'T>
193193
#endif
194194

src/FSharpPlus/Control/Monoid.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ type Plus with
118118
static member inline ``+`` (x: 'a Task, y: 'a Task, [<Optional>]_mthd: Plus) = Task.map2 Plus.Invoke x y
119119
#endif
120120

121-
#if NETSTANDARD2_1 && !FABLE_COMPILER
121+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
122122
type Plus with
123123

124124
static member inline ``+`` (x: 'a ValueTask, y: 'a ValueTask, [<Optional>]_mthd: Plus) = ValueTask.map2 Plus.Invoke x y

src/FSharpPlus/Control/Numeric.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ type Zero with
193193
s.SetResult v
194194
s.Task
195195
#endif
196-
#if NETSTANDARD2_1 && !FABLE_COMPILER
196+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
197197
static member inline Zero (_: ValueTask<'a>, _: Zero) : ValueTask<'a> =
198198
let (v: 'a) = Zero.Invoke ()
199199
ValueTask<'a>(v)

src/FSharpPlus/Extensions/ValueTask.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace FSharpPlus
22

3-
#if NETSTANDARD2_1_OR_GREATER && !FABLE_COMPILER
3+
#if !NET45 && !NETSTANDARD2_0 && !FABLE_COMPILER
44

55
/// Additional operations on ValueTask<'T>
66
[<RequireQualifiedAccess>]

src/FSharpPlus/Internals.fs

+6
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ type Either<'t,'u> =
125125

126126
type DmStruct = struct end
127127

128+
type KeyValuePair2<'TKey, 'TValue> = struct
129+
val Key : 'TKey
130+
val Value : 'TValue
131+
new (key, value) = { Key = key; Value = value }
132+
end
133+
128134
[<Sealed>]
129135
type Set2<'T when 'T: comparison >() = class end
130136

0 commit comments

Comments
 (0)