You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/FSharpPlus/Builders.fs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -341,7 +341,7 @@ module GenericBuilders =
341
341
#endif
342
342
member inline_.MergeSources(t1:'``Applicative<'T>``, t2: '``Applicative<'U>``):'``Applicative<'T*'U>`` = Lift2.Invoke tuple2 t1 t2
343
343
member inline_.MergeSources3(t1:'``Applicative<'T>``, t2: '``Applicative<'U>``,t3:'``Applicative<'V>``):'``Applicative<'T*'U*'V>`` = Lift3.Invoke tuple3 t1 t2 t3
Copy file name to clipboardExpand all lines: src/FSharpPlus/Data/Validation.fs
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -84,21 +84,21 @@ module Validation =
84
84
-> Failure (e1 + e2)
85
85
#endif
86
86
87
-
let inlinefoldBack(folder:'T->'State->'State)(source:Validation<'Error,'T>)(state:'State)=
87
+
let inlinefoldBack(folder:'T->'State->'State)(source:Validation<'Error,'T>)(state:'State)=
88
88
match source with
89
89
| Success a -> folder a state
90
90
| Failure _-> state
91
91
92
92
#if!FABLE_COMPILER || FABLE_COMPILER_3
93
93
94
94
/// Traverse the Success case with the supplied function.
95
-
let inlinetraverse(f:'T->'``Functor<'U>``)(source:Validation<'Error,'T>):'``Functor<Validation<'Error,'U>>`` =
95
+
let inlinetraverse(f:'T->'``Functor<'U>``)(source:Validation<'Error,'T>):'``Functor<Validation<'Error,'U>>`` =
96
96
match source with
97
97
| Success a -> Validation<'Error,'U>.Success <!> f a
98
98
| Failure e -> result (Validation<'Error,'U>.Failure e)
99
99
100
100
/// Traverse the Success case.
101
-
let inlinesequence(source:Validation<'Error,'``Functor<'T>``>):'``Functor<Validation<'Error,'T>>`` = traverse id source
101
+
let inlinesequence(source:Validation<'Error,'``Functor<'T>``>):'``Functor<Validation<'Error,'T>>`` = traverse id source
102
102
103
103
#endif
104
104
@@ -245,11 +245,11 @@ module Validation =
245
245
#endif
246
246
247
247
248
-
typeValidation<'err,'a>with
248
+
typeValidation<'error,'t>with
249
249
250
250
// as Applicative
251
251
static memberReturn x = Success x
252
-
static member inline(<*>)(f:Validation<_,'T->'U>,x:Validation<_,'T>):Validation<_,_>= Validation.apply f x
252
+
static member inline(<*>)(f:Validation<'Error,'T->'U>,x:Validation<_,'T>):Validation<_,_>= Validation.apply f x
253
253
254
254
/// <summary>
255
255
/// Sequences two Validations left-to-right, discarding the value of the first argument.
@@ -264,39 +264,39 @@ type Validation<'err,'a> with
264
264
static member inline(<*)(x:Validation<'Error,'U>,y:Validation<'Error,'T>):Validation<'Error,'U>=((fun(k: 'U)(_: 'T)-> k )</Validation.map/> x : Validation<'Error, 'T->'U>)</Validation.apply/> y
265
265
266
266
[<EditorBrowsable(EditorBrowsableState.Never)>]
267
-
static member inlineLift2(f,x:Validation<_,'T>,y:Validation<_,'U>):Validation<_,'V>= Validation.map2 f x y
267
+
static member inlineLift2(f,x:Validation<'Error,'T>,y:Validation<'Error,'U>):Validation<'Error,'V>= Validation.map2 f x y
268
268
269
269
[<EditorBrowsable(EditorBrowsableState.Never)>]
270
-
static member inlineLift3(f,x:Validation<_,'T>,y:Validation<_,'U>,z:Validation<_,'V>):Validation<_,'W>= Validation.map3 f x y z
270
+
static member inlineLift3(f,x:Validation<'Error,'T>,y:Validation<_,'U>,z:Validation<_,'V>):Validation<_,'W>= Validation.map3 f x y z
271
271
272
-
#if!FABLE_COMPILER || FABLE_COMPILER_3
273
272
// as Alternative (inherits from Applicative)
273
+
#if!FABLE_COMPILER || FABLE_COMPILER_3
274
274
static member inlineget_Empty()= Failure (getEmpty ())
275
-
static member inline(<|>)(x:Validation<_,_>,y:Validation<_,_>)= Validation.appValidation Control.Append.Invoke x y
275
+
static member inline(<|>)(x:Validation<'Error,'T>,y:Validation<_,_>)= Validation.appValidation Control.Append.Invoke x y
276
276
#endif
277
277
278
278
// as Functor
279
279
[<EditorBrowsable(EditorBrowsableState.Never)>]
280
-
static memberMap(x:Validation<_,_>,f)= Validation.map f x
280
+
static memberMap(x:Validation<'Error,_>,f:'T ->'U)= Validation.map f x
281
281
282
282
/// <summary>Lifts a function into a Validator. Same as map.
283
283
/// To be used in Applicative Style expressions, combined with <*>
284
284
/// </summary>
285
285
/// <categoryindex="1">Functor</category>
286
-
static member(<!>)(f,x:Validation<_,_>)= Validation.map f x
286
+
static member(<!>)(f:'T ->'U,x:Validation<'Error,_>)= Validation.map f x
287
287
288
288
// as Bifunctor
289
289
[<EditorBrowsable(EditorBrowsableState.Never)>]
290
-
static memberBimap(x:Validation<'T,'V>,f:'T->'U,g:'V->'W):Validation<'U,'W>= Validation.bimap f g x
290
+
static memberBimap(x:Validation<'T,'V>,f:'T->'U,g:'V->'W):Validation<'U,'W>= Validation.bimap f g x
291
291
292
292
#if!FABLE_COMPILER || FABLE_COMPILER_3
293
293
294
294
// as Traversable
295
295
[<EditorBrowsable(EditorBrowsableState.Never)>]
296
-
static member inlineTraverse(t:Validation<'err,'a>,f:'a->'b):'c= Validation.traverse f t
296
+
static member inlineTraverse(t:Validation<'Error,'T>,f:'T ->'``Functor<'U>``):'``Functor<Validation<'Error, 'U>>``= Validation.traverse f t
297
297
298
298
[<EditorBrowsable(EditorBrowsableState.Never)>]
299
-
static member inlineSequence(t:Validation<'err,'a>):'c= Validation.sequence t
299
+
static member inlineSequence(t:Validation<'Error, '``Functor<'T>``>):'``Functor<Validation<'Error, 'T>>``= Validation.sequence t
Copy file name to clipboardExpand all lines: src/FSharpPlus/Extensions/List.fs
+4-10Lines changed: 4 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -357,19 +357,14 @@ module List =
357
357
/// <paramname="i">The index of the item to remove </param>
358
358
/// <paramname="lst">The input list</param>
359
359
///
360
-
/// <returns>For invalid indexes, the input list. Otherwise, a new list with the item removed.</returns>
360
+
/// <returns>For invalid indexes, the input list. Otherwise, a new list with the item removed.</returns>
361
+
/// <remarks>Use List.removeAt from FSharp.Core if you want to throw exceptions when using invalid indexes.</remarks>
361
362
letdeleteAt i lst =
362
363
if List.length lst > i then
363
364
lst.[0..i-1]@ lst.[i+1..]
364
365
else lst
365
366
366
-
/// <summary>Attempts to remove an item from a list.</summary>
367
-
/// <paramname="i">The index of the item to remove </param>
368
-
/// <paramname="lst">The input list</param>
369
-
///
370
-
/// <returns>For invalid indexes, the input list. Otherwise, a new list with the item removed.</returns>
371
-
/// <remarks>Use deletaAt instead or if you want to throw exceptions use the full path to removeAt in FSharp.Core until this function is removed from this library.</remarks>
372
-
[<Obsolete("This function was included in FSharp.Core but throwing")>]
367
+
[<Obsolete("This function was included in FSharp.Core but throwing. Use deletaAt instead or if you want to throw exceptions use the full path to removeAt in FSharp.Core until this function is removed from this library")>]
373
368
letremoveAt i lst = deleteAt i lst
374
369
375
370
/// <summary>Updates the value of an item in a list</summary>
@@ -378,9 +373,8 @@ module List =
378
373
/// <paramname="lst">The input list</param>
379
374
///
380
375
/// <returns>A new list with the updated element</returns>
381
-
/// <remarks>Use List.updateAt if you want to throw exceptions when using invalid indexes.</remarks>
376
+
/// <remarks>Use List.updateAt from FSharp.Core if you want to throw exceptions when using invalid indexes.</remarks>
0 commit comments