From be9280e65fe97e10d85a71bddb6ac9125e80dba7 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 31 Jul 2020 23:01:05 +0100 Subject: [PATCH] improve doc comments for FSharp.Core (#9844) * improve xml doc spacing * improve cref nodes * fix broken xml doc * fix more crefs * doc improvements --- src/absil/ilnativeres.fs | 6 + src/fsharp/FSharp.Core/Nullable.fsi | 41 ++ src/fsharp/FSharp.Core/array.fsi | 611 ++++++++++++---- src/fsharp/FSharp.Core/array2.fsi | 18 +- src/fsharp/FSharp.Core/array3.fsi | 35 + src/fsharp/FSharp.Core/async.fsi | 221 +++--- src/fsharp/FSharp.Core/collections.fsi | 3 + src/fsharp/FSharp.Core/event.fsi | 2 + src/fsharp/FSharp.Core/eventmodule.fsi | 16 + .../FSharp.Core/fslib-extra-pervasives.fsi | 38 +- src/fsharp/FSharp.Core/list.fsi | 266 +++++-- src/fsharp/FSharp.Core/mailbox.fsi | 35 +- src/fsharp/FSharp.Core/map.fsi | 71 +- src/fsharp/FSharp.Core/math/z.fsi | 7 + src/fsharp/FSharp.Core/nativeptr.fsi | 19 + src/fsharp/FSharp.Core/observable.fsi | 15 + src/fsharp/FSharp.Core/option.fsi | 103 +++ src/fsharp/FSharp.Core/prim-types-prelude.fsi | 54 +- src/fsharp/FSharp.Core/prim-types.fsi | 679 ++++++++++++++++-- src/fsharp/FSharp.Core/printf.fsi | 118 +-- src/fsharp/FSharp.Core/quotations.fsi | 241 +++++++ src/fsharp/FSharp.Core/reflect.fsi | 107 ++- src/fsharp/FSharp.Core/result.fsi | 6 + src/fsharp/FSharp.Core/seq.fsi | 277 +++---- src/fsharp/FSharp.Core/set.fsi | 82 ++- src/fsharp/FSharp.Core/string.fsi | 26 +- src/fsharp/fsiaux.fsi | 2 + src/fsharp/lib.fs | 12 +- src/fsharp/service/FSharpCheckerResults.fsi | 2 + src/fsharp/service/service.fsi | 5 + .../Project/ProjectNode.cs | 2 +- 31 files changed, 2484 insertions(+), 636 deletions(-) diff --git a/src/absil/ilnativeres.fs b/src/absil/ilnativeres.fs index 53321b9eef3..96cff415130 100644 --- a/src/absil/ilnativeres.fs +++ b/src/absil/ilnativeres.fs @@ -279,8 +279,10 @@ type VersionHelper() = /// /// Parses a version string of the form "major [ '.' minor [ '.' build [ '.' revision ] ] ]". /// + /// /// The version string to parse. /// If parsing succeeds, the parsed version. Otherwise a version that represents as much of the input as could be parsed successfully. + /// /// True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise. static member TryParse(s: string, [] version: byref) = VersionHelper.TryParse (s, false, UInt16.MaxValue, true, ref version) @@ -289,12 +291,14 @@ type VersionHelper() = /// Parses a version string of the form "major [ '.' minor [ '.' ( '*' | ( build [ '.' ( '*' | revision ) ] ) ) ] ]" /// as accepted by System.Reflection.AssemblyVersionAttribute. /// + /// /// The version string to parse. /// Indicates whether or not a wildcard is accepted as the terminal component. /// /// If parsing succeeded, the parsed version. Otherwise a version instance with all parts set to zero. /// If contains * the version build and/or revision numbers are set to . /// + /// /// True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise. static member TryParseAssemblyVersion (s: string, allowWildcard: bool, [] version: byref) = @@ -306,6 +310,7 @@ type VersionHelper() = /// Parses a version string of the form "major [ '.' minor [ '.' ( '*' | ( build [ '.' ( '*' | revision ) ] ) ) ] ]" /// as accepted by System.Reflection.AssemblyVersionAttribute. /// + /// /// The version string to parse. /// Indicates whether or not we're parsing an assembly version string. If so, wildcards are accepted and each component must be less than 65535. /// The maximum value that a version component may have. @@ -314,6 +319,7 @@ type VersionHelper() = /// If parsing succeeded, the parsed version. When is true a version with values up to the first invalid character set. Otherwise a version with all parts set to zero. /// If contains * and wildcard is allowed the version build and/or revision numbers are set to . /// + /// /// True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise. static member private TryParse(s: string, allowWildcard: bool, maxValue: uint16, allowPartialParse: bool, [] version: byref) = Debug.Assert (not allowWildcard || maxValue < UInt16.MaxValue) diff --git a/src/fsharp/FSharp.Core/Nullable.fsi b/src/fsharp/FSharp.Core/Nullable.fsi index 777aecdc7ab..0b18896ef8c 100644 --- a/src/fsharp/FSharp.Core/Nullable.fsi +++ b/src/fsharp/FSharp.Core/Nullable.fsi @@ -117,6 +117,7 @@ module Nullable = /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. /// The input value. + /// /// The converted byte [] val inline byte : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> byte) and default ^T : int @@ -124,7 +125,9 @@ module Nullable = /// Converts the argument to byte. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted byte [] val inline uint8 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> uint8) and default ^T : int @@ -132,7 +135,9 @@ module Nullable = /// Converts the argument to signed byte. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted sbyte [] val inline sbyte : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> sbyte) and default ^T : int @@ -140,7 +145,9 @@ module Nullable = /// Converts the argument to signed byte. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted sbyte [] val inline int8 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> int8) and default ^T : int @@ -148,7 +155,9 @@ module Nullable = /// Converts the argument to signed 16-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int16 [] val inline int16 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> int16) and default ^T : int @@ -156,7 +165,9 @@ module Nullable = /// Converts the argument to unsigned 16-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint16 [] val inline uint16 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> uint16) and default ^T : int @@ -164,7 +175,9 @@ module Nullable = /// Converts the argument to signed 32-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int [] val inline int : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> int) and default ^T : int @@ -172,13 +185,17 @@ module Nullable = /// Converts the argument to an unsigned 32-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted unsigned integer [] val inline uint: value: Nullable< ^T > -> Nullable when ^T :(static member op_Explicit: ^T -> uint) and default ^T : uint /// Converts the argument to a particular enum type. + /// /// The input value. + /// /// The converted enum type. [] val inline enum : value:Nullable< int32 > -> Nullable< ^U > when ^U : enum @@ -186,7 +203,9 @@ module Nullable = /// Converts the argument to signed 32-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int32 [] val inline int32 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> int32) and default ^T : int @@ -194,7 +213,9 @@ module Nullable = /// Converts the argument to unsigned 32-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint32 [] val inline uint32 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> uint32) and default ^T : int @@ -202,7 +223,9 @@ module Nullable = /// Converts the argument to signed 64-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int64 [] val inline int64 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> int64) and default ^T : int @@ -210,7 +233,9 @@ module Nullable = /// Converts the argument to unsigned 64-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint64 [] val inline uint64 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> uint64) and default ^T : int @@ -218,7 +243,9 @@ module Nullable = /// Converts the argument to 32-bit float. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted float32 [] val inline float32 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> float32) and default ^T : int @@ -226,7 +253,9 @@ module Nullable = /// Converts the argument to 64-bit float. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted float [] val inline float : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> float) and default ^T : int @@ -234,7 +263,9 @@ module Nullable = /// Converts the argument to 32-bit float. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted float32 [] val inline single : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> single) and default ^T : int @@ -242,7 +273,9 @@ module Nullable = /// Converts the argument to 64-bit float. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted float [] val inline double : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> double) and default ^T : int @@ -250,7 +283,9 @@ module Nullable = /// Converts the argument to signed native integer. This is a direct conversion for all /// primitive numeric types. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted nativeint [] val inline nativeint : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> nativeint) and default ^T : int @@ -258,7 +293,9 @@ module Nullable = /// Converts the argument to unsigned native integer using a direct conversion for all /// primitive numeric types. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted unativeint [] val inline unativeint : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> unativeint) and default ^T : int @@ -266,14 +303,18 @@ module Nullable = /// Converts the argument to System.Decimal using a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted decimal. [] val inline decimal : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> decimal) and default ^T : int /// Converts the argument to character. Numeric inputs are converted according to the UTF-16 /// encoding for characters. The operation requires an appropriate static conversion method on the input type. + /// /// The input value. + /// /// The converted char. [] val inline char : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> char) and default ^T : int diff --git a/src/fsharp/FSharp.Core/array.fsi b/src/fsharp/FSharp.Core/array.fsi index 5ede87a3c6d..2ae5facdbca 100644 --- a/src/fsharp/FSharp.Core/array.fsi +++ b/src/fsharp/FSharp.Core/array.fsi @@ -13,26 +13,35 @@ namespace Microsoft.FSharp.Collections module Array = /// Returns a new array that contains all pairings of elements from the first and second arrays. + /// /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. + /// + /// Thrown when either of the input arrays is null. + /// /// The resulting array of pairs. [] val allPairs: array1:'T1[] -> array2:'T2[] -> ('T1 * 'T2)[] /// Builds a new array that contains the elements of the first array followed by the elements of the second array. + /// /// The first input array. /// The second input array. + /// /// The resulting array. - /// Thrown when either of the input arrays is null. + /// + /// Thrown when either of the input arrays is null. [] val append: array1:'T[] -> array2:'T[] -> 'T[] /// Returns the average of the elements in the array. + /// /// The input array. - /// Thrown when array is empty. + /// + /// Thrown when array is empty. + /// Thrown when the input array is null. + /// /// The average of the elements in the array. - /// Thrown when the input array is null. [] val inline average : array:^T[] -> ^T when ^T : (static member ( + ) : ^T * ^T -> ^T) @@ -41,11 +50,15 @@ namespace Microsoft.FSharp.Collections /// Returns the average of the elements generated by applying the function to each element of the array. + /// /// The function to transform the array elements before averaging. /// The input array. - /// Thrown when array is empty. + /// + /// Thrown when array is empty. + /// /// The computed average. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val inline averageBy : projection:('T -> ^U) -> array:'T[] -> ^U when ^U : (static member ( + ) : ^U * ^U -> ^U) @@ -53,22 +66,27 @@ namespace Microsoft.FSharp.Collections and ^U : (static member Zero : ^U) /// Reads a range of elements from the first array and write them into the second. + /// /// The source array. /// The starting index of the source array. /// The target array. /// The starting index of the target array. /// The number of elements to copy. - /// Thrown when either of the input arrays is null. - /// Thrown when any of sourceIndex, targetIndex or count are negative, + /// + /// Thrown when either of the input arrays is null. + /// Thrown when any of sourceIndex, targetIndex or count are negative, /// or when there aren't enough elements in source or target. [] val inline blit: source:'T[] -> sourceIndex:int -> target:'T[] -> targetIndex:int -> count:int -> unit /// For each element of the array, applies the given function. Concatenates all the results and return the combined array. + /// /// The function to create sub-arrays from the input array elements. /// The input array. + /// /// The concatenation of the sub-arrays. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val collect : mapping:('T -> 'U[]) -> array:'T[] -> 'U[] @@ -85,30 +103,39 @@ namespace Microsoft.FSharp.Collections /// arrays, 1 is returned if the first array is longer, 0 is returned if they are equal in /// length, and -1 is returned when the second array is longer. /// - /// Thrown when either of the input arrays + /// Thrown when either of the input arrays /// is null. [] val inline compareWith: comparer:('T -> 'T -> int) -> array1:'T[] -> array2:'T[] -> int /// Builds a new array that contains the elements of each of the given sequence of arrays. + /// /// The input sequence of arrays. + /// /// The concatenation of the sequence of input arrays. - /// Thrown when the input sequence is null. + /// + /// Thrown when the input sequence is null. [] val concat: arrays:seq<'T[]> -> 'T[] /// Tests if the array contains the specified element. + /// /// The value to locate in the input array. /// The input array. + /// /// True if the input array contains the specified element; false otherwise. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val inline contains: value:'T -> array:'T[] -> bool when 'T : equality /// Builds a new array that contains the elements of the given array. + /// /// The input array. + /// /// A copy of the input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val copy: array:'T[] -> 'T[] @@ -121,22 +148,28 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val countBy : projection:('T -> 'Key) -> array:'T[] -> ('Key * int)[] when 'Key : equality /// Creates an array whose elements are all initially the given value. + /// /// The length of the array to create. /// The value for the elements. + /// /// The created array. - /// Thrown when count is negative. + /// + /// Thrown when count is negative. [] val create: count:int -> value:'T -> 'T[] /// Returns the first element of the array, or /// None if the array is empty. + /// /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. + /// /// The first element of the array or None. [] val tryHead: array:'T[] -> 'T option @@ -144,31 +177,39 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to successive elements, returning the first /// result where function returns Some(x) for some x. If the function /// never returns Some(x) then None is returned. + /// /// The function to transform the array elements into options. /// The input array. + /// /// The first transformed element that is Some(x). - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val tryPick: chooser:('T -> 'U option) -> array:'T[] -> 'U option /// Fills a range of elements of the array with the given value. + /// /// The target array. /// The index of the first element to set. /// The number of elements to set. /// The value to set. - /// Thrown when the input array is null. - /// Thrown when either targetIndex or count is negative. + /// + /// Thrown when the input array is null. + /// Thrown when either targetIndex or count is negative. [] val fill: target:'T[] -> targetIndex:int -> count:int -> value:'T -> unit /// Applies the given function to successive elements, returning the first /// result where function returns Some(x) for some x. If the function - /// never returns Some(x) then KeyNotFoundException is raised. + /// never returns Some(x) then is raised. + /// /// The function to generate options from the elements. /// The input array. - /// Thrown when the input array is null. - /// Thrown if every result from + /// + /// Thrown when the input array is null. + /// Thrown if every result from /// chooser is None. + /// /// The first result. [] val pick: chooser:('T -> 'U option) -> array:'T[] -> 'U @@ -176,19 +217,25 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to each element of the array. Returns /// the array comprised of the results "x" for each element where /// the function returns Some(x) + /// /// The function to generate options from the elements. /// The input array. + /// /// The array of results. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val choose: chooser:('T -> 'U option) -> array:'T[] -> 'U[] /// Divides the input array into chunks of size at most chunkSize. + /// /// The maximum size of each chunk. /// The input array. + /// /// The array divided into chunks. - /// Thrown when the input array is null. - /// Thrown when chunkSize is not positive. + /// + /// Thrown when the input array is null. + /// Thrown when chunkSize is not positive. [] val chunkBySize: chunkSize:int -> array:'T[] -> 'T[][] @@ -200,7 +247,7 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val distinct: array:'T[] -> 'T[] when 'T : equality @@ -213,16 +260,19 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val distinctBy: projection:('T -> 'Key) -> array:'T[] -> 'T[] when 'Key : equality /// Splits the input array into at most count chunks. + /// /// The maximum number of chunks. /// The input array. + /// /// The array split into chunks. - /// Thrown when the input array is null. - /// Thrown when count is not positive. + /// + /// Thrown when the input array is null. + /// Thrown when count is not positive. [] val splitInto: count:int -> array:'T[] -> 'T[][] @@ -238,8 +288,8 @@ namespace Microsoft.FSharp.Collections /// /// The only element of the array. /// - /// Thrown when the input array is null. - /// Thrown when the input does not have precisely one element. + /// Thrown when the input array is null. + /// Thrown when the input does not have precisely one element. [] val exactlyOne: array:'T[] -> 'T @@ -249,7 +299,7 @@ namespace Microsoft.FSharp.Collections /// /// The only element of the array or None. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val tryExactlyOne: array:'T[] -> 'T option @@ -262,7 +312,7 @@ namespace Microsoft.FSharp.Collections /// /// An array that contains the distinct elements of array that do not appear in itemsToExclude. /// - /// Thrown when either itemsToExclude or array is null. + /// Thrown when either itemsToExclude or array is null. [] val except: itemsToExclude:seq<'T> -> array:'T[] -> 'T[] when 'T : equality @@ -271,10 +321,13 @@ namespace Microsoft.FSharp.Collections /// The predicate is applied to the elements of the input array. If any application /// returns true then the overall result is true and no further elements are tested. /// Otherwise, false is returned. + /// /// The function to test the input elements. /// The input array. + /// /// True if any result from predicate is true. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val exists: predicate:('T -> bool) -> array:'T[] -> bool @@ -285,66 +338,84 @@ namespace Microsoft.FSharp.Collections /// true and no further elements are tested. Otherwise, if one collections is longer /// than the other then the ArgumentException exception is raised. /// Otherwise, false is returned. + /// /// The function to test the input elements. /// The first input array. /// The second input array. + /// /// True if any result from predicate is true. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. [] val exists2: predicate:('T1 -> 'T2 -> bool) -> array1:'T1[] -> array2:'T2[] -> bool /// Returns a new collection containing only the elements of the collection /// for which the given predicate returns "true". + /// /// The function to test the input elements. /// The input array. + /// /// An array containing the elements for which the given predicate returns true. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val filter: predicate:('T -> bool) -> array:'T[] -> 'T[] /// Returns the first element for which the given function returns 'true'. - /// Raise KeyNotFoundException if no such element exists. + /// Raise if no such element exists. + /// /// The function to test the input elements. /// The input array. - /// Thrown when the input array is null. - /// Thrown if predicate + /// + /// Thrown when the input array is null. + /// Thrown if predicate /// never returns true. + /// /// The first element for which predicate returns true. [] val find: predicate:('T -> bool) -> array:'T[] -> 'T /// Returns the last element for which the given function returns 'true'. - /// Raise KeyNotFoundException if no such element exists. + /// Raise if no such element exists. + /// /// The function to test the input elements. /// The input array. - /// Thrown if predicate + /// + /// Thrown if predicate /// never returns true. - /// Thrown when the input array is null. + /// Thrown when the input array is null. + /// /// The last element for which predicate returns true. [] val findBack: predicate:('T -> bool) -> array:'T[] -> 'T /// Returns the index of the first element in the array - /// that satisfies the given predicate. Raise KeyNotFoundException if + /// that satisfies the given predicate. Raise if /// none of the elements satisfy the predicate. + /// /// The function to test the input elements. /// The input array. - /// Thrown if predicate + /// + /// Thrown if predicate /// never returns true. - /// Thrown when the input array is null. + /// Thrown when the input array is null. + /// /// The index of the first element in the array that satisfies the given predicate. [] val findIndex: predicate:('T -> bool) -> array:'T[] -> int /// Returns the index of the last element in the array - /// that satisfies the given predicate. Raise KeyNotFoundException if + /// that satisfies the given predicate. Raise if /// none of the elements satisfy the predicate. + /// /// The function to test the input elements. /// The input array. - /// Thrown if predicate + /// + /// Thrown if predicate /// never returns true. - /// Thrown when the input array is null. + /// Thrown when the input array is null. + /// /// The index of the last element in the array that satisfies the given predicate. [] val findIndexBack: predicate:('T -> bool) -> array:'T[] -> int @@ -354,10 +425,13 @@ namespace Microsoft.FSharp.Collections /// The predicate is applied to the elements of the input collection. If any application /// returns false then the overall result is false and no further elements are tested. /// Otherwise, true is returned. + /// /// The function to test the input elements. /// The input array. + /// /// True if all of the array elements satisfy the predicate. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val forall: predicate:('T -> bool) -> array:'T[] -> bool @@ -369,11 +443,14 @@ namespace Microsoft.FSharp.Collections /// false and no further elements are tested. Otherwise, if one collection is longer /// than the other then the ArgumentException exception is raised. /// Otherwise, true is returned. + /// /// The function to test the input elements. /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. + /// /// True if all of the array elements satisfy the predicate. [] val forall2: predicate:('T1 -> 'T2 -> bool) -> array1:'T1[] -> array2:'T2[] -> bool @@ -381,22 +458,28 @@ namespace Microsoft.FSharp.Collections /// Applies a function to each element of the collection, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN then computes /// f (... (f s i0)...) iN + /// /// The function to update the state given the input elements. /// The initial state. /// The input array. + /// /// The final state. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val fold<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> array: 'T[] -> 'State /// Applies a function to each element of the array, starting from the end, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN then computes /// f i0 (...(f iN s)) + /// /// The function to update the state given the input elements. /// The input array. /// The initial state. + /// /// The state object after the folding function is applied to each element of the array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val foldBack<'T,'State> : folder:('T -> 'State -> 'State) -> array:'T[] -> state:'State -> 'State @@ -405,12 +488,15 @@ namespace Microsoft.FSharp.Collections /// through the computation. The two input /// arrays must have the same lengths, otherwise an ArgumentException is /// raised. + /// /// The function to update the state given the input elements. /// The initial state. /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. + /// /// The final state. [] val fold2<'T1,'T2,'State> : folder:('State -> 'T1 -> 'T2 -> 'State) -> state:'State -> array1:'T1[] -> array2:'T2[] -> 'State @@ -419,22 +505,28 @@ namespace Microsoft.FSharp.Collections /// threading an accumulator argument through the computation. The two input /// arrays must have the same lengths, otherwise an ArgumentException is /// raised. + /// /// The function to update the state given the input elements. /// The first input array. /// The second input array. /// The initial state. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. + /// /// The final state. [] val foldBack2<'T1,'T2,'State> : folder:('T1 -> 'T2 -> 'State -> 'State) -> array1:'T1[] -> array2:'T2[] -> state:'State -> 'State /// Gets an element from an array. + /// /// The input array. /// The input index. + /// /// The value of the array at the given index. - /// Thrown when the input array is null. - /// Thrown when the index is negative or the input array does not contain enough elements. + /// + /// Thrown when the input array is null. + /// Thrown when the index is negative or the input array does not contain enough elements. [] val get: array:'T[] -> index:int -> 'T @@ -444,8 +536,8 @@ namespace Microsoft.FSharp.Collections /// /// The first element of the array. /// - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// Thrown when the input array is null. + /// Thrown when the input array is empty. [] val head: array:'T[] -> 'T @@ -458,115 +550,150 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val groupBy : projection:('T -> 'Key) -> array:'T[] -> ('Key * 'T[])[] when 'Key : equality /// Builds a new array whose elements are the corresponding elements of the input array /// paired with the integer index (from 0) of each element. + /// /// The input array. + /// /// The array of indexed elements. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val indexed: array:'T[] -> (int * 'T)[] /// Creates an array given the dimension and a generator function to compute the elements. + /// /// The number of elements to initialize. /// The function to generate the initial values for each index. + /// /// The created array. - /// Thrown when count is negative. + /// + /// Thrown when count is negative. [] val inline init: count:int -> initializer:(int -> 'T) -> 'T[] /// Creates an array where the entries are initially the default value Unchecked.defaultof<'T>. + /// /// The length of the array to create. + /// /// The created array. - /// Thrown when count is negative. + /// + /// Thrown when count is negative. [] val zeroCreate: count:int -> 'T[] /// Returns true if the given array is empty, otherwise false. + /// /// The input array. + /// /// True if the array is empty. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val isEmpty: array:'T[] -> bool /// Applies the given function to each element of the array. + /// /// The function to apply. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val inline iter: action:('T -> unit) -> array:'T[] -> unit /// Applies the given function to pair of elements drawn from matching indices in two arrays. The /// two arrays must have the same lengths, otherwise an ArgumentException is /// raised. + /// /// The function to apply. /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. [] val iter2: action:('T1 -> 'T2 -> unit) -> array1:'T1[] -> array2:'T2[] -> unit /// Applies the given function to each element of the array. The integer passed to the /// function indicates the index of element. + /// /// The function to apply to each index and element. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val iteri: action:(int -> 'T -> unit) -> array:'T[] -> unit /// Applies the given function to pair of elements drawn from matching indices in two arrays, /// also passing the index of the elements. The two arrays must have the same lengths, /// otherwise an ArgumentException is raised. + /// /// The function to apply to each index and pair of elements. /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. [] val iteri2: action:(int -> 'T1 -> 'T2 -> unit) -> array1:'T1[] -> array2:'T2[] -> unit /// Returns the last element of the array. + /// /// The input array. + /// /// The last element of the array. - /// Thrown when the input array is null. - /// Thrown when the input does not have any elements. + /// + /// Thrown when the input array is null. + /// Thrown when the input does not have any elements. [] val inline last: array:'T[] -> 'T /// Gets an element from an array. + /// /// The input index. /// The input array. + /// /// The value of the array at the given index. - /// Thrown when the input array is null. - /// Thrown when the index is negative or the input array does not contain enough elements. + /// + /// Thrown when the input array is null. + /// Thrown when the index is negative or the input array does not contain enough elements. [] val item: index:int -> array:'T[] -> 'T /// Returns the length of an array. You can also use property arr.Length. + /// /// The input array. + /// /// The length of the array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val length: array:'T[] -> int /// Returns the last element of the array. /// Return None if no such element exists. + /// /// The input array. + /// /// The last element of the array or None. - /// Thrown when the input sequence is null. + /// + /// Thrown when the input sequence is null. [] val tryLast: array:'T[] -> 'T option /// Builds a new array whose elements are the results of applying the given function /// to each of the elements of the array. + /// /// The function to transform elements of the array. /// The input array. + /// /// The array of transformed elements. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val inline map: mapping:('T -> 'U) -> array:'T[] -> 'U[] @@ -574,31 +701,40 @@ namespace Microsoft.FSharp.Collections /// to the corresponding elements of the two collections pairwise. The two input /// arrays must have the same lengths, otherwise an ArgumentException is /// raised. + /// /// The function to transform the pairs of the input elements. /// The first input array. /// The second input array. - /// Thrown when the input arrays differ in length. - /// Thrown when either of the input arrays is null. + /// + /// Thrown when the input arrays differ in length. + /// Thrown when either of the input arrays is null. + /// /// The array of transformed elements. [] val map2: mapping:('T1 -> 'T2 -> 'U) -> array1:'T1[] -> array2:'T2[] -> 'U[] /// Combines map and fold. Builds a new array whose elements are the results of applying the given function /// to each of the elements of the input array. The function is also used to accumulate a final value. + /// /// The function to transform elements from the input array and accumulate the final value. /// The initial state. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. + /// /// The array of transformed elements, and the final accumulated value. [] val mapFold<'T,'State,'Result> : mapping:('State -> 'T -> 'Result * 'State) -> state:'State -> array:'T[] -> 'Result[] * 'State /// Combines map and foldBack. Builds a new array whose elements are the results of applying the given function /// to each of the elements of the input array. The function is also used to accumulate a final value. + /// /// The function to transform elements from the input array and accumulate the final value. /// The input array. /// The initial state. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. + /// /// The array of transformed elements, and the final accumulated value. [] val mapFoldBack<'T,'State,'Result> : mapping:('T -> 'State -> 'Result * 'State) -> array:'T[] -> state:'State -> 'Result[] * 'State @@ -607,12 +743,15 @@ namespace Microsoft.FSharp.Collections /// to the corresponding triples from the three collections. The three input /// arrays must have the same length, otherwise an ArgumentException is /// raised. + /// /// The function to transform the pairs of the input elements. /// The first input array. /// The second input array. /// The third input array. - /// Thrown when the input arrays differ in length. - /// Thrown when any of the input arrays is null. + /// + /// Thrown when the input arrays differ in length. + /// Thrown when any of the input arrays is null. + /// /// The array of transformed elements. [] val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> array1:'T1[] -> array2:'T2[] -> array3:'T3[] -> 'U[] @@ -621,11 +760,14 @@ namespace Microsoft.FSharp.Collections /// to the corresponding elements of the two collections pairwise, also passing the index of /// the elements. The two input arrays must have the same lengths, otherwise an ArgumentException is /// raised. + /// /// The function to transform pairs of input elements and their indices. /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. + /// /// The array of transformed elements. [] val mapi2: mapping:(int -> 'T1 -> 'T2 -> 'U) -> array1:'T1[] -> array2:'T2[] -> 'U[] @@ -633,19 +775,25 @@ namespace Microsoft.FSharp.Collections /// Builds a new array whose elements are the results of applying the given function /// to each of the elements of the array. The integer index passed to the /// function indicates the index of element being transformed. + /// /// The function to transform elements and their indices. /// The input array. + /// /// The array of transformed elements. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val mapi: mapping:(int -> 'T -> 'U) -> array:'T[] -> 'U[] /// Returns the greatest of all elements of the array, compared via Operators.max on the function result. /// /// Throws ArgumentException for empty arrays. + /// /// The input array. - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// /// The maximum element. [] val inline max : array:'T[] -> 'T when 'T : comparison @@ -653,10 +801,13 @@ namespace Microsoft.FSharp.Collections /// Returns the greatest of all elements of the array, compared via Operators.max on the function result. /// /// Throws ArgumentException for empty arrays. + /// /// The function to transform the elements into a type supporting comparison. /// The input array. - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// /// The maximum element. [] val inline maxBy : projection:('T -> 'U) -> array:'T[] -> 'T when 'U : comparison @@ -664,9 +815,12 @@ namespace Microsoft.FSharp.Collections /// Returns the lowest of all elements of the array, compared via Operators.min. /// /// Throws ArgumentException for empty arrays + /// /// The input array. - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// /// The minimum element. [] val inline min : array:'T[] -> 'T when 'T : comparison @@ -674,24 +828,32 @@ namespace Microsoft.FSharp.Collections /// Returns the lowest of all elements of the array, compared via Operators.min on the function result. /// /// Throws ArgumentException for empty arrays. + /// /// The function to transform the elements into a type supporting comparison. /// The input array. - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// /// The minimum element. [] val inline minBy : projection:('T -> 'U) -> array:'T[] -> 'T when 'U : comparison /// Builds an array from the given list. + /// /// The input list. + /// /// The array of elements from the list. [] val ofList: list:'T list -> 'T[] /// Builds a new array from the given enumerable object. + /// /// The input sequence. + /// /// The array of elements from the sequence. - /// Thrown when the input sequence is null. + /// + /// Thrown when the input sequence is null. [] val ofSeq: source:seq<'T> -> 'T[] @@ -702,28 +864,34 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val pairwise: array:'T[] -> ('T * 'T)[] /// Splits the collection into two collections, containing the /// elements for which the given predicate returns "true" and "false" /// respectively. + /// /// The function to test the input elements. /// The input array. + /// /// A pair of arrays. The first containing the elements the predicate evaluated to true, /// and the second containing those evaluated to false. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val partition: predicate:('T -> bool) -> array:'T[] -> 'T[] * 'T[] /// Returns an array with all elements permuted according to the /// specified permutation. + /// /// The function that maps input indices to output indices. /// The input array. + /// /// The output array. - /// Thrown when the input array is null. - /// Thrown when indexMap does not produce a valid permutation. + /// + /// Thrown when the input array is null. + /// Thrown when indexMap does not produce a valid permutation. [] val permute : indexMap:(int -> int) -> array:'T[] -> 'T[] @@ -731,10 +899,13 @@ namespace Microsoft.FSharp.Collections /// through the computation. If the input function is f and the elements are i0...iN /// then computes f (... (f i0 i1)...) iN. /// Raises ArgumentException if the array has size zero. + /// /// The function to reduce a pair of elements to a single element. /// The input array. - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// /// The final result of the reductions. [] val reduce: reduction:('T -> 'T -> 'T) -> array:'T[] -> 'T @@ -742,45 +913,60 @@ namespace Microsoft.FSharp.Collections /// Applies a function to each element of the array, starting from the end, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN /// then computes f i0 (...(f iN-1 iN)). + /// /// A function that takes in the next-to-last element of the list and the /// current accumulated result to produce the next accumulated result. /// The input array. - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// /// The final result of the reductions. [] val reduceBack: reduction:('T -> 'T -> 'T) -> array:'T[] -> 'T /// Creates an array by replicating the given initial value. + /// /// The number of elements to replicate. /// The value to replicate + /// /// The generated array. - /// Thrown when count is negative. + /// + /// Thrown when count is negative. [] val replicate: count:int -> initial:'T -> 'T[] /// Returns a new array with the elements in reverse order. + /// /// The input array. + /// /// The reversed array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val rev: array:'T[] -> 'T[] /// Like fold, but return the intermediary and final results. + /// /// The function to update the state given the input elements. /// The initial state. /// The input array. + /// /// The array of state values. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val scan<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> array:'T[] -> 'State[] /// Like foldBack, but return both the intermediary and final results. + /// /// The function to update the state given the input elements. /// The input array. /// The initial state. + /// /// The array of state values. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val scanBack<'T,'State> : folder:('T -> 'State -> 'State) -> array:'T[] -> state:'State -> 'State[] @@ -793,41 +979,52 @@ namespace Microsoft.FSharp.Collections val inline singleton: value:'T -> 'T[] /// Sets an element of an array. + /// /// The input array. /// The input index. /// The input value. - /// Thrown when the input array is null. - /// Thrown when the index is negative or the input array does not contain enough elements. + /// + /// Thrown when the input array is null. + /// Thrown when the index is negative or the input array does not contain enough elements. [] val set: array:'T[] -> index:int -> value:'T -> unit /// Builds a new array that contains the elements of the given array, excluding the first N elements. + /// /// The number of elements to skip. /// The input array. + /// /// A copy of the input array, after removing the first N elements. - /// Thrown when the input array is null. - /// Thrown when count is negative or exceeds the number of + /// + /// Thrown when the input array is null. + /// Thrown when count is negative or exceeds the number of /// elements in the array. [] val skip: count:int -> array:'T[] -> 'T[] /// Bypasses elements in an array while the given predicate returns True, and then returns /// the remaining elements in a new array. + /// /// A function that evaluates an element of the array to a boolean value. /// The input array. + /// /// The created sub array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val skipWhile: predicate:('T -> bool) -> array:'T[] -> 'T[] /// Builds a new array that contains the given subrange specified by /// starting index and length. + /// /// The input array. /// The index of the first element of the sub array. /// The length of the sub array. + /// /// The created sub array. - /// Thrown when the input array is null. - /// Thrown when either startIndex or count is negative, + /// + /// Thrown when the input array is null. + /// Thrown when either startIndex or count is negative, /// or when there aren't enough elements in the input array. [] val sub: array:'T[] -> startIndex:int -> count:int -> 'T[] @@ -836,9 +1033,12 @@ namespace Microsoft.FSharp.Collections /// /// This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. /// For a stable sort, consider using Seq.sort. + /// /// The input array. + /// /// The sorted array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val sort: array:'T[] -> 'T[] when 'T : comparison @@ -847,10 +1047,13 @@ namespace Microsoft.FSharp.Collections /// /// This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. /// For a stable sort, consider using Seq.sort. + /// /// The function to transform array elements into the type that is compared. /// The input array. + /// /// The sorted array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val sortBy: projection:('T -> 'Key) -> array:'T[] -> 'T[] when 'Key : comparison @@ -858,10 +1061,13 @@ namespace Microsoft.FSharp.Collections /// /// This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. /// For a stable sort, consider using Seq.sort. + /// /// The function to compare pairs of array elements. /// The input array. + /// /// The sorted array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val sortWith: comparer:('T -> 'T -> int) -> array:'T[] -> 'T[] @@ -870,35 +1076,43 @@ namespace Microsoft.FSharp.Collections /// /// This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. /// For a stable sort, consider using Seq.sort. + /// /// The function to transform array elements into the type that is compared. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val sortInPlaceBy: projection:('T -> 'Key) -> array:'T[] -> unit when 'Key : comparison /// Sorts the elements of an array by mutating the array in-place, using the given comparison function as the order. + /// /// The function to compare pairs of array elements. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val sortInPlaceWith: comparer:('T -> 'T -> int) -> array:'T[] -> unit /// Sorts the elements of an array by mutating the array in-place, using the given comparison function. /// Elements are compared using Operators.compare. + /// /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val sortInPlace: array:'T[] -> unit when 'T : comparison /// Splits an array into two arrays, at the given index. + /// /// The index at which the array is split. /// The input array. + /// /// The two split arrays. /// - /// Thrown when the input array is null. - /// Thrown when split index exceeds the number of elements + /// Thrown when the input array is null. + /// Thrown when split index exceeds the number of elements /// in the array. [] val splitAt: index:int -> array:'T[] -> ('T[] * 'T[]) @@ -907,7 +1121,9 @@ namespace Microsoft.FSharp.Collections /// /// This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. /// For a stable sort, consider using Seq.sort. + /// /// The input array. + /// /// The sorted array. [] val inline sortDescending: array:'T[] -> 'T[] when 'T : comparison @@ -917,16 +1133,21 @@ namespace Microsoft.FSharp.Collections /// /// This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. /// For a stable sort, consider using Seq.sort. + /// /// The function to transform array elements into the type that is compared. /// The input array. + /// /// The sorted array. [] val inline sortByDescending: projection:('T -> 'Key) -> array:'T[] -> 'T[] when 'Key : comparison /// Returns the sum of the elements in the array. + /// /// The input array. + /// /// The resulting sum. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val inline sum : array: ^T[] -> ^T when ^T : (static member ( + ) : ^T * ^T -> ^T) @@ -934,10 +1155,13 @@ namespace Microsoft.FSharp.Collections /// Returns the sum of the results generated by applying the function to each element of the array. + /// /// The function to transform the array elements into the type to be summed. /// The input array. + /// /// The resulting sum. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val inline sumBy : projection:('T -> ^U) -> array:'T[] -> ^U when ^U : (static member ( + ) : ^U * ^U -> ^U) @@ -953,9 +1177,9 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input array is null. - /// Thrown when the input array is empty. - /// Thrown when count exceeds the number of elements + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// Thrown when count exceeds the number of elements /// in the list. [] val take: count:int -> array:'T[] -> 'T[] @@ -968,154 +1192,202 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val takeWhile: predicate:('T -> bool) -> array:'T[] -> 'T[] /// Returns a new array containing the elements of the original except the first element. /// /// The input array. - /// Thrown when the array is empty. - /// Thrown when the input array is null. + /// + /// Thrown when the array is empty. + /// Thrown when the input array is null. + /// /// A new array containing the elements of the original except the first element. [] val tail: array:'T[] -> 'T[] /// Builds a list from the given array. + /// /// The input array. + /// /// The list of array elements. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val toList: array:'T[] -> 'T list /// Views the given array as a sequence. + /// /// The input array. + /// /// The sequence of array elements. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val toSeq: array:'T[] -> seq<'T> /// Returns the transpose of the given sequence of arrays. + /// /// The input sequence of arrays. + /// /// The transposed array. - /// Thrown when the input sequence is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when the input sequence is null. + /// Thrown when the input arrays differ in length. [] val transpose: arrays:seq<'T[]> -> 'T[][] /// Returns at most N elements in a new array. + /// /// The maximum number of items to return. /// The input array. + /// /// The result array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val truncate: count:int -> array:'T[] -> 'T[] /// Returns the first element for which the given function returns True. /// Return None if no such element exists. + /// /// The function to test the input elements. /// The input array. + /// /// The first element that satisfies the predicate, or None. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val tryFind: predicate:('T -> bool) -> array:'T[] -> 'T option /// Returns the last element for which the given function returns True. /// Return None if no such element exists. + /// /// The function to test the input elements. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. + /// /// The last element that satisfies the predicate, or None. [] val tryFindBack: predicate:('T -> bool) -> array:'T[] -> 'T option /// Returns the index of the first element in the array /// that satisfies the given predicate. + /// /// The function to test the input elements. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. + /// /// The index of the first element that satisfies the predicate, or None. [] val tryFindIndex : predicate:('T -> bool) -> array:'T[] -> int option /// Tries to find the nth element in the array. /// Returns None if index is negative or the input array does not contain enough elements. + /// /// The index of element to retrieve. /// The input array. + /// /// The nth element of the array or None. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val tryItem: index:int -> array:'T[] -> 'T option /// Returns the index of the last element in the array /// that satisfies the given predicate. + /// /// The function to test the input elements. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. + /// /// The index of the last element that satisfies the predicate, or None. [] val tryFindIndexBack : predicate:('T -> bool) -> array:'T[] -> int option /// Returns an array that contains the elements generated by the given computation. /// The given initial state argument is passed to the element generator. + /// /// A function that takes in the current state and returns an option tuple of the next /// element of the array and the next state value. /// The initial state value. + /// /// The result array. [] val unfold<'T,'State> : generator:('State -> ('T * 'State) option) -> state:'State -> 'T[] /// Splits an array of pairs into two arrays. + /// /// The input array. + /// /// The two arrays. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val unzip: array:('T1 * 'T2)[] -> ('T1[] * 'T2[]) /// Splits an array of triples into three arrays. + /// /// The input array. + /// /// The tuple of three arrays. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val unzip3: array:('T1 * 'T2 * 'T3)[] -> ('T1[] * 'T2[] * 'T3[]) /// Returns a new array containing only the elements of the array /// for which the given predicate returns "true". + /// /// The function to test the input elements. /// The input array. + /// /// An array containing the elements for which the given predicate returns true. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val where: predicate:('T -> bool) -> array:'T[] -> 'T[] /// Returns an array of sliding windows containing elements drawn from the input /// array. Each window is returned as a fresh array. + /// /// The number of elements in each window. /// The input array. + /// /// The result array. - /// Thrown when the input array is null. - /// Thrown when windowSize is not positive. + /// + /// Thrown when the input array is null. + /// Thrown when windowSize is not positive. [] val windowed : windowSize:int -> array:'T[] -> 'T[][] /// Combines the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is /// raised. + /// /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. + /// /// The array of tupled elements. [] val zip: array1:'T1[] -> array2:'T2[] -> ('T1 * 'T2)[] /// Combines three arrays into an array of pairs. The three arrays must have equal lengths, otherwise an ArgumentException is /// raised. + /// /// The first input array. /// The second input array. /// The third input array. - /// Thrown when any of the input arrays are null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when any of the input arrays are null. + /// Thrown when the input arrays differ in length. + /// /// The array of tupled elements. [] val zip3: array1:'T1[] -> array2:'T2[] -> array3:'T3[] -> ('T1 * 'T2 * 'T3)[] @@ -1129,10 +1401,13 @@ namespace Microsoft.FSharp.Collections /// /// Performs the operation in parallel using System.Threading.Parallel.For. /// The order in which the given function is applied to elements of the input array is not specified. + /// /// The function to generate options from the elements. /// The input array. + /// /// 'U[] - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val choose: chooser:('T -> 'U option) -> array:'T[] -> 'U[] @@ -1140,10 +1415,13 @@ namespace Microsoft.FSharp.Collections /// /// Performs the operation in parallel using System.Threading.Parallel.For. /// The order in which the given function is applied to elements of the input array is not specified. + /// /// /// The input array. + /// /// 'U[] - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val collect : mapping:('T -> 'U[]) -> array:'T[] -> 'U[] @@ -1152,10 +1430,13 @@ namespace Microsoft.FSharp.Collections /// /// Performs the operation in parallel using System.Threading.Parallel.For. /// The order in which the given function is applied to elements of the input array is not specified. + /// /// /// The input array. + /// /// 'U[] - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val map : mapping:('T -> 'U) -> array:'T[] -> 'U[] @@ -1165,10 +1446,13 @@ namespace Microsoft.FSharp.Collections /// /// Performs the operation in parallel using System.Threading.Parallel.For. /// The order in which the given function is applied to elements of the input array is not specified. + /// /// /// The input array. + /// /// 'U[] - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val mapi: mapping:(int -> 'T -> 'U) -> array:'T[] -> 'U[] @@ -1176,9 +1460,11 @@ namespace Microsoft.FSharp.Collections /// /// Performs the operation in parallel using System.Threading.Parallel.For. /// The order in which the given function is applied to elements of the input array is not specified. + /// /// /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val iter : action:('T -> unit) -> array:'T[] -> unit @@ -1187,9 +1473,11 @@ namespace Microsoft.FSharp.Collections /// /// Performs the operation in parallel using System.Threading.Parallel.For. /// The order in which the given function is applied to elements of the input array is not specified. + /// /// /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val iteri: action:(int -> 'T -> unit) -> array:'T[] -> unit @@ -1197,8 +1485,10 @@ namespace Microsoft.FSharp.Collections /// /// Performs the operation in parallel using System.Threading.Parallel.For. /// The order in which the given function is applied to indices is not specified. + /// /// /// + /// /// 'T[] [] val init : count:int -> initializer:(int -> 'T) -> 'T[] @@ -1209,9 +1499,12 @@ namespace Microsoft.FSharp.Collections /// /// Performs the operation in parallel using System.Threading.Parallel.For. /// The order in which the given function is applied to indices is not specified. + /// /// The function to test the input elements. /// The input array. + /// /// 'T[] * 'T[] - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val partition : predicate:('T -> bool) -> array:'T[] -> 'T[] * 'T[] diff --git a/src/fsharp/FSharp.Core/array2.fsi b/src/fsharp/FSharp.Core/array2.fsi index 86a3d5be5c4..f21e7930d93 100644 --- a/src/fsharp/FSharp.Core/array2.fsi +++ b/src/fsharp/FSharp.Core/array2.fsi @@ -58,7 +58,7 @@ namespace Microsoft.FSharp.Collections /// The second-dimension index to begin copying into in the target array. /// The number of elements to copy across the first dimension of the arrays. /// The number of elements to copy across the second dimension of the arrays. - /// Thrown when any of the indices are negative or if either of + /// Thrown when any of the indices are negative or if either of /// the counts are larger than the dimensions of the array allow. [] val blit: source:'T[,] -> sourceIndex1:int -> sourceIndex2:int -> target:'T[,] -> targetIndex1:int -> targetIndex2:int -> length1:int -> length2:int -> unit @@ -70,7 +70,7 @@ namespace Microsoft.FSharp.Collections /// A function to produce elements of the array given the two indices. /// /// The generated array. - /// Thrown when either of the lengths is negative. + /// Thrown when either of the lengths is negative. [] val init: length1:int -> length2:int -> initializer:(int -> int -> 'T) -> 'T[,] @@ -81,7 +81,7 @@ namespace Microsoft.FSharp.Collections /// The value to populate the new array. /// /// The created array. - /// Thrown when length1 or length2 is negative. + /// Thrown when length1 or length2 is negative. [] val create: length1:int -> length2:int -> value:'T -> 'T[,] @@ -91,7 +91,7 @@ namespace Microsoft.FSharp.Collections /// The length of the second dimension of the array. /// /// The created array. - /// Thrown when length1 or length2 is negative. + /// Thrown when length1 or length2 is negative. [] val zeroCreate : length1:int -> length2:int -> 'T[,] @@ -104,7 +104,7 @@ namespace Microsoft.FSharp.Collections /// A function to produce elements of the array given the two indices. /// /// The created array. - /// Thrown when base1, base2, length1, or length2 is negative. + /// Thrown when base1, base2, length1, or length2 is negative. [] val initBased: base1:int -> base2:int -> length1:int -> length2:int -> initializer:(int -> int -> 'T) -> 'T[,] @@ -117,7 +117,7 @@ namespace Microsoft.FSharp.Collections /// The value to populate the new array. /// /// The created array. - /// Thrown when base1, base2, length1, or length2 is negative. + /// Thrown when base1, base2, length1, or length2 is negative. [] val createBased: base1:int -> base2:int -> length1:int -> length2:int -> initial: 'T -> 'T[,] @@ -129,7 +129,7 @@ namespace Microsoft.FSharp.Collections /// The length of the second dimension of the array. /// /// The created array. - /// Thrown when base1, base2, length1, or length2 is negative. + /// Thrown when base1, base2, length1, or length2 is negative. [] val zeroCreateBased : base1:int -> base2:int -> length1:int -> length2:int -> 'T[,] @@ -209,7 +209,7 @@ namespace Microsoft.FSharp.Collections /// The index along the first dimension. /// The index along the second dimension. /// The value to set in the array. - /// Thrown when the indices are negative or exceed the bounds of the array. + /// Thrown when the indices are negative or exceed the bounds of the array. [] val set: array:'T[,] -> index1:int -> index2:int -> value:'T -> unit @@ -220,7 +220,7 @@ namespace Microsoft.FSharp.Collections /// The index along the second dimension. /// /// The value of the array at the given index. - /// Thrown when the indices are negative or exceed the bounds of the array. + /// Thrown when the indices are negative or exceed the bounds of the array. [] val get: array:'T[,] -> index1:int -> index2:int -> 'T diff --git a/src/fsharp/FSharp.Core/array3.fsi b/src/fsharp/FSharp.Core/array3.fsi index e5372c9084d..cc295522d44 100644 --- a/src/fsharp/FSharp.Core/array3.fsi +++ b/src/fsharp/FSharp.Core/array3.fsi @@ -17,29 +17,35 @@ namespace Microsoft.FSharp.Collections /// The length of the second dimension. /// The length of the third dimension. /// The value of the array elements. + /// /// The created array. [] val create: length1:int -> length2:int -> length3:int -> initial:'T -> 'T[,,] /// Creates an array given the dimensions and a generator function to compute the elements. + /// /// The length of the first dimension. /// The length of the second dimension. /// The length of the third dimension. /// The function to create an initial value at each index into the array. + /// /// The created array. [] val init: length1:int -> length2:int -> length3:int -> initializer:(int -> int -> int -> 'T) -> 'T[,,] /// Fetches an element from a 3D array. You can also use the syntax 'array.[index1,index2,index3]' + /// /// The input array. /// The index along the first dimension. /// The index along the second dimension. /// The index along the third dimension. + /// /// The value at the given index. [] val get: array:'T[,,] -> index1:int -> index2:int -> index3:int -> 'T /// Applies the given function to each element of the array. + /// /// The function to apply to each element of the array. /// The input array. [] @@ -47,25 +53,32 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to each element of the array. The integer indices passed to the /// function indicates the index of element. + /// /// The function to apply to each element of the array. /// The input array. [] val iteri: action:(int -> int -> int -> 'T -> unit) -> array:'T[,,] -> unit /// Returns the length of an array in the first dimension + /// /// The input array. + /// /// The length of the array in the first dimension. [] val length1: array:'T[,,] -> int /// Returns the length of an array in the second dimension. + /// /// The input array. + /// /// The length of the array in the second dimension. [] val length2: array:'T[,,] -> int /// Returns the length of an array in the third dimension. + /// /// The input array. + /// /// The length of the array in the third dimension. [] val length3: array:'T[,,] -> int @@ -77,6 +90,7 @@ namespace Microsoft.FSharp.Collections /// array. /// The function to transform each element of the array. /// The input array. + /// /// The array created from the transformed elements. [] val map: mapping:('T -> 'U) -> array:'T[,,] -> 'U[,,] @@ -89,12 +103,14 @@ namespace Microsoft.FSharp.Collections /// array. /// The function to transform the elements at each index in the array. /// The input array. + /// /// The array created from the transformed elements. [] val mapi: mapping:(int -> int -> int -> 'T -> 'U) -> array:'T[,,] -> 'U[,,] /// Sets the value of an element in an array. You can also /// use the syntax 'array.[index1,index2,index3] <- value'. + /// /// The input array. /// The index along the first dimension. /// The index along the second dimension. @@ -104,9 +120,11 @@ namespace Microsoft.FSharp.Collections val set: array:'T[,,] -> index1:int -> index2:int -> index3:int -> value:'T -> unit /// Creates an array where the entries are initially the "default" value. + /// /// The length of the first dimension. /// The length of the second dimension. /// The length of the third dimension. + /// /// The created array. [] val zeroCreate: length1:int -> length2:int -> length3:int -> 'T[,,] @@ -119,70 +137,87 @@ namespace Microsoft.FSharp.Collections module Array4D = /// Creates an array whose elements are all initially the given value + /// /// The length of the first dimension. /// The length of the second dimension. /// The length of the third dimension. /// The length of the fourth dimension. /// The initial value for each element of the array. + /// /// The created array. [] val create: length1:int -> length2:int -> length3:int -> length4:int -> initial:'T -> 'T[,,,] /// Creates an array given the dimensions and a generator function to compute the elements. + /// /// The length of the first dimension. /// The length of the second dimension. /// The length of the third dimension. /// The length of the fourth dimension. /// The function to create an initial value at each index in the array. + /// /// The created array. [] val init: length1:int -> length2:int -> length3:int -> length4:int -> initializer:(int -> int -> int -> int -> 'T) -> 'T[,,,] /// Returns the length of an array in the first dimension + /// /// The input array. + /// /// The length of the array in the first dimension. [] val length1: array:'T[,,,] -> int /// Returns the length of an array in the second dimension. + /// /// The input array. + /// /// The length of the array in the second dimension. [] val length2: array:'T[,,,] -> int /// Returns the length of an array in the third dimension. + /// /// The input array. + /// /// The length of the array in the third dimension. [] val length3: array:'T[,,,] -> int /// Returns the length of an array in the fourth dimension. + /// /// The input array. + /// /// The length of the array in the fourth dimension. [] val length4: array:'T[,,,] -> int /// Creates an array where the entries are initially the "default" value. + /// /// The length of the first dimension. /// The length of the second dimension. /// The length of the third dimension. /// The length of the fourth dimension. + /// /// The created array. [] val zeroCreate: length1:int -> length2:int -> length3:int -> length4:int -> 'T[,,,] /// Fetches an element from a 4D array. You can also use the syntax 'array.[index1,index2,index3,index4]' + /// /// The input array. /// The index along the first dimension. /// The index along the second dimension. /// The index along the third dimension. /// The index along the fourth dimension. + /// /// The value at the given index. [] val get: array:'T[,,,] -> index1:int -> index2:int -> index3:int -> index4:int -> 'T /// Sets the value of an element in an array. You can also /// use the syntax 'array.[index1,index2,index3,index4] <- value'. + /// /// The input array. /// The index along the first dimension. /// The index along the second dimension. diff --git a/src/fsharp/FSharp.Core/async.fsi b/src/fsharp/FSharp.Core/async.fsi index 72502b9d26e..594d90144f1 100644 --- a/src/fsharp/FSharp.Core/async.fsi +++ b/src/fsharp/FSharp.Core/async.fsi @@ -43,47 +43,56 @@ namespace Microsoft.FSharp.Control /// /// The timeout parameter is given in milliseconds. A value of -1 is equivalent to /// System.Threading.Timeout.Infinite. + /// /// The computation to run. /// The amount of time in milliseconds to wait for the result of the - /// computation before raising a System.TimeoutException. If no value is provided + /// computation before raising a . If no value is provided /// for timeout then a default of -1 is used to correspond to System.Threading.Timeout.Infinite. /// If a cancellable cancellationToken is provided, timeout parameter will be ignored /// The cancellation token to be associated with the computation. /// If one is not supplied, the default cancellation token is used. + /// /// The result of the computation. static member RunSynchronously : computation:Async<'T> * ?timeout : int * ?cancellationToken:CancellationToken-> 'T /// Starts the asynchronous computation in the thread pool. Do not await its result. /// /// If no cancellation token is provided then the default cancellation token is used. + /// /// The computation to run asynchronously. /// The cancellation token to be associated with the computation. /// If one is not supplied, the default cancellation token is used. static member Start : computation:Async * ?cancellationToken:CancellationToken -> unit /// Executes a computation in the thread pool. + /// /// If no cancellation token is provided then the default cancellation token is used. - /// A System.Threading.Tasks.Task that will be completed + /// + /// A that will be completed /// in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled) /// static member StartAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions * ?cancellationToken:CancellationToken -> Task<'T> - /// Creates an asynchronous computation which starts the given computation as a System.Threading.Tasks.Task + /// Creates an asynchronous computation which starts the given computation as a static member StartChildAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions -> Async> /// Creates an asynchronous computation that executes computation. /// If this computation completes successfully then return Choice1Of2 with the returned /// value. If this computation raises an exception before it completes then return Choice2Of2 /// with the raised exception. + /// /// The input computation that returns the type T. + /// /// A computation that returns a choice of type T or exception. static member Catch : computation:Async<'T> -> Async> /// Creates an asynchronous computation that executes computation. /// If this computation is cancelled before it completes then the computation generated by /// running compensation is executed. + /// /// The input asynchronous computation. /// The function to be run if the computation is cancelled. + /// /// An asynchronous computation that runs the compensation if the input computation /// is cancelled. static member TryCancelled : computation:Async<'T> * compensation:(OperationCanceledException -> unit) -> Async<'T> @@ -97,16 +106,20 @@ namespace Microsoft.FSharp.Control /// interruption is executed on the thread that is performing the cancellation. This can /// be used to arrange for a computation to be asynchronously notified that a cancellation /// has occurred, e.g. by setting a flag, or deregistering a pending I/O action. + /// /// The function that is executed on the thread performing the /// cancellation. + /// /// An asynchronous computation that triggers the interruption if it is cancelled /// before being disposed. static member OnCancel : interruption: (unit -> unit) -> Async /// Creates an asynchronous computation that returns the CancellationToken governing the execution /// of the computation. + /// /// In async { let! token = Async.CancellationToken ...} token can be used to initiate other /// asynchronous operations that will cancel cooperatively with this workflow. + /// /// An asynchronous computation capable of retrieving the CancellationToken from a computation /// expression. static member CancellationToken : Async @@ -118,6 +131,7 @@ namespace Microsoft.FSharp.Control static member CancelDefaultToken : unit -> unit /// Gets the default cancellation token for executing asynchronous computations. + /// /// The default CancellationToken. static member DefaultCancellationToken : CancellationToken @@ -128,7 +142,7 @@ namespace Microsoft.FSharp.Control /// /// This method should normally be used as the immediate /// right-hand-side of a let! binding in an F# asynchronous workflow, that is, - /// + /// /// async { ... /// let! completor1 = childComputation1 |> Async.StartChild /// let! completor2 = childComputation2 |> Async.StartChild @@ -136,13 +150,16 @@ namespace Microsoft.FSharp.Control /// let! result1 = completor1 /// let! result2 = completor2 /// ... } + /// /// /// When used in this way, each use of StartChild starts an instance of childComputation /// and returns a completor object representing a computation to wait for the completion of the operation. /// When executed, the completor awaits the completion of childComputation. + /// /// The child computation. /// The timeout value in milliseconds. If one is not provided - /// then the default value of -1 corresponding to System.Threading.Timeout.Infinite. + /// then the default value of -1 corresponding to . + /// /// A new computation that waits for the input computation to finish. static member StartChild : computation:Async<'T> * ?millisecondsTimeout : int -> Async> @@ -157,7 +174,9 @@ namespace Microsoft.FSharp.Control /// The overall computation will respond to cancellation while executing the child computations. /// If cancelled, the computation will cancel any remaining child computations but will still wait /// for the other child computations to complete. + /// /// A sequence of distinct computations to be parallelized. + /// /// A computation that returns an array of values from the sequence of input computations. static member Parallel : computations:seq> -> Async<'T[]> @@ -172,7 +191,9 @@ namespace Microsoft.FSharp.Control /// The overall computation will respond to cancellation while executing the child computations. /// If cancelled, the computation will cancel any remaining child computations but will still wait /// for the other child computations to complete. + /// /// A sequence of distinct computations to be parallelized. + /// /// A computation that returns an array of values from the sequence of input computations. static member Parallel : computations:seq> * ?maxDegreeOfParallelism : int -> Async<'T[]> @@ -186,7 +207,9 @@ namespace Microsoft.FSharp.Control /// The overall computation will respond to cancellation while executing the child computations. /// If cancelled, the computation will cancel any remaining child computations but will still wait /// for the other child computations to complete. + /// /// A sequence of distinct computations to be run in sequence. + /// /// A computation that returns an array of values from the sequence of input computations. static member Sequential : computations:seq> -> Async<'T[]> @@ -201,7 +224,9 @@ namespace Microsoft.FSharp.Control /// The overall computation will respond to cancellation while executing the child computations. /// If cancelled, the computation will cancel any remaining child computations but will still wait /// for the other child computations to complete. + /// /// A sequence of computations to be parallelized. + /// /// A computation that returns the first succeeding computation. static member Choice : computations:seq> -> Async<'T option> @@ -209,26 +234,32 @@ namespace Microsoft.FSharp.Control /// Creates an asynchronous computation that creates a new thread and runs /// its continuation in that thread. + /// /// A computation that will execute on a new thread. static member SwitchToNewThread : unit -> Async /// Creates an asynchronous computation that queues a work item that runs /// its continuation. + /// /// A computation that generates a new work item in the thread pool. static member SwitchToThreadPool : unit -> Async /// Creates an asynchronous computation that runs /// its continuation using syncContext.Post. If syncContext is null /// then the asynchronous computation is equivalent to SwitchToThreadPool(). + /// /// The synchronization context to accept the posted computation. + /// /// An asynchronous computation that uses the syncContext context to execute. static member SwitchToContext : syncContext:System.Threading.SynchronizationContext -> Async /// Creates an asynchronous computation that captures the current /// success, exception and cancellation continuations. The callback must /// eventually call exactly one of the given continuations. + /// /// The function that accepts the current success, exception, and cancellation /// continuations. + /// /// An asynchronous computation that provides the callback with the current continuations. static member FromContinuations : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T> @@ -242,101 +273,115 @@ namespace Microsoft.FSharp.Control /// /// If cancelAction is not specified, then cancellation causes the computation /// to cancel immediately. + /// /// The event to handle once. /// An optional function to execute instead of cancelling when a /// cancellation is issued. + /// /// An asynchronous computation that waits for the event to be invoked. static member AwaitEvent: event:IEvent<'Del,'T> * ?cancelAction : (unit -> unit) -> Async<'T> when 'Del : delegate<'T,unit> and 'Del :> System.Delegate /// Creates an asynchronous computation that will wait on the given WaitHandle. /// /// The computation returns true if the handle indicated a result within the given timeout. + /// /// The WaitHandle that can be signalled. /// The timeout value in milliseconds. If one is not provided - /// then the default value of -1 corresponding to System.Threading.Timeout.Infinite. + /// then the default value of -1 corresponding to . + /// /// An asynchronous computation that waits on the given WaitHandle. static member AwaitWaitHandle: waitHandle: WaitHandle * ?millisecondsTimeout:int -> Async /// Creates an asynchronous computation that will wait on the IAsyncResult. /// /// The computation returns true if the handle indicated a result within the given timeout. + /// /// The IAsyncResult to wait on. /// The timeout value in milliseconds. If one is not provided - /// then the default value of -1 corresponding to System.Threading.Timeout.Infinite. + /// then the default value of -1 corresponding to . + /// /// An asynchronous computation that waits on the given IAsyncResult. static member AwaitIAsyncResult: iar: System.IAsyncResult * ?millisecondsTimeout:int -> Async /// Return an asynchronous computation that will wait for the given task to complete and return /// its result. static member AwaitTask: task: Task<'T> -> Async<'T> + /// Return an asynchronous computation that will wait for the given task to complete and return /// its result. static member AwaitTask: task: Task -> Async - /// Creates an asynchronous computation that will sleep for the given time. This is scheduled - /// using a System.Threading.Timer object. The operation will not block operating system threads - /// for the duration of the wait. + /// + /// Creates an asynchronous computation that will sleep for the given time. This is scheduled + /// using a System.Threading.Timer object. The operation will not block operating system threads + /// for the duration of the wait. + /// + /// /// The number of milliseconds to sleep. + /// /// An asynchronous computation that will sleep for the given time. - /// Thrown when the due time is negative + /// + /// Thrown when the due time is negative /// and not infinite. static member Sleep: millisecondsDueTime:int -> Async - /// Creates an asynchronous computation that will sleep for the given time. This is scheduled - /// using a System.Threading.Timer object. The operation will not block operating system threads - /// for the duration of the wait. + /// + /// Creates an asynchronous computation that will sleep for the given time. This is scheduled + /// using a System.Threading.Timer object. The operation will not block operating system threads + /// for the duration of the wait. + /// + /// /// The amount of time to sleep. + /// /// An asynchronous computation that will sleep for the given time. - /// Thrown when the due time is negative. + /// + /// Thrown when the due time is negative. static member Sleep: dueTime:TimeSpan -> Async - /// Creates an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in CLI APIs. For example, - /// Async.FromBeginEnd(ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, beginFunc is executed, with - /// a callback which represents the continuation of the computation. - /// When the callback is invoked, the overall result is fetched using endFunc. + /// + /// Creates an asynchronous computation in terms of a Begin/End pair of actions in + /// the style used in CLI APIs. + /// /// - /// The computation will respond to cancellation while waiting for the completion + /// + /// The computation will respond to cancellation while waiting for the completion /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is /// executed, and the computation continues to wait for the completion of the operation. /// /// If cancelAction is not specified, then cancellation causes the computation /// to stop immediately, and subsequent invocations of the callback are ignored. + /// /// The function initiating a traditional CLI asynchronous operation. /// The function completing a traditional CLI asynchronous operation. /// An optional function to be executed when a cancellation is requested. + /// /// An asynchronous computation wrapping the given Begin/End functions. static member FromBeginEnd : beginAction:(System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> - /// Creates an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in CLI APIs. This overload should be used if the operation is - /// qualified by one argument. For example, - /// Async.FromBeginEnd(place,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, beginFunc is executed, with - /// a callback which represents the continuation of the computation. - /// When the callback is invoked, the overall result is fetched using endFunc. + /// + /// Creates an asynchronous computation in terms of a Begin/End pair of actions in + /// the style used in .NET 2.0 APIs. + /// /// /// The computation will respond to cancellation while waiting for the completion /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is /// executed, and the computation continues to wait for the completion of the operation. - /// - /// If cancelAction is not specified, then cancellation causes the computation - /// to stop immediately, and subsequent invocations of the callback are ignored. + /// + /// If cancelAction is not specified, then cancellation causes the computation + /// to stop immediately, and subsequent invocations of the callback are ignored. + /// + /// /// The argument for the operation. /// The function initiating a traditional CLI asynchronous operation. /// The function completing a traditional CLI asynchronous operation. /// An optional function to be executed when a cancellation is requested. + /// /// An asynchronous computation wrapping the given Begin/End functions. static member FromBeginEnd : arg:'Arg1 * beginAction:('Arg1 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> - /// Creates an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in CLI APIs. This overload should be used if the operation is - /// qualified by two arguments. For example, - /// Async.FromBeginEnd(arg1,arg2,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, beginFunc is executed, with - /// a callback which represents the continuation of the computation. - /// When the callback is invoked, the overall result is fetched using endFunc. + /// + /// Creates an asynchronous computation in terms of a Begin/End pair of actions in + /// the style used in .NET 2.0 APIs. /// /// The computation will respond to cancellation while waiting for the completion /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is @@ -344,21 +389,18 @@ namespace Microsoft.FSharp.Control /// /// If cancelAction is not specified, then cancellation causes the computation /// to stop immediately, and subsequent invocations of the callback are ignored. + /// /// The first argument for the operation. /// The second argument for the operation. /// The function initiating a traditional CLI asynchronous operation. /// The function completing a traditional CLI asynchronous operation. /// An optional function to be executed when a cancellation is requested. + /// /// An asynchronous computation wrapping the given Begin/End functions. static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * beginAction:('Arg1 * 'Arg2 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> /// Creates an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in CLI APIs. This overload should be used if the operation is - /// qualified by three arguments. For example, - /// Async.FromBeginEnd(arg1,arg2,arg3,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, beginFunc is executed, with - /// a callback which represents the continuation of the computation. - /// When the callback is invoked, the overall result is fetched using endFunc. + /// the style used in .NET 2.0 APIs. /// /// The computation will respond to cancellation while waiting for the completion /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is @@ -366,48 +408,23 @@ namespace Microsoft.FSharp.Control /// /// If cancelAction is not specified, then cancellation causes the computation /// to stop immediately, and subsequent invocations of the callback are ignored. + /// /// The first argument for the operation. /// The second argument for the operation. /// The third argument for the operation. /// The function initiating a traditional CLI asynchronous operation. /// The function completing a traditional CLI asynchronous operation. /// An optional function to be executed when a cancellation is requested. + /// /// An asynchronous computation wrapping the given Begin/End functions. static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * arg3:'Arg3 * beginAction:('Arg1 * 'Arg2 * 'Arg3 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> - /// Creates three functions that can be used to implement the .NET Asynchronous + /// Creates three functions that can be used to implement the .NET 1.0 Asynchronous /// Programming Model (APM) for a given asynchronous computation. - /// - /// The functions should normally be published as members with prefix Begin, - /// End and Cancel, and can be used within a type definition as follows: - /// - /// let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun arg -> computation) - /// member x.BeginSomeOperation(arg,callback,state:obj) = beginAction(arg,callback,state) - /// member x.EndSomeOperation(iar) = endAction(iar) - /// member x.CancelSomeOperation(iar) = cancelAction(iar) - /// - /// - /// If the asynchronous computation takes no arguments, then AsBeginEnd is used as follows: - /// - /// let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun () -> computation) - /// member x.BeginSomeOperation(callback,state:obj) = beginAction((),callback,state) - /// member x.EndSomeOperation(iar) = endAction(iar) - /// member x.CancelSomeOperation(iar) = cancelAction(iar) - /// - /// - /// - /// If the asynchronous computation takes two arguments, then AsBeginEnd is used as follows: - /// - /// let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun arg1 arg2 -> computation) - /// member x.BeginSomeOperation(arg1,arg2,callback,state:obj) = beginAction((),callback,state) - /// member x.EndSomeOperation(iar) = endAction(iar) - /// member x.CancelSomeOperation(iar) = cancelAction(iar) - /// - /// - /// In each case, the resulting API will be familiar to programmers in other CLI languages and - /// is a useful way to publish asynchronous computations in CLI components. + /// /// A function generating the asynchronous computation to split into the traditional /// .NET Asynchronous Programming Model. + /// /// A tuple of the begin, end, and cancel members. static member AsBeginEnd : computation:('Arg -> Async<'T>) -> // The 'Begin' member @@ -419,14 +436,18 @@ namespace Microsoft.FSharp.Control /// Creates an asynchronous computation that runs the given computation and ignores /// its result. + /// /// The input computation. + /// /// A computation that is equivalent to the input computation, but disregards the result. static member Ignore : computation: Async<'T> -> Async /// Runs an asynchronous computation, starting immediately on the current operating system /// thread. Call one of the three continuations when the operation completes. + /// /// If no cancellation token is provided then the default cancellation token /// is used. + /// /// The asynchronous computation to execute. /// The function called on success. /// The function called on exception. @@ -445,7 +466,9 @@ namespace Microsoft.FSharp.Control /// Runs an asynchronous computation, starting immediately on the current operating system /// thread. + /// /// If no cancellation token is provided then the default cancellation token is used. + /// /// The asynchronous computation to execute. /// The CancellationToken to associate with the computation. /// The default is used if this parameter is not provided. @@ -453,16 +476,19 @@ namespace Microsoft.FSharp.Control computation:Async * ?cancellationToken:CancellationToken-> unit /// Runs an asynchronous computation, starting immediately on the current operating system - /// thread, but also returns the execution as System.Threading.Tasks.Task + /// thread, but also returns the execution as /// + /// /// If no cancellation token is provided then the default cancellation token is used. /// You may prefer using this method if you want to achive a similar behviour to async await in C# as /// async computation starts on the current thread with an ability to return a result. /// + /// /// The asynchronous computation to execute. /// The CancellationToken to associate with the computation. /// The default is used if this parameter is not provided. - /// A System.Threading.Tasks.Task that will be completed + /// + /// A that will be completed /// in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled) static member StartImmediateAsTask: computation:Async<'T> * ?cancellationToken:CancellationToken-> Task<'T> @@ -586,9 +612,11 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of for in the /// async { ... } computation expression syntax. + /// /// The sequence to enumerate. /// A function to take an item from the sequence and create /// an asynchronous computation. Can be seen as the body of the for expression. + /// /// An asynchronous computation that will enumerate the sequence and run body /// for each element. member For: sequence:seq<'T> * body:('T -> Async) -> Async @@ -609,8 +637,10 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of expression sequencing in the /// async { ... } computation expression syntax. + /// /// The first part of the sequenced computation. /// The second part of the sequenced computation. + /// /// An asynchronous computation that runs both of the computations sequentially. member inline Combine : computation1:Async * computation2:Async<'T> -> Async<'T> @@ -621,9 +651,11 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of while in the /// async { ... } computation expression syntax. + /// /// The function to determine when to stop executing computation. /// The function to be executed. Equivalent to the body /// of a while expression. + /// /// An asynchronous computation that behaves similarly to a while loop when run. member While : guard:(unit -> bool) * computation:Async -> Async @@ -633,7 +665,9 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of return in the /// async { ... } computation expression syntax. + /// /// The value to return from the computation. + /// /// An asynchronous computation that returns value when executed. member inline Return : value:'T -> Async<'T> @@ -641,14 +675,18 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of return! in the /// async { ... } computation expression syntax. + /// /// The input computation. + /// /// The input computation. member inline ReturnFrom : computation:Async<'T> -> Async<'T> /// Creates an asynchronous computation that runs generator. /// /// A cancellation check is performed when the computation is executed. + /// /// The function to run. + /// /// An asynchronous computation that runs generator. member Delay : generator:(unit -> Async<'T>) -> Async<'T> @@ -660,9 +698,11 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of use and use! in the /// async { ... } computation expression syntax. + /// /// The resource to be used and disposed. /// The function that takes the resource and returns an asynchronous /// computation. + /// /// An asynchronous computation that binds and eventually disposes resource. member Using: resource:'T * binder:('T -> Async<'U>) -> Async<'U> when 'T :> System.IDisposable @@ -673,8 +713,10 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of let! in the /// async { ... } computation expression syntax. + /// /// The computation to provide an unbound result. /// The function to bind the result of computation. + /// /// An asynchronous computation that performs a monadic bind on the result /// of computation. member inline Bind: computation: Async<'T> * binder: ('T -> Async<'U>) -> Async<'U> @@ -687,9 +729,11 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of try/finally in the /// async { ... } computation expression syntax. + /// /// The input computation. /// The action to be run after computation completes or raises an /// exception (including cancellation). + /// /// An asynchronous computation that executes computation and compensation afterwards or /// when an exception is raised. member inline TryFinally : computation:Async<'T> * compensation:(unit -> unit) -> Async<'T> @@ -704,6 +748,7 @@ namespace Microsoft.FSharp.Control /// /// The input computation. /// The function to run when computation throws an exception. + /// /// An asynchronous computation that executes computation and calls catchHandler if an /// exception is thrown. member inline TryWith : computation:Async<'T> * catchHandler:(exn -> Async<'T>) -> Async<'T> @@ -726,27 +771,32 @@ namespace Microsoft.FSharp.Control /// The buffer to read into. /// An optional offset as a number of bytes in the stream. /// An optional number of bytes to read from the stream. + /// /// An asynchronous computation that will read from the stream into the given buffer. - /// Thrown when the sum of offset and count is longer than + /// Thrown when the sum of offset and count is longer than /// the buffer length. - /// Thrown when offset or count is negative. + /// Thrown when offset or count is negative. [] // give the extension member a nice, unmangled compiled name, unique within this module member AsyncRead : buffer:byte[] * ?offset:int * ?count:int -> Async /// Returns an asynchronous computation that will read the given number of bytes from the stream. + /// /// The number of bytes to read. + /// /// An asynchronous computation that returns the read byte[] when run. [] // give the extension member a nice, unmangled compiled name, unique within this module member AsyncRead : count:int -> Async /// Returns an asynchronous computation that will write the given bytes to the stream. + /// /// The buffer to write from. /// An optional offset as a number of bytes in the stream. /// An optional number of bytes to write to the stream. + /// /// An asynchronous computation that will write the given bytes to the stream. - /// Thrown when the sum of offset and count is longer than + /// Thrown when the sum of offset and count is longer than /// the buffer length. - /// Thrown when offset or count is negative. + /// Thrown when offset or count is negative. [] // give the extension member a nice, unmangled compiled name, unique within this module member AsyncWrite : buffer:byte[] * ?offset:int * ?count:int -> Async @@ -755,6 +805,7 @@ namespace Microsoft.FSharp.Control type IObservable<'T> with /// Permanently connects a listener function to the observable. The listener will /// be invoked for each observation. + /// /// The function to be called for each observation. [] // give the extension member a nice, unmangled compiled name, unique within this module member Add: callback:('T -> unit) -> unit @@ -762,7 +813,9 @@ namespace Microsoft.FSharp.Control /// Connects a listener function to the observable. The listener will /// be invoked for each observation. The listener can be removed by /// calling Dispose on the returned IDisposable object. + /// /// The function to be called for each observation. + /// /// An object that will remove the listener if disposed. [] // give the extension member a nice, unmangled compiled name, unique within this module member Subscribe: callback:('T -> unit) -> System.IDisposable @@ -780,20 +833,26 @@ namespace Microsoft.FSharp.Control type System.Net.WebClient with /// Returns an asynchronous computation that, when run, will wait for the download of the given URI. + /// /// The URI to retrieve. + /// /// An asynchronous computation that will wait for the download of the URI. [] // give the extension member a nice, unmangled compiled name, unique within this module member AsyncDownloadString : address:System.Uri -> Async /// Returns an asynchronous computation that, when run, will wait for the download of the given URI. + /// /// The URI to retrieve. + /// /// An asynchronous computation that will wait for the download of the URI. [] // give the extension member a nice, unmangled compiled name, unique within this module member AsyncDownloadData : address:System.Uri -> Async /// Returns an asynchronous computation that, when run, will wait for the download of the given URI to specified file. + /// /// The URI to retrieve. /// The filename to save download to. + /// /// An asynchronous computation that will wait for the download of the URI to specified file. [] // give the extension member a nice, unmangled compiled name, unique within this module member AsyncDownloadFile : address:System.Uri * fileName: string -> Async diff --git a/src/fsharp/FSharp.Core/collections.fsi b/src/fsharp/FSharp.Core/collections.fsi index ad7f4363d1b..8e3eab67a38 100644 --- a/src/fsharp/FSharp.Core/collections.fsi +++ b/src/fsharp/FSharp.Core/collections.fsi @@ -20,6 +20,7 @@ namespace Microsoft.FSharp.Collections /// Compare using the given comparer function. /// A function to compare two values. + /// /// An object implementing IComparer using the supplied comparer. val FromFunction : comparer:('T -> 'T -> int) -> IComparer<'T> @@ -42,8 +43,10 @@ namespace Microsoft.FSharp.Collections val Reference<'T> : IEqualityComparer<'T> when 'T : not struct /// Hash using the given hashing and equality functions. + /// /// A function to generate a hash code from a value. /// A function to test equality of two values. + /// /// An object implementing IEqualityComparer using the supplied functions. // inline justification: allows inlining of hash functions diff --git a/src/fsharp/FSharp.Core/event.fsi b/src/fsharp/FSharp.Core/event.fsi index 23bc85ceea6..dfc76ab434d 100644 --- a/src/fsharp/FSharp.Core/event.fsi +++ b/src/fsharp/FSharp.Core/event.fsi @@ -27,6 +27,7 @@ namespace Microsoft.FSharp.Control /// The created event. new : unit -> Event<'Delegate,'Args> /// Triggers the event using the given sender object and parameters. The sender object may be null. + /// /// The object triggering the event. /// The parameters for the event. member Trigger : sender:obj * args:'Args -> unit @@ -41,6 +42,7 @@ namespace Microsoft.FSharp.Control /// The created event. new : unit -> Event<'T> /// Triggers an observation using the given parameters. + /// /// The event parameters. member Trigger : arg:'T -> unit /// Publishes an observation as a first class value. diff --git a/src/fsharp/FSharp.Core/eventmodule.fsi b/src/fsharp/FSharp.Core/eventmodule.fsi index c3f5f3cc9fb..54a0c4057c8 100644 --- a/src/fsharp/FSharp.Core/eventmodule.fsi +++ b/src/fsharp/FSharp.Core/eventmodule.fsi @@ -12,21 +12,26 @@ namespace Microsoft.FSharp.Control /// Fires the output event when either of the input events fire. /// The first input event. /// The second input event. + /// /// An event that fires when either of the input events fire. [] val merge: event1:IEvent<'Del1,'T> -> event2:IEvent<'Del2,'T> -> IEvent<'T> /// Returns a new event that passes values transformed by the given function. + /// /// The function to transform event values. /// The input event. + /// /// An event that passes the transformed values. [] val map: mapping:('T -> 'U) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> /// Returns a new event that listens to the original event and triggers the resulting /// event only when the argument to the event passes the given function. + /// /// The function to determine which triggers from the event to propagate. /// The input event. + /// /// An event that only passes values that pass the predicate. [] val filter: predicate:('T -> bool) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'T> @@ -34,8 +39,10 @@ namespace Microsoft.FSharp.Control /// Returns a new event that listens to the original event and triggers the /// first resulting event if the application of the predicate to the event arguments /// returned true, and the second event if it returned false. + /// /// The function to determine which output event to trigger. /// The input event. + /// /// A tuple of events. The first is triggered when the predicate evaluates to true /// and the second when the predicate evaluates to false. [] @@ -44,8 +51,10 @@ namespace Microsoft.FSharp.Control /// Returns a new event that listens to the original event and triggers the /// first resulting event if the application of the function to the event arguments /// returned a Choice1Of2, and the second event if it returns a Choice2Of2. + /// /// The function to transform event values into one of two types. /// The input event. + /// /// A tuple of events. The first fires whenever splitter evaluates to Choice1of1 and /// the second fires whenever splitter evaluates to Choice2of2. [] @@ -53,8 +62,10 @@ namespace Microsoft.FSharp.Control /// Returns a new event which fires on a selection of messages from the original event. /// The selection function takes an original message to an optional new message. + /// /// The function to select and transform event values to pass on. /// The input event. + /// /// An event that fires only when the chooser returns Some. [] val choose: chooser:('T -> 'U option) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> @@ -65,13 +76,16 @@ namespace Microsoft.FSharp.Control /// records the current value of the state parameter. The internal state is not locked during the /// execution of the accumulation function, so care should be taken that the /// input IEvent not triggered by multiple threads simultaneously. + /// /// The function to update the state with each event value. /// The initial state. /// The input event. + /// /// An event that fires on the updated state values. val scan: collector:('U -> 'T -> 'U) -> state:'U -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> /// Runs the given function each time the given event is triggered. + /// /// The function to call when the event is triggered. /// The input event. [] @@ -81,7 +95,9 @@ namespace Microsoft.FSharp.Control /// The Nth triggering of the input event passes the arguments from the N-1th and Nth triggering as /// a pair. The argument passed to the N-1th triggering is held in hidden internal state until the /// Nth triggering occurs. + /// /// The input event. + /// /// An event that triggers on pairs of consecutive values passed from the source event. [] val pairwise: sourceEvent:IEvent<'Del,'T> -> IEvent<'T * 'T> diff --git a/src/fsharp/FSharp.Core/fslib-extra-pervasives.fsi b/src/fsharp/FSharp.Core/fslib-extra-pervasives.fsi index 6b43ddef90a..c1ef9149ae5 100644 --- a/src/fsharp/FSharp.Core/fslib-extra-pervasives.fsi +++ b/src/fsharp/FSharp.Core/fslib-extra-pervasives.fsi @@ -4,6 +4,7 @@ namespace Microsoft.FSharp.Core [] +/// A set of extra operators and functions. This module is opened by default when compiling all F# code. module ExtraTopLevelOperators = open System @@ -14,57 +15,74 @@ module ExtraTopLevelOperators = /// Print to stdout using the given format. /// The formatter. + /// /// The formatted result. [] - val printf : format:Printf.TextWriterFormat<'T> -> 'T + val printf: format:Printf.TextWriterFormat<'T> -> 'T /// Print to stdout using the given format, and add a newline. + /// /// The formatter. + /// /// The formatted result. [] - val printfn : format:Printf.TextWriterFormat<'T> -> 'T + val printfn: format:Printf.TextWriterFormat<'T> -> 'T /// Print to stderr using the given format. + /// /// The formatter. + /// /// The formatted result. [] - val eprintf : format:Printf.TextWriterFormat<'T> -> 'T + val eprintf: format:Printf.TextWriterFormat<'T> -> 'T /// Print to stderr using the given format, and add a newline. + /// /// The formatter. + /// /// The formatted result. [] - val eprintfn : format:Printf.TextWriterFormat<'T> -> 'T + val eprintfn: format:Printf.TextWriterFormat<'T> -> 'T /// Print to a string using the given format. + /// /// The formatter. + /// /// The formatted result. [] - val sprintf : format:Printf.StringFormat<'T> -> 'T + val sprintf: format:Printf.StringFormat<'T> -> 'T /// Print to a string buffer and raise an exception with the given - /// result. Helper printers must return strings. + /// result. Helper printers must return strings. + /// /// The formatter. + /// /// The formatted result. [] val failwithf: format:Printf.StringFormat<'T,'Result> -> 'T /// Print to a file using the given format. + /// /// The file TextWriter. /// The formatter. + /// /// The formatted result. [] val fprintf : textWriter:System.IO.TextWriter -> format:Printf.TextWriterFormat<'T> -> 'T /// Print to a file using the given format, and add a newline. + /// /// The file TextWriter. /// The formatter. + /// /// The formatted result. [] val fprintfn : textWriter:System.IO.TextWriter -> format:Printf.TextWriterFormat<'T> -> 'T /// Builds a set from a sequence of objects. The objects are indexed using generic comparison. + /// /// The input sequence of elements. + /// /// The created set. [] val set : elements:seq<'T> -> Set<'T> @@ -285,7 +303,9 @@ namespace Microsoft.FSharp.Core.CompilerServices /// /// Get the static parameters for a provided type. /// + /// /// A type returned by GetTypes or ResolveTypeName + /// /// abstract GetStaticParameters : typeWithoutArguments:Type -> ParameterInfo[] @@ -296,14 +316,17 @@ namespace Microsoft.FSharp.Core.CompilerServices /// the provided type definition which has static parameters /// the full path of the type, including encoded representations of static parameters /// the static parameters, indexed by name + /// /// abstract ApplyStaticArguments : typeWithoutArguments:Type * typePathWithArguments:string[] * staticArguments:obj[] -> Type /// /// Called by the compiler to ask for an Expression tree to replace the given MethodBase with. /// + /// /// MethodBase that was given to the compiler by a type returned by a GetType(s) call. /// Expressions that represent the parameters to this call. + /// /// An expression that the compiler will use in place of the given method base. abstract GetInvokerExpression : syntheticMethodBase:MethodBase * parameters:Expr[] -> Expr @@ -324,7 +347,9 @@ namespace Microsoft.FSharp.Core.CompilerServices /// /// Get the static parameters for a provided method. /// + /// /// A method returned by GetMethod on a provided type + /// /// The static parameters of the provided method, if any abstract GetStaticParametersForMethod : methodWithoutArguments:MethodBase -> ParameterInfo[] @@ -336,6 +361,7 @@ namespace Microsoft.FSharp.Core.CompilerServices /// the provided method definition which has static parameters /// the full name of the method that must be returned, including encoded representations of static parameters /// the values of the static parameters, indexed by name + /// /// The provided method definition corresponding to the given static parameter values abstract ApplyStaticArgumentsForMethod : methodWithoutArguments:MethodBase * methodNameWithArguments:string * staticArguments:obj[] -> MethodBase diff --git a/src/fsharp/FSharp.Core/list.fsi b/src/fsharp/FSharp.Core/list.fsi index 26c5dad94e1..28acfb823c1 100644 --- a/src/fsharp/FSharp.Core/list.fsi +++ b/src/fsharp/FSharp.Core/list.fsi @@ -7,31 +7,37 @@ namespace Microsoft.FSharp.Collections open Microsoft.FSharp.Core open Microsoft.FSharp.Collections - /// Basic operations on lists. + /// Basic operations for values of type . [] [] module List = /// Returns a new list that contains all pairings of elements from the first and second lists. + /// /// The first input list. /// The second input list. + /// /// The resulting list of pairs. [] val allPairs: list1:'T1 list -> list2:'T2 list -> ('T1 * 'T2) list /// Returns a new list that contains the elements of the first list /// followed by elements of the second. + /// /// The first input list. /// The second input list. + /// /// The resulting list. [] val append: list1:'T list -> list2:'T list -> 'T list /// Returns the average of the elements in the list. /// - /// Raises System.ArgumentException if list is empty. + /// Raises if list is empty. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The resulting average. [] val inline average : list:^T list -> ^T @@ -41,10 +47,12 @@ namespace Microsoft.FSharp.Collections /// Returns the average of the elements generated by applying the function to each element of the list. /// - /// Raises System.ArgumentException if list is empty. + /// Raises if list is empty. /// The function to transform the list elements into the type to be averaged. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The resulting average. [] val inline averageBy : projection:('T -> ^U) -> list:'T list -> ^U @@ -55,23 +63,30 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to each element of the list. Returns /// the list comprised of the results x for each element where /// the function returns Some(x) + /// /// The function to generate options from the elements. /// The input list. + /// /// The list comprising the values selected from the chooser function. [] val choose: chooser:('T -> 'U option) -> list:'T list -> 'U list /// Divides the input list into chunks of size at most chunkSize. + /// /// The maximum size of each chunk. /// The input list. + /// /// The list divided into chunks. - /// Thrown when chunkSize is not positive. + /// + /// Thrown when chunkSize is not positive. [] val chunkBySize: chunkSize:int -> list:'T list -> 'T list list /// For each element of the list, applies the given function. Concatenates all the results and return the combined list. + /// /// The function to transform each input element into a sublist to be concatenated. /// The input list. + /// /// The concatenation of the transformed sublists. [] val collect: mapping:('T -> 'U list) -> list:'T list -> 'U list @@ -92,14 +107,18 @@ namespace Microsoft.FSharp.Collections val inline compareWith: comparer:('T -> 'T -> int) -> list1:'T list -> list2:'T list -> int /// Returns a new list that contains the elements of each the lists in order. + /// /// The input sequence of lists. + /// /// The resulting concatenated list. [] val concat: lists:seq<'T list> -> 'T list /// Tests if the list contains the specified element. + /// /// The value to locate in the input list. /// The input list. + /// /// True if the input list contains the specified element; false otherwise. [] val inline contains: value:'T -> source:'T list -> bool when 'T : equality @@ -137,10 +156,13 @@ namespace Microsoft.FSharp.Collections val countBy : projection:('T -> 'Key) -> list:'T list -> ('Key * int) list when 'Key : equality /// Splits the input list into at most count chunks. + /// /// The maximum number of chunks. /// The input list. + /// /// The list split into chunks. - /// Thrown when count is not positive. + /// + /// Thrown when count is not positive. [] val splitInto: count:int -> list:'T list -> 'T list list @@ -158,7 +180,7 @@ namespace Microsoft.FSharp.Collections /// /// A list that contains the distinct elements of list that do not appear in itemsToExclude. /// - /// Thrown when itemsToExclude is null. + /// Thrown when itemsToExclude is null. [] val except: itemsToExclude:seq<'T> -> list:'T list -> 'T list when 'T : equality @@ -168,7 +190,7 @@ namespace Microsoft.FSharp.Collections /// /// The only element of the list. /// - /// Thrown when the input does not have precisely one element. + /// Thrown when the input does not have precisely one element. [] val exactlyOne: list:'T list -> 'T @@ -187,6 +209,7 @@ namespace Microsoft.FSharp.Collections /// Otherwise, false is returned. /// The function to test the input elements. /// The input list. + /// /// True if any element satisfies the predicate. [] val exists: predicate:('T -> bool) -> list:'T list -> bool @@ -196,32 +219,41 @@ namespace Microsoft.FSharp.Collections /// The predicate is applied to matching elements in the two collections up to the lesser of the /// two lengths of the collections. If any application returns true then the overall result is /// true and no further elements are tested. Otherwise, if one collections is longer - /// than the other then the System.ArgumentException exception is raised. + /// than the other then the exception is raised. /// Otherwise, false is returned. + /// /// The function to test the input elements. /// The first input list. /// The second input list. - /// Thrown when the input lists differ in length. + /// + /// Thrown when the input lists differ in length. + /// /// True if any pair of elements satisfy the predicate. [] val exists2: predicate:('T1 -> 'T2 -> bool) -> list1:'T1 list -> list2:'T2 list -> bool /// Returns the first element for which the given function returns True. /// Raises KeyNotFoundException if no such element exists. + /// /// The function to test the input elements. /// The input list. - /// Thrown if the predicate evaluates to false for + /// + /// Thrown if the predicate evaluates to false for /// all the elements of the list. + /// /// The first element that satisfies the predicate. [] val find: predicate:('T -> bool) -> list:'T list -> 'T /// Returns the last element for which the given function returns True. /// Raises KeyNotFoundException if no such element exists. + /// /// The function to test the input elements. /// The input list. - /// Thrown if the predicate evaluates to false for + /// + /// Thrown if the predicate evaluates to false for /// all the elements of the list. + /// /// The last element that satisfies the predicate. [] val findBack: predicate:('T -> bool) -> list:'T list -> 'T @@ -229,10 +261,13 @@ namespace Microsoft.FSharp.Collections /// Returns the index of the first element in the list /// that satisfies the given predicate. /// Raises KeyNotFoundException if no such element exists. + /// /// The function to test the input elements. /// The input list. - /// Thrown if the predicate evaluates to false for all the + /// + /// Thrown if the predicate evaluates to false for all the /// elements of the list. + /// /// The index of the first element that satisfies the predicate. [] val findIndex: predicate:('T -> bool) -> list:'T list -> int @@ -240,18 +275,23 @@ namespace Microsoft.FSharp.Collections /// Returns the index of the last element in the list /// that satisfies the given predicate. /// Raises KeyNotFoundException if no such element exists. + /// /// The function to test the input elements. /// The input list. - /// Thrown if the predicate evaluates to false for all the + /// + /// Thrown if the predicate evaluates to false for all the /// elements of the list. + /// /// The index of the last element that satisfies the predicate. [] val findIndexBack: predicate:('T -> bool) -> list:'T list -> int /// Returns a new collection containing only the elements of the collection /// for which the given predicate returns "true" + /// /// The function to test the input elements. /// The input list. + /// /// A list containing only the elements that satisfy the predicate. [] val filter: predicate:('T -> bool) -> list:'T list -> 'T list @@ -262,9 +302,11 @@ namespace Microsoft.FSharp.Collections /// with the second element and so on. Return the final result. /// If the input function is f and the elements are i0...iN then /// computes f (... (f s i0) i1 ...) iN. + /// /// The function to update the state given the input elements. /// The initial state. /// The input list. + /// /// The final state value. [] val fold<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> list:'T list -> 'State @@ -273,10 +315,12 @@ namespace Microsoft.FSharp.Collections /// through the computation. The collections must have identical sizes. /// If the input function is f and the elements are i0...iN and j0...jN /// then computes f (... (f s i0 j0)...) iN jN. + /// /// The function to update the state given the input elements. /// The initial state. /// The first input list. /// The second input list. + /// /// The final state value. [] val fold2<'T1,'T2,'State> : folder:('State -> 'T1 -> 'T2 -> 'State) -> state:'State -> list1:'T1 list -> list2:'T2 list -> 'State @@ -284,9 +328,11 @@ namespace Microsoft.FSharp.Collections /// Applies a function to each element of the collection, starting from the end, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN then /// computes f i0 (...(f iN s)). + /// /// The function to update the state given the input elements. /// The input list. /// The initial state. + /// /// The state object after the folding function is applied to each element of the list. [] val foldBack<'T,'State> : folder:('T -> 'State -> 'State) -> list:'T list -> state:'State -> 'State @@ -295,10 +341,12 @@ namespace Microsoft.FSharp.Collections /// through the computation. The collections must have identical sizes. /// If the input function is f and the elements are i0...iN and j0...jN /// then computes f i0 j0 (...(f iN jN s)). + /// /// The function to update the state given the input elements. /// The first input list. /// The second input list. /// The initial state. + /// /// The final state value. [] val foldBack2<'T1,'T2,'State> : folder:('T1 -> 'T2 -> 'State -> 'State) -> list1:'T1 list -> list2:'T2 list -> state:'State -> 'State @@ -310,6 +358,7 @@ namespace Microsoft.FSharp.Collections /// Otherwise, true is returned. /// The function to test the input elements. /// The input list. + /// /// True if all of the elements satisfy the predicate. [] val forall: predicate:('T -> bool) -> list:'T list -> bool @@ -319,12 +368,14 @@ namespace Microsoft.FSharp.Collections /// The predicate is applied to matching elements in the two collections up to the lesser of the /// two lengths of the collections. If any application returns false then the overall result is /// false and no further elements are tested. Otherwise, if one collection is longer - /// than the other then the System.ArgumentException exception is raised. + /// than the other then the exception is raised. /// Otherwise, true is returned. /// The function to test the input elements. /// The first input list. /// The second input list. - /// Thrown when the input lists differ in length. + /// + /// Thrown when the input lists differ in length. + /// /// True if all of the pairs of elements satisfy the predicate. [] val forall2: predicate:('T1 -> 'T2 -> bool) -> list1:'T1 list -> list2:'T2 list -> bool @@ -343,40 +394,52 @@ namespace Microsoft.FSharp.Collections /// Returns the first element of the list. /// /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The first element of the list. [] val head: list:'T list -> 'T /// Returns a new list whose elements are the corresponding elements /// of the input list paired with the index (from 0) of each element. + /// /// The input list. + /// /// The list of indexed elements. [] val indexed: list:'T list -> (int * 'T) list /// Creates a list by calling the given generator on each index. + /// /// The length of the list to generate. /// The function to generate an element from an index. + /// /// The list of generated elements. [] val init: length:int -> initializer:(int -> 'T) -> 'T list /// Returns true if the list contains no elements, false otherwise. + /// /// The input list. + /// /// True if the list is empty. [] val isEmpty: list:'T list -> bool /// Indexes into the list. The first element has index 0. + /// /// The index to retrieve. /// The input list. + /// /// The value at the given index. - /// Thrown when the index is negative or the input list does not contain enough elements. + /// + /// Thrown when the index is negative or the input list does not contain enough elements. [] val item: index:int -> list:'T list -> 'T /// Applies the given function to each element of the collection. + /// /// The function to apply to elements from the input list. /// The input list. [] @@ -384,6 +447,7 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to two collections simultaneously. The /// collections must have identical size. + /// /// The function to apply to pairs of elements from the input lists. /// The first input list. /// The second input list. @@ -392,6 +456,7 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to each element of the collection. The integer passed to the /// function indicates the index of element. + /// /// The function to apply to the elements of the list along with their index. /// The input list. [] @@ -400,6 +465,7 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to two collections simultaneously. The /// collections must have identical size. The integer passed to the /// function indicates the index of element. + /// /// The function to apply to a pair of elements from the input lists along with their index. /// The first input list. /// The second input list. @@ -407,66 +473,83 @@ namespace Microsoft.FSharp.Collections val iteri2: action:(int -> 'T1 -> 'T2 -> unit) -> list1:'T1 list -> list2:'T2 list -> unit /// Returns the last element of the list. + /// /// The input list. + /// /// The last element of the list. - /// Thrown when the input does not have any elements. + /// + /// Thrown when the input does not have any elements. [] val last: list:'T list -> 'T /// Returns the length of the list. + /// /// The input list. + /// /// The length of the list. [] val length: list:'T list -> int /// Returns the last element of the list. /// Return None if no such element exists. + /// /// The input list. + /// /// The last element of the list or None. [] val tryLast: list:'T list -> 'T option /// Builds a new collection whose elements are the results of applying the given function /// to each of the elements of the collection. + /// /// The function to transform elements from the input list. /// The input list. + /// /// The list of transformed elements. [] val map: mapping:('T -> 'U) -> list:'T list -> 'U list /// Builds a new collection whose elements are the results of applying the given function /// to the corresponding elements of the two collections pairwise. + /// /// The function to transform pairs of elements from the input lists. /// The first input list. /// The second input list. + /// /// The list of transformed elements. [] val map2: mapping:('T1 -> 'T2 -> 'U) -> list1:'T1 list -> list2:'T2 list -> 'U list /// Builds a new collection whose elements are the results of applying the given function /// to the corresponding elements of the three collections simultaneously. + /// /// The function to transform triples of elements from the input lists. /// The first input list. /// The second input list. /// The third input list. + /// /// The list of transformed elements. [] val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> list1:'T1 list -> list2:'T2 list -> list3:'T3 list -> 'U list /// Combines map and fold. Builds a new list whose elements are the results of applying the given function /// to each of the elements of the input list. The function is also used to accumulate a final value. + /// /// The function to transform elements from the input list and accumulate the final value. /// The initial state. /// The input list. + /// /// The list of transformed elements, and the final accumulated value. [] val mapFold<'T,'State,'Result> : mapping:('State -> 'T -> 'Result * 'State) -> state:'State -> list:'T list -> 'Result list * 'State /// Combines map and foldBack. Builds a new list whose elements are the results of applying the given function /// to each of the elements of the input list. The function is also used to accumulate a final value. + /// /// The function to transform elements from the input list and accumulate the final value. /// The input list. /// The initial state. + /// /// The list of transformed elements, and the final accumulated value. [] val mapFoldBack<'T,'State,'Result> : mapping:('T -> 'State -> 'Result * 'State) -> list:'T list -> state:'State -> 'Result list * 'State @@ -474,75 +557,94 @@ namespace Microsoft.FSharp.Collections /// Builds a new collection whose elements are the results of applying the given function /// to each of the elements of the collection. The integer index passed to the /// function indicates the index (from 0) of element being transformed. + /// /// The function to transform elements and their indices. /// The input list. + /// /// The list of transformed elements. [] val mapi: mapping:(int -> 'T -> 'U) -> list:'T list -> 'U list /// Like mapi, but mapping corresponding elements from two lists of equal length. + /// /// The function to transform pairs of elements from the two lists and their index. /// The first input list. /// The second input list. + /// /// The list of transformed elements. [] val mapi2: mapping:(int -> 'T1 -> 'T2 -> 'U) -> list1:'T1 list -> list2:'T2 list -> 'U list /// Return the greatest of all elements of the list, compared via Operators.max. /// - /// Raises System.ArgumentException if list is empty + /// Raises if list is empty /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The maximum element. [] val inline max : list:'T list -> 'T when 'T : comparison /// Returns the greatest of all elements of the list, compared via Operators.max on the function result. /// - /// Raises System.ArgumentException if list is empty. + /// Raises if list is empty. /// The function to transform the list elements into the type to be compared. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The maximum element. [] val inline maxBy : projection:('T -> 'U) -> list:'T list -> 'T when 'U : comparison /// Returns the lowest of all elements of the list, compared via Operators.min. /// - /// Raises System.ArgumentException if list is empty + /// Raises if list is empty /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The minimum value. [] val inline min : list:'T list -> 'T when 'T : comparison /// Returns the lowest of all elements of the list, compared via Operators.min on the function result /// - /// Raises System.ArgumentException if list is empty. + /// Raises if list is empty. /// The function to transform list elements into the type to be compared. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The minimum value. [] val inline minBy : projection:('T -> 'U) -> list:'T list -> 'T when 'U : comparison /// Indexes into the list. The first element has index 0. + /// /// The input list. /// The index to retrieve. + /// /// The value at the given index. - /// Thrown when the index is negative or the input list does not contain enough elements. + /// + /// Thrown when the index is negative or the input list does not contain enough elements. [] [] val nth: list:'T list -> index:int -> 'T /// Builds a list from the given array. + /// /// The input array. + /// /// The list of elements from the array. [] val ofArray : array:'T[] -> 'T list /// Builds a new list from the given enumerable object. + /// /// The input sequence. + /// /// The list of elements from the sequence. [] val ofSeq: source:seq<'T> -> 'T list @@ -559,8 +661,10 @@ namespace Microsoft.FSharp.Collections /// Splits the collection into two collections, containing the /// elements for which the given predicate returns True and False /// respectively. Element order is preserved in both of the created lists. + /// /// The function to test the input elements. /// The input list. + /// /// A list containing the elements for which the predicate evaluated to false and a list /// containing the elements for which the predicate evaluated to true. [] @@ -568,20 +672,26 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to successive elements, returning the first /// result where function returns Some(x) for some x. If no such - /// element exists then raise System.Collections.Generic.KeyNotFoundException + /// element exists then raise + /// /// The function to generate options from the elements. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The first resulting value. [] val pick: chooser:('T -> 'U option) -> list:'T list -> 'U /// Returns a list with all elements permuted according to the /// specified permutation. + /// /// The function to map input indices to output indices. /// The input list. + /// /// The permuted list. - /// Thrown when indexMap does not produce a valid permutation. + /// + /// Thrown when indexMap does not produce a valid permutation. [] val permute : indexMap:(int -> int) -> list:'T list -> 'T list @@ -591,10 +701,13 @@ namespace Microsoft.FSharp.Collections /// Return the final result. If the input function is f and the elements are i0...iN then computes /// f (... (f i0 i1) i2 ...) iN. /// - /// Raises System.ArgumentException if list is empty + /// Raises if list is empty + /// /// The function to reduce two list elements to a single element. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The final reduced value. [] val reduce: reduction:('T -> 'T -> 'T) -> list:'T list -> 'T @@ -602,23 +715,30 @@ namespace Microsoft.FSharp.Collections /// Applies a function to each element of the collection, starting from the end, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN then computes /// f i0 (...(f iN-1 iN)). + /// /// A function that takes in the next-to-last element of the list and the /// current accumulated result to produce the next accumulated result. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The final result of the reductions. [] val reduceBack: reduction:('T -> 'T -> 'T) -> list:'T list -> 'T /// Creates a list by replicating the given initial value. + /// /// The number of elements to replicate. /// The value to replicate + /// /// The generated list. [] val replicate: count:int -> initial:'T -> 'T list /// Returns a new list with the elements in reverse order. + /// /// The input list. + /// /// The reversed list. [] val rev: list:'T list -> 'T list @@ -627,17 +747,21 @@ namespace Microsoft.FSharp.Collections /// through the computation. Take the second argument, and apply the function to it /// and the first element of the list. Then feed this result into the function along /// with the second element and so on. Returns the list of intermediate results and the final result. + /// /// The function to update the state given the input elements. /// The initial state. /// The input list. + /// /// The list of states. [] val scan<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> list:'T list -> 'State list /// Like foldBack, but returns both the intermediary and final results + /// /// The function to update the state given the input elements. /// The input list. /// The initial state. + /// /// The list of states. [] val scanBack<'T,'State> : folder:('T -> 'State -> 'State) -> list:'T list -> state:'State -> 'State list @@ -651,18 +775,23 @@ namespace Microsoft.FSharp.Collections val inline singleton: value:'T -> 'T list /// Returns the list after removing the first N elements. + /// /// The number of elements to skip. /// The input list. + /// /// The list after removing the first N elements. - /// Thrown when count is negative or exceeds the number of + /// + /// Thrown when count is negative or exceeds the number of /// elements in the list. [] val skip: count:int -> list: 'T list -> 'T list /// Bypasses elements in a list while the given predicate returns True, and then returns /// the remaining elements of the list. + /// /// A function that evaluates an element of the list to a boolean value. /// The input list. + /// /// The result list. [] val skipWhile: predicate:('T -> bool) -> list:'T list -> 'T list @@ -672,6 +801,7 @@ namespace Microsoft.FSharp.Collections /// This is a stable sort, i.e. the original order of equal elements is preserved. /// The function to compare the list elements. /// The input list. + /// /// The sorted list. [] val sortWith: comparer:('T -> 'T -> int) -> list:'T list -> 'T list @@ -681,6 +811,7 @@ namespace Microsoft.FSharp.Collections /// This is a stable sort, i.e. the original order of equal elements is preserved. /// The function to transform the list elements into the type to be compared. /// The input list. + /// /// The sorted list. [] val sortBy: projection:('T -> 'Key) -> list:'T list -> 'T list when 'Key : comparison @@ -689,16 +820,19 @@ namespace Microsoft.FSharp.Collections /// /// This is a stable sort, i.e. the original order of equal elements is preserved. /// The input list. + /// /// The sorted list. [] val sort: list:'T list -> 'T list when 'T : comparison /// Splits a list into two lists, at the given index. + /// /// The index at which the list is split. /// The input list. + /// /// The two split lists. /// - /// Thrown when split index exceeds the number of elements + /// Thrown when split index exceeds the number of elements /// in the list. [] val splitAt: index:int -> list:'T list -> ('T list * 'T list) @@ -708,6 +842,7 @@ namespace Microsoft.FSharp.Collections /// This is a stable sort, i.e. the original order of equal elements is preserved. /// The function to transform the list elements into the type to be compared. /// The input list. + /// /// The sorted list. [] val inline sortByDescending: projection:('T -> 'Key) -> list:'T list -> 'T list when 'Key : comparison @@ -716,12 +851,15 @@ namespace Microsoft.FSharp.Collections /// /// This is a stable sort, i.e. the original order of equal elements is preserved. /// The input list. + /// /// The sorted list. [] val inline sortDescending: list:'T list -> 'T list when 'T : comparison /// Returns the sum of the elements in the list. + /// /// The input list. + /// /// The resulting sum. [] val inline sum : list:^T list -> ^T @@ -729,8 +867,10 @@ namespace Microsoft.FSharp.Collections and ^T : (static member Zero : ^T) /// Returns the sum of the results generated by applying the function to each element of the list. + /// /// The function to transform the list elements into the type to be summed. /// The input list. + /// /// The resulting sum. [] val inline sumBy : projection:('T -> ^U) -> list:'T list -> ^U @@ -740,7 +880,9 @@ namespace Microsoft.FSharp.Collections /// Returns the list after removing the first element. /// /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The list after removing the first element. [] val tail: list:'T list -> 'T list @@ -755,8 +897,8 @@ namespace Microsoft.FSharp.Collections /// /// The result list. /// - /// Thrown when the input list is empty. - /// Thrown when count exceeds the number of elements + /// Thrown when the input list is empty. + /// Thrown when count exceeds the number of elements /// in the list. [] val take: count:int -> list:'T list -> 'T list @@ -772,35 +914,46 @@ namespace Microsoft.FSharp.Collections val takeWhile: predicate:('T -> bool) -> list:'T list -> 'T list /// Builds an array from the given list. + /// /// The input list. + /// /// The array containing the elements of the list. [] val toArray: list:'T list -> 'T[] /// Views the given list as a sequence. + /// /// The input list. + /// /// The sequence of elements in the list. [] val toSeq: list:'T list -> seq<'T> /// Returns the first element of the list, or /// None if the list is empty. + /// /// The input list. + /// /// The first element of the list or None. [] val tryHead: list:'T list -> 'T option /// Returns the transpose of the given sequence of lists. + /// /// The input sequence of list. + /// /// The transposed list. - /// Thrown when the input sequence is null. - /// Thrown when the input lists differ in length. + /// + /// Thrown when the input sequence is null. + /// Thrown when the input lists differ in length. [] val transpose: lists:seq<'T list> -> 'T list list /// Returns at most N elements in a new list. + /// /// The maximum number of items to return. /// The input list. + /// /// The result list. [] val truncate: count:int -> list:'T list -> 'T list @@ -808,16 +961,20 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to successive elements, returning Some(x) the first /// result where function returns Some(x) for some x. If no such element /// exists then return None. + /// /// The function to generate options from the elements. /// The input list. + /// /// The first resulting value or None. [] val tryPick: chooser:('T -> 'U option) -> list:'T list -> 'U option /// Returns the first element for which the given function returns True. /// Return None if no such element exists. + /// /// The function to test the input elements. /// The input list. + /// /// The first element for which the predicate returns true, or None if /// every element evaluates to false. [] @@ -825,8 +982,10 @@ namespace Microsoft.FSharp.Collections /// Returns the last element for which the given function returns True. /// Return None if no such element exists. + /// /// The function to test the input elements. /// The input list. + /// /// The last element for which the predicate returns true, or None if /// every element evaluates to false. [] @@ -835,8 +994,10 @@ namespace Microsoft.FSharp.Collections /// Returns the index of the first element in the list /// that satisfies the given predicate. /// Return None if no such element exists. + /// /// The function to test the input elements. /// The input list. + /// /// The index of the first element for which the predicate returns true, or None if /// every element evaluates to false. [] @@ -844,8 +1005,10 @@ namespace Microsoft.FSharp.Collections /// Tries to find the nth element in the list. /// Returns None if index is negative or the list does not contain enough elements. + /// /// The index to retrieve. /// The input list. + /// /// The value at the given index or None. [] val tryItem: index:int -> list:'T list -> 'T option @@ -853,8 +1016,10 @@ namespace Microsoft.FSharp.Collections /// Returns the index of the last element in the list /// that satisfies the given predicate. /// Return None if no such element exists. + /// /// The function to test the input elements. /// The input list. + /// /// The index of the last element for which the predicate returns true, or None if /// every element evaluates to false. [] @@ -862,53 +1027,68 @@ namespace Microsoft.FSharp.Collections /// Returns a list that contains the elements generated by the given computation. /// The given initial state argument is passed to the element generator. + /// /// A function that takes in the current state and returns an option tuple of the next /// element of the list and the next state value. /// The initial state value. + /// /// The result list. [] val unfold<'T,'State> : generator:('State -> ('T * 'State) option) -> state:'State -> 'T list /// Splits a list of pairs into two lists. + /// /// The input list. + /// /// Two lists of split elements. [] val unzip: list:('T1 * 'T2) list -> ('T1 list * 'T2 list) /// Splits a list of triples into three lists. + /// /// The input list. + /// /// Three lists of split elements. [] val unzip3: list:('T1 * 'T2 * 'T3) list -> ('T1 list * 'T2 list * 'T3 list) /// Returns a new list containing only the elements of the list /// for which the given predicate returns "true" + /// /// The function to test the input elements. /// The input list. + /// /// A list containing only the elements that satisfy the predicate. [] val where: predicate:('T -> bool) -> list:'T list -> 'T list /// Returns a list of sliding windows containing elements drawn from the input /// list. Each window is returned as a fresh list. + /// /// The number of elements in each window. /// The input list. + /// /// The result list. - /// Thrown when windowSize is not positive. + /// + /// Thrown when windowSize is not positive. [] val windowed : windowSize:int -> list:'T list -> 'T list list /// Combines the two lists into a list of pairs. The two lists must have equal lengths. + /// /// The first input list. /// The second input list. + /// /// A single list containing pairs of matching elements from the input lists. [] val zip: list1:'T1 list -> list2:'T2 list -> ('T1 * 'T2) list /// Combines the three lists into a list of triples. The lists must have equal lengths. + /// /// The first input list. /// The second input list. /// The third input list. + /// /// A single list containing triples of matching elements from the input lists. [] val zip3: list1:'T1 list -> list2:'T2 list -> list3:'T3 list -> ('T1 * 'T2 * 'T3) list diff --git a/src/fsharp/FSharp.Core/mailbox.fsi b/src/fsharp/FSharp.Core/mailbox.fsi index 6d818299e06..65e31a192c6 100644 --- a/src/fsharp/FSharp.Core/mailbox.fsi +++ b/src/fsharp/FSharp.Core/mailbox.fsi @@ -28,23 +28,28 @@ namespace Microsoft.FSharp.Control /// Creates an agent. The body function is used to generate the asynchronous /// computation executed by the agent. This function is not executed until /// Start is called. + /// /// The function to produce an asynchronous computation that will be executed /// as the read loop for the MailboxProcessor when Start is called. /// An optional cancellation token for the body. /// Defaults to Async.DefaultCancellationToken. + /// /// The created MailboxProcessor. new : body:(MailboxProcessor<'Msg> -> Async) * ?cancellationToken: CancellationToken -> MailboxProcessor<'Msg> /// Creates and starts an agent. The body function is used to generate the asynchronous /// computation executed by the agent. + /// /// The function to produce an asynchronous computation that will be executed /// as the read loop for the MailboxProcessor when Start is called. /// An optional cancellation token for the body. /// Defaults to Async.DefaultCancellationToken. + /// /// The created MailboxProcessor. static member Start : body:(MailboxProcessor<'Msg> -> Async) * ?cancellationToken: CancellationToken -> MailboxProcessor<'Msg> /// Posts a message to the message queue of the MailboxProcessor, asynchronously. + /// /// The message to post. member Post : message:'Msg -> unit @@ -56,7 +61,8 @@ namespace Microsoft.FSharp.Control /// The function to incorporate the AsyncReplyChannel into /// the message to be sent. /// An optional timeout parameter (in milliseconds) to wait for a reply message. - /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + /// Defaults to -1 which corresponds to . + /// /// The reply from the agent. member PostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> 'Reply @@ -68,23 +74,28 @@ namespace Microsoft.FSharp.Control /// The function to incorporate the AsyncReplyChannel into /// the message to be sent. /// An optional timeout parameter (in milliseconds) to wait for a reply message. - /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + /// Defaults to -1 which corresponds to . + /// /// An asynchronous computation that will wait for the reply from the agent. member PostAndAsyncReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> Async<'Reply> /// Like PostAndReply, but returns None if no reply within the timeout period. + /// /// The function to incorporate the AsyncReplyChannel into /// the message to be sent. /// An optional timeout parameter (in milliseconds) to wait for a reply message. - /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + /// Defaults to -1 which corresponds to . + /// /// The reply from the agent or None if the timeout expires. member TryPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> 'Reply option /// Like AsyncPostAndReply, but returns None if no reply within the timeout period. + /// /// The function to incorporate the AsyncReplyChannel into /// the message to be sent. /// An optional timeout parameter (in milliseconds) to wait for a reply message. - /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + /// Defaults to -1 which corresponds to . + /// /// An asynchronous computation that will return the reply or None if the timeout expires. member PostAndTryAsyncReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> Async<'Reply option> @@ -96,9 +107,10 @@ namespace Microsoft.FSharp.Control /// one concurrent reader may be active, so no more than one concurrent call to /// Receive, TryReceive, Scan and/or TryScan may be active. /// An optional timeout in milliseconds. Defaults to -1 which corresponds - /// to System.Threading.Timeout.Infinite. + /// to . + /// /// An asynchronous computation that returns the received message. - /// Thrown when the timeout is exceeded. + /// Thrown when the timeout is exceeded. member Receive : ?timeout:int -> Async<'Msg> /// Waits for a message. This will consume the first message in arrival order. @@ -111,7 +123,8 @@ namespace Microsoft.FSharp.Control /// one concurrent reader may be active, so no more than one concurrent call to /// Receive, TryReceive, Scan and/or TryScan may be active. /// An optional timeout in milliseconds. Defaults to -1 which - /// corresponds to System.Threading.Timeout.Infinite. + /// corresponds to . + /// /// An asynchronous computation that returns the received message or /// None if the timeout is exceeded. member TryReceive : ?timeout:int -> Async<'Msg option> @@ -127,9 +140,10 @@ namespace Microsoft.FSharp.Control /// The function to return None if the message is to be skipped /// or Some if the message is to be processed and removed from the queue. /// An optional timeout in milliseconds. Defaults to -1 which corresponds - /// to System.Threading.Timeout.Infinite. + /// to . + /// /// An asynchronous computation that scanner built off the read message. - /// Thrown when the timeout is exceeded. + /// Thrown when the timeout is exceeded. member Scan : scanner:('Msg -> (Async<'T>) option) * ?timeout:int -> Async<'T> /// Scans for a message by looking through messages in arrival order until scanner @@ -141,7 +155,8 @@ namespace Microsoft.FSharp.Control /// The function to return None if the message is to be skipped /// or Some if the message is to be processed and removed from the queue. /// An optional timeout in milliseconds. Defaults to -1 which corresponds - /// to System.Threading.Timeout.Infinite. + /// to . + /// /// An asynchronous computation that scanner built off the read message. member TryScan : scanner:('Msg -> (Async<'T>) option) * ?timeout:int -> Async<'T option> diff --git a/src/fsharp/FSharp.Core/map.fsi b/src/fsharp/FSharp.Core/map.fsi index 04e6b048326..5e35b635ab1 100644 --- a/src/fsharp/FSharp.Core/map.fsi +++ b/src/fsharp/FSharp.Core/map.fsi @@ -19,12 +19,15 @@ namespace Microsoft.FSharp.Collections /// Returns a new map with the binding added to the given map. /// If a binding with the given key already exists in the input map, the existing binding is replaced by the new binding in the result map. /// The input key. + /// /// The resulting map. member Add: key:'Key * value:'Value -> Map<'Key,'Value> /// Returns a new map with the value stored under key changed according to f. + /// /// The input key. /// The change function. + /// /// The resulting map. member Change: key:'Key * f:('Value option -> 'Value option) -> Map<'Key,'Value> @@ -32,12 +35,16 @@ namespace Microsoft.FSharp.Collections member IsEmpty: bool /// Builds a map that contains the bindings of the given IEnumerable. + /// /// The input sequence of key/value pairs. + /// /// The resulting map. new : elements:seq<'Key * 'Value> -> Map<'Key,'Value> /// Tests if an element is in the domain of the map. + /// /// The input key. + /// /// True if the map contains the given key. member ContainsKey: key:'Key -> bool @@ -46,26 +53,34 @@ namespace Microsoft.FSharp.Collections /// Lookup an element in the map. Raise KeyNotFoundException if no binding /// exists in the map. + /// /// The input key. - /// Thrown when the key is not found. + /// Thrown when the key is not found. + /// /// The value mapped to the key. member Item : key:'Key -> 'Value with get /// Removes an element from the domain of the map. No exception is raised if the element is not present. + /// /// The input key. + /// /// The resulting map. member Remove: key:'Key -> Map<'Key,'Value> /// Lookup an element in the map, returning a Some value if the element is in the domain /// of the map and None if not. + /// /// The input key. + /// /// The mapped value, or None if the key is not in the map. member TryFind: key:'Key -> 'Value option /// Lookup an element in the map, assigning to value if the element is in the domain /// of the map and returning false if not. + /// /// The input key. /// A reference to the output value. + /// /// true if the value is present, false if not. member TryGetValue: key:'Key * [] value:byref<'Value> -> bool @@ -81,66 +96,85 @@ namespace Microsoft.FSharp.Collections /// Functional programming operators related to the Map<_,_> type. [] [] + /// Basic operations on values of type . module Map = /// Returns a new map with the binding added to the given map. /// If a binding with the given key already exists in the input map, the existing binding is replaced by the new binding in the result map. + /// /// The input key. /// The input value. /// The input map. + /// /// The resulting map. [] val add: key:'Key -> value:'T -> table:Map<'Key,'T> -> Map<'Key,'T> /// Returns a new map with the value stored under key changed according to f. + /// /// The input key. /// The change function. /// The input map. + /// /// The resulting map. [] val change: key:'Key -> f:('T option -> 'T option) -> table:Map<'Key,'T> -> Map<'Key,'T> /// Returns a new map made from the given bindings. + /// /// The input list of key/value pairs. + /// /// The resulting map. [] val ofList: elements:('Key * 'T) list -> Map<'Key,'T> /// Returns a new map made from the given bindings. + /// /// The input array of key/value pairs. + /// /// The resulting map. [] val ofArray: elements:('Key * 'T)[] -> Map<'Key,'T> /// Returns a new map made from the given bindings. + /// /// The input sequence of key/value pairs. + /// /// The resulting map. [] val ofSeq: elements:seq<'Key * 'T> -> Map<'Key,'T> /// Views the collection as an enumerable sequence of pairs. /// The sequence will be ordered by the keys of the map. + /// /// The input map. + /// /// The sequence of key/value pairs. [] val toSeq: table:Map<'Key,'T> -> seq<'Key * 'T> /// Returns a list of all key-value pairs in the mapping. /// The list will be ordered by the keys of the map. + /// /// The input map. + /// /// The list of key/value pairs. [] val toList: table:Map<'Key,'T> -> ('Key * 'T) list /// Returns an array of all key-value pairs in the mapping. /// The array will be ordered by the keys of the map. + /// /// The input map. + /// /// The array of key/value pairs. [] val toArray: table:Map<'Key,'T> -> ('Key * 'T)[] /// Is the map empty? + /// /// The input map. + /// /// True if the map is empty. [] val isEmpty: table:Map<'Key,'T> -> bool @@ -152,44 +186,55 @@ namespace Microsoft.FSharp.Collections /// Lookup an element in the map, raising KeyNotFoundException if no binding /// exists in the map. + /// /// The input key. /// The input map. - /// Thrown when the key does not exist in the map. + /// Thrown when the key does not exist in the map. + /// /// The value mapped to the given key. [] val find: key:'Key -> table:Map<'Key,'T> -> 'T /// Searches the map looking for the first element where the given function returns a Some value. + /// /// The function to generate options from the key/value pairs. /// The input map. + /// /// The first result. [] val tryPick: chooser:('Key -> 'T -> 'U option) -> table:Map<'Key,'T> -> 'U option /// Searches the map looking for the first element where the given function returns a Some value + /// /// The function to generate options from the key/value pairs. /// The input map. + /// /// The first result. [] val pick: chooser:('Key -> 'T -> 'U option) -> table:Map<'Key,'T> -> 'U /// Folds over the bindings in the map. + /// /// The function to update the state given the input key/value pairs. /// The input map. /// The initial state. + /// /// The final state value. [] val foldBack<'Key,'T,'State> : folder:('Key -> 'T -> 'State -> 'State) -> table:Map<'Key,'T> -> state:'State -> 'State when 'Key : comparison /// Folds over the bindings in the map + /// /// The function to update the state given the input key/value pairs. /// The initial state. /// The input map. + /// /// The final state value. [] val fold<'Key,'T,'State> : folder:('State -> 'Key -> 'T -> 'State) -> state:'State -> table:Map<'Key,'T> -> 'State when 'Key : comparison /// Applies the given function to each binding in the dictionary + /// /// The function to apply to each key/value pair. /// The input map. [] @@ -197,23 +242,29 @@ namespace Microsoft.FSharp.Collections /// Returns true if the given predicate returns true for one of the /// bindings in the map. + /// /// The function to test the input elements. /// The input map. + /// /// True if the predicate returns true for one of the key/value pairs. [] val exists: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> bool /// Builds a new map containing only the bindings for which the given predicate returns 'true'. + /// /// The function to test the key/value pairs. /// The input map. + /// /// The filtered map. [] val filter: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> Map<'Key, 'T> /// Returns true if the given predicate returns true for all of the /// bindings in the map. + /// /// The function to test the input elements. /// The input map. + /// /// True if the predicate evaluates to true for all of the bindings in the map. [] val forall: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> bool @@ -221,56 +272,70 @@ namespace Microsoft.FSharp.Collections /// Builds a new collection whose elements are the results of applying the given function /// to each of the elements of the collection. The key passed to the /// function indicates the key of element being transformed. + /// /// The function to transform the key/value pairs. /// The input map. + /// /// The resulting map of keys and transformed values. [] val map: mapping:('Key -> 'T -> 'U) -> table:Map<'Key,'T> -> Map<'Key,'U> /// Tests if an element is in the domain of the map. + /// /// The input key. /// The input map. + /// /// True if the map contains the key. [] val containsKey: key:'Key -> table:Map<'Key,'T> -> bool /// Builds two new maps, one containing the bindings for which the given predicate returns 'true', /// and the other the remaining bindings. + /// /// The function to test the input elements. /// The input map. + /// /// A pair of maps in which the first contains the elements for which the predicate returned true /// and the second containing the elements for which the predicated returned false. [] val partition: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> Map<'Key, 'T> * Map<'Key, 'T> /// Removes an element from the domain of the map. No exception is raised if the element is not present. + /// /// The input key. /// The input map. + /// /// The resulting map. [] val remove: key:'Key -> table:Map<'Key,'T> -> Map<'Key,'T> /// Lookup an element in the map, returning a Some value if the element is in the domain /// of the map and None if not. + /// /// The input key. /// The input map. + /// /// The found Some value or None. [] val tryFind: key:'Key -> table:Map<'Key,'T> -> 'T option /// Evaluates the function on each mapping in the collection. Returns the key for the first mapping /// where the function returns 'true'. Raise KeyNotFoundException if no such element exists. + /// /// The function to test the input elements. /// The input map. - /// Thrown if the key does not exist in the map. + /// Thrown if the key does not exist in the map. + /// /// The first key for which the predicate evaluates true. [] val findKey: predicate:('Key -> 'T -> bool) -> table:Map<'Key,'T> -> 'Key /// Returns the key of the first mapping in the collection that satisfies the given predicate. /// Returns 'None' if no such element exists. + /// /// The function to test the input elements. /// The input map. + /// /// The first key for which the predicate returns true or None if the predicate evaluates to false for each key/value pair. [] val tryFindKey: predicate:('Key -> 'T -> bool) -> table:Map<'Key,'T> -> 'Key option diff --git a/src/fsharp/FSharp.Core/math/z.fsi b/src/fsharp/FSharp.Core/math/z.fsi index e49b1b3d532..dcdb96ef604 100644 --- a/src/fsharp/FSharp.Core/math/z.fsi +++ b/src/fsharp/FSharp.Core/math/z.fsi @@ -12,6 +12,7 @@ namespace Microsoft.FSharp.Math namespace Microsoft.FSharp.Core + /// An abbreviation for type bigint = System.Numerics.BigInteger [] @@ -24,15 +25,21 @@ namespace Microsoft.FSharp.Core /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromZero : value:unit -> 'T + /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromOne : value:unit -> 'T + /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromInt32 : value:int32 -> 'T + /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromInt64 : value:int64 -> 'T + /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromString : text:string -> 'T + /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromInt64Dynamic : value:int64 -> obj + /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromStringDynamic : text:string -> obj diff --git a/src/fsharp/FSharp.Core/nativeptr.fsi b/src/fsharp/FSharp.Core/nativeptr.fsi index b60a9323f54..6fbdc484d05 100644 --- a/src/fsharp/FSharp.Core/nativeptr.fsi +++ b/src/fsharp/FSharp.Core/nativeptr.fsi @@ -15,27 +15,34 @@ namespace Microsoft.FSharp.NativeInterop [] /// Returns a typed native pointer for a given machine address. /// The pointer address. + /// /// A typed pointer. val inline ofNativeInt : address:nativeint -> nativeptr<'T> [] [] /// Returns an untyped native pointer for a given typed pointer. + /// /// The pointer address. + /// /// A typed pointer. val inline toVoidPtr : address:nativeptr<'T> -> voidptr [] [] /// Returns a typed native pointer for a untyped native pointer. + /// /// The untyped pointer. + /// /// A typed pointer. val inline ofVoidPtr : voidptr -> nativeptr<'T> [] [] /// Returns a machine address for a given typed native pointer. + /// /// The input pointer. + /// /// The machine address. val inline toNativeInt : address:nativeptr<'T> -> nativeint @@ -44,8 +51,10 @@ namespace Microsoft.FSharp.NativeInterop [] /// Returns a typed native pointer by adding index * sizeof<'T> to the /// given input pointer. + /// /// The input pointer. /// The index by which to offset the pointer. + /// /// A typed pointer. val inline add : address:nativeptr<'T> -> index:int -> nativeptr<'T> @@ -53,21 +62,26 @@ namespace Microsoft.FSharp.NativeInterop [] /// Dereferences the typed native pointer computed by adding index * sizeof<'T> to the /// given input pointer. + /// /// The input pointer. /// The index by which to offset the pointer. + /// /// The value at the pointer address. val inline get : address:nativeptr<'T> -> index:int -> 'T [] [] /// Dereferences the given typed native pointer. + /// /// The input pointer. + /// /// The value at the pointer address. val inline read : address:nativeptr<'T> -> 'T [] [] /// Assigns the value into the memory location referenced by the given typed native pointer. + /// /// The input pointer. /// The value to assign. val inline write : address:nativeptr<'T> -> value:'T -> unit @@ -76,20 +90,25 @@ namespace Microsoft.FSharp.NativeInterop [] /// Assigns the value into the memory location referenced by the typed native /// pointer computed by adding index * sizeof<'T> to the given input pointer. + /// /// The input pointer. /// The index by which to offset the pointer. /// The value to assign. val inline set : address:nativeptr<'T> -> index:int -> value:'T -> unit /// Allocates a region of memory on the stack. + /// /// The number of objects of type T to allocate. + /// /// A typed pointer to the allocated memory. [] [] val inline stackalloc : count:int -> nativeptr<'T> /// Converts a given typed native pointer to a managed pointer. + /// /// The input pointer. + /// /// The managed pointer. [] [] diff --git a/src/fsharp/FSharp.Core/observable.fsi b/src/fsharp/FSharp.Core/observable.fsi index 36cbee5700d..479d306cdd4 100644 --- a/src/fsharp/FSharp.Core/observable.fsi +++ b/src/fsharp/FSharp.Core/observable.fsi @@ -19,6 +19,7 @@ namespace Microsoft.FSharp.Control /// be triggered concurrently on different threads. /// The first Observable. /// The second Observable. + /// /// An Observable that propagates information from both sources. [] val merge: source1:IObservable<'T> -> source2:IObservable<'T> -> IObservable<'T> @@ -29,6 +30,7 @@ namespace Microsoft.FSharp.Control /// arising from the source and completes when the source completes. /// The function applied to observations from the source. /// The input Observable. + /// /// An Observable of the type specified by mapping. [] val map: mapping:('T -> 'U) -> source:IObservable<'T> -> IObservable<'U> @@ -38,9 +40,11 @@ namespace Microsoft.FSharp.Control /// for which the predicate returns true. The predicate is executed once for /// each subscribed observer. The returned object also propagates error /// observations arising from the source and completes when the source completes. + /// /// The function to apply to observations to determine if it should /// be kept. /// The input Observable. + /// /// An Observable that filters observations based on filter. [] val filter: predicate:('T -> bool) -> source:IObservable<'T> -> IObservable<'T> @@ -52,9 +56,11 @@ namespace Microsoft.FSharp.Control /// executed once for each subscribed observer. Both also propagate all error /// observations arising from the source and each completes when the source /// completes. + /// /// The function to determine which output Observable will trigger /// a particular observation. /// The input Observable. + /// /// A tuple of Observables. The first triggers when the predicate returns true, and /// the second triggers when the predicate returns false. [] @@ -67,9 +73,11 @@ namespace Microsoft.FSharp.Control /// executed once for each subscribed observer. Both also propagate error /// observations arising from the source and each completes when the source /// completes. + /// /// The function that takes an observation an transforms /// it into one of the two output Choice types. /// The input Observable. + /// /// A tuple of Observables. The first triggers when splitter returns Choice1of2 /// and the second triggers when splitter returns Choice2of2. [] @@ -79,9 +87,11 @@ namespace Microsoft.FSharp.Control /// using the given function. The returned object will trigger observations x /// for which the splitter returns Some x. The returned object also propagates /// all errors arising from the source and completes when the source completes. + /// /// The function that returns Some for observations to be propagated /// and None for observations to ignore. /// The input Observable. + /// /// An Observable that only propagates some of the observations from the source. [] val choose: chooser:('T -> 'U option) -> source:IObservable<'T> -> IObservable<'U> @@ -98,12 +108,14 @@ namespace Microsoft.FSharp.Control /// The function to update the state with each observation. /// The initial state. /// The input Observable. + /// /// An Observable that triggers on the updated state values. [] val scan: collector:('U -> 'T -> 'U) -> state:'U -> source:IObservable<'T> -> IObservable<'U> /// Creates an observer which permanently subscribes to the given observable and which calls /// the given function for each observation. + /// /// The function to be called on each observation. /// The input Observable. [] @@ -111,8 +123,10 @@ namespace Microsoft.FSharp.Control /// Creates an observer which subscribes to the given observable and which calls /// the given function for each observation. + /// /// The function to be called on each observation. /// The input Observable. + /// /// An object that will remove the callback if disposed. [] val subscribe : callback:('T -> unit) -> source:IObservable<'T> -> System.IDisposable @@ -126,6 +140,7 @@ namespace Microsoft.FSharp.Control /// That is, observations arising from the source must not be triggered concurrently /// on different threads. /// The input Observable. + /// /// An Observable that triggers on successive pairs of observations from the input Observable. [] val pairwise: source:IObservable<'T> -> IObservable<'T * 'T> diff --git a/src/fsharp/FSharp.Core/option.fsi b/src/fsharp/FSharp.Core/option.fsi index 96d4ab74bf6..8854204201f 100644 --- a/src/fsharp/FSharp.Core/option.fsi +++ b/src/fsharp/FSharp.Core/option.fsi @@ -12,187 +12,238 @@ open Microsoft.FSharp.Collections module Option = /// Returns true if the option is not None. /// The input option. + /// /// True if the option is not None. [] val inline isSome: option:'T option -> bool /// Returns true if the option is None. + /// /// The input option. + /// /// True if the option is None. [] val inline isNone: option:'T option -> bool /// Gets the value of the option if the option is Some, otherwise returns the specified default value. + /// /// The specified default value. /// The input option. + /// /// The option if the option is Some, else the default value. /// Identical to the built-in operator, except with the arguments swapped. [] val defaultValue: value:'T -> option:'T option -> 'T /// Gets the value of the option if the option is Some, otherwise evaluates and returns the result. + /// /// A thunk that provides a default value when evaluated. /// The input option. + /// /// The option if the option is Some, else the result of evaluating . /// is not evaluated unless is None. [] val defaultWith: defThunk:(unit -> 'T) -> option:'T option -> 'T /// Returns if it is Some, otherwise returns . + /// /// The value to use if is None. /// The input option. + /// /// The option if the option is Some, else the alternate option. [] val orElse: ifNone:'T option -> option:'T option -> 'T option /// Returns if it is Some, otherwise evaluates and returns the result. + /// /// A thunk that provides an alternate option when evaluated. /// The input option. + /// /// The option if the option is Some, else the result of evaluating . /// is not evaluated unless is None. [] val orElseWith: ifNoneThunk:(unit -> 'T option) -> option:'T option -> 'T option /// Gets the value associated with the option. + /// /// The input option. + /// /// The value within the option. /// Thrown when the option is None. [] val get: option:'T option -> 'T /// count inp evaluates to match inp with None -> 0 | Some _ -> 1. + /// /// The input option. + /// /// A zero if the option is None, a one otherwise. [] val count: option:'T option -> int /// fold f s inp evaluates to match inp with None -> s | Some x -> f s x. + /// /// A function to update the state data when given a value from an option. /// The initial state. /// The input option. + /// /// The original state if the option is None, otherwise it returns the updated state with the folder /// and the option value. [] val fold<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> option:'T option -> 'State /// fold f inp s evaluates to match inp with None -> s | Some x -> f x s. + /// /// A function to update the state data when given a value from an option. /// The input option. /// The initial state. + /// /// The original state if the option is None, otherwise it returns the updated state with the folder /// and the option value. [] val foldBack<'T,'State> : folder:('T -> 'State -> 'State) -> option:'T option -> state:'State -> 'State /// exists p inp evaluates to match inp with None -> false | Some x -> p x. + /// /// A function that evaluates to a boolean when given a value from the option type. /// The input option. + /// /// False if the option is None, otherwise it returns the result of applying the predicate /// to the option value. [] val exists: predicate:('T -> bool) -> option:'T option -> bool /// forall p inp evaluates to match inp with None -> true | Some x -> p x. + /// /// A function that evaluates to a boolean when given a value from the option type. /// The input option. + /// /// True if the option is None, otherwise it returns the result of applying the predicate /// to the option value. [] val forall: predicate:('T -> bool) -> option:'T option -> bool /// Evaluates to true if is Some and its value is equal to . + /// /// The value to test for equality. /// The input option. + /// /// True if the option is Some and contains a value equal to , otherwise false. [] val inline contains: value:'T -> option:'T option -> bool when 'T : equality /// iter f inp executes match inp with None -> () | Some x -> f x. + /// /// A function to apply to the option value. /// The input option. + /// /// Unit if the option is None, otherwise it returns the result of applying the predicate /// to the option value. [] val iter: action:('T -> unit) -> option:'T option -> unit /// map f inp evaluates to match inp with None -> None | Some x -> Some (f x). + /// /// A function to apply to the option value. /// The input option. + /// /// An option of the input value after applying the mapping function, or None if the input is None. [] val map: mapping:('T -> 'U) -> option:'T option -> 'U option /// map f option1 option2 evaluates to match option1, option2 with Some x, Some y -> Some (f x y) | _ -> None. + /// /// A function to apply to the option values. /// The first option. /// The second option. + /// /// An option of the input values after applying the mapping function, or None if either input is None. [] val map2: mapping:('T1 -> 'T2 -> 'U) -> 'T1 option -> 'T2 option -> 'U option /// map f option1 option2 option3 evaluates to match option1, option2, option3 with Some x, Some y, Some z -> Some (f x y z) | _ -> None. + /// /// A function to apply to the option values. /// The first option. /// The second option. /// The third option. + /// /// An option of the input values after applying the mapping function, or None if any input is None. [] val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> 'T1 option -> 'T2 option -> 'T3 option -> 'U option /// bind f inp evaluates to match inp with None -> None | Some x -> f x + /// /// A function that takes the value of type T from an option and transforms it into /// an option containing a value of type U. /// The input option. + /// /// An option of the output type of the binder. [] val bind: binder:('T -> 'U option) -> option:'T option -> 'U option /// flatten inp evaluates to match inp with None -> None | Some x -> x + /// /// The input option. + /// /// An option of the output type of the binder. /// flatten is equivalent to bind id. [] val flatten: option:'T option option -> 'T option /// filter f inp evaluates to match inp with None -> None | Some x -> if f x then Some x else None. + /// /// A function that evaluates whether the value contained in the option should remain, or be filtered out. /// The input option. + /// /// The input if the predicate evaluates to true; otherwise, None. [] val filter: predicate:('T -> bool) -> option:'T option -> 'T option /// Convert the option to an array of length 0 or 1. + /// /// The input option. + /// /// The result array. [] val toArray: option:'T option -> 'T[] /// Convert the option to a list of length 0 or 1. + /// /// The input option. + /// /// The result list. [] val toList: option:'T option -> 'T list /// Convert the option to a Nullable value. + /// /// The input option. + /// /// The result value. [] val toNullable: option:'T option -> Nullable<'T> /// Convert a Nullable value to an option. + /// /// The input nullable value. + /// /// The result option. [] val ofNullable: value:Nullable<'T> -> 'T option /// Convert a potentially null value to an option. + /// /// The input value. + /// /// The result option. [] val ofObj: value: 'T -> 'T option when 'T : null /// Convert an option to a potentially null value. + /// /// The input value. + /// /// The result value, which is null if the input was None. [] val toObj: value: 'T option -> 'T when 'T : null @@ -200,188 +251,240 @@ module Option = /// Basic operations on value options. module ValueOption = /// Returns true if the value option is not ValueNone. + /// /// The input value option. + /// /// True if the value option is not ValueNone. [] val inline isSome: voption:'T voption -> bool /// Returns true if the value option is ValueNone. + /// /// The input value option. + /// /// True if the voption is ValueNone. [] val inline isNone: voption:'T voption -> bool /// Gets the value of the value option if the option is ValueSome, otherwise returns the specified default value. + /// /// The specified default value. /// The input voption. + /// /// The voption if the voption is ValueSome, else the default value. /// Identical to the built-in operator, except with the arguments swapped. [] val defaultValue: value:'T -> voption:'T voption -> 'T /// Gets the value of the voption if the voption is ValueSome, otherwise evaluates and returns the result. + /// /// A thunk that provides a default value when evaluated. /// The input voption. + /// /// The voption if the voption is ValueSome, else the result of evaluating . /// is not evaluated unless is ValueNone. [] val defaultWith: defThunk:(unit -> 'T) -> voption:'T voption -> 'T /// Returns if it is Some, otherwise returns . + /// /// The value to use if is None. /// The input option. + /// /// The option if the option is Some, else the alternate option. [] val orElse: ifNone:'T voption -> voption:'T voption -> 'T voption /// Returns if it is Some, otherwise evaluates and returns the result. + /// /// A thunk that provides an alternate value option when evaluated. /// The input value option. + /// /// The voption if the voption is ValueSome, else the result of evaluating . /// is not evaluated unless is ValueNone. [] val orElseWith: ifNoneThunk:(unit -> 'T voption) -> voption:'T voption -> 'T voption /// Gets the value associated with the option. + /// /// The input value option. + /// /// The value within the option. /// Thrown when the option is ValueNone. [] val get: voption:'T voption -> 'T /// count inp evaluates to match inp with ValueNone -> 0 | ValueSome _ -> 1. + /// /// The input value option. + /// /// A zero if the option is ValueNone, a one otherwise. [] val count: voption:'T voption -> int /// fold f s inp evaluates to match inp with ValueNone -> s | ValueSome x -> f s x. + /// /// A function to update the state data when given a value from a value option. /// The initial state. /// The input value option. + /// /// The original state if the option is ValueNone, otherwise it returns the updated state with the folder /// and the voption value. [] val fold<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> voption:'T voption -> 'State /// fold f inp s evaluates to match inp with ValueNone -> s | ValueSome x -> f x s. + /// /// A function to update the state data when given a value from a value option. /// The input value option. /// The initial state. + /// /// The original state if the option is ValueNone, otherwise it returns the updated state with the folder /// and the voption value. [] val foldBack<'T,'State> : folder:('T -> 'State -> 'State) -> voption:'T voption -> state:'State -> 'State /// exists p inp evaluates to match inp with ValueNone -> false | ValueSome x -> p x. + /// /// A function that evaluates to a boolean when given a value from the option type. /// The input value option. + /// /// False if the option is ValueNone, otherwise it returns the result of applying the predicate /// to the option value. [] val exists: predicate:('T -> bool) -> voption:'T voption -> bool /// forall p inp evaluates to match inp with ValueNone -> true | ValueSome x -> p x. + /// /// A function that evaluates to a boolean when given a value from the value option type. /// The input value option. + /// /// True if the option is None, otherwise it returns the result of applying the predicate /// to the option value. [] val forall: predicate:('T -> bool) -> voption:'T voption -> bool /// Evaluates to true if is ValueSome and its value is equal to . + /// /// The value to test for equality. /// The input value option. + /// /// True if the option is ValueSome and contains a value equal to , otherwise false. [] val inline contains: value:'T -> voption:'T voption -> bool when 'T : equality /// iter f inp executes match inp with ValueNone -> () | ValueSome x -> f x. + /// /// A function to apply to the voption value. /// The input value option. + /// /// Unit if the option is ValueNone, otherwise it returns the result of applying the predicate /// to the voption value. [] val iter: action:('T -> unit) -> voption:'T voption -> unit /// map f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> ValueSome (f x). + /// /// A function to apply to the voption value. /// The input value option. + /// /// A value option of the input value after applying the mapping function, or ValueNone if the input is ValueNone. [] val map: mapping:('T -> 'U) -> voption:'T voption -> 'U voption /// map f voption1 voption2 evaluates to match voption1, voption2 with ValueSome x, ValueSome y -> ValueSome (f x y) | _ -> ValueNone. + /// /// A function to apply to the voption values. /// The first value option. /// The second value option. + /// /// A value option of the input values after applying the mapping function, or ValueNone if either input is ValueNone. [] val map2: mapping:('T1 -> 'T2 -> 'U) -> voption1: 'T1 voption -> voption2: 'T2 voption -> 'U voption /// map f voption1 voption2 voption3 evaluates to match voption1, voption2, voption3 with ValueSome x, ValueSome y, ValueSome z -> ValueSome (f x y z) | _ -> ValueNone. + /// /// A function to apply to the value option values. /// The first value option. /// The second value option. /// The third value option. + /// /// A value option of the input values after applying the mapping function, or ValueNone if any input is ValueNone. [] val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> 'T1 voption -> 'T2 voption -> 'T3 voption -> 'U voption /// bind f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> f x + /// /// A function that takes the value of type T from a value option and transforms it into /// a value option containing a value of type U. /// The input value option. + /// /// An option of the output type of the binder. [] val bind: binder:('T -> 'U voption) -> voption:'T voption -> 'U voption /// flatten inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> x + /// /// The input value option. + /// /// A value option of the output type of the binder. /// flatten is equivalent to bind id. [] val flatten: voption:'T voption voption -> 'T voption /// filter f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> if f x then ValueSome x else ValueNone. + /// /// A function that evaluates whether the value contained in the value option should remain, or be filtered out. /// The input value option. + /// /// The input if the predicate evaluates to true; otherwise, ValueNone. [] val filter: predicate:('T -> bool) -> voption:'T voption -> 'T voption /// Convert the value option to an array of length 0 or 1. + /// /// The input value option. + /// /// The result array. [] val toArray: voption:'T voption -> 'T[] /// Convert the value option to a list of length 0 or 1. + /// /// The input value option. + /// /// The result list. [] val toList: voption:'T voption -> 'T list /// Convert the value option to a Nullable value. + /// /// The input value option. + /// /// The result value. [] val toNullable: voption:'T voption -> Nullable<'T> /// Convert a Nullable value to a value option. + /// /// The input nullable value. + /// /// The result value option. [] val ofNullable: value:Nullable<'T> -> 'T voption /// Convert a potentially null value to a value option. + /// /// The input value. + /// /// The result value option. [] val ofObj: value: 'T -> 'T voption when 'T : null /// Convert an option to a potentially null value. + /// /// The input value. + /// /// The result value, which is null if the input was ValueNone. [] val toObj: value: 'T voption -> 'T when 'T : null diff --git a/src/fsharp/FSharp.Core/prim-types-prelude.fsi b/src/fsharp/FSharp.Core/prim-types-prelude.fsi index 0d8d44d7682..dcaf513abf3 100644 --- a/src/fsharp/FSharp.Core/prim-types-prelude.fsi +++ b/src/fsharp/FSharp.Core/prim-types-prelude.fsi @@ -9,76 +9,76 @@ namespace Microsoft.FSharp.Core open System - /// An abbreviation for the CLI type System.Object. + /// An abbreviation for the CLI type . type obj = System.Object - /// An abbreviation for the CLI type System.Exception. + /// An abbreviation for the CLI type . type exn = System.Exception - /// An abbreviation for the CLI type System.IntPtr. + /// An abbreviation for the CLI type . type nativeint = System.IntPtr - /// An abbreviation for the CLI type System.UIntPtr. + /// An abbreviation for the CLI type . type unativeint = System.UIntPtr - /// An abbreviation for the CLI type System.String. + /// An abbreviation for the CLI type . type string = System.String - /// An abbreviation for the CLI type System.Single. + /// An abbreviation for the CLI type . type float32 = System.Single - /// An abbreviation for the CLI type System.Double. + /// An abbreviation for the CLI type . type float = System.Double - /// An abbreviation for the CLI type System.Single. + /// An abbreviation for the CLI type . Identical to . type single = System.Single - /// An abbreviation for the CLI type System.Double. + /// An abbreviation for the CLI type . Identical to . type double = System.Double - /// An abbreviation for the CLI type System.SByte. + /// An abbreviation for the CLI type . type sbyte = System.SByte - /// An abbreviation for the CLI type System.Byte. + /// An abbreviation for the CLI type . type byte = System.Byte - /// An abbreviation for the CLI type System.SByte. + /// An abbreviation for the CLI type . type int8 = System.SByte - /// An abbreviation for the CLI type System.Byte. + /// An abbreviation for the CLI type . type uint8 = System.Byte - /// An abbreviation for the CLI type System.Int16. + /// An abbreviation for the CLI type . type int16 = System.Int16 - /// An abbreviation for the CLI type System.UInt16. + /// An abbreviation for the CLI type . type uint16 = System.UInt16 - /// An abbreviation for the CLI type System.Int32. + /// An abbreviation for the CLI type . type int32 = System.Int32 - /// An abbreviation for the CLI type System.UInt32. + /// An abbreviation for the CLI type . type uint32 = System.UInt32 - /// An abbreviation for the CLI type System.Int64. + /// An abbreviation for the CLI type . type int64 = System.Int64 - /// An abbreviation for the CLI type System.UInt64. + /// An abbreviation for the CLI type . type uint64 = System.UInt64 - /// An abbreviation for the CLI type System.Char. + /// An abbreviation for the CLI type . type char = System.Char - /// An abbreviation for the CLI type System.Boolean. + /// An abbreviation for the CLI type . type bool = System.Boolean - /// An abbreviation for the CLI type System.Decimal. + /// An abbreviation for the CLI type . type decimal = System.Decimal - /// An abbreviation for the CLI type System.Int32. + /// An abbreviation for the CLI type . type int = int32 - /// An abbreviation for the CLI type System.UInt32. + /// An abbreviation for the CLI type . type uint = uint32 /// Single dimensional, zero-based arrays, written int[], string[] etc. @@ -249,7 +249,7 @@ namespace Microsoft.FSharp.Core /// Single dimensional, zero-based arrays, written int[], string[] etc. /// - /// Use the values in the Array module to manipulate values + /// Use the values in the module to manipulate values /// of this type, or the notation arr.[x] to get/set array /// values. type 'T array = 'T[] @@ -259,7 +259,7 @@ namespace Microsoft.FSharp.Core /// This type should only be used when writing F# code that interoperates /// with native code. Use of this type in F# code may result in /// unverifiable code being generated. Conversions to and from the - /// nativeint type may be required. Values of this type can be generated + /// type may be required. Values of this type can be generated /// by the functions in the NativeInterop.NativePtr module. type nativeptr<'T when 'T : unmanaged> = (# "native int" #) @@ -268,7 +268,7 @@ namespace Microsoft.FSharp.Core /// This type should only be used when writing F# code that interoperates /// with native code. Use of this type in F# code may result in /// unverifiable code being generated. Conversions to and from the - /// nativeint type may be required. Values of this type can be generated + /// type may be required. Values of this type can be generated /// by the functions in the NativeInterop.NativePtr module. type voidptr = (# "void*" #) diff --git a/src/fsharp/FSharp.Core/prim-types.fsi b/src/fsharp/FSharp.Core/prim-types.fsi index 1ff9c146c04..e44853e8bc8 100644 --- a/src/fsharp/FSharp.Core/prim-types.fsi +++ b/src/fsharp/FSharp.Core/prim-types.fsi @@ -87,7 +87,9 @@ namespace Microsoft.FSharp.Core new : unit -> SealedAttribute /// Creates an instance of the attribute + /// /// Indicates whether the class is sealed. + /// /// SealedAttribute new : value:bool -> SealedAttribute @@ -118,7 +120,9 @@ namespace Microsoft.FSharp.Core new : unit -> ReflectedDefinitionAttribute /// Creates an instance of the attribute + /// /// Indicates whether to include the evaluated value of the definition as the outer node of the quotation + /// /// ReflectedDefinitionAttribute new : includeValue:bool -> ReflectedDefinitionAttribute @@ -126,14 +130,18 @@ namespace Microsoft.FSharp.Core member IncludeValue: bool /// This attribute is used to indicate a generic container type satisfies the F# 'equality' - /// constraint only if a generic argument also satisfies this constraint. For example, adding + /// constraint only if a generic argument also satisfies this constraint. + /// + /// + /// + /// For example, adding /// this attribute to parameter 'T on a type definition C<'T> means that a type C<X> only supports /// equality if the type X also supports equality and all other conditions for C<X> to support /// equality are also met. The type C<'T> can still be used with other type arguments, but a type such /// as C<(int -> int)> will not support equality because the type (int -> int) is an F# function type - /// and does not support equality. - /// - /// This attribute will be ignored if it is used on the generic parameters of functions or methods. + /// and does not support equality. + /// + /// This attribute will be ignored if it is used on the generic parameters of functions or methods. [] [] type EqualityConditionalOnAttribute = @@ -144,14 +152,16 @@ namespace Microsoft.FSharp.Core new : unit -> EqualityConditionalOnAttribute /// This attribute is used to indicate a generic container type satisfies the F# 'comparison' - /// constraint only if a generic argument also satisfies this constraint. For example, adding + /// constraint only if a generic argument also satisfies this constraint. + /// + /// For example, adding /// this attribute to parameter 'T on a type definition C<'T> means that a type C<X> only supports /// comparison if the type X also supports comparison and all other conditions for C<X> to support /// comparison are also met. The type C<'T> can still be used with other type arguments, but a type such /// as C<(int -> int)> will not support comparison because the type (int -> int) is an F# function type - /// and does not support comparison. + /// and does not support comparison. /// - /// This attribute will be ignored if it is used on the generic parameters of functions or methods. + /// This attribute will be ignored if it is used on the generic parameters of functions or methods. [] [] type ComparisonConditionalOnAttribute = @@ -277,8 +287,10 @@ namespace Microsoft.FSharp.Core member Value: bool /// Creates an instance of the attribute + /// /// Indicates whether to generate helper members on the CLI class representing a discriminated /// union. + /// /// DefaultAugmentationAttribute new : value:bool -> DefaultAugmentationAttribute @@ -450,7 +462,9 @@ namespace Microsoft.FSharp.Core new : unit -> DefaultValueAttribute /// Creates an instance of the attribute + /// /// Indicates whether to assert that the field type supports null. + /// /// DefaultValueAttribute new : check: bool -> DefaultValueAttribute @@ -494,7 +508,9 @@ namespace Microsoft.FSharp.Core inherit Attribute /// Creates an instance of the attribute + /// /// The name to use in compiled code. + /// /// CompiledNameAttribute new : compiledName:string -> CompiledNameAttribute @@ -509,7 +525,9 @@ namespace Microsoft.FSharp.Core inherit Attribute /// Creates an instance of the attribute + /// /// Indicates whether the type should be serializable by default. + /// /// AutoSerializableAttribute new : value:bool -> AutoSerializableAttribute @@ -525,9 +543,11 @@ namespace Microsoft.FSharp.Core inherit Attribute /// Creates an instance of the attribute + /// /// The major version number. /// The minor version number. /// The release number. + /// /// FSharpInterfaceDataVersionAttribute new : major:int * minor:int * release:int -> FSharpInterfaceDataVersionAttribute @@ -542,31 +562,41 @@ namespace Microsoft.FSharp.Core /// This attribute is inserted automatically by the F# compiler to tag types /// and methods in the generated CLI code with flags indicating the correspondence - /// with original source constructs. It is used by the functions in the - /// Microsoft.FSharp.Reflection namespace to reverse-map compiled constructs to - /// their original forms. It is not intended for use from user code. + /// with original source constructs. + /// + /// This attribute is used by the functions in the + /// FSharp.Reflection namespace to reverse-map compiled constructs to + /// their original forms. It is not intended for use from user code. [] [] type CompilationMappingAttribute = inherit Attribute /// Creates an instance of the attribute + /// /// Indicates the type of source construct. + /// /// CompilationMappingAttribute new : sourceConstructFlags:SourceConstructFlags -> CompilationMappingAttribute /// Creates an instance of the attribute + /// /// Indicates the type of source construct. + /// /// CompilationMappingAttribute new : sourceConstructFlags:SourceConstructFlags * sequenceNumber: int -> CompilationMappingAttribute /// Creates an instance of the attribute + /// /// Indicates the type of source construct. + /// /// CompilationMappingAttribute new : sourceConstructFlags:SourceConstructFlags * variantNumber : int * sequenceNumber : int -> CompilationMappingAttribute /// Creates an instance of the attribute + /// /// Indicates the type definitions needed to resolve the source construct. + /// /// CompilationMappingAttribute new : resourceName:string * typeDefinitions:System.Type[] -> CompilationMappingAttribute @@ -585,15 +615,20 @@ namespace Microsoft.FSharp.Core member TypeDefinitions : System.Type[] /// This attribute is inserted automatically by the F# compiler to tag - /// methods which are given the 'CompiledName' attribute. It is not intended - /// for use from user code. + /// methods which are given the 'CompiledName' attribute. + /// + /// This attribute is used by the functions in the + /// FSharp.Reflection namespace to reverse-map compiled constructs to + /// their original forms. It is not intended for use from user code. [] [] type CompilationSourceNameAttribute = inherit Attribute /// Creates an instance of the attribute + /// /// The name of the method in source. + /// /// CompilationSourceNameAttribute new : sourceName:string -> CompilationSourceNameAttribute @@ -609,7 +644,9 @@ namespace Microsoft.FSharp.Core inherit Attribute /// Creates an instance of the attribute + /// /// Indicates adjustments to the compiled representation of the type or member. + /// /// CompilationRepresentationAttribute new : flags:CompilationRepresentationFlags -> CompilationRepresentationAttribute @@ -629,7 +666,9 @@ namespace Microsoft.FSharp.Core inherit Attribute /// Creates an instance of the attribute + /// /// The warning message to be emitted when code uses this construct. + /// /// ExperimentalAttribute new : message:string-> ExperimentalAttribute @@ -644,7 +683,9 @@ namespace Microsoft.FSharp.Core inherit Attribute /// Creates an instance of the attribute + /// /// Indicates the number of arguments in each argument group. + /// /// CompilationArgumentCountsAttribute new : counts:int[] -> CompilationArgumentCountsAttribute @@ -661,7 +702,9 @@ namespace Microsoft.FSharp.Core inherit Attribute /// Creates an instance of the attribute + /// /// Indicates the text to display when using the '%A' printf formatting. + /// /// StructuredFormatDisplayAttribute new : value:string-> StructuredFormatDisplayAttribute @@ -732,13 +775,16 @@ namespace Microsoft.FSharp.Core /// RequireQualifiedAccessAttribute new : unit -> RequireQualifiedAccessAttribute - /// This attribute is used for two purposes. When applied to an assembly, it must be given a string - /// argument, and this argument must indicate a valid module or namespace in that assembly. Source + /// Indicates a construct is automatically opened when brought into scope through + /// an assembly reference or then opening of the containing namespace or module. + /// + /// When applied to an assembly, this attribute must be given a string + /// argument, and this indicates a valid module or namespace in that assembly. Source /// code files compiled with a reference to this assembly are processed in an environment - /// where the given path is automatically opened. + /// where the given path is automatically opened. /// - /// When applied to a module within an assembly, then the attribute must not be given any arguments. - /// When the enclosing namespace is opened in user source code, the module is also implicitly opened. + /// When applied to a type or module within an assembly, then the attribute must not be given any arguments, and + /// the type or module is implicitly opened when its enclosing namespace or module is opened. [] [] type AutoOpenAttribute = @@ -749,8 +795,10 @@ namespace Microsoft.FSharp.Core new : unit -> AutoOpenAttribute /// Creates an attribute used to mark a namespace or module path to be 'automatically opened' when an assembly is referenced + /// /// The namespace or module to be automatically opened when an assembly is referenced /// or an enclosing module opened. + /// /// AutoOpenAttribute new : path:string-> AutoOpenAttribute @@ -762,49 +810,49 @@ namespace Microsoft.FSharp.Core /// The type of floating point numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.Double. + /// . type float<[] 'Measure> = float [] /// The type of floating point numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.Single. + /// . type float32<[] 'Measure> = float32 [] /// The type of decimal numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.Decimal. + /// . type decimal<[] 'Measure> = decimal [] /// The type of 32-bit signed integer numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.Int32. + /// . type int<[] 'Measure> = int [] /// The type of 8-bit signed integer numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.SByte. + /// . type sbyte<[] 'Measure> = sbyte [] /// The type of 16-bit signed integer numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.Int16. + /// . type int16<[] 'Measure> = int16 [] /// The type of 64-bit signed integer numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.Int64. + /// . type int64<[] 'Measure> = int64 /// Represents a managed pointer in F# code. @@ -860,84 +908,110 @@ namespace Microsoft.FSharp.Core module LanguagePrimitives = /// Compare two values for equality using partial equivalence relation semantics ([nan] <> [nan]) + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericEquality : e1:'T -> e2:'T -> bool when 'T : equality /// Compare two values for equality using equivalence relation semantics ([nan] = [nan]) + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericEqualityER : e1:'T -> e2:'T -> bool when 'T : equality /// Compare two values for equality + /// /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericEqualityWithComparer : comp:System.Collections.IEqualityComparer -> e1:'T -> e2:'T -> bool when 'T : equality /// Compare two values + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericComparison : e1:'T -> e2:'T -> int when 'T : comparison /// Compare two values. May be called as a recursive case from an implementation of System.IComparable to /// ensure consistent NaN comparison semantics. + /// /// The function to compare the values. /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericComparisonWithComparer : comp:System.Collections.IComparer -> e1:'T -> e2:'T -> int when 'T : comparison /// Compare two values + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericLessThan : e1:'T -> e2:'T -> bool when 'T : comparison /// Compare two values + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericGreaterThan : e1:'T -> e2:'T -> bool when 'T : comparison /// Compare two values + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericLessOrEqual : e1:'T -> e2:'T -> bool when 'T : comparison /// Compare two values + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericGreaterOrEqual : e1:'T -> e2:'T -> bool when 'T : comparison /// Take the minimum of two values structurally according to the order given by GenericComparison + /// /// The first value. /// The second value. + /// /// The minimum value. val inline GenericMinimum : e1:'T -> e2:'T -> 'T when 'T : comparison /// Take the maximum of two values structurally according to the order given by GenericComparison + /// /// The first value. /// The second value. + /// /// The maximum value. val inline GenericMaximum : e1:'T -> e2:'T -> 'T when 'T : comparison /// Reference/physical equality. /// True if the inputs are reference-equal, false otherwise. + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline PhysicalEquality : e1:'T -> e2:'T -> bool when 'T : not struct /// The physical hash. Hashes on the object identity, except for value types, /// where we hash on the contents. + /// /// The input object. + /// /// The hashed value. val inline PhysicalHash : obj:'T -> int when 'T : not struct @@ -966,7 +1040,9 @@ namespace Microsoft.FSharp.Core /// Make an F# hash/equality object for the given type using node-limited hashing when hashing F# /// records, lists and union types. + /// /// The input limit on the number of nodes. + /// /// System.Collections.Generic.IEqualityComparer<'T> val inline FastLimitedGenericEqualityComparer<'T> : limit: int -> System.Collections.Generic.IEqualityComparer<'T> when 'T : equality @@ -980,85 +1056,117 @@ namespace Microsoft.FSharp.Core /// Hash a value according to its structure. This hash is not limited by an overall node count when hashing F# /// records, lists and union types. + /// /// The input object. + /// /// The hashed value. val inline GenericHash : obj:'T -> int /// Hash a value according to its structure. Use the given limit to restrict the hash when hashing F# /// records, lists and union types. + /// /// The limit on the number of nodes. /// The input object. + /// /// The hashed value. val inline GenericLimitedHash : limit: int -> obj:'T -> int /// Recursively hash a part of a value according to its structure. + /// /// The comparison function. /// The input object. + /// /// The hashed value. val inline GenericHashWithComparer : comparer : System.Collections.IEqualityComparer -> obj:'T -> int /// Build an enum value from an underlying value + /// /// The input value. + /// /// The value as an enumeration. val inline EnumOfValue : value:'T -> 'Enum when 'Enum : enum<'T> /// Get the underlying value for an enum value + /// /// The input enum. + /// /// The enumeration as a value. val inline EnumToValue : enum:'Enum -> 'T when 'Enum : enum<'T> /// Creates a float value with units-of-measure + /// /// The input float. + /// /// The float with units-of-measure. val inline FloatWithMeasure : float -> float<'Measure> /// Creates a float32 value with units-of-measure + /// /// The input float. + /// /// The float with units-of-measure. val inline Float32WithMeasure : float32 -> float32<'Measure> /// Creates a decimal value with units-of-measure + /// /// The input decimal. + /// /// The decimal with units of measure. val inline DecimalWithMeasure : decimal -> decimal<'Measure> /// Creates an int32 value with units-of-measure + /// /// The input int. + /// /// The int with units of measure. val inline Int32WithMeasure : int -> int<'Measure> /// Creates an int64 value with units-of-measure + /// /// The input int64. + /// /// The int64 with units of measure. val inline Int64WithMeasure : int64 -> int64<'Measure> /// Creates an int16 value with units-of-measure + /// /// The input int16. + /// /// The int16 with units-of-measure. val inline Int16WithMeasure : int16 -> int16<'Measure> /// Creates an sbyte value with units-of-measure + /// /// The input sbyte. + /// /// The sbyte with units-of-measure. val inline SByteWithMeasure : sbyte -> sbyte<'Measure> /// Parse an int32 according to the rules used by the overloaded 'int32' conversion operator when applied to strings + /// /// The input string. + /// /// The parsed value. val ParseInt32 : s:string -> int32 /// Parse an uint32 according to the rules used by the overloaded 'uint32' conversion operator when applied to strings + /// /// The input string. + /// /// The parsed value. val ParseUInt32 : s:string -> uint32 /// Parse an int64 according to the rules used by the overloaded 'int64' conversion operator when applied to strings + /// /// The input string. + /// /// The parsed value. val ParseInt64 : s:string -> int64 /// Parse an uint64 according to the rules used by the overloaded 'uint64' conversion operator when applied to strings + /// /// The input string. + /// /// The parsed value. val ParseUInt64 : s:string -> uint64 @@ -1194,8 +1302,10 @@ namespace Microsoft.FSharp.Core val internal anyToStringShowingNull : 'T -> string /// Divides a value by an integer. + /// /// The input value. /// The input int. + /// /// The division result. val inline DivideByInt< ^T > : x:^T -> y:int -> ^T when ^T : (static member DivideByInt : ^T * int -> ^T) @@ -1228,8 +1338,10 @@ namespace Microsoft.FSharp.Core val ( & ) : e1:bool -> e2:bool -> bool /// Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand + /// /// The first value. /// The second value. + /// /// The result of the operation. val ( && ) : e1:bool -> e2:bool -> bool @@ -1239,18 +1351,24 @@ namespace Microsoft.FSharp.Core val ( or ) : e1:bool -> e2:bool -> bool /// Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand + /// /// The first value. /// The second value. + /// /// The result of the operation. val ( || ) : e1:bool -> e2:bool -> bool /// Address-of. Uses of this value may result in the generation of unverifiable code. + /// /// The input object. + /// /// The managed pointer. val inline ( ~& ) : obj:'T -> byref<'T> /// Address-of. Uses of this value may result in the generation of unverifiable code. + /// /// The input object. + /// /// The unmanaged pointer. val inline ( ~&& ) : obj:'T -> nativeptr<'T> @@ -1585,65 +1703,83 @@ namespace Microsoft.FSharp.Core new : unit -> FSharpFunc<'T,'U> /// Invoke an F# first class function value with one argument + /// /// + /// /// 'U abstract member Invoke : func:'T -> 'U - /// Convert an F# first class function value to a value of type System.Converter + /// Convert an F# first class function value to a value of type + /// /// The input function. + /// /// A System.Converter of the function type. static member op_Implicit : func:('T -> 'U) -> System.Converter<'T,'U> - /// Convert an value of type System.Converter to a F# first class function value + /// Convert an value of type to a F# first class function value + /// /// The input System.Converter. + /// /// An F# function of the same type. static member op_Implicit : converter:System.Converter<'T,'U> -> ('T -> 'U) - /// Convert an F# first class function value to a value of type System.Converter + /// Convert an F# first class function value to a value of type + /// /// The input function. + /// /// System.Converter<'T,'U> static member ToConverter : func:('T -> 'U) -> System.Converter<'T,'U> - /// Convert an value of type System.Converter to a F# first class function value + /// Convert an value of type to a F# first class function value + /// /// The input System.Converter. + /// /// An F# function of the same type. static member FromConverter : converter:System.Converter<'T,'U> -> ('T -> 'U) /// Invoke an F# first class function value with five curried arguments. In some cases this /// will result in a more efficient application than applying the arguments successively. + /// /// The input function. /// The first arg. /// The second arg. /// The third arg. /// The fourth arg. /// The fifth arg. + /// /// The function result. static member InvokeFast : func: FSharpFunc<'T,('U -> 'V -> 'W -> 'X -> 'Y)> * arg1:'T * arg2:'U * arg3:'V * arg4:'W * arg5:'X -> 'Y /// Invoke an F# first class function value with four curried arguments. In some cases this /// will result in a more efficient application than applying the arguments successively. + /// /// The input function. /// The first arg. /// The second arg. /// The third arg. /// The fourth arg. + /// /// The function result. static member InvokeFast : func: FSharpFunc<'T,('U -> 'V -> 'W -> 'X)> * arg1:'T * arg2:'U * arg3:'V * arg4:'W -> 'X /// Invoke an F# first class function value with three curried arguments. In some cases this /// will result in a more efficient application than applying the arguments successively. + /// /// The input function. /// The first arg. /// The second arg. /// The third arg. + /// /// The function result. static member InvokeFast : func: FSharpFunc<'T,('U -> 'V -> 'W)> * arg1:'T * arg2:'U * arg3:'V -> 'W /// Invoke an F# first class function value with two curried arguments. In some cases this /// will result in a more efficient application than applying the arguments successively. + /// /// The input function. /// The first arg. /// The second arg. + /// /// The function result. static member InvokeFast : func: FSharpFunc<'T,('U -> 'V)> * arg1:'T * arg2:'U -> 'V @@ -1654,92 +1790,128 @@ namespace Microsoft.FSharp.Core type FuncConvert = /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F# function. static member inline ToFSharpFunc : action:Action<'T> -> ('T -> unit) /// Convert the given Converter delegate object to an F# function value + /// /// The input Converter delegate. + /// /// The F# function. static member inline ToFSharpFunc : converter:Converter<'T,'U> -> ('T -> 'U) /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F# function. static member inline FromAction : action:Action -> (unit -> unit) /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F# function. static member inline FromAction : action:Action<'T> -> ('T -> unit) /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F#funcfunction. static member inline FromAction : action:Action<'T1,'T2> -> ('T1 -> 'T2 -> unit) /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F# function. static member inline FromAction : action:Action<'T1,'T2,'T3> -> ('T1 -> 'T2 -> 'T3 -> unit) /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F# function. static member inline FromAction : action:Action<'T1,'T2,'T3,'T4> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> unit) /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F# function. static member inline FromAction : action:Action<'T1,'T2,'T3,'T4,'T5> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> unit) /// Convert the given Func delegate object to an F# function value + /// /// The input Func delegate. + /// /// The F# function. static member inline FromFunc : func:Func<'T> -> (unit -> 'T) /// Convert the given Func delegate object to an F# function value + /// /// The input Func delegate. + /// /// The F# function. static member inline FromFunc : func:Func<'T,'U> -> ('T -> 'U) /// Convert the given Func delegate object to an F# function value + /// /// The input Func delegate. + /// /// The F#funcfunction. static member inline FromFunc : func:Func<'T1,'T2,'U> -> ('T1 -> 'T2 -> 'U) /// Convert the given Func delegate object to an F# function value + /// /// The input Func delegate. + /// /// The F# function. static member inline FromFunc : func:Func<'T1,'T2,'T3,'U> -> ('T1 -> 'T2 -> 'T3 -> 'U) /// Convert the given Func delegate object to an F# function value + /// /// The input Func delegate. + /// /// The F# function. static member inline FromFunc : func:Func<'T1,'T2,'T3,'T4,'U> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U) /// Convert the given Func delegate object to an F# function value + /// /// The input Func delegate. + /// /// The F# function. static member inline FromFunc : func:Func<'T1,'T2,'T3,'T4,'T5,'U> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U) /// A utility function to convert function values from tupled to curried form + /// /// The input tupled function. + /// /// The output curried function. static member inline FuncFromTupled : func:('T1 * 'T2 -> 'U) -> ('T1 -> 'T2 -> 'U) /// A utility function to convert function values from tupled to curried form + /// /// The input tupled function. + /// /// The output curried function. static member inline FuncFromTupled : func:('T1 * 'T2 * 'T3 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'U) /// A utility function to convert function values from tupled to curried form + /// /// The input tupled function. + /// /// The output curried function. static member inline FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U) /// A utility function to convert function values from tupled to curried form + /// /// The input tupled function. + /// /// The output curried function. static member inline FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U) @@ -1755,14 +1927,18 @@ namespace Microsoft.FSharp.Core inherit FSharpFunc<'T1,('T2 -> 'U)> /// Invoke the optimized function value with two curried arguments + /// /// The first arg. /// The second arg. + /// /// The function result. abstract member Invoke : arg1:'T1 * arg2:'T2 -> 'U /// Adapt an F# first class function value to be an optimized function value that can /// accept two curried arguments without intervening execution. + /// /// The input function. + /// /// The adapted function. static member Adapt : func:('T1 -> 'T2 -> 'U) -> FSharpFunc<'T1,'T2,'U> @@ -1781,15 +1957,19 @@ namespace Microsoft.FSharp.Core /// Invoke an F# first class function value that accepts three curried arguments /// without intervening execution + /// /// The first arg. /// The second arg. /// The third arg. + /// /// The function result. abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 -> 'U /// Adapt an F# first class function value to be an optimized function value that can /// accept three curried arguments without intervening execution. + /// /// The input function. + /// /// The adapted function. static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'U) -> FSharpFunc<'T1,'T2,'T3,'U> @@ -1807,16 +1987,20 @@ namespace Microsoft.FSharp.Core /// Invoke an F# first class function value that accepts four curried arguments /// without intervening execution + /// /// The first arg. /// The second arg. /// The third arg. /// The fourth arg. + /// /// The function result. abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 * arg4:'T4 -> 'U /// Adapt an F# first class function value to be an optimized function value that can /// accept four curried arguments without intervening execution. + /// /// The input function. + /// /// The optimized function. static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U) -> FSharpFunc<'T1,'T2,'T3,'T4,'U> @@ -1834,17 +2018,21 @@ namespace Microsoft.FSharp.Core /// Invoke an F# first class function value that accepts five curried arguments /// without intervening execution + /// /// The first arg. /// The second arg. /// The third arg. /// The fourth arg. /// The fifth arg. + /// /// The function result. abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 * arg4:'T4 * arg5:'T5 -> 'U /// Adapt an F# first class function value to be an optimized function value that can /// accept five curried arguments without intervening execution. + /// /// The input function. + /// /// The optimized function. static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U) -> FSharpFunc<'T1,'T2,'T3,'T4,'T5,'U> @@ -1888,7 +2076,9 @@ namespace Microsoft.FSharp.Core | None : 'T option /// The representation of "Value of type 'T" + /// /// The input value. + /// /// An option representing the value. | Some : Value:'T -> 'T option @@ -1896,12 +2086,16 @@ namespace Microsoft.FSharp.Core static member None : 'T option /// Create an option value that is a 'Some' value. + /// /// The input value + /// /// An option representing the value. static member Some : value:'T -> 'T option /// Implicitly converts a value into an optional that is a 'Some' value. + /// /// The input value + /// /// An option representing the value. static member op_Implicit : value:'T -> 'T option @@ -1940,7 +2134,9 @@ namespace Microsoft.FSharp.Core | ValueNone: 'T voption /// The representation of "Value of type 'T" + /// /// The input value. + /// /// An option representing the value. | ValueSome: 'T -> 'T voption @@ -1951,7 +2147,9 @@ namespace Microsoft.FSharp.Core static member None : 'T voption /// Create a value option value that is a 'Some' value. + /// /// The input value + /// /// A value option representing the value. static member Some : value:'T -> 'T voption @@ -1962,7 +2160,9 @@ namespace Microsoft.FSharp.Core member IsNone : bool /// Implicitly converts a value into an optional that is a 'ValueSome' value. + /// /// The input value + /// /// A voption representing the value. static member op_Implicit: value: 'T -> 'T voption @@ -2022,25 +2222,32 @@ namespace Microsoft.FSharp.Collections /// Gets the element of the list at the given position. /// Lists are represented as linked lists so this is an O(n) operation. /// The index. + /// /// The value at the given index. member Item : index:int -> 'T with get /// Gets a slice of the list, the elements of the list from the given start index to the given end index. + /// /// The start index. /// The end index. + /// /// The sub list specified by the input indices. member GetSlice : startIndex:int option * endIndex:int option -> 'T list /// Get the index for the element offset elements away from the end of the collection. + /// /// The rank of the index. /// The offset from the end. + /// /// The corresponding index from the start. [] member GetReverseIndex: rank: int * offset: int -> int /// Returns a list with head as its first element and tail as its subsequent elements + /// /// A new head value for the list. /// The existing list. + /// /// The list with head appended to the front of tail. static member Cons : head:'T * tail:'T list -> 'T list @@ -2056,10 +2263,10 @@ namespace Microsoft.FSharp.Collections /// values of this type, or pattern match against the values directly. and 'T list = List<'T> - /// An abbreviation for the CLI type System.Collections.Generic.List<_> + /// An abbreviation for the CLI type type ResizeArray<'T> = System.Collections.Generic.List<'T> - /// An abbreviation for the CLI type System.Collections.Generic.IEnumerable<_> + /// An abbreviation for the CLI type type seq<'T> = IEnumerable<'T> namespace Microsoft.FSharp.Core @@ -2074,180 +2281,238 @@ namespace Microsoft.FSharp.Core module Operators = /// Overloaded unary negation. + /// /// The value to negate. + /// /// The result of the operation. val inline ( ~- ) : n:^T -> ^T when ^T : (static member ( ~- ) : ^T -> ^T) and default ^T : int /// Overloaded addition operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline ( + ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( + ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded subtraction operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline ( - ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( - ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded multiplication operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline ( * ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( * ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded division operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline ( / ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( / ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded modulo operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline ( % ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( % ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded bitwise-AND operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline (&&&): x:^T -> y:^T -> ^T when ^T : (static member (&&&) : ^T * ^T -> ^T) and default ^T : int /// Overloaded bitwise-OR operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline (|||) : x:^T -> y:^T -> ^T when ^T : (static member (|||) : ^T * ^T -> ^T) and default ^T : int /// Overloaded bitwise-XOR operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline (^^^) : x:^T -> y:^T -> ^T when ^T : (static member (^^^) : ^T * ^T -> ^T) and default ^T : int /// Overloaded byte-shift left operator by a specified number of bits + /// /// The input value. /// The amount to shift. + /// /// The result of the operation. val inline (<<<) : value:^T -> shift:int32 -> ^T when ^T : (static member (<<<) : ^T * int32 -> ^T) and default ^T : int /// Overloaded byte-shift right operator by a specified number of bits + /// /// The input value. /// The amount to shift. + /// /// The result of the operation. val inline (>>>) : value:^T -> shift:int32 -> ^T when ^T : (static member (>>>) : ^T * int32 -> ^T) and default ^T : int /// Overloaded bitwise-NOT operator + /// /// The input value. + /// /// The result of the operation. val inline (~~~) : value:^T -> ^T when ^T : (static member (~~~) : ^T -> ^T) and default ^T : int /// Overloaded prefix-plus operator + /// /// The input value. + /// /// The result of the operation. val inline (~+) : value:^T -> ^T when ^T : (static member (~+) : ^T -> ^T) and default ^T : int /// Structural less-than comparison + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( < ) : x:'T -> y:'T -> bool when 'T : comparison /// Structural greater-than + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( > ) : x:'T -> y:'T -> bool when 'T : comparison /// Structural greater-than-or-equal + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( >= ) : x:'T -> y:'T -> bool when 'T : comparison /// Structural less-than-or-equal comparison + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( <= ) : x:'T -> y:'T -> bool when 'T : comparison /// Structural equality + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( = ) : x:'T -> y:'T -> bool when 'T : equality /// Structural inequality + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( <> ) : x:'T -> y:'T -> bool when 'T : equality /// Compose two functions, the function on the left being applied first + /// /// The first function to apply. /// The second function to apply. + /// /// The composition of the input functions. val inline (>>): func1:('T1 -> 'T2) -> func2:('T2 -> 'T3) -> ('T1 -> 'T3) /// Compose two functions, the function on the right being applied first + /// /// The second function to apply. /// The first function to apply. + /// /// The composition of the input functions. val inline (<<): func2:('T2 -> 'T3) -> func1:('T1 -> 'T2) -> ('T1 -> 'T3) /// Apply a function to a value, the value being on the left, the function on the right + /// /// The argument. /// The function. + /// /// The function result. val inline (|>): arg:'T1 -> func:('T1 -> 'U) -> 'U /// Apply a function to two values, the values being a pair on the left, the function on the right + /// /// The first argument. /// The second argument. /// The function. + /// /// The function result. val inline (||>): arg1:'T1 * arg2:'T2 -> func:('T1 -> 'T2 -> 'U) -> 'U /// Apply a function to three values, the values being a triple on the left, the function on the right + /// /// The first argument. /// The second argument. /// The third argument. /// The function. + /// /// The function result. val inline (|||>): arg1:'T1 * arg2:'T2 * arg3:'T3 -> func:('T1 -> 'T2 -> 'T3 -> 'U) -> 'U /// Apply a function to a value, the value being on the right, the function on the left + /// /// The function. /// The argument. + /// /// The function result. val inline (<|): func:('T -> 'U) -> arg1:'T -> 'U /// Apply a function to two values, the values being a pair on the right, the function on the left + /// /// The function. /// The first argument. /// The second argument. + /// /// The function result. val inline (<||): func:('T1 -> 'T2 -> 'U) -> arg1:'T1 * arg2:'T2 -> 'U /// Apply a function to three values, the values being a triple on the right, the function on the left + /// /// The function. /// The first argument. /// The second argument. /// The third argument. + /// /// The function result. val inline (<|||): func:('T1 -> 'T2 -> 'T3 -> 'U) -> arg1:'T1 * arg2:'T2 * arg3:'T3 -> 'U /// Used to specify a default value for an optional argument in the implementation of a function + /// /// An option representing the argument. /// The default value of the argument. + /// /// The argument value. If it is None, the defaultValue is returned. [] val defaultArg : arg:'T option -> defaultValue:'T -> 'T /// Used to specify a default value for an optional argument in the implementation of a function + /// /// A value option representing the argument. /// The default value of the argument. + /// /// The argument value. If it is None, the defaultValue is returned. [] val defaultValueArg : arg:'T voption -> defaultValue:'T -> 'T @@ -2257,7 +2522,9 @@ namespace Microsoft.FSharp.Core val (^): s1:string -> s2:string -> string /// Raises an exception + /// /// The exception to raise. + /// /// The result value. [] val inline raise : exn:System.Exception -> 'T @@ -2273,199 +2540,251 @@ namespace Microsoft.FSharp.Core [] val inline reraise : unit -> 'T - /// Builds a System.Exception object. + /// Builds a object. + /// /// The message for the Exception. + /// /// A System.Exception. val Failure : message:string -> exn - /// Matches System.Exception objects whose runtime type is precisely System.Exception + /// Matches objects whose runtime type is precisely + /// /// The input exception. + /// /// A string option. [] val (|Failure|_|) : error:exn -> string option /// Return the first element of a tuple, fst (a,b) = a. + /// /// The input tuple. + /// /// The first value. [] val inline fst : tuple:('T1 * 'T2) -> 'T1 /// Return the second element of a tuple, snd (a,b) = b. + /// /// The input tuple. + /// /// The second value. [] val inline snd : tuple:('T1 * 'T2) -> 'T2 /// Generic comparison. + /// /// The first value. /// The second value. + /// /// The result of the comparison. [] val inline compare: e1:'T -> e2:'T -> int when 'T : comparison /// Maximum based on generic comparison + /// /// The first value. /// The second value. + /// /// The maximum value. [] val inline max : e1:'T -> e2:'T -> 'T when 'T : comparison /// Minimum based on generic comparison + /// /// The first value. /// The second value. + /// /// The minimum value. [] val inline min : e1:'T -> e2:'T -> 'T when 'T : comparison /// Ignore the passed value. This is often used to throw away results of a computation. + /// /// The value to ignore. [] val inline ignore : value:'T -> unit /// Unbox a strongly typed value. + /// /// The boxed value. + /// /// The unboxed result. [] val inline unbox : value:obj -> 'T /// Boxes a strongly typed value. + /// /// The value to box. + /// /// The boxed object. [] val inline box : value:'T -> obj /// Try to unbox a strongly typed value. + /// /// The boxed value. + /// /// The unboxed result as an option. [] val inline tryUnbox : value:obj -> 'T option /// Determines whether the given value is null. + /// /// The value to check. + /// /// True when value is null, false otherwise. [] val inline isNull : value:'T -> bool when 'T : null /// Determines whether the given value is not null. + /// /// The value to check. + /// /// True when value is not null, false otherwise. [] val inline internal isNotNull : value:'T -> bool when 'T : null - /// Throw a System.Exception exception. + /// Throw a exception. + /// /// The exception message. + /// /// The result value. [] val inline failwith : message:string -> 'T - /// Throw a System.ArgumentException exception with + /// Throw a exception with /// the given argument name and message. + /// /// The argument name. /// The exception message. + /// /// The result value. [] val inline invalidArg : argumentName:string -> message:string -> 'T - /// Throw a System.ArgumentNullException exception + /// Throw a exception + /// /// The argument name. + /// /// The result value. [] val inline nullArg : argumentName:string -> 'T - /// Throw a System.InvalidOperationException exception + /// Throw a exception + /// /// The exception message. + /// /// The result value. [] val inline invalidOp : message:string -> 'T /// The identity function + /// /// The input value. + /// /// The same value. [] val id : x:'T -> 'T /// Create a mutable reference cell + /// /// The value to contain in the cell. + /// /// The created reference cell. [] val ref : value:'T -> 'T ref /// Assign to a mutable reference cell + /// /// The cell to mutate. /// The value to set inside the cell. val ( := ) : cell:'T ref -> value:'T -> unit /// Dereference a mutable reference cell + /// /// The cell to dereference. + /// /// The value contained in the cell. val ( ! ) : cell:'T ref -> 'T /// Decrement a mutable reference cell containing an integer + /// /// The reference cell. [] val decr: cell:int ref -> unit /// Increment a mutable reference cell containing an integer + /// /// The reference cell. [] val incr: cell:int ref -> unit /// Concatenate two lists. + /// /// The first list. /// The second list. + /// /// The concatenation of the lists. val (@): list1:'T list -> list2:'T list -> 'T list /// Negate a logical value. Not True equals False and not False equals True + /// /// The value to negate. + /// /// The result of the negation. [] val inline not : value:bool -> bool /// Builds a sequence using sequence expression syntax + /// /// The input sequence. + /// /// The result sequence. [] val seq : sequence:seq<'T> -> seq<'T> /// Exit the current hardware isolated process, if security settings permit, - /// otherwise raise an exception. Calls System.Environment.Exit. + /// otherwise raise an exception. Calls . + /// /// The exit code to use. + /// /// The result value. [] val exit: exitcode:int -> 'T when default 'T : obj - /// Equivalent to System.Double.PositiveInfinity + /// Equivalent to [] val infinity: float - /// Equivalent to System.Double.NaN + /// Equivalent to [] val nan: float - /// Equivalent to System.Single.PositiveInfinity + /// Equivalent to [] val infinityf: float32 - /// Equivalent to System.Single.NaN + /// Equivalent to [] val nanf: float32 - /// Reads the value of the property System.Console.In. + /// Reads the value of the property . [] val stdin<'T> : System.IO.TextReader - /// Reads the value of the property System.Console.Error. + /// Reads the value of the property . [] val stderr<'T> : System.IO.TextWriter - /// Reads the value of the property System.Console.Out. + /// Reads the value of the property . [] val stdout<'T> : System.IO.TextWriter /// The standard overloaded range operator, e.g. [n..m] for lists, seq {n..m} for sequences + /// /// The start value of the range. /// The end value of the range. + /// /// The sequence spanning the range. val inline (..) : start:^T -> finish:^T -> seq< ^T > when ^T : (static member (+) : ^T * ^T -> ^T) @@ -2475,9 +2794,11 @@ namespace Microsoft.FSharp.Core and default ^T : int /// The standard overloaded skip range operator, e.g. [n..skip..m] for lists, seq {n..skip..m} for sequences + /// /// The start value of the range. /// The step value of the range. /// The end value of the range. + /// /// The sequence spanning the range using the specified step size. val inline (.. ..) : start:^T -> step:^Step -> finish:^T -> seq< ^T > when (^T or ^Step) : (static member (+) : ^T * ^Step -> ^T) @@ -2488,8 +2809,10 @@ namespace Microsoft.FSharp.Core and default ^T : int /// Execute the function as a mutual-exclusion region using the input value as a lock. + /// /// The object to be locked. /// The action to perform during the lock. + /// /// The resulting value. [] val inline lock: lockObject:'Lock -> action:(unit -> 'T) -> 'T when 'Lock : not struct @@ -2497,8 +2820,10 @@ namespace Microsoft.FSharp.Core /// Clean up resources associated with the input object after the completion of the given function. /// Cleanup occurs even when an exception is raised by the protected /// code. + /// /// The resource to be disposed after action is called. /// The action that accepts the resource. + /// /// The resulting value. [] val using: resource:('T :> System.IDisposable) -> action:('T -> 'U) -> 'U @@ -2539,7 +2864,9 @@ namespace Microsoft.FSharp.Core /// for F# union, record and tuple types, hashing the complete contents of the /// type. The exact behaviour of the function can be adjusted on a /// type-by-type basis by implementing GetHashCode for each type. + /// /// The input object. + /// /// The computed hash. [] val inline hash: obj:'T -> int when 'T : equality @@ -2549,142 +2876,188 @@ namespace Microsoft.FSharp.Core /// types stops when the given limit of nodes is reached. The exact behaviour of /// the function can be adjusted on a type-by-type basis by implementing /// GetHashCode for each type. + /// /// The limit of nodes. /// The input object. + /// /// The computed hash. val inline limitedHash: limit: int -> obj:'T -> int when 'T : equality /// Absolute value of the given number. + /// /// The input value. + /// /// The absolute value of the input. [] val inline abs : value:^T -> ^T when ^T : (static member Abs : ^T -> ^T) and default ^T : int /// Inverse cosine of the given number + /// /// The input value. + /// /// The inverse cosine of the input. [] val inline acos : value:^T -> ^T when ^T : (static member Acos : ^T -> ^T) and default ^T : float /// Inverse sine of the given number + /// /// The input value. + /// /// The inverse sine of the input. [] val inline asin : value:^T -> ^T when ^T : (static member Asin : ^T -> ^T) and default ^T : float /// Inverse tangent of the given number + /// /// The input value. + /// /// The inverse tangent of the input. [] val inline atan : value:^T -> ^T when ^T : (static member Atan : ^T -> ^T) and default ^T : float /// Inverse tangent of x/y where x and y are specified separately + /// /// The y input value. /// The x input value. + /// /// The inverse tangent of the input ratio. [] val inline atan2 : y:^T1 -> x:^T1 -> 'T2 when ^T1 : (static member Atan2 : ^T1 * ^T1 -> 'T2) and default ^T1 : float /// Ceiling of the given number + /// /// The input value. + /// /// The ceiling of the input. [] val inline ceil : value:^T -> ^T when ^T : (static member Ceiling : ^T -> ^T) and default ^T : float /// Exponential of the given number + /// /// The input value. + /// /// The exponential of the input. [] val inline exp : value:^T -> ^T when ^T : (static member Exp : ^T -> ^T) and default ^T : float /// Floor of the given number + /// /// The input value. + /// /// The floor of the input. [] val inline floor : value:^T -> ^T when ^T : (static member Floor : ^T -> ^T) and default ^T : float /// Sign of the given number + /// /// The input value. + /// /// -1, 0, or 1 depending on the sign of the input. [] val inline sign : value:^T -> int when ^T : (member Sign : int) and default ^T : float /// Round the given number + /// /// The input value. + /// /// The nearest integer to the input value. [] val inline round : value:^T -> ^T when ^T : (static member Round : ^T -> ^T) and default ^T : float /// Natural logarithm of the given number + /// /// The input value. + /// /// The natural logarithm of the input. [] val inline log : value:^T -> ^T when ^T : (static member Log : ^T -> ^T) and default ^T : float /// Logarithm to base 10 of the given number + /// /// The input value. + /// /// The logarithm to base 10 of the input. [] val inline log10 : value:^T -> ^T when ^T : (static member Log10 : ^T -> ^T) and default ^T : float /// Square root of the given number + /// /// The input value. + /// /// The square root of the input. [] val inline sqrt : value:^T -> ^U when ^T : (static member Sqrt : ^T -> ^U) and default ^U : ^T and default ^T : ^U and default ^T : float /// Cosine of the given number + /// /// The input value. + /// /// The cosine of the input. [] val inline cos : value:^T -> ^T when ^T : (static member Cos : ^T -> ^T) and default ^T : float /// Hyperbolic cosine of the given number + /// /// The input value. + /// /// The hyperbolic cosine of the input. [] val inline cosh : value:^T -> ^T when ^T : (static member Cosh : ^T -> ^T) and default ^T : float /// Sine of the given number + /// /// The input value. + /// /// The sine of the input. [] val inline sin : value:^T -> ^T when ^T : (static member Sin : ^T -> ^T) and default ^T : float /// Hyperbolic sine of the given number + /// /// The input value. + /// /// The hyperbolic sine of the input. [] val inline sinh : value:^T -> ^T when ^T : (static member Sinh : ^T -> ^T) and default ^T : float /// Tangent of the given number + /// /// The input value. + /// /// The tangent of the input. [] val inline tan : value:^T -> ^T when ^T : (static member Tan : ^T -> ^T) and default ^T : float /// Hyperbolic tangent of the given number + /// /// The input value. + /// /// The hyperbolic tangent of the input. [] val inline tanh : value:^T -> ^T when ^T : (static member Tanh : ^T -> ^T) and default ^T : float /// Overloaded truncate operator. + /// /// The input value. + /// /// The truncated value. [] val inline truncate : value:^T -> ^T when ^T : (static member Truncate : ^T -> ^T) and default ^T : float /// Overloaded power operator. + /// /// The input base. /// The input exponent. + /// /// The base raised to the exponent. val inline ( ** ) : x:^T -> y:^U -> ^T when ^T : (static member Pow : ^T * ^U -> ^T) and default ^U : float and default ^T : float /// Overloaded power operator. If n > 0 then equivalent to x*...*x for n occurrences of x. + /// /// The input base. /// The input exponent. + /// /// The base raised to the exponent. [] val inline pown : x:^T -> n:int -> ^T when ^T : (static member One : ^T) @@ -2696,7 +3069,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Byte.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted byte [] val inline byte : value:^T -> byte when ^T : (static member op_Explicit : ^T -> byte) and default ^T : int @@ -2705,7 +3080,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using SByte.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted sbyte [] val inline sbyte : value:^T -> sbyte when ^T : (static member op_Explicit : ^T -> sbyte) and default ^T : int @@ -2714,7 +3091,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Int16.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int16 [] val inline int16 : value:^T -> int16 when ^T : (static member op_Explicit : ^T -> int16) and default ^T : int @@ -2723,7 +3102,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using UInt16.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint16 [] val inline uint16 : value:^T -> uint16 when ^T : (static member op_Explicit : ^T -> uint16) and default ^T : int @@ -2732,7 +3113,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Int32.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int [] val inline int : value:^T -> int when ^T : (static member op_Explicit : ^T -> int) and default ^T : int @@ -2741,13 +3124,17 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using UInt32.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int [] val inline uint: value:^T -> uint when ^T: (static member op_Explicit: ^T -> uint) and default ^T: uint /// Converts the argument to a particular enum type. + /// /// The input value. + /// /// The converted enum type. [] val inline enum : value:int32 -> ^U when ^U : enum @@ -2756,7 +3143,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Int32.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int32 [] val inline int32 : value:^T -> int32 when ^T : (static member op_Explicit : ^T -> int32) and default ^T : int @@ -2765,7 +3154,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using UInt32.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint32 [] val inline uint32 : value:^T -> uint32 when ^T : (static member op_Explicit : ^T -> uint32) and default ^T : int @@ -2774,7 +3165,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Int64.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int64 [] val inline int64 : value:^T -> int64 when ^T : (static member op_Explicit : ^T -> int64) and default ^T : int @@ -2783,7 +3176,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using UInt64.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint64 [] val inline uint64 : value:^T -> uint64 when ^T : (static member op_Explicit : ^T -> uint64) and default ^T : int @@ -2792,7 +3187,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Single.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted float32 [] val inline float32 : value:^T -> float32 when ^T : (static member op_Explicit : ^T -> float32) and default ^T : int @@ -2801,7 +3198,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Double.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted float [] val inline float : value:^T -> float when ^T : (static member op_Explicit : ^T -> float) and default ^T : int @@ -2809,7 +3208,9 @@ namespace Microsoft.FSharp.Core /// Converts the argument to signed native integer. This is a direct conversion for all /// primitive numeric types. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted nativeint [] val inline nativeint : value:^T -> nativeint when ^T : (static member op_Explicit : ^T -> nativeint) and default ^T : int @@ -2817,7 +3218,9 @@ namespace Microsoft.FSharp.Core /// Converts the argument to unsigned native integer using a direct conversion for all /// primitive numeric types. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted unativeint [] val inline unativeint : value:^T -> unativeint when ^T : (static member op_Explicit : ^T -> unativeint) and default ^T : int @@ -2827,6 +3230,7 @@ namespace Microsoft.FSharp.Core /// For standard integer and floating point values the ToString conversion /// uses CultureInfo.InvariantCulture. /// The input value. + /// /// The converted string. [] val inline string : value:^T -> string @@ -2835,7 +3239,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using UInt64.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted decimal. [] val inline decimal : value:^T -> decimal when ^T : (static member op_Explicit : ^T -> decimal) and default ^T : int @@ -2843,13 +3249,17 @@ namespace Microsoft.FSharp.Core /// Converts the argument to character. Numeric inputs are converted according to the UTF-16 /// encoding for characters. String inputs must be exactly one character long. For other /// input types the operation requires an appropriate static conversion method on the input type. + /// /// The input value. + /// /// The converted char. [] val inline char : value:^T -> char when ^T : (static member op_Explicit : ^T -> char) and default ^T : int - /// An active pattern to match values of type System.Collections.Generic.KeyValuePair + /// An active pattern to match values of type + /// /// The input key/value pair. + /// /// A tuple containing the key and value. [] val ( |KeyValue| ): keyValuePair:KeyValuePair<'Key,'Value> -> 'Key * 'Value @@ -2859,40 +3269,50 @@ namespace Microsoft.FSharp.Core module ArrayExtensions = type ``[,,,]``<'T> with /// Get the index for the element offset elements away from the end of the collection. + /// /// The rank of the index. This refers to the dimension in the 4d array. /// The offset from the end. + /// /// The corresponding index from the start. [] member GetReverseIndex: rank: int * offset: int -> int type ``[,,]``<'T> with /// Get the index for the element offset elements away from the end of the collection. + /// /// The rank of the index. This refers to the dimension in the 3d array. /// The offset from the end. + /// /// The corresponding index from the start. [] member GetReverseIndex: rank: int * offset: int -> int type ``[,]``<'T> with /// Get the index for the element offset elements away from the end of the collection. + /// /// The rank of the index. This refers to the dimension in the 2d array. /// The offset from the end. + /// /// The corresponding index from the start. [] member GetReverseIndex: rank: int * offset: int -> int type ``[]``<'T> with /// Get the index for the element offset elements away from the end of the collection. + /// /// The rank of the index. /// The offset from the end. + /// /// The corresponding index from the start. [] member GetReverseIndex: rank: int * offset: int -> int type System.String with /// Get the index for the element offset elements away from the end of the collection. + /// /// The rank of the index. /// The offset from the end. + /// /// The corresponding index from the start. [] member GetReverseIndex: rank: int * offset: int -> int @@ -2903,13 +3323,16 @@ namespace Microsoft.FSharp.Core module OperatorIntrinsics = /// Gets a slice of an array + /// /// The input array. /// The start index. /// The end index. + /// /// The sub array from the input indices. val inline GetArraySlice : source:'T[] -> start:int option -> finish:int option -> 'T[] /// Sets a slice of an array + /// /// The target array. /// The start index. /// The end index. @@ -2917,31 +3340,38 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice : target:'T[] -> start:int option -> finish:int option -> source:'T[] -> unit /// Gets a region slice of an array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. + /// /// The two dimensional sub array from the input indices. val inline GetArraySlice2D : source:'T[,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> 'T[,] /// Gets a vector slice of a 2D array. The index of the first dimension is fixed. + /// /// The source array. /// The index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. + /// /// The sub array from the input indices. val inline GetArraySlice2DFixed1 : source:'T[,] -> index1:int -> start2:int option -> finish2:int option -> 'T[] /// Gets a vector slice of a 2D array. The index of the second dimension is fixed. + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The fixed index of the second dimension. + /// /// The sub array from the input indices. val inline GetArraySlice2DFixed2 : source:'T[,] -> start1:int option -> finish1:int option -> index2: int -> 'T[] /// Sets a region slice of an array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -2951,6 +3381,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice2D : target:'T[,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> source:'T[,] -> unit /// Sets a vector slice of a 2D array. The index of the first dimension is fixed. + /// /// The target array. /// The index of the first dimension. /// The start index of the second dimension. @@ -2959,6 +3390,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice2DFixed1 : target:'T[,] -> index1:int -> start2:int option -> finish2:int option -> source:'T[] -> unit /// Sets a vector slice of a 2D array. The index of the second dimension is fixed. + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -2967,6 +3399,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice2DFixed2 : target:'T[,] -> start1:int option -> finish1:int option -> index2:int -> source:'T[] -> unit /// Gets a slice of an array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -2974,73 +3407,87 @@ namespace Microsoft.FSharp.Core /// The end index of the second dimension. /// The start index of the third dimension. /// The end index of the third dimension. + /// /// The three dimensional sub array from the given indices. val inline GetArraySlice3D : source:'T[,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> start3:int option -> finish3:int option -> 'T[,,] /// Gets a 2D slice of a 3D array. + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. /// The start index of the third dimension. /// The end index of the third dimension. + /// /// The two dimensional sub array from the given indices. [] val inline GetArraySlice3DFixedSingle1 : source:'T[,,] -> index1:int -> start2:int option -> finish2:int option -> start3:int option -> finish3:int option -> 'T[,] /// Gets a 2D slice of a 3D array. + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The fixed index of the second dimension. /// The start index of the third dimension. /// The end index of the third dimension. + /// /// The two dimensional sub array from the given indices. [] val inline GetArraySlice3DFixedSingle2 : source:'T[,,] -> start1:int option -> finish1:int option -> index2: int -> start3:int option -> finish3:int option -> 'T[,] /// Gets a 2D slice of a 3D array. + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. /// The fixed index of the third dimension. + /// /// The two dimensional sub array from the given indices. [] val inline GetArraySlice3DFixedSingle3 : source:'T[,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> index3: int -> 'T[,] /// Gets a 1D slice of a 3D array. + /// /// The source array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. /// The start index of the third dimension. /// The end index of the third dimension. + /// /// The one dimensional sub array from the given indices. [] val inline GetArraySlice3DFixedDouble1 : source:'T[,,] -> index1:int -> index2:int -> start3:int option -> finish3:int option -> 'T[] /// Gets a 1D slice of a 3D array. + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. /// The fixed index of the third dimension. + /// /// The one dimensional sub array from the given indices. [] val inline GetArraySlice3DFixedDouble2 : source:'T[,,] -> index1:int -> start2:int option -> finish2:int option -> index3:int -> 'T[] /// Gets a 1D slice of a 3D array. + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The fixed index of the second dimension. /// The fixed index of the third dimension. + /// /// The one dimensional sub array from the given indices. [] val inline GetArraySlice3DFixedDouble3 : source:'T[,,] -> start1:int option -> finish1:int option -> index2:int -> index3:int -> 'T[] /// Sets a slice of an array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3052,6 +3499,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice3D : target:'T[,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> start3:int option -> finish3:int option -> source:'T[,,] -> unit /// Sets a 2D slice of a 3D array + /// /// The target array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3059,11 +3507,13 @@ namespace Microsoft.FSharp.Core /// The start index of the third dimension. /// The end index of the third dimension. /// The source array. + /// /// The two dimensional sub array from the given indices. [] val inline SetArraySlice3DFixedSingle1 : target: 'T[,,] -> index1: int -> start2: int option -> finish2: int option -> start3: int option -> finish3: int option -> source: 'T[,] -> unit /// Sets a 2D slice of a 3D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3071,11 +3521,13 @@ namespace Microsoft.FSharp.Core /// The start index of the third dimension. /// The end index of the third dimension. /// The source array. + /// /// The two dimensional sub array from the given indices. [] val inline SetArraySlice3DFixedSingle2 : target: 'T[,,] -> start1: int option -> finish1: int option -> index2: int -> start3: int option -> finish3: int option -> source: 'T[,] -> unit /// Sets a 2D slice of a 3D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3083,44 +3535,52 @@ namespace Microsoft.FSharp.Core /// The end index of the second dimension. /// The fixed index of the third dimension. /// The source array. + /// /// The two dimensional sub array from the given indices. [] val inline SetArraySlice3DFixedSingle3 : target: 'T[,,] -> start1: int option -> finish1: int option -> start2: int option -> finish2: int option -> index3: int -> source: 'T[,] -> unit /// Sets a 1D slice of a 3D array. + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The fixed index of the second dimension. /// The fixed index of the third dimension. /// The source array. + /// /// The one dimensional sub array from the given indices. [] val inline SetArraySlice3DFixedDouble1 : target: 'T[,,] -> index1: int -> index2: int -> start3: int option -> finish3: int option -> source: 'T[] -> unit /// Sets a 1D slice of a 3D array. + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. /// The fixed index of the third dimension. /// The source array. + /// /// The one dimensional sub array from the given indices. [] val inline SetArraySlice3DFixedDouble2 : target: 'T[,,] -> index1: int -> start2: int option -> finish2: int option -> index3: int -> source: 'T[] -> unit /// Sets a 1D slice of a 3D array. + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The fixed index of the second dimension. /// The fixed index of the third dimension. /// The source array. + /// /// The one dimensional sub array from the given indices. [] val inline SetArraySlice3DFixedDouble3 : target: 'T[,,] -> start1: int option -> finish1: int option -> index2: int -> index3: int -> source: 'T[] -> unit /// Gets a slice of an array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3130,10 +3590,12 @@ namespace Microsoft.FSharp.Core /// The end index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The four dimensional sub array from the given indices. val inline GetArraySlice4D : source:'T[,,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> 'T[,,,] /// Gets a 3D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3142,10 +3604,12 @@ namespace Microsoft.FSharp.Core /// The end index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The three dimensional sub array from the given indices. val inline GetArraySlice4DFixedSingle1 : source:'T[,,,] -> index1:int -> start2: int option -> finish2:int option -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> 'T[,,] /// Gets a 3D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3154,10 +3618,12 @@ namespace Microsoft.FSharp.Core /// The end index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The three dimensional sub array from the given indices. val inline GetArraySlice4DFixedSingle2 : source:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> 'T[,,] /// Gets a 3D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3166,10 +3632,12 @@ namespace Microsoft.FSharp.Core /// The fixed index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The three dimensional sub array from the given indices. val inline GetArraySlice4DFixedSingle3 : source:'T[,,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> index3:int -> start4:int option -> finish4:int option -> 'T[,,] /// Gets a 3D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3178,10 +3646,12 @@ namespace Microsoft.FSharp.Core /// The start index of the third dimension. /// The end index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The three dimensional sub array from the given indices. val inline GetArraySlice4DFixedSingle4 : source:'T[,,,] -> start1:int option -> finish1:int option -> start2: int option -> finish2:int option -> start3:int option -> finish3:int option -> index4:int -> 'T[,,] /// Gets a 2D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. @@ -3189,10 +3659,12 @@ namespace Microsoft.FSharp.Core /// The end index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The two dimensional sub array from the given indices. val inline GetArraySlice4DFixedDouble1 : source:'T[,,,] -> index1: int -> index2:int -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> 'T[,] /// Gets a 2D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3200,10 +3672,12 @@ namespace Microsoft.FSharp.Core /// The fixed index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The two dimensional sub array from the given indices. val inline GetArraySlice4DFixedDouble2 : source:'T[,,,] -> index1: int -> start2: int option -> finish2:int option -> index3:int -> start4:int option -> finish4:int option -> 'T[,] /// Gets a 2D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3211,10 +3685,12 @@ namespace Microsoft.FSharp.Core /// The start index of the third dimension. /// The end index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The two dimensional sub array from the given indices. val inline GetArraySlice4DFixedDouble3 : source:'T[,,,] -> index1:int -> start2: int option -> finish2:int option -> start3:int option -> finish3:int option -> index4:int -> 'T[,] /// Gets a 2D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3222,10 +3698,12 @@ namespace Microsoft.FSharp.Core /// The fixed index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The two dimensional sub array from the given indices. val inline GetArraySlice4DFixedDouble4 : source:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> index3:int -> start4:int option -> finish4:int option -> 'T[,] /// Gets a 2D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3233,10 +3711,12 @@ namespace Microsoft.FSharp.Core /// The start index of the third dimension. /// The end index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The two dimensional sub array from the given indices. val inline GetArraySlice4DFixedDouble5 : source:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> start3:int option -> finish3:int option -> index4:int -> 'T[,] /// Gets a 2D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3244,50 +3724,60 @@ namespace Microsoft.FSharp.Core /// The end index of the second dimension. /// The fixed index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The two dimensional sub array from the given indices. val inline GetArraySlice4DFixedDouble6 : source:'T[,,,] -> start1:int option -> finish1:int option -> start2: int option -> finish2:int option -> index3:int -> index4:int -> 'T[,] /// Gets a 1D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. /// The fixed index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The one dimensional sub array from the given indices. val inline GetArraySlice4DFixedTriple4 : source:'T[,,,] -> index1:int -> index2:int -> index3:int -> start4:int option -> finish4:int option -> 'T[] /// Gets a 1D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. /// The start index of the third dimension. /// The end index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The one dimensional sub array from the given indices. val inline GetArraySlice4DFixedTriple3 : source:'T[,,,] -> index1:int -> index2:int -> start3:int option -> finish3:int option -> index4:int -> 'T[] /// Gets a 1D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. /// The fixed index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The one dimensional sub array from the given indices. val inline GetArraySlice4DFixedTriple2 : source:'T[,,,] -> index1:int -> start2: int option -> finish2:int option -> index3:int -> index4:int -> 'T[] /// Gets a 1D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The fixed index of the second dimension. /// The fixed index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The one dimensional sub array from the given indices. val inline GetArraySlice4DFixedTriple1 : source:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> index3:int -> index4:int -> 'T[] /// Gets a 3D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3300,6 +3790,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedSingle1 : target:'T[,,,] -> index1:int -> start2: int option -> finish2:int option -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> source: 'T[,,] -> unit /// Sets a 3D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3312,6 +3803,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedSingle2 : target:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> source: 'T[,,] -> unit /// Sets a 3D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3324,6 +3816,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedSingle3 : target:'T[,,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> index3:int -> start4:int option -> finish4:int option -> source: 'T[,,] -> unit /// Sets a 3D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3336,6 +3829,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedSingle4 : target:'T[,,,] -> start1:int option -> finish1:int option -> start2: int option -> finish2:int option -> start3:int option -> finish3:int option -> index4:int -> source: 'T[,,] -> unit /// Sets a 2D slice of a 4D array + /// /// The target array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. @@ -3347,6 +3841,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedDouble1 : target:'T[,,,] -> index1: int -> index2:int -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> source: 'T[,] -> unit /// Sets a 2D slice of a 4D array + /// /// The target array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3358,6 +3853,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedDouble2 : target:'T[,,,] -> index1: int -> start2: int option -> finish2:int option -> index3:int -> start4:int option -> finish4:int option -> source: 'T[,] -> unit /// Sets a 2D slice of a 4D array + /// /// The target array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3369,6 +3865,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedDouble3 : target:'T[,,,] -> index1:int -> start2: int option -> finish2:int option -> start3:int option -> finish3:int option -> index4:int -> source: 'T[,] -> unit /// Sets a 2D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3380,6 +3877,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedDouble4 : target:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> index3:int -> start4:int option -> finish4:int option -> source: 'T[,] -> unit /// Sets a 2D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3391,6 +3889,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedDouble5 : target:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> start3:int option -> finish3:int option -> index4:int -> source: 'T[,] -> unit /// Sets a 2D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3402,6 +3901,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedDouble6 : target:'T[,,,] -> start1:int option -> finish1:int option -> start2: int option -> finish2:int option -> index3:int -> index4:int -> source: 'T[,] -> unit /// Sets a 1D slice of a 4D array + /// /// The target array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. @@ -3412,6 +3912,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedTriple4 : target:'T[,,,] -> index1:int -> index2:int -> index3:int -> start4:int option -> finish4:int option -> source: 'T[] -> unit /// Sets a 1D slice of a 4D array + /// /// The target array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. @@ -3422,6 +3923,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedTriple3 : target:'T[,,,] -> index1:int -> index2:int -> start3:int option -> finish3:int option -> index4:int -> source: 'T[] -> unit /// Sets a 1D slice of a 4D array + /// /// The target array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3432,6 +3934,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedTriple2 : target:'T[,,,] -> index1:int -> start2: int option -> finish2:int option -> index3:int -> index4:int -> source: 'T[] -> unit /// Sets a 1D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3442,6 +3945,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedTriple1 : target:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> index3:int -> index4:int -> source: 'T[] -> unit /// Sets a slice of an array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3455,9 +3959,11 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4D : target:'T[,,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> source:'T[,,,] -> unit /// Gets a slice from a string + /// /// The source string. /// The index of the first character of the slice. /// The index of the last character of the slice. + /// /// The substring from the given indices. val inline GetStringSlice : source:string -> start:int option -> finish:int option -> string @@ -3665,7 +4171,9 @@ namespace Microsoft.FSharp.Core module Unchecked = /// Unboxes a strongly typed value. This is the inverse of box, unbox<t>(box<t> a) equals a. + /// /// The boxed value. + /// /// The unboxed result. [] val inline unbox<'T> : obj -> 'T @@ -3700,64 +4208,84 @@ namespace Microsoft.FSharp.Core module NonStructuralComparison = /// Compares the two values for less-than + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( < ) : x:^T -> y:^U -> bool when (^T or ^U) : (static member ( < ) : ^T * ^U -> bool) /// Compares the two values for greater-than + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( > ) : x:^T -> y:^U -> bool when (^T or ^U) : (static member ( > ) : ^T * ^U -> bool) /// Compares the two values for greater-than-or-equal + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( >= ) : x:^T -> y:^U -> bool when (^T or ^U) : (static member ( >= ) : ^T * ^U -> bool) /// Compares the two values for less-than-or-equal + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( <= ) : x:^T -> y:^U -> bool when (^T or ^U) : (static member ( <= ) : ^T * ^U -> bool) /// Compares the two values for equality + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( = ) : x:^T -> y:^T -> bool when ^T : (static member ( = ) : ^T * ^T -> bool) /// Compares the two values for inequality + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( <> ) : x:^T -> y:^T -> bool when ^T : (static member ( <> ) : ^T * ^T -> bool) /// Compares the two values + /// /// The first value. /// The second value. + /// /// The result of the comparison. [] val inline compare: e1:'T -> e2:^T -> int when ^T : (static member ( < ) : ^T * ^T -> bool) and ^T : (static member ( > ) : ^T * ^T -> bool) /// Maximum of the two values + /// /// The first value. /// The second value. + /// /// The maximum value. [] val inline max : e1:^T -> e2:^T -> ^T when ^T : (static member ( < ) : ^T * ^T -> bool) /// Minimum of the two values + /// /// The first value. /// The second value. + /// /// The minimum value. [] val inline min : e1:^T -> e2:^T -> ^T when ^T : (static member ( < ) : ^T * ^T -> bool) /// Calls GetHashCode() on the value + /// /// The value. + /// /// The hash code. [] val inline hash :value:'T -> int when 'T : equality @@ -3765,113 +4293,141 @@ namespace Microsoft.FSharp.Core /// This module contains the basic arithmetic operations with overflow checks. module Checked = /// Overloaded unary negation (checks for overflow) + /// /// The input value. + /// /// The negated value. val inline ( ~- ) : value:^T -> ^T when ^T : (static member ( ~- ) : ^T -> ^T) and default ^T : int /// Overloaded subtraction operator (checks for overflow) + /// /// The first value. /// The second value. + /// /// The first value minus the second value. val inline ( - ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( - ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded addition operator (checks for overflow) + /// /// The first value. /// The second value. + /// /// The sum of the two input values. val inline ( + ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( + ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded multiplication operator (checks for overflow) + /// /// The first value. /// The second value. + /// /// The product of the two input values. val inline ( * ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( * ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Converts the argument to byte. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.Byte.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted byte [] val inline byte : value:^T -> byte when ^T : (static member op_Explicit : ^T -> byte) and default ^T : int /// Converts the argument to sbyte. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.SByte.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted sbyte [] val inline sbyte : value:^T -> sbyte when ^T : (static member op_Explicit : ^T -> sbyte) and default ^T : int /// Converts the argument to int16. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.Int16.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int16 [] val inline int16 : value:^T -> int16 when ^T : (static member op_Explicit : ^T -> int16) and default ^T : int /// Converts the argument to uint16. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.UInt16.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint16 [] val inline uint16 : value:^T -> uint16 when ^T : (static member op_Explicit : ^T -> uint16) and default ^T : int /// Converts the argument to int. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.Int32.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int [] val inline int : value:^T -> int when ^T : (static member op_Explicit : ^T -> int) and default ^T : int /// Converts the argument to int32. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.Int32.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int32 [] val inline int32 : value:^T -> int32 when ^T : (static member op_Explicit : ^T -> int32) and default ^T : int /// Converts the argument to uint32. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.UInt32.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint32 [] val inline uint32 : value:^T -> uint32 when ^T : (static member op_Explicit : ^T -> uint32) and default ^T : int /// Converts the argument to int64. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.Int64.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int64 [] val inline int64 : value:^T -> int64 when ^T : (static member op_Explicit : ^T -> int64) and default ^T : int /// Converts the argument to uint64. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.UInt64.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint64 [] val inline uint64 : value:^T -> uint64 when ^T : (static member op_Explicit : ^T -> uint64) and default ^T : int - /// Converts the argument to nativeint. This is a direct, checked conversion for all + /// Converts the argument to . This is a direct, checked conversion for all /// primitive numeric types. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted nativeint [] val inline nativeint : value:^T -> nativeint when ^T : (static member op_Explicit : ^T -> nativeint) and default ^T : int @@ -3879,7 +4435,9 @@ namespace Microsoft.FSharp.Core /// Converts the argument to unativeint. This is a direct, checked conversion for all /// primitive numeric types. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted unativeint [] val inline unativeint : value:^T -> unativeint when ^T : (static member op_Explicit : ^T -> unativeint) and default ^T : int @@ -3888,7 +4446,9 @@ namespace Microsoft.FSharp.Core /// conversion according to the UTF-16 encoding for characters. String inputs must /// be exactly one character long. For other input types the operation requires an /// appropriate static conversion method on the input type. + /// /// The input value. + /// /// The converted char [] val inline char : value:^T -> char when ^T : (static member op_Explicit : ^T -> char) and default ^T : int @@ -3905,13 +4465,17 @@ namespace Microsoft.FSharp.Control type System.Lazy<'T> with /// Creates a lazy computation that evaluates to the result of the given function when forced. + /// /// The function to provide the value when needed. + /// /// The created Lazy object. [] // give the extension member a 'nice', unmangled compiled name, unique within this module static member Create : creator:(unit -> 'T) -> System.Lazy<'T> /// Creates a lazy computation that evaluates to the given value when forced. + /// /// The input value. + /// /// The created Lazy object. [] // give the extension member a 'nice', unmangled compiled name, unique within this module static member CreateFromValue : value:'T -> System.Lazy<'T> @@ -3926,7 +4490,7 @@ namespace Microsoft.FSharp.Control /// /// Use the values in the Lazy module to manipulate /// values of this type, and the notation lazy expr to create values - /// of type . + /// of type . type Lazy<'T> = System.Lazy<'T> and [] @@ -3947,10 +4511,12 @@ namespace Microsoft.FSharp.Control /// Connect a handler delegate object to the event. A handler can /// be later removed using RemoveHandler. The listener will /// be invoked when the event is fired. + /// /// A delegate to be invoked when the event is fired. abstract AddHandler: handler:'Delegate -> unit /// Remove a listener delegate from an event listener store. + /// /// The delegate to be removed from the event listener store. abstract RemoveHandler: handler:'Delegate -> unit @@ -3961,6 +4527,7 @@ namespace Microsoft.FSharp.Control inherit IObservable<'Args> /// A delegate type associated with the F# event type IEvent<_> + /// /// The object that fired the event. /// The event arguments. [] diff --git a/src/fsharp/FSharp.Core/printf.fsi b/src/fsharp/FSharp.Core/printf.fsi index 10e17ec68d8..37e98e99d27 100644 --- a/src/fsharp/FSharp.Core/printf.fsi +++ b/src/fsharp/FSharp.Core/printf.fsi @@ -18,6 +18,7 @@ type PrintfFormat<'Printer,'State,'Residue,'Result> = /// Construct a format string /// The input string. + /// /// The PrintfFormat containing the formatted result. new : value:string -> PrintfFormat<'Printer,'State,'Residue,'Result> @@ -35,7 +36,9 @@ type PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> = inherit PrintfFormat<'Printer,'State,'Residue,'Result> /// Construct a format string + /// /// The input string. + /// /// The created format string. new: value:string -> PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> @@ -57,88 +60,11 @@ type Format<'Printer,'State,'Residue,'Result,'Tuple> = PrintfFormat<'Printer,'St /// Extensible printf-style formatting for numbers and other datatypes /// /// Format specifications are strings with "%" markers indicating format -/// placeholders. Format placeholders consist of: -/// -/// %[flags][width][.precision][type] -/// -/// where the type is interpreted as follows: -/// -/// %b: bool, formatted as "true" or "false" -/// %s: string, formatted as its unescaped contents -/// %c: character literal -/// %d, %i: any basic integer type formatted as a decimal integer, signed if the basic integer type is signed. -/// %u: any basic integer type formatted as an unsigned decimal integer -/// %x, %X, %o: any basic integer type formatted as an unsigned hexadecimal -/// (a-f)/Hexadecimal (A-F)/Octal integer -/// -/// %e, %E, %f, %F, %g, %G: -/// any basic floating point type (float,float32) formatted -/// using a C-style floating point format specifications, i.e -/// -/// %e, %E: Signed value having the form [-]d.dddde[sign]ddd where -/// d is a single decimal digit, dddd is one or more decimal -/// digits, ddd is exactly three decimal digits, and sign -/// is + or - -/// -/// %f: Signed value having the form [-]dddd.dddd, where dddd is one -/// or more decimal digits. The number of digits before the -/// decimal point depends on the magnitude of the number, and -/// the number of digits after the decimal point depends on -/// the requested precision. -/// -/// %g, %G: Signed value printed in f or e format, whichever is -/// more compact for the given value and precision. -/// -/// -/// %M: System.Decimal value -/// -/// %O: Any value, printed by boxing the object and using it's ToString method(s) -/// -/// %A: Any value, printed with the default layout settings -/// -/// %a: A general format specifier, requires two arguments: -/// (1) a function which accepts two arguments: -/// (a) a context parameter of the appropriate type for the -/// given formatting function (e.g. an #System.IO.TextWriter) -/// (b) a value to print -/// and which either outputs or returns appropriate text. -/// -/// (2) the particular value to print -/// -/// -/// %t: A general format specifier, requires one argument: -/// (1) a function which accepts a context parameter of the -/// appropriate type for the given formatting function (e.g. -/// an System.IO.TextWriter)and which either outputs or returns -/// appropriate text. -/// -/// Basic integer types are: -/// byte,sbyte,int16,uint16,int32,uint32,int64,uint64,nativeint,unativeint -/// Basic floating point types are: -/// float, float32 -/// -/// The optional width is an integer indicating the minimal width of the -/// result. For instance, %6d prints an integer, prefixing it with spaces -/// to fill at least 6 characters. If width is '*', then an extra integer -/// argument is taken to specify the corresponding width. -/// -/// any number -/// '*': -/// -/// Valid flags are: -/// -/// 0: add zeros instead of spaces to make up the required width -/// '-': left justify the result within the width specified -/// '+': add a '+' character if the number is positive (to match a '-' sign -/// for negatives) -/// ' ': add an extra space if the number is positive (to match a '-' -/// sign for negatives) -/// -/// The printf '#' flag is invalid and a compile-time error will be reported if it is used. +/// placeholders. Format placeholders consist of %[flags][width][.precision][type]. [] module Printf = - /// Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The first type parameter indicates the + /// Represents a statically-analyzed format associated with writing to a . The first type parameter indicates the /// arguments of the format operation and the last the overall return type. type BuilderFormat<'T,'Result> = Format<'T, StringBuilder, unit, 'Result> @@ -146,11 +72,11 @@ module Printf = /// arguments of the format operation and the last the overall return type. type StringFormat<'T,'Result> = Format<'T, unit, string, 'Result> - /// Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The first type parameter indicates the + /// Represents a statically-analyzed format associated with writing to a . The first type parameter indicates the /// arguments of the format operation and the last the overall return type. type TextWriterFormat<'T,'Result> = Format<'T, TextWriter, unit, 'Result> - /// Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The type parameter indicates the + /// Represents a statically-analyzed format associated with writing to a . The type parameter indicates the /// arguments and return type of the format operation. type BuilderFormat<'T> = BuilderFormat<'T,unit> @@ -158,76 +84,96 @@ module Printf = /// arguments and return type of the format operation. type StringFormat<'T> = StringFormat<'T,string> - /// Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The type parameter indicates the + /// Represents a statically-analyzed format associated with writing to a . The type parameter indicates the /// arguments and return type of the format operation. type TextWriterFormat<'T> = TextWriterFormat<'T,unit> - /// Print to a System.Text.StringBuilder + /// Print to a + /// /// The StringBuilder to print to. /// The input formatter. + /// /// The return type and arguments of the formatter. [] val bprintf : builder:StringBuilder -> format:BuilderFormat<'T> -> 'T /// Print to a text writer. + /// /// The TextWriter to print to. /// The input formatter. + /// /// The return type and arguments of the formatter. [] val fprintf : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T /// Print to a text writer, adding a newline + /// /// The TextWriter to print to. /// The input formatter. + /// /// The return type and arguments of the formatter. [] val fprintfn : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T /// Formatted printing to stderr + /// /// The input formatter. + /// /// The return type and arguments of the formatter. [] val eprintf : format:TextWriterFormat<'T> -> 'T /// Formatted printing to stderr, adding a newline + /// /// The input formatter. + /// /// The return type and arguments of the formatter. [] val eprintfn : format:TextWriterFormat<'T> -> 'T /// Formatted printing to stdout + /// /// The input formatter. + /// /// The return type and arguments of the formatter. [] val printf : format:TextWriterFormat<'T> -> 'T /// Formatted printing to stdout, adding a newline. + /// /// The input formatter. + /// /// The return type and arguments of the formatter. [] val printfn : format:TextWriterFormat<'T> -> 'T /// Print to a string via an internal string buffer and return /// the result as a string. Helper printers must return strings. + /// /// The input formatter. + /// /// The formatted string. [] val sprintf : format:StringFormat<'T> -> 'T /// bprintf, but call the given 'final' function to generate the result. /// See kprintf. + /// /// The function called after formatting to generate the format result. /// The input StringBuilder. /// The input formatter. + /// /// The arguments of the formatter. [] val kbprintf : continuation:(unit -> 'Result) -> builder:StringBuilder -> format:BuilderFormat<'T,'Result> -> 'T /// fprintf, but call the given 'final' function to generate the result. /// See kprintf. + /// /// The function called after formatting to generate the format result. /// The input TextWriter. /// The input formatter. + /// /// The arguments of the formatter. [] val kfprintf : continuation:(unit -> 'Result) -> textWriter:TextWriter -> format:TextWriterFormat<'T,'Result> -> 'T @@ -235,23 +181,29 @@ module Printf = /// printf, but call the given 'final' function to generate the result. /// For example, these let the printing force a flush after all output has /// been entered onto the channel, but not before. + /// /// The function called after formatting to generate the format result. /// The input formatter. + /// /// The arguments of the formatter. [] val kprintf : continuation:(string -> 'Result) -> format:StringFormat<'T,'Result> -> 'T /// sprintf, but call the given 'final' function to generate the result. /// See kprintf. + /// /// The function called to generate a result from the formatted string. /// The input formatter. + /// /// The arguments of the formatter. [] val ksprintf : continuation:(string -> 'Result) -> format:StringFormat<'T,'Result> -> 'T /// Print to a string buffer and raise an exception with the given /// result. Helper printers must return strings. + /// /// The input formatter. + /// /// The arguments of the formatter. [] val failwithf: format:StringFormat<'T,'Result> -> 'T diff --git a/src/fsharp/FSharp.Core/quotations.fsi b/src/fsharp/FSharp.Core/quotations.fsi index e51ed2bd747..bdeab19a85b 100644 --- a/src/fsharp/FSharp.Core/quotations.fsi +++ b/src/fsharp/FSharp.Core/quotations.fsi @@ -26,13 +26,16 @@ type Var = /// The declared name of the variable. /// The type associated with the variable. /// Indicates if the variable represents a mutable storage location. Default is false. + /// /// The created variable. new : name:string * typ:Type * ?isMutable : bool -> Var /// Fetches or create a new variable with the given name and type from a global pool of shared variables /// indexed by name and type + /// /// The name of the variable. /// The type associated with the variable. + /// /// The retrieved or created variable. static member Global : name:string * typ:Type -> Var @@ -47,7 +50,9 @@ type Expr = /// to map variables to new values. The functions must give consistent results /// at each application. Variable renaming may occur on the target expression /// if variable capture occurs. + /// /// The function to map variables into expressions. + /// /// The expression with the given substitutions. member Substitute : substitution:(Var -> Expr option) -> Expr @@ -64,309 +69,405 @@ type Expr = override Equals : obj:obj -> bool /// Builds an expression that represents getting the address of a value. + /// /// The target expression. + /// /// The resulting expression. static member AddressOf : target:Expr -> Expr /// Builds an expression that represents setting the value held at a particular address. + /// /// The target expression. /// The value to set at the address. + /// /// The resulting expression. static member AddressSet : target:Expr * value:Expr -> Expr /// Builds an expression that represents the application of a first class function value to a single argument. + /// /// The function to apply. /// The argument to the function. + /// /// The resulting expression. static member Application: functionExpr:Expr * argument:Expr -> Expr /// Builds an expression that represents the application of a first class function value to multiple arguments + /// /// The function to apply. /// The list of lists of arguments to the function. + /// /// The resulting expression. static member Applications: functionExpr:Expr * arguments:list> -> Expr /// Builds an expression that represents a call to an static method or module-bound function + /// /// The MethodInfo describing the method to call. /// The list of arguments to the method. + /// /// The resulting expression. static member Call : methodInfo:MethodInfo * arguments:list -> Expr /// Builds an expression that represents a call to an instance method associated with an object + /// /// The input object. /// The description of the method to call. /// The list of arguments to the method. + /// /// The resulting expression. static member Call : obj:Expr * methodInfo:MethodInfo * arguments:list -> Expr /// Builds an expression that represents a call to an static method or module-bound function + /// /// The MethodInfo describing the method to call. /// The additional MethodInfo describing the method to call, accepting witnesses. /// The list of witnesses to the method. /// The list of arguments to the method. + /// /// The resulting expression. [] static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr /// Builds an expression that represents a call to an instance method associated with an object + /// /// The input object. /// The description of the method to call. /// The additional MethodInfo describing the method to call, accepting witnesses. /// The list of witnesses to the method. /// The list of arguments to the method. + /// /// The resulting expression. [] static member CallWithWitnesses: obj:Expr * methodInfo:MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments:Expr list -> Expr /// Builds an expression that represents the coercion of an expression to a type + /// /// The expression to coerce. /// The target type. + /// /// The resulting expression. static member Coerce : source:Expr * target:Type -> Expr /// Builds 'if ... then ... else' expressions. + /// /// The condition expression. /// The then sub-expression. /// The else sub-expression. + /// /// The resulting expression. static member IfThenElse : guard:Expr * thenExpr:Expr * elseExpr:Expr -> Expr /// Builds a 'for i = ... to ... do ...' expression that represent loops over integer ranges + /// /// The sub-expression declaring the loop variable. /// The sub-expression setting the initial value of the loop variable. /// The sub-expression declaring the final value of the loop variable. /// The sub-expression representing the body of the loop. + /// /// The resulting expression. static member ForIntegerRangeLoop: loopVariable:Var * start:Expr * endExpr:Expr * body:Expr -> Expr /// Builds an expression that represents the access of a static field + /// /// The description of the field to access. + /// /// The resulting expression. static member FieldGet: fieldInfo:FieldInfo -> Expr /// Builds an expression that represents the access of a field of an object + /// /// The input object. /// The description of the field to access. + /// /// The resulting expression. static member FieldGet: obj:Expr * fieldInfo:FieldInfo -> Expr /// Builds an expression that represents writing to a static field + /// /// The description of the field to write to. /// The value to the set to the field. + /// /// The resulting expression. static member FieldSet: fieldInfo:FieldInfo * value:Expr -> Expr /// Builds an expression that represents writing to a field of an object + /// /// The input object. /// The description of the field to write to. /// The value to set to the field. + /// /// The resulting expression. static member FieldSet: obj:Expr * fieldInfo:FieldInfo * value:Expr -> Expr /// Builds an expression that represents the construction of an F# function value + /// /// The parameter to the function. /// The body of the function. + /// /// The resulting expression. static member Lambda : parameter:Var * body:Expr -> Expr /// Builds expressions associated with 'let' constructs + /// /// The variable in the let expression. /// The expression bound to the variable. /// The sub-expression where the binding is in scope. + /// /// The resulting expression. static member Let : letVariable:Var * letExpr:Expr * body:Expr -> Expr /// Builds recursive expressions associated with 'let rec' constructs + /// /// The list of bindings for the let expression. /// The sub-expression where the bindings are in scope. + /// /// The resulting expression. static member LetRecursive : bindings:(Var * Expr) list * body:Expr -> Expr /// Builds an expression that represents the invocation of an object constructor + /// /// The description of the constructor. /// The list of arguments to the constructor. + /// /// The resulting expression. static member NewObject: constructorInfo:ConstructorInfo * arguments:Expr list -> Expr /// Builds an expression that represents the invocation of a default object constructor + /// /// The type on which the constructor is invoked. + /// /// The resulting expression. static member DefaultValue: expressionType:Type -> Expr /// Builds an expression that represents the creation of an F# tuple value + /// /// The list of elements of the tuple. + /// /// The resulting expression. static member NewTuple: elements:Expr list -> Expr /// Builds an expression that represents the creation of an F# tuple value + /// /// Runtime assembly containing System.ValueTuple definitions. /// The list of elements of the tuple. + /// /// The resulting expression. static member NewStructTuple: asm:Assembly * elements:Expr list -> Expr /// Builds record-construction expressions + /// /// The type of record. /// The list of elements of the record. + /// /// The resulting expression. static member NewRecord: recordType:Type * elements:Expr list -> Expr /// Builds an expression that represents the creation of an array value initialized with the given elements + /// /// The type for the elements of the array. /// The list of elements of the array. + /// /// The resulting expression. static member NewArray: elementType:Type * elements:Expr list -> Expr /// Builds an expression that represents the creation of a delegate value for the given type + /// /// The type of delegate. /// The parameters for the delegate. /// The body of the function. + /// /// The resulting expression. static member NewDelegate: delegateType:Type * parameters:Var list * body:Expr -> Expr /// Builds an expression that represents the creation of a union case value + /// /// The description of the union case. /// The list of arguments for the case. + /// /// The resulting expression. static member NewUnionCase: unionCase:UnionCaseInfo * arguments:Expr list -> Expr /// Builds an expression that represents reading a property of an object + /// /// The input object. /// The description of the property. /// List of indices for the property if it is an indexed property. + /// /// The resulting expression. static member PropertyGet: obj:Expr * property:PropertyInfo * ?indexerArgs: Expr list -> Expr /// Builds an expression that represents reading a static property + /// /// The description of the property. /// List of indices for the property if it is an indexed property. + /// /// The resulting expression. static member PropertyGet: property:PropertyInfo * ?indexerArgs: Expr list -> Expr /// Builds an expression that represents writing to a property of an object + /// /// The input object. /// The description of the property. /// The value to set. /// List of indices for the property if it is an indexed property. + /// /// The resulting expression. static member PropertySet: obj:Expr * property:PropertyInfo * value:Expr * ?indexerArgs: Expr list -> Expr /// Builds an expression that represents writing to a static property + /// /// The description of the property. /// The value to set. /// List of indices for the property if it is an indexed property. + /// /// The resulting expression. static member PropertySet: property:PropertyInfo * value:Expr * ?indexerArgs: Expr list -> Expr /// Builds an expression that represents a nested typed or raw quotation literal + /// /// The expression being quoted. + /// /// The resulting expression. [] static member Quote: inner:Expr -> Expr /// Builds an expression that represents a nested raw quotation literal + /// /// The expression being quoted. + /// /// The resulting expression. static member QuoteRaw: inner:Expr -> Expr /// Builds an expression that represents a nested typed quotation literal + /// /// The expression being quoted. + /// /// The resulting expression. static member QuoteTyped: inner:Expr -> Expr /// Builds an expression that represents the sequential execution of one expression followed by another + /// /// The first expression. /// The second expression. + /// /// The resulting expression. static member Sequential: first:Expr * second:Expr -> Expr /// Builds an expression that represents a try/with construct for exception filtering and catching. + /// /// The body of the try expression. /// /// /// The variable to bind to a caught exception. /// The expression evaluated when an exception is caught. + /// /// The resulting expression. static member TryWith: body:Expr * filterVar:Var * filterBody:Expr * catchVar:Var * catchBody:Expr -> Expr /// Builds an expression that represents a try/finally construct + /// /// The body of the try expression. /// The final part of the expression to be evaluated. + /// /// The resulting expression. static member TryFinally: body:Expr * compensation:Expr -> Expr /// Builds an expression that represents getting a field of a tuple + /// /// The input tuple. /// The index of the tuple element to get. + /// /// The resulting expression. static member TupleGet: tuple:Expr * index:int -> Expr /// Builds an expression that represents a type test. + /// /// The expression to test. /// The target type. + /// /// The resulting expression. static member TypeTest: source:Expr * target:Type -> Expr /// Builds an expression that represents a test of a value is of a particular union case + /// /// The expression to test. /// The description of the union case. + /// /// The resulting expression. static member UnionCaseTest: source:Expr * unionCase:UnionCaseInfo -> Expr /// Builds an expression that represents a constant value of a particular type + /// /// The untyped object. /// The type of the object. + /// /// The resulting expression. static member Value : value:obj * expressionType:Type -> Expr /// Builds an expression that represents a constant value + /// /// The typed value. + /// /// The resulting expression. static member Value : value:'T -> Expr /// Builds an expression that represents a constant value, arising from a variable of the given name + /// /// The typed value. /// The name of the variable. + /// /// The resulting expression. static member ValueWithName : value:'T * name: string -> Expr /// Builds an expression that represents a constant value of a particular type, arising from a variable of the given name + /// /// The untyped object. /// The type of the object. /// The name of the variable. + /// /// The resulting expression. static member ValueWithName : value:obj * expressionType:Type * name: string -> Expr /// Builds an expression that represents a value and its associated reflected definition as a quotation + /// /// The value being quoted. /// The definition of the value being quoted. + /// /// The resulting expression. static member WithValue: value: 'T * definition: Expr<'T> -> Expr<'T> /// Builds an expression that represents a value and its associated reflected definition as a quotation + /// /// The untyped object. /// The type of the object. /// The definition of the value being quoted. + /// /// The resulting expression. static member WithValue: value: obj * expressionType:Type * definition: Expr -> Expr /// Builds an expression that represents a variable + /// /// The input variable. + /// /// The resulting expression. static member Var : variable:Var -> Expr /// Builds an expression that represents setting a mutable variable + /// /// The input variable. /// The value to set. + /// /// The resulting expression. static member VarSet : variable:Var * value:Expr -> Expr /// Builds an expression that represents a while loop + /// /// The predicate to control the loop iteration. /// The body of the while loop. + /// /// The resulting expression. static member WhileLoop : guard:Expr * body:Expr -> Expr @@ -376,38 +477,47 @@ type Expr = /// Returns a new typed expression given an underlying runtime-typed expression. /// A type annotation is usually required to use this function, and /// using an incorrect type annotation may result in a later runtime exception. + /// /// The expression to cast. + /// /// The resulting typed expression. static member Cast : source:Expr -> Expr<'T> /// Try and find a stored reflection definition for the given method. Stored reflection /// definitions are added to an F# assembly through the use of the [<ReflectedDefinition>] attribute. + /// /// The description of the method to find. + /// /// The reflection definition or None if a match could not be found. static member TryGetReflectedDefinition : methodBase:MethodBase -> Expr option /// This function is called automatically when quotation syntax (<@ @>) and other sources of /// quotations are used. + /// /// A type in the assembly where the quotation occurs. /// The spliced types, to replace references to type variables. /// The spliced expressions to replace references to spliced expressions. /// The serialized form of the quoted expression. + /// /// The resulting expression. static member Deserialize : qualifyingType:System.Type * spliceTypes:list * spliceExprs:list * bytes:byte[] -> Expr /// This function is called automatically when quotation syntax (<@ @>) and other sources of /// quotations are used. + /// /// A type in the assembly where the quotation occurs. /// The type definitions referenced. /// The spliced types, to replace references to type variables. /// The spliced expressions to replace references to spliced expressions. /// The serialized form of the quoted expression. + /// /// The resulting expression. static member Deserialize40 : qualifyingType:Type * referencedTypes:Type[] * spliceTypes:Type[] * spliceExprs:Expr[] * bytes:byte[] -> Expr /// Permits interactive environments such as F# Interactive /// to explicitly register new pickled resources that represent persisted /// top level definitions. + /// /// The assembly associated with the resource. /// The unique name for the resources being added. /// The serialized resource to register with the environment. @@ -416,6 +526,7 @@ type Expr = /// Permits interactive environments such as F# Interactive /// to explicitly register new pickled resources that represent persisted /// top level definitions. + /// /// The assembly associated with the resource. /// The unique name for the resources being added. /// The type definitions referenced. @@ -424,12 +535,16 @@ type Expr = /// Fetches or creates a new variable with the given name and type from a global pool of shared variables /// indexed by name and type. The type is given by the explicit or inferred type parameter + /// /// The variable name. + /// /// The created of fetched typed global variable. static member GlobalVar<'T> : name:string -> Expr<'T> /// Format the expression as a string + /// /// Indicates if method, property, constructor and type objects should be printed in detail. If false, these are abbreviated to their name. + /// /// The formatted string. member ToString : full: bool -> string @@ -449,231 +564,307 @@ and [] module Patterns = /// An active pattern to recognize expressions that represent getting the address of a value + /// /// The input expression to match against. + /// /// Expr option [] val (|AddressOf|_|) : input:Expr -> Expr option /// An active pattern to recognize expressions that represent setting the value held at an address + /// /// The input expression to match against. + /// /// (Expr * Expr) option [] val (|AddressSet|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize expressions that represent applications of first class function values + /// /// The input expression to match against. + /// /// (Expr * Expr) option [] val (|Application|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules + /// /// The input expression to match against. + /// /// (Expr option * MethodInfo * Expr list) option [] val (|Call|_|) : input:Expr -> (Expr option * MethodInfo * Expr list) option /// An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules, including witness arguments + /// /// The input expression to match against. + /// /// (Expr option * MethodInfo * MethodInfo * Expr list) option [] [] val (|CallWithWitnesses|_|) : input:Expr -> (Expr option * MethodInfo * MethodInfo * Expr list * Expr list) option /// An active pattern to recognize expressions that represent coercions from one type to another + /// /// The input expression to match against. + /// /// (Expr * Type) option [] val (|Coerce|_|) : input:Expr -> (Expr * Type) option /// An active pattern to recognize expressions that represent getting a static or instance field + /// /// The input expression to match against. + /// /// (Expr option * FieldInfo) option [] val (|FieldGet|_|) : input:Expr -> (Expr option * FieldInfo) option /// An active pattern to recognize expressions that represent setting a static or instance field + /// /// The input expression to match against. + /// /// (Expr option * FieldInfo * Expr) option [] val (|FieldSet|_|) : input:Expr -> (Expr option * FieldInfo * Expr) option /// An active pattern to recognize expressions that represent loops over integer ranges + /// /// The input expression to match against. + /// /// (Var * Expr * Expr * Expr) option [] val (|ForIntegerRangeLoop|_|) : input:Expr -> (Var * Expr * Expr * Expr) option /// An active pattern to recognize expressions that represent while loops + /// /// The input expression to match against. + /// /// (Expr * Expr) option [] val (|WhileLoop|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize expressions that represent conditionals + /// /// The input expression to match against. + /// /// (Expr * Expr * Expr) option [] val (|IfThenElse|_|) : input:Expr -> (Expr * Expr * Expr) option /// An active pattern to recognize expressions that represent first class function values + /// /// The input expression to match against. + /// /// (Var * Expr) option [] val (|Lambda|_|) : input:Expr -> (Var * Expr) option /// An active pattern to recognize expressions that represent let bindings + /// /// The input expression to match against. + /// /// (Var * Expr * Expr) option [] val (|Let|_|) : input:Expr -> (Var * Expr * Expr) option /// An active pattern to recognize expressions that represent recursive let bindings of one or more variables + /// /// The input expression to match against. + /// /// ((Var * Expr) list * Expr) option [] val (|LetRecursive|_|) : input:Expr -> ((Var * Expr) list * Expr) option /// An active pattern to recognize expressions that represent the construction of arrays + /// /// The input expression to match against. + /// /// (Type * Expr list) option [] val (|NewArray|_|) : input:Expr -> (Type * Expr list) option /// An active pattern to recognize expressions that represent invocations of a default constructor of a struct + /// /// The input expression to match against. + /// /// Type option [] val (|DefaultValue|_|) : input:Expr -> Type option /// An active pattern to recognize expressions that represent construction of delegate values + /// /// The input expression to match against. + /// /// (Type * Var list * Expr) option [] val (|NewDelegate|_|) : input:Expr -> (Type * Var list * Expr) option /// An active pattern to recognize expressions that represent invocation of object constructors + /// /// The input expression to match against. + /// /// (ConstructorInfo * Expr list) option [] val (|NewObject|_|) : input:Expr -> (ConstructorInfo * Expr list) option /// An active pattern to recognize expressions that represent construction of record values + /// /// The input expression to match against. + /// /// (Type * Expr list) option [] val (|NewRecord|_|) : input:Expr -> (Type * Expr list) option /// An active pattern to recognize expressions that represent construction of particular union case values + /// /// The input expression to match against. + /// /// (UnionCaseInfo * Expr list) option [] val (|NewUnionCase|_|) : input:Expr -> (UnionCaseInfo * Expr list) option /// An active pattern to recognize expressions that represent construction of tuple values + /// /// The input expression to match against. + /// /// (Expr list) option [] val (|NewTuple|_|) : input:Expr -> (Expr list) option /// An active pattern to recognize expressions that represent construction of struct tuple values + /// /// The input expression to match against. + /// /// (Expr list) option [] val (|NewStructTuple|_|) : input:Expr -> (Expr list) option /// An active pattern to recognize expressions that represent the read of a static or instance property, or a non-function value declared in a module + /// /// The input expression to match against. + /// /// (Expr option * PropertyInfo * Expr list) option [] val (|PropertyGet|_|) : input:Expr -> (Expr option * PropertyInfo * Expr list) option /// An active pattern to recognize expressions that represent setting a static or instance property, or a non-function value declared in a module + /// /// The input expression to match against. + /// /// (Expr option * PropertyInfo * Expr list * Expr) option [] val (|PropertySet|_|) : input:Expr -> (Expr option * PropertyInfo * Expr list * Expr) option /// An active pattern to recognize expressions that represent a nested quotation literal + /// /// The input expression to match against. + /// /// Expr option [] [] val (|Quote|_|) : input:Expr -> Expr option /// An active pattern to recognize expressions that represent a nested raw quotation literal + /// /// The input expression to match against. + /// /// Expr option [] val (|QuoteRaw|_|) : input:Expr -> Expr option /// An active pattern to recognize expressions that represent a nested typed quotation literal + /// /// The input expression to match against. + /// /// Expr option [] val (|QuoteTyped|_|) : input:Expr -> Expr option /// An active pattern to recognize expressions that represent sequential execution of one expression followed by another + /// /// The input expression to match against. + /// /// (Expr * Expr) option [] val (|Sequential|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize expressions that represent a try/with construct for exception filtering and catching + /// /// The input expression to match against. + /// /// (Expr * Var * Expr * Var * Expr) option [] val (|TryWith|_|) : input:Expr -> (Expr * Var * Expr * Var * Expr) option /// An active pattern to recognize expressions that represent a try/finally construct + /// /// The input expression to match against. + /// /// The body and handler parts of the try/finally expression [] val (|TryFinally|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize expressions that represent getting a tuple field + /// /// The input expression to match against. + /// /// The expression and tuple field being accessed [] val (|TupleGet|_|) : input:Expr -> (Expr * int) option /// An active pattern to recognize expressions that represent a dynamic type test + /// /// The input expression to match against. + /// /// The expression and type being tested [] val (|TypeTest|_|) : input:Expr -> (Expr * Type) option /// An active pattern to recognize expressions that represent a test if a value is of a particular union case + /// /// The input expression to match against. + /// /// The expression and union case being tested [] val (|UnionCaseTest|_|) : input:Expr -> (Expr * UnionCaseInfo) option /// An active pattern to recognize expressions that represent a constant value. This also matches expressions matched by ValueWithName. + /// /// The input expression to match against. + /// /// The boxed value and its static type [] val (|Value|_|) : input:Expr -> (obj * Type) option /// An active pattern to recognize expressions that represent a constant value + /// /// The input expression to match against. + /// /// The boxed value, its static type and its name [] val (|ValueWithName|_|) : input:Expr -> (obj * Type * string) option /// An active pattern to recognize expressions that are a value with an associated definition + /// /// The input expression to match against. + /// /// The boxed value, its static type and its definition [] val (|WithValue|_|) : input:Expr -> (obj * Type * Expr) option /// An active pattern to recognize expressions that represent a variable + /// /// The input expression to match against. + /// /// Var option [] val (|Var|_|) : input:Expr -> Var option /// An active pattern to recognize expressions that represent setting a mutable variable + /// /// The input expression to match against. + /// /// (Var * Expr) option [] val (|VarSet|_|) : input:Expr -> (Var * Expr) option @@ -683,115 +874,153 @@ module Patterns = module DerivedPatterns = /// An active pattern to recognize expressions that represent a (possibly curried or tupled) first class function value + /// /// The input expression to match against. + /// /// (Var list list * Expr) option [] val (|Lambdas|_|) : input:Expr -> (Var list list * Expr) option /// An active pattern to recognize expressions that represent the application of a (possibly curried or tupled) first class function value + /// /// The input expression to match against. + /// /// (Expr * Expr list list) option [] val (|Applications|_|) : input:Expr -> (Expr * Expr list list) option /// An active pattern to recognize expressions of the form a && b + /// /// The input expression to match against. + /// /// (Expr * Expr) option [] val (|AndAlso|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize expressions of the form a || b + /// /// The input expression to match against. + /// /// (Expr * Expr) option [] val (|OrElse|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize () constant expressions + /// /// The input expression to match against. + /// /// unit option [] val (|Unit|_|) : input:Expr -> unit option /// An active pattern to recognize constant boolean expressions + /// /// The input expression to match against. + /// /// bool option [] val (|Bool|_|) : input:Expr -> bool option /// An active pattern to recognize constant string expressions + /// /// The input expression to match against. + /// /// string option [] val (|String|_|) : input:Expr -> string option /// An active pattern to recognize constant 32-bit floating point number expressions + /// /// The input expression to match against. + /// /// float32 option [] val (|Single|_|) : input:Expr -> float32 option /// An active pattern to recognize constant 64-bit floating point number expressions + /// /// The input expression to match against. + /// /// float option [] val (|Double|_|) : input:Expr -> float option /// An active pattern to recognize constant unicode character expressions + /// /// The input expression to match against. + /// /// char option [] val (|Char|_|) : input:Expr -> char option /// An active pattern to recognize constant signed byte expressions + /// /// The input expression to match against. + /// /// sbyte option [] val (|SByte|_|) : input:Expr -> sbyte option /// An active pattern to recognize constant byte expressions + /// /// The input expression to match against. + /// /// byte option [] val (|Byte|_|) : input:Expr -> byte option /// An active pattern to recognize constant int16 expressions + /// /// The input expression to match against. + /// /// int16 option [] val (|Int16|_|) : input:Expr -> int16 option /// An active pattern to recognize constant unsigned int16 expressions + /// /// The input expression to match against. + /// /// uint16 option [] val (|UInt16|_|) : input:Expr -> uint16 option /// An active pattern to recognize constant int32 expressions + /// /// The input expression to match against. + /// /// int32 option [] val (|Int32|_|) : input:Expr -> int32 option /// An active pattern to recognize constant unsigned int32 expressions + /// /// The input expression to match against. + /// /// uint32 option [] val (|UInt32|_|) : input:Expr -> uint32 option /// An active pattern to recognize constant int64 expressions + /// /// The input expression to match against. + /// /// int64 option [] val (|Int64|_|) : input:Expr -> int64 option /// An active pattern to recognize constant unsigned int64 expressions + /// /// The input expression to match against. + /// /// uint64 option [] val (|UInt64|_|) : input:Expr -> uint64 option /// An active pattern to recognize constant decimal expressions + /// /// The input expression to match against. + /// /// decimal option [] val (|Decimal|_|) : input:Expr -> decimal option @@ -800,7 +1029,9 @@ module DerivedPatterns = /// The returned elements are the optional target object (present if the target is an /// instance method), the generic type instantiation (non-empty if the target is a generic /// instantiation), and the arguments to the function or method. + /// /// The input template expression to specify the method to call. + /// /// The optional target object (present if the target is an /// instance method), the generic type instantiation (non-empty if the target is a generic /// instantiation), and the arguments to the function or method. @@ -808,19 +1039,25 @@ module DerivedPatterns = val (|SpecificCall|_|) : templateParameter:Expr -> (Expr -> (Expr option * list * list) option) /// An active pattern to recognize methods that have an associated ReflectedDefinition + /// /// The description of the method. + /// /// The expression of the method definition if found, or None. [] val (|MethodWithReflectedDefinition|_|) : methodBase:MethodBase -> Expr option /// An active pattern to recognize property getters or values in modules that have an associated ReflectedDefinition + /// /// The description of the property. + /// /// The expression of the method definition if found, or None. [] val (|PropertyGetterWithReflectedDefinition|_|) : propertyInfo:PropertyInfo -> Expr option /// An active pattern to recognize property setters that have an associated ReflectedDefinition + /// /// The description of the property. + /// /// The expression of the method definition if found, or None. [] val (|PropertySetterWithReflectedDefinition|_|) : propertyInfo:PropertyInfo -> Expr option @@ -830,7 +1067,9 @@ module DerivedPatterns = module ExprShape = /// An active pattern that performs a complete decomposition viewing the expression tree as a binding structure + /// /// The input expression. + /// /// The decomposed Var, Lambda, or ConstApp. [] val (|ShapeVar|ShapeLambda|ShapeCombination|) : @@ -840,7 +1079,9 @@ module ExprShape = /// Re-build combination expressions. The first parameter should be an object /// returned by the ShapeCombination case of the active pattern in this module. + /// /// The input shape. /// The list of arguments. + /// /// The rebuilt expression. val RebuildShapeCombination : shape:obj * arguments:list -> Expr diff --git a/src/fsharp/FSharp.Core/reflect.fsi b/src/fsharp/FSharp.Core/reflect.fsi index 465529677a7..e6c2f6f9098 100644 --- a/src/fsharp/FSharp.Core/reflect.fsi +++ b/src/fsharp/FSharp.Core/reflect.fsi @@ -26,6 +26,7 @@ type UnionCaseInfo = member GetCustomAttributes: unit -> obj[] /// Returns the custom attributes associated with the case matching the given attribute type. /// The type of attributes to return. + /// /// An array of custom attributes. member GetCustomAttributes: attributeType:System.Type -> obj[] @@ -51,7 +52,7 @@ type FSharpValue = /// Assumes the given input is a record value. If not, ArgumentException is raised. /// The record object. /// The PropertyInfo describing the field to read. - /// Thrown when the input type is not a record type. + /// Thrown when the input type is not a record type. /// The field from the record. static member GetRecordField: record:obj * info:PropertyInfo -> obj @@ -63,7 +64,7 @@ type FSharpValue = /// because the path executed by the computed function is optimized given the knowledge that it will be /// used to read values of the given type. /// The PropertyInfo of the field to read. - /// Thrown when the input type is not a record type. + /// Thrown when the input type is not a record type. /// A function to read the specified field from the record. static member PreComputeRecordFieldReader : info:PropertyInfo -> (obj -> obj) @@ -73,7 +74,7 @@ type FSharpValue = /// The type of record to make. /// The array of values to initialize the record. /// Optional binding flags for the record. - /// Thrown when the input type is not a record type. + /// Thrown when the input type is not a record type. /// The created record. static member MakeRecord: recordType:Type * values:obj [] * ?bindingFlags:BindingFlags -> obj @@ -82,7 +83,7 @@ type FSharpValue = /// Assumes the given input is a record value. If not, ArgumentException is raised. /// The record object. /// Optional binding flags for the record. - /// Thrown when the input type is not a record type. + /// Thrown when the input type is not a record type. /// The array of fields from the record. static member GetRecordFields: record:obj * ?bindingFlags:BindingFlags -> obj[] @@ -98,7 +99,7 @@ type FSharpValue = /// used to read values of the given type. /// The type of record to read. /// Optional binding flags. - /// Thrown when the input type is not a record type. + /// Thrown when the input type is not a record type. /// An optimized reader for the given record type. static member PreComputeRecordReader : recordType:Type * ?bindingFlags:BindingFlags -> (obj -> obj[]) /// Precompute a function for constructing a record value. @@ -107,20 +108,24 @@ type FSharpValue = /// If not, ArgumentException is raised during pre-computation. /// The type of record to construct. /// Optional binding flags. - /// Thrown when the input type is not a record type. + /// Thrown when the input type is not a record type. /// A function to construct records of the given type. static member PreComputeRecordConstructor : recordType:Type * ?bindingFlags:BindingFlags -> (obj[] -> obj) /// Get a ConstructorInfo for a record type + /// /// The record type. /// Optional binding flags. + /// /// A ConstructorInfo for the given record type. static member PreComputeRecordConstructorInfo: recordType:Type * ?bindingFlags:BindingFlags -> ConstructorInfo /// Create a union case value. + /// /// The description of the union case to create. /// The array of arguments to construct the given case. /// Optional binding flags. + /// /// The constructed union case. static member MakeUnion: unionCase:UnionCaseInfo * args:obj [] * ?bindingFlags:BindingFlags -> obj @@ -134,7 +139,7 @@ type FSharpValue = /// The input union case. /// The union type containing the value. /// Optional binding flags. - /// Thrown when the input type is not a union case value. + /// Thrown when the input type is not a union case value. /// The description of the union case and its fields. static member GetUnionFields: value:obj * unionType:Type * ?bindingFlags:BindingFlags -> UnionCaseInfo * obj [] @@ -146,12 +151,15 @@ type FSharpValue = /// used to read values of the given type. /// The type of union to optimize reading. /// Optional binding flags. + /// /// An optimized function to read the tags of the given union type. static member PreComputeUnionTagReader : unionType:Type * ?bindingFlags:BindingFlags -> (obj -> int) /// Precompute a property or static method for reading an integer representing the case tag of a union type. + /// /// The type of union to read. /// Optional binding flags. + /// /// The description of the union case reader. static member PreComputeUnionTagMemberInfo : unionType:Type * ?bindingFlags:BindingFlags -> MemberInfo @@ -160,18 +168,23 @@ type FSharpValue = /// Using the computed function will typically be faster than executing a corresponding call to GetFields /// The description of the union case to read. /// Optional binding flags. + /// /// A function to for reading the fields of the given union case. static member PreComputeUnionReader : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> (obj -> obj[]) /// Precompute a function for constructing a discriminated union value for a particular union case. + /// /// The description of the union case. /// Optional binding flags. + /// /// A function for constructing values of the given union case. static member PreComputeUnionConstructor : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> (obj[] -> obj) /// A method that constructs objects of the given case + /// /// The description of the union case. /// Optional binding flags. + /// /// The description of the constructor of the given union case. static member PreComputeUnionConstructorInfo: unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> MethodInfo @@ -180,7 +193,7 @@ type FSharpValue = /// Assumes the given input is an F# exception value. If not, ArgumentException is raised. /// The exception instance. /// Optional binding flags. - /// Thrown when the input type is not an F# exception. + /// Thrown when the input type is not an F# exception. /// The fields from the given exception. static member GetExceptionFields: exn:obj * ?bindingFlags:BindingFlags -> obj[] @@ -189,7 +202,7 @@ type FSharpValue = /// Assumes at least one element is given. If not, ArgumentException is raised. /// The array of tuple fields. /// The tuple type to create. - /// Thrown if no elements are given. + /// Thrown if no elements are given. /// An instance of the tuple type with the given elements. static member MakeTuple: tupleElements:obj[] * tupleType:Type -> obj @@ -198,6 +211,7 @@ type FSharpValue = /// Assumes the given input is a tuple value. If not, ArgumentException is raised. /// The input tuple. /// The index of the field to read. + /// /// The value of the field. static member GetTupleField: tuple:obj * index:int -> obj @@ -205,7 +219,7 @@ type FSharpValue = /// /// Assumes the given input is a tuple value. If not, ArgumentException is raised. /// The input tuple. - /// Thrown when the input is not a tuple value. + /// Thrown when the input is not a tuple value. /// An array of the fields from the given tuple. static member GetTupleFields: tuple:obj -> obj [] @@ -214,13 +228,15 @@ type FSharpValue = /// Assumes the given type is a TupleType. /// If not, ArgumentException is raised during pre-computation. /// The tuple type to read. - /// Thrown when the given type is not a tuple type. + /// Thrown when the given type is not a tuple type. /// A function to read values of the given tuple type. static member PreComputeTupleReader : tupleType:Type -> (obj -> obj[]) /// Gets information that indicates how to read a field of a tuple + /// /// The input tuple type. /// The index of the tuple element to describe. + /// /// The description of the tuple element and an optional type and index if the tuple is big. static member PreComputeTuplePropertyInfo: tupleType:Type * index:int -> PropertyInfo * (Type * int) option @@ -229,7 +245,7 @@ type FSharpValue = /// Assumes the given type is a TupleType. /// If not, ArgumentException is raised during pre-computation. /// The type of tuple to read. - /// Thrown when the given type is not a tuple type. + /// Thrown when the given type is not a tuple type. /// A function to read a particular tuple type. static member PreComputeTupleConstructor : tupleType:Type -> (obj[] -> obj) @@ -243,13 +259,16 @@ type FSharpValue = /// to the ConstructorInfo. A recursive call to PreComputeTupleConstructorInfo /// can be used to determine the constructor for that the suffix type. /// The input tuple type. + /// /// The description of the tuple type constructor and an optional extra type /// for large tuples. static member PreComputeTupleConstructorInfo: tupleType:Type -> ConstructorInfo * Type option /// Builds a typed function from object from a dynamic function implementation + /// /// The function type of the implementation. /// The untyped lambda of the function implementation. + /// /// A typed function from the given dynamic implementation. static member MakeFunction : functionType:Type * implementation:(obj -> obj) -> obj @@ -262,6 +281,7 @@ type FSharpType = /// Assumes the given input is a record value. If not, ArgumentException is raised. /// The input record type. /// Optional binding flags. + /// /// An array of descriptions of the properties of the record type. static member GetRecordFields: recordType:Type * ?bindingFlags:BindingFlags -> PropertyInfo[] @@ -270,20 +290,24 @@ type FSharpType = /// Assumes the given type is a union type. If not, ArgumentException is raised during pre-computation. /// The input union type. /// Optional binding flags. - /// Thrown when the input type is not a union type. + /// Thrown when the input type is not a union type. /// An array of descriptions of the cases of the given union type. static member GetUnionCases: unionType:Type * ?bindingFlags:BindingFlags -> UnionCaseInfo[] /// Return true if the typ is a representation of an F# record type + /// /// The type to check. /// Optional binding flags. + /// /// True if the type check succeeds. static member IsRecord: typ:Type * ?bindingFlags:BindingFlags -> bool /// Returns true if the typ is a representation of an F# union type or the runtime type of a value of that type + /// /// The type to check. /// Optional binding flags. + /// /// True if the type check succeeds. static member IsUnion: typ:Type * ?bindingFlags:BindingFlags -> bool @@ -292,62 +316,82 @@ type FSharpType = /// Assumes exceptionType is an exception representation type. If not, ArgumentException is raised. /// The exception type to read. /// Optional binding flags. - /// Thrown if the given type is not an exception. + /// Thrown if the given type is not an exception. /// An array containing the PropertyInfo of each field in the exception. static member GetExceptionFields: exceptionType:Type * ?bindingFlags:BindingFlags -> PropertyInfo[] /// Returns true if the typ is a representation of an F# exception declaration + /// /// The type to check. /// Optional binding flags. + /// /// True if the type check is an F# exception. static member IsExceptionRepresentation: exceptionType:Type * ?bindingFlags:BindingFlags -> bool - /// Returns a System.Type representing the F# function type with the given domain and range + /// Returns a representing the F# function type with the given domain and range + /// /// The input type of the function. /// The output type of the function. + /// /// The function type with the given domain and range. static member MakeFunctionType: domain:Type * range:Type -> Type - /// Returns a System.Type representing an F# tuple type with the given element types + /// Returns a representing an F# tuple type with the given element types + /// /// An array of types for the tuple elements. + /// /// The type representing the tuple containing the input elements. static member MakeTupleType: types:Type[] -> Type - /// Returns a System.Type representing an F# tuple type with the given element types + /// Returns a representing an F# tuple type with the given element types + /// /// Runtime assembly containing System.Tuple definitions. /// An array of types for the tuple elements. + /// /// The type representing the tuple containing the input elements. static member MakeTupleType: asm:Assembly * types:Type[] -> Type - /// Returns a System.Type representing an F# struct tuple type with the given element types + /// Returns a representing an F# struct tuple type with the given element types + /// /// Runtime assembly containing System.ValueTuple definitions. /// An array of types for the tuple elements. + /// /// The type representing the struct tuple containing the input elements. static member MakeStructTupleType: asm:Assembly * types:Type[] -> Type /// Return true if the typ is a representation of an F# tuple type + /// /// The type to check. + /// /// True if the type check succeeds. static member IsTuple : typ:Type -> bool /// Return true if the typ is a representation of an F# function type or the runtime type of a closure implementing an F# function type + /// /// The type to check. + /// /// True if the type check succeeds. static member IsFunction : typ:Type -> bool - /// Return true if the typ is a System.Type value corresponding to the compiled form of an F# module + /// Return true if the typ is a value corresponding to the compiled form of an F# module + /// /// The type to check. + /// /// True if the type check succeeds. static member IsModule: typ:Type -> bool /// Gets the tuple elements from the representation of an F# tuple type. + /// /// The input tuple type. + /// /// An array of the types contained in the given tuple type. static member GetTupleElements : tupleType:Type -> Type[] /// Gets the domain and range types from an F# function type or from the runtime type of a closure implementing an F# type + /// /// The input function type. + /// /// A tuple of the domain and range types of the input function. static member GetFunctionElements : functionType:Type -> Type * Type @@ -360,7 +404,7 @@ module FSharpReflectionExtensions = /// The type of record to make. /// The array of values to initialize the record. /// Optional flags that denotes accessibility of the private representation. - /// Thrown when the input type is not a record type. + /// Thrown when the input type is not a record type. /// The created record. static member MakeRecord: recordType:Type * values:obj [] * ?allowAccessToPrivateRepresentation : bool -> obj /// Reads all the fields from a record value. @@ -368,7 +412,7 @@ module FSharpReflectionExtensions = /// Assumes the given input is a record value. If not, ArgumentException is raised. /// The record object. /// Optional flag that denotes accessibility of the private representation. - /// Thrown when the input type is not a record type. + /// Thrown when the input type is not a record type. /// The array of fields from the record. static member GetRecordFields: record:obj * ?allowAccessToPrivateRepresentation : bool -> obj[] @@ -384,7 +428,7 @@ module FSharpReflectionExtensions = /// used to read values of the given type. /// The type of record to read. /// Optional flag that denotes accessibility of the private representation. - /// Thrown when the input type is not a record type. + /// Thrown when the input type is not a record type. /// An optimized reader for the given record type. static member PreComputeRecordReader : recordType:Type * ?allowAccessToPrivateRepresentation : bool -> (obj -> obj[]) /// Precompute a function for constructing a record value. @@ -393,17 +437,19 @@ module FSharpReflectionExtensions = /// If not, ArgumentException is raised during pre-computation. /// The type of record to construct. /// Optional flag that denotes accessibility of the private representation. - /// Thrown when the input type is not a record type. + /// Thrown when the input type is not a record type. /// A function to construct records of the given type. static member PreComputeRecordConstructor : recordType:Type * ?allowAccessToPrivateRepresentation : bool -> (obj[] -> obj) /// Get a ConstructorInfo for a record type + /// /// The record type. /// Optional flag that denotes accessibility of the private representation. /// A ConstructorInfo for the given record type. static member PreComputeRecordConstructorInfo: recordType:Type * ?allowAccessToPrivateRepresentation : bool-> ConstructorInfo /// Create a union case value. + /// /// The description of the union case to create. /// The array of arguments to construct the given case. /// Optional flag that denotes accessibility of the private representation. @@ -420,7 +466,7 @@ module FSharpReflectionExtensions = /// The input union case. /// The union type containing the value. /// Optional flag that denotes accessibility of the private representation. - /// Thrown when the input type is not a union case value. + /// Thrown when the input type is not a union case value. /// The description of the union case and its fields. static member GetUnionFields: value:obj * unionType:Type * ?allowAccessToPrivateRepresentation : bool -> UnionCaseInfo * obj [] @@ -432,10 +478,12 @@ module FSharpReflectionExtensions = /// used to read values of the given type. /// The type of union to optimize reading. /// Optional flag that denotes accessibility of the private representation. + /// /// An optimized function to read the tags of the given union type. static member PreComputeUnionTagReader : unionType:Type * ?allowAccessToPrivateRepresentation : bool -> (obj -> int) /// Precompute a property or static method for reading an integer representing the case tag of a union type. + /// /// The type of union to read. /// Optional flag that denotes accessibility of the private representation. /// The description of the union case reader. @@ -450,12 +498,14 @@ module FSharpReflectionExtensions = static member PreComputeUnionReader : unionCase:UnionCaseInfo * ?allowAccessToPrivateRepresentation : bool -> (obj -> obj[]) /// Precompute a function for constructing a discriminated union value for a particular union case. + /// /// The description of the union case. /// Optional flag that denotes accessibility of the private representation. /// A function for constructing values of the given union case. static member PreComputeUnionConstructor : unionCase:UnionCaseInfo * ?allowAccessToPrivateRepresentation : bool -> (obj[] -> obj) /// A method that constructs objects of the given case + /// /// The description of the union case. /// Optional flag that denotes accessibility of the private representation. /// The description of the constructor of the given union case. @@ -466,7 +516,7 @@ module FSharpReflectionExtensions = /// Assumes the given input is an F# exception value. If not, ArgumentException is raised. /// The exception instance. /// Optional flag that denotes accessibility of the private representation. - /// Thrown when the input type is not an F# exception. + /// Thrown when the input type is not an F# exception. /// The fields from the given exception. static member GetExceptionFields: exn:obj * ?allowAccessToPrivateRepresentation : bool -> obj[] @@ -484,18 +534,20 @@ module FSharpReflectionExtensions = /// Assumes the given type is a union type. If not, ArgumentException is raised during pre-computation. /// The input union type. /// Optional flag that denotes accessibility of the private representation. - /// Thrown when the input type is not a union type. + /// Thrown when the input type is not a union type. /// An array of descriptions of the cases of the given union type. static member GetUnionCases: unionType:Type * ?allowAccessToPrivateRepresentation : bool -> UnionCaseInfo[] /// Return true if the typ is a representation of an F# record type + /// /// The type to check. /// Optional flag that denotes accessibility of the private representation. /// True if the type check succeeds. static member IsRecord: typ:Type * ?allowAccessToPrivateRepresentation : bool -> bool /// Returns true if the typ is a representation of an F# union type or the runtime type of a value of that type + /// /// The type to check. /// Optional flag that denotes accessibility of the private representation. /// True if the type check succeeds. @@ -506,11 +558,12 @@ module FSharpReflectionExtensions = /// Assumes exceptionType is an exception representation type. If not, ArgumentException is raised. /// The exception type to read. /// Optional flag that denotes accessibility of the private representation. - /// Thrown if the given type is not an exception. + /// Thrown if the given type is not an exception. /// An array containing the PropertyInfo of each field in the exception. static member GetExceptionFields: exceptionType:Type * ?allowAccessToPrivateRepresentation : bool -> PropertyInfo[] /// Returns true if the typ is a representation of an F# exception declaration + /// /// The type to check. /// Optional flag that denotes accessibility of the private representation. /// True if the type check is an F# exception. diff --git a/src/fsharp/FSharp.Core/result.fsi b/src/fsharp/FSharp.Core/result.fsi index 77e289bd17f..2cb80c5b0f5 100644 --- a/src/fsharp/FSharp.Core/result.fsi +++ b/src/fsharp/FSharp.Core/result.fsi @@ -5,26 +5,32 @@ namespace Microsoft.FSharp.Core open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators [] + /// Basic operations for values of type . module Result = /// map f inp evaluates to match inp with Error e -> Error e | Ok x -> Ok (f x). /// A function to apply to the OK result value. /// The input result. + /// /// A result of the input value after applying the mapping function, or Error if the input is Error. [] val map : mapping:('T -> 'U) -> result:Result<'T, 'TError> -> Result<'U, 'TError> /// map f inp evaluates to match inp with Error x -> Error (f x) | Ok v -> Ok v. + /// /// A function to apply to the Error result value. /// The input result. + /// /// A result of the error value after applying the mapping function, or Ok if the input is Ok. [] val mapError: mapping:('TError -> 'U) -> result:Result<'T, 'TError> -> Result<'T, 'U> /// bind f inp evaluates to match inp with Error e -> Error e | Ok x -> f x + /// /// A function that takes the value of type T from a result and transforms it into /// a result containing a value of type U. /// The input result. + /// /// A result of the output type of the binder. [] val bind: binder:('T -> Result<'U, 'TError>) -> result:Result<'T, 'TError> -> Result<'U, 'TError> diff --git a/src/fsharp/FSharp.Core/seq.fsi b/src/fsharp/FSharp.Core/seq.fsi index 9ed5bed0965..144276df7c2 100644 --- a/src/fsharp/FSharp.Core/seq.fsi +++ b/src/fsharp/FSharp.Core/seq.fsi @@ -9,7 +9,7 @@ namespace Microsoft.FSharp.Collections open Microsoft.FSharp.Collections - /// Basic operations on IEnumerables. + /// Basic operations on values of type . [] [] module Seq = @@ -17,8 +17,9 @@ namespace Microsoft.FSharp.Collections /// Returns a new sequence that contains all pairings of elements from the first and second sequences. /// The first sequence. /// The second sequence. + /// /// The result sequence. - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input sequences is null. [] val allPairs: source1:seq<'T1> -> source2:seq<'T2> -> seq<'T1 * 'T2> @@ -34,7 +35,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when either of the two provided sequences is + /// Thrown when either of the two provided sequences is /// null. [] val append: source1:seq<'T> -> source2:seq<'T> -> seq<'T> @@ -48,8 +49,8 @@ namespace Microsoft.FSharp.Collections /// /// The average. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence has zero elements. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence has zero elements. [] val inline average : source:seq<(^T)> -> ^T when ^T : (static member ( + ) : ^T * ^T -> ^T) @@ -67,8 +68,8 @@ namespace Microsoft.FSharp.Collections /// /// The average. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence has zero elements. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence has zero elements. [] val inline averageBy : projection:('T -> ^U) -> source:seq<'T> -> ^U when ^U : (static member ( + ) : ^U * ^U -> ^U) @@ -101,7 +102,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val cache: source:seq<'T> -> seq<'T> @@ -116,7 +117,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val cast: source:IEnumerable -> seq<'T> @@ -133,16 +134,18 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val choose: chooser:('T -> 'U option) -> source:seq<'T> -> seq<'U> /// Divides the input sequence into chunks of size at most chunkSize. + /// /// The maximum size of each chunk. /// The input sequence. + /// /// The sequence divided into chunks. - /// Thrown when the input sequence is null. - /// Thrown when chunkSize is not positive. + /// Thrown when the input sequence is null. + /// Thrown when chunkSize is not positive. [] val chunkBySize: chunkSize:int -> source:seq<'T> -> seq<'T[]> @@ -157,7 +160,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val collect: mapping:('T -> 'Collection) -> source:seq<'T> -> seq<'U> when 'Collection :> seq<'U> @@ -172,7 +175,7 @@ namespace Microsoft.FSharp.Collections /// is reached it returns a -1 if the first sequence is shorter and a 1 if the second sequence /// is shorter. /// - /// Thrown when either of the input sequences + /// Thrown when either of the input sequences /// is null. [] val compareWith: comparer:('T -> 'T -> int) -> source1:seq<'T> -> source2:seq<'T> -> int @@ -187,15 +190,17 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val concat: sources:seq<'Collection> -> seq<'T> when 'Collection :> seq<'T> /// Tests if the sequence contains the specified element. + /// /// The value to locate in the input sequence. /// The input sequence. + /// /// True if the input sequence contains the specified element; false otherwise. - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val inline contains: value:'T -> source:seq<'T> -> bool when 'T : equality @@ -213,7 +218,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val countBy : projection:('T -> 'Key) -> source:seq<'T> -> seq<'Key * int> when 'Key : equality @@ -235,7 +240,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val distinct: source:seq<'T> -> seq<'T> when 'T : equality @@ -248,7 +253,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val distinctBy: projection:('T -> 'Key) -> source:seq<'T> -> seq<'T> when 'Key : equality @@ -257,9 +262,10 @@ namespace Microsoft.FSharp.Collections /// sequence is iterated. As a result this function should not be used with large or infinite sequences. /// The maximum number of chunks. /// The input sequence. + /// /// The sequence split into chunks. - /// Thrown when the input sequence is null. - /// Thrown when count is not positive. + /// Thrown when the input sequence is null. + /// Thrown when count is not positive. /// This function consumes the whole input sequence before yielding the first element of the result sequence. [] val splitInto: count:int -> source:seq<'T> -> seq<'T[]> @@ -285,7 +291,7 @@ namespace Microsoft.FSharp.Collections /// /// A sequence that contains the set difference of the elements of two sequences. /// - /// Thrown when either of the two input sequences is null. + /// Thrown when either of the two input sequences is null. [] val except: itemsToExclude:seq<'T> -> source:seq<'T> -> seq<'T> when 'T : equality @@ -300,7 +306,7 @@ namespace Microsoft.FSharp.Collections /// /// True if any result from the predicate is true; false otherwise. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val exists: predicate:('T -> bool) -> source:seq<'T> -> bool @@ -317,7 +323,7 @@ namespace Microsoft.FSharp.Collections /// /// True if any result from the predicate is true; false otherwise. /// - /// Thrown when either of the two input sequences is null. + /// Thrown when either of the two input sequences is null. [] val exists2: predicate:('T1 -> 'T2 -> bool) -> source1:seq<'T1> -> source2:seq<'T2> -> bool @@ -334,7 +340,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val filter: predicate:('T -> bool) -> source:seq<'T> -> seq<'T> @@ -353,7 +359,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val where: predicate:('T -> bool) -> source:seq<'T> -> seq<'T> @@ -364,9 +370,9 @@ namespace Microsoft.FSharp.Collections /// /// The first element for which the predicate returns True. /// - /// Thrown if no element returns true when + /// Thrown if no element returns true when /// evaluated by the predicate - /// Thrown when the input sequence is null + /// Thrown when the input sequence is null [] val find: predicate:('T -> bool) -> source:seq<'T> -> 'T @@ -375,10 +381,11 @@ namespace Microsoft.FSharp.Collections /// result this function should not be used with large or infinite sequences. /// A function to test whether an item in the sequence should be returned. /// The input sequence. + /// /// The last element for which the predicate returns True. - /// Thrown if no element returns true when + /// Thrown if no element returns true when /// evaluated by the predicate - /// Thrown when the input sequence is null + /// Thrown when the input sequence is null /// This function consumes the whole input sequence before returning the result. [] val findBack: predicate:('T -> bool) -> source:seq<'T> -> 'T @@ -390,9 +397,9 @@ namespace Microsoft.FSharp.Collections /// /// The index of the first element for which the predicate returns True. /// - /// Thrown if no element returns true when + /// Thrown if no element returns true when /// evaluated by the predicate - /// Thrown when the input sequence is null + /// Thrown when the input sequence is null [] val findIndex: predicate:('T -> bool) -> source:seq<'T> -> int @@ -401,10 +408,11 @@ namespace Microsoft.FSharp.Collections /// result this function should not be used with large or infinite sequences. /// A function to test whether the index of a particular element should be returned. /// The input sequence. + /// /// The index of the last element for which the predicate returns True. - /// Thrown if no element returns true when + /// Thrown if no element returns true when /// evaluated by the predicate - /// Thrown when the input sequence is null + /// Thrown when the input sequence is null /// This function consumes the whole input sequence before returning the result. [] val findIndexBack: predicate:('T -> bool) -> source:seq<'T> -> int @@ -419,7 +427,7 @@ namespace Microsoft.FSharp.Collections /// /// The state object after the folding function is applied to each element of the sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val fold<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> source:seq<'T> -> 'State @@ -428,23 +436,27 @@ namespace Microsoft.FSharp.Collections /// when one sequence is exhausted any remaining elements in the other sequence are ignored. /// If the input function is f and the elements are i0...iN and j0...jN /// then computes f (... (f s i0 j0)...) iN jN. + /// /// The function to update the state given the input elements. /// The initial state. /// The first input sequence. /// The second input sequence. + /// /// The final state value. - /// Thrown when the either of the input sequences is null. + /// Thrown when the either of the input sequences is null. [] val fold2<'T1,'T2,'State> : folder:('State -> 'T1 -> 'T2 -> 'State) -> state:'State -> source1:seq<'T1> -> source2:seq<'T2> -> 'State /// Applies a function to each element of the collection, starting from the end, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN /// then computes f i0 (... (f iN s)...) + /// /// The function to update the state given the input elements. /// The input sequence. /// The initial state. + /// /// The state object after the folding function is applied to each element of the sequence. - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. /// This function consumes the whole input sequence before returning the result. [] val foldBack<'T,'State> : folder:('T -> 'State -> 'State) -> source:seq<'T> -> state:'State -> 'State @@ -453,12 +465,14 @@ namespace Microsoft.FSharp.Collections /// threading an accumulator argument through the computation. The two sequences need not have equal lengths. /// If the input function is f and the elements are i0...iN and j0...jM, N < M /// then computes f i0 j0 (... (f iN jN s)...). + /// /// The function to update the state given the input elements. /// The first input sequence. /// The second input sequence. /// The initial state. + /// /// The final state value. - /// Thrown when the either of the input sequences is null. + /// Thrown when the either of the input sequences is null. [] val foldBack2<'T1,'T2,'State> : folder:('T1 -> 'T2 -> 'State -> 'State) -> source1:seq<'T1> -> source2:seq<'T2> -> state:'State -> 'State @@ -473,7 +487,7 @@ namespace Microsoft.FSharp.Collections /// /// True if every element of the sequence satisfies the predicate; false otherwise. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val forall: predicate:('T -> bool) -> source:seq<'T> -> bool @@ -487,7 +501,7 @@ namespace Microsoft.FSharp.Collections /// /// True if all pairs satisfy the predicate; false otherwise. /// - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input sequences is null. [] val forall2: predicate:('T1 -> 'T2 -> bool) -> source1:seq<'T1> -> source2:seq<'T2> -> bool @@ -513,8 +527,8 @@ namespace Microsoft.FSharp.Collections /// /// The first element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input does not have any elements. + /// Thrown when the input sequence is null. + /// Thrown when the input does not have any elements. [] val head: source:seq<'T> -> 'T @@ -524,15 +538,17 @@ namespace Microsoft.FSharp.Collections /// /// The first element of the sequence or None. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryHead: source:seq<'T> -> 'T option /// Returns the last element of the sequence. + /// /// The input sequence. + /// /// The last element of the sequence. - /// Thrown when the input sequence is null. - /// Thrown when the input does not have any elements. + /// Thrown when the input sequence is null. + /// Thrown when the input does not have any elements. [] val last: source:seq<'T> -> 'T @@ -543,7 +559,7 @@ namespace Microsoft.FSharp.Collections /// /// The last element of the sequence or None. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryLast: source:seq<'T> -> 'T option @@ -553,8 +569,8 @@ namespace Microsoft.FSharp.Collections /// /// The only element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input does not have precisely one element. + /// Thrown when the input sequence is null. + /// Thrown when the input does not have precisely one element. [] val exactlyOne: source:seq<'T> -> 'T @@ -564,7 +580,7 @@ namespace Microsoft.FSharp.Collections /// /// The only element of the sequence or None. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryExactlyOne: source:seq<'T> -> 'T option @@ -574,15 +590,17 @@ namespace Microsoft.FSharp.Collections /// /// True if the sequence is empty; false otherwise. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val isEmpty: source:seq<'T> -> bool /// Builds a new collection whose elements are the corresponding elements of the input collection /// paired with the integer index (from 0) of each element. + /// /// The input sequence. + /// /// The result sequence. - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val indexed: source:seq<'T> -> seq @@ -599,7 +617,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when count is negative. + /// Thrown when count is negative. [] val init: count:int -> initializer:(int -> 'T) -> seq<'T> @@ -620,11 +638,13 @@ namespace Microsoft.FSharp.Collections val initInfinite: initializer:(int -> 'T) -> seq<'T> /// Computes the element at the specified index in the collection. + /// /// The index of the element to retrieve. /// The input sequence. + /// /// The element at the specified index of the sequence. - /// Thrown when the input sequence is null. - /// Thrown when the index is negative or the input sequence does not contain enough elements. + /// Thrown when the input sequence is null. + /// Thrown when the index is negative or the input sequence does not contain enough elements. [] val item: index:int -> source:seq<'T> -> 'T @@ -633,7 +653,7 @@ namespace Microsoft.FSharp.Collections /// A function to apply to each element of the sequence. /// The input sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val iter: action:('T -> unit) -> source:seq<'T> -> unit @@ -643,7 +663,7 @@ namespace Microsoft.FSharp.Collections /// A function to apply to each element of the sequence that can also access the current index. /// The input sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val iteri: action:(int -> 'T -> unit) -> source:seq<'T> -> unit @@ -654,7 +674,7 @@ namespace Microsoft.FSharp.Collections /// The first input sequence. /// The second input sequence. /// - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input sequences is null. [] val iter2: action:('T1 -> 'T2 -> unit) -> source1:seq<'T1> -> source2:seq<'T2> -> unit @@ -666,7 +686,7 @@ namespace Microsoft.FSharp.Collections /// The first input sequence. /// The second input sequence. /// - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input sequences is null. [] val iteri2: action:(int -> 'T1 -> 'T2 -> unit) -> source1:seq<'T1> -> source2:seq<'T2> -> unit @@ -676,7 +696,7 @@ namespace Microsoft.FSharp.Collections /// /// The length of the sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val length: source:seq<'T> -> int @@ -693,7 +713,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val map : mapping:('T -> 'U) -> source:seq<'T> -> seq<'U> @@ -707,7 +727,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input sequences is null. [] val map2: mapping:('T1 -> 'T2 -> 'U) -> source1:seq<'T1> -> source2:seq<'T2> -> seq<'U> @@ -718,7 +738,7 @@ namespace Microsoft.FSharp.Collections /// The function to transform elements from the input collection and accumulate the final value. /// The initial state. /// The input collection. - /// Thrown when the input collection is null. + /// Thrown when the input collection is null. /// The collection of transformed elements, and the final accumulated value. /// This function consumes the whole input sequence before yielding the first element of the result sequence. [] @@ -731,7 +751,7 @@ namespace Microsoft.FSharp.Collections /// The function to transform elements from the input collection and accumulate the final value. /// The input collection. /// The initial state. - /// Thrown when the input collection is null. + /// Thrown when the input collection is null. /// The collection of transformed elements, and the final accumulated value. /// This function consumes the whole input sequence before yielding the first element of the result sequence. [] @@ -748,7 +768,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when any of the input sequences is null. + /// Thrown when any of the input sequences is null. [] val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> source1:seq<'T1> -> source2:seq<'T2> -> source3:seq<'T3> -> seq<'U> @@ -761,7 +781,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val mapi: mapping:(int -> 'T -> 'U) -> source:seq<'T> -> seq<'U> @@ -776,7 +796,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input sequences is null. [] val mapi2: mapping:(int -> 'T1 -> 'T2 -> 'U) -> source1:seq<'T1> -> source2:seq<'T2> -> seq<'U> @@ -784,8 +804,8 @@ namespace Microsoft.FSharp.Collections /// /// The input sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. /// /// The largest element of the sequence. [] @@ -798,8 +818,8 @@ namespace Microsoft.FSharp.Collections /// /// The largest element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. [] val inline maxBy : projection:('T -> 'U) -> source:seq<'T> -> 'T when 'U : comparison @@ -811,8 +831,8 @@ namespace Microsoft.FSharp.Collections /// /// The largest element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. [] val inline maxValBy : projection:('T -> 'U) -> source:seq<'T> -> 'U when 'U : comparison *) @@ -823,8 +843,8 @@ namespace Microsoft.FSharp.Collections /// /// The smallest element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. [] val inline min : source:seq<'T> -> 'T when 'T : comparison @@ -835,8 +855,8 @@ namespace Microsoft.FSharp.Collections /// /// The smallest element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. [] val inline minBy : projection:('T -> 'U) -> source:seq<'T> -> 'T when 'U : comparison @@ -848,8 +868,8 @@ namespace Microsoft.FSharp.Collections /// /// The smallest element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. [] val inline minValBy : projection:('T -> 'U) -> source:seq<'T> -> 'U when 'U : comparison *) @@ -861,8 +881,8 @@ namespace Microsoft.FSharp.Collections /// /// The nth element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the index is negative or the input sequence does not contain enough elements. + /// Thrown when the input sequence is null. + /// Thrown when the index is negative or the input sequence does not contain enough elements. [] [] val nth: index:int -> source:seq<'T> -> 'T @@ -875,7 +895,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. val ofArray: source:'T[] -> seq<'T> [] @@ -893,7 +913,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val pairwise: source:seq<'T> -> seq<'T * 'T> @@ -909,8 +929,8 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when indexMap does not produce a valid permutation. + /// Thrown when the input sequence is null. + /// Thrown when indexMap does not produce a valid permutation. /// This function consumes the whole input sequence before yielding the first element of the result sequence. [] val permute: indexMap:(int -> int) -> source:seq<'T> -> seq<'T> @@ -923,8 +943,8 @@ namespace Microsoft.FSharp.Collections /// /// The selected element. /// - /// Thrown when the input sequence is null. - /// Thrown when every item of the sequence + /// Thrown when the input sequence is null. + /// Thrown when every item of the sequence /// evaluates to None when the given function is applied. [] val pick: chooser:('T -> 'U option) -> source:seq<'T> -> 'U @@ -938,7 +958,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val readonly : source:seq<'T> -> seq<'T> @@ -953,14 +973,16 @@ namespace Microsoft.FSharp.Collections /// /// The final result of the reduction function. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. [] val reduce: reduction:('T -> 'T -> 'T) -> source:seq<'T> -> 'T /// Creates a sequence by replicating the given initial value. + /// /// The number of elements to replicate. /// The value to replicate + /// /// The generated sequence. [] val replicate: count:int -> initial:'T -> seq<'T> @@ -968,20 +990,24 @@ namespace Microsoft.FSharp.Collections /// Applies a function to each element of the sequence, starting from the end, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN /// then computes f i0 (...(f iN-1 iN)). + /// /// A function that takes in the next-to-last element of the sequence and the /// current accumulated result to produce the next accumulated result. /// The input sequence. + /// /// The final result of the reductions. - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. /// This function consumes the whole input sequence before returning the result. [] val reduceBack: reduction:('T -> 'T -> 'T) -> source:seq<'T> -> 'T /// Returns a new sequence with the elements in reverse order. + /// /// The input sequence. + /// /// The reversed sequence. - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. /// This function consumes the whole input sequence before yielding the first element of the reversed sequence. [] val rev: source:seq<'T> -> seq<'T> @@ -994,7 +1020,7 @@ namespace Microsoft.FSharp.Collections /// /// The resulting sequence of computed states. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val scan<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> source:seq<'T> -> seq<'State> @@ -1005,8 +1031,9 @@ namespace Microsoft.FSharp.Collections /// A function that updates the state with each element from the sequence. /// The input sequence. /// The initial state. + /// /// The resulting sequence of computed states. - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. /// This function consumes the whole input sequence before yielding the first element of the result sequence. [] val scanBack<'T,'State> : folder:('T -> 'State -> 'State) -> source:seq<'T> -> state:'State -> seq<'State> @@ -1027,8 +1054,8 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when count exceeds the number of elements + /// Thrown when the input sequence is null. + /// Thrown when count exceeds the number of elements /// in the sequence. [] val skip: count:int -> source:seq<'T> -> seq<'T> @@ -1041,7 +1068,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val skipWhile: predicate:('T -> bool) -> source:seq<'T> -> seq<'T> @@ -1058,7 +1085,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. /// This function consumes the whole input sequence before yielding the first element of the result sequence. [] val sort : source:seq<'T> -> seq<'T> when 'T : comparison @@ -1072,6 +1099,7 @@ namespace Microsoft.FSharp.Collections /// This is a stable sort, that is the original order of equal elements is preserved. /// The function to compare the collection elements. /// The input sequence. + /// /// The result sequence. /// This function consumes the whole input sequence before yielding the first element of the result sequence. [] @@ -1092,7 +1120,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val sortBy : projection:('T -> 'Key) -> source:seq<'T> -> seq<'T> when 'Key : comparison @@ -1109,7 +1137,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val inline sortDescending : source:seq<'T> -> seq<'T> when 'T : comparison @@ -1128,7 +1156,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val inline sortByDescending : projection:('T -> 'Key) -> source:seq<'T> -> seq<'T> when 'Key : comparison @@ -1163,8 +1191,8 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. [] val tail: source:seq<'T> -> seq<'T> @@ -1178,9 +1206,9 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. - /// Thrown when count exceeds the number of elements + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. + /// Thrown when count exceeds the number of elements /// in the sequence. [] val take: count:int -> source:seq<'T> -> seq<'T> @@ -1193,7 +1221,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val takeWhile: predicate:('T -> bool) -> source:seq<'T> -> seq<'T> @@ -1203,7 +1231,7 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val toArray: source:seq<'T> -> 'T[] @@ -1213,7 +1241,7 @@ namespace Microsoft.FSharp.Collections /// /// The result list. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val toList: source:seq<'T> -> 'T list @@ -1225,7 +1253,7 @@ namespace Microsoft.FSharp.Collections /// /// The found element or None. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryFind: predicate:('T -> bool) -> source:seq<'T> -> 'T option @@ -1235,8 +1263,9 @@ namespace Microsoft.FSharp.Collections /// result this function should not be used with large or infinite sequences. /// A function that evaluates to a Boolean when given an item in the sequence. /// The input sequence. + /// /// The found element or None. - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. /// This function consumes the whole input sequence before returning the result. [] val tryFindBack: predicate:('T -> bool) -> source:seq<'T> -> 'T option @@ -1249,16 +1278,18 @@ namespace Microsoft.FSharp.Collections /// /// The found index or None. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryFindIndex : predicate:('T -> bool) -> source:seq<'T> -> int option /// Tries to find the nth element in the sequence. /// Returns None if index is negative or the input sequence does not contain enough elements. + /// /// The index of element to retrieve. /// The input sequence. + /// /// The nth element of the sequence or None. - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryItem: index:int -> source:seq<'T> -> 'T option @@ -1268,8 +1299,9 @@ namespace Microsoft.FSharp.Collections /// result this function should not be used with large or infinite sequences. /// A function that evaluates to a Boolean when given an item in the sequence. /// The input sequence. + /// /// The found index or None. - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. /// This function consumes the whole input sequence before returning the result. [] val tryFindIndexBack : predicate:('T -> bool) -> source:seq<'T> -> int option @@ -1282,7 +1314,7 @@ namespace Microsoft.FSharp.Collections /// /// The chosen element or None. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryPick: chooser:('T -> 'U option) -> source:seq<'T> -> 'U option @@ -1291,8 +1323,9 @@ namespace Microsoft.FSharp.Collections /// that sequence is iterated. As a result this function should not be used with /// large or infinite sequences. /// The input sequence. + /// /// The transposed sequence. - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val transpose: source:seq<'Collection> -> seq> when 'Collection :> seq<'T> @@ -1303,7 +1336,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val truncate: count:int -> source:seq<'T> -> seq<'T> @@ -1328,11 +1361,13 @@ namespace Microsoft.FSharp.Collections /// Returns a sequence that yields sliding windows containing elements drawn from the input /// sequence. Each window is returned as a fresh array. + /// /// The number of elements in each window. /// The input sequence. + /// /// The result sequence. - /// Thrown when the input sequence is null. - /// Thrown when windowSize is not positive. + /// Thrown when the input sequence is null. + /// Thrown when windowSize is not positive. [] val windowed: windowSize:int -> source:seq<'T> -> seq<'T[]> @@ -1345,7 +1380,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input sequences is null. [] val zip: source1:seq<'T1> -> source2:seq<'T2> -> seq<'T1 * 'T2> @@ -1359,6 +1394,6 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when any of the input sequences is null. + /// Thrown when any of the input sequences is null. [] val zip3: source1:seq<'T1> -> source2:seq<'T2> -> source3:seq<'T3> -> seq<'T1 * 'T2 * 'T3> diff --git a/src/fsharp/FSharp.Core/set.fsi b/src/fsharp/FSharp.Core/set.fsi index 9293a523312..267fefec056 100644 --- a/src/fsharp/FSharp.Core/set.fsi +++ b/src/fsharp/FSharp.Core/set.fsi @@ -20,20 +20,25 @@ namespace Microsoft.FSharp.Collections /// Create a set containing elements drawn from the given sequence. /// The input sequence. + /// /// The result set. new : elements:seq<'T> -> Set<'T> /// A useful shortcut for Set.add. Note this operation produces a new set /// and does not mutate the original set. The new set will share many storage /// nodes with the original. See the Set module for further operations on sets. + /// /// The value to add to the set. + /// /// The result set. member Add : value:'T -> Set<'T> /// A useful shortcut for Set.remove. Note this operation produces a new set /// and does not mutate the original set. The new set will share many storage /// nodes with the original. See the Set module for further operations on sets. + /// /// The value to remove from the set. + /// /// The result set. member Remove : value:'T -> Set<'T> @@ -41,7 +46,9 @@ namespace Microsoft.FSharp.Collections member Count : int /// A useful shortcut for Set.contains. See the Set module for further operations on sets. + /// /// The value to check. + /// /// True if the set contains value. member Contains : value:'T -> bool @@ -49,37 +56,49 @@ namespace Microsoft.FSharp.Collections member IsEmpty : bool /// Returns a new set with the elements of the second set removed from the first. + /// /// The first input set. /// The second input set. + /// /// A set containing elements of the first set that are not contained in the second set. static member (-) : set1:Set<'T> * set2:Set<'T> -> Set<'T> /// Compute the union of the two sets. + /// /// The first input set. /// The second input set. + /// /// The union of the two input sets. static member (+) : set1:Set<'T> * set2:Set<'T> -> Set<'T> /// Evaluates to "true" if all elements of the first set are in the second. + /// /// The set to test against. + /// /// True if this set is a subset of otherSet. member IsSubsetOf: otherSet:Set<'T> -> bool /// Evaluates to "true" if all elements of the first set are in the second, and at least /// one element of the second is not in the first. + /// /// The set to test against. + /// /// True if this set is a proper subset of otherSet. member IsProperSubsetOf: otherSet:Set<'T> -> bool /// Evaluates to "true" if all elements of the second set are in the first. + /// /// The set to test against. + /// /// True if this set is a superset of otherSet. member IsSupersetOf: otherSet:Set<'T> -> bool /// Evaluates to "true" if all elements of the second set are in the first, and at least /// one element of the first is not in the second. + /// /// The set to test against. + /// /// True if this set is a proper superset of otherSet. member IsProperSupersetOf: otherSet:Set<'T> -> bool @@ -108,7 +127,7 @@ namespace Microsoft.FSharp.Collections [] [] - /// Functional programming operators related to the Set<_> type. + /// Basic operations on values of type . module Set = /// The empty set for the type 'T. @@ -117,59 +136,75 @@ namespace Microsoft.FSharp.Collections val empty<'T> : Set<'T> when 'T : comparison /// The set containing the given element. + /// /// The value for the set to contain. + /// /// The set containing value. [] val singleton: value:'T -> Set<'T> /// Returns a new set with an element added to the set. No exception is raised if /// the set already contains the given element. + /// /// The value to add. /// The input set. + /// /// A new set containing value. [] val add: value:'T -> set:Set<'T> -> Set<'T> /// Evaluates to "true" if the given element is in the given set. + /// /// The element to test. /// The input set. + /// /// True if element is in set. [] val contains: element:'T -> set:Set<'T> -> bool /// Evaluates to "true" if all elements of the first set are in the second + /// /// The potential subset. /// The set to test against. + /// /// True if set1 is a subset of set2. [] val isSubset: set1: Set<'T> -> set2:Set<'T> -> bool /// Evaluates to "true" if all elements of the first set are in the second, and at least /// one element of the second is not in the first. + /// /// The potential subset. /// The set to test against. + /// /// True if set1 is a proper subset of set2. [] val isProperSubset: set1: Set<'T> -> set2:Set<'T> -> bool /// Evaluates to "true" if all elements of the second set are in the first. + /// /// The potential superset. /// The set to test against. + /// /// True if set1 is a superset of set2. [] val isSuperset: set1: Set<'T> -> set2:Set<'T> -> bool /// Evaluates to "true" if all elements of the second set are in the first, and at least /// one element of the first is not in the second. + /// /// The potential superset. /// The set to test against. + /// /// True if set1 is a proper superset of set2. [] val isProperSuperset: set1: Set<'T> -> set2:Set<'T> -> bool /// Returns the number of elements in the set. Same as size. + /// /// The input set. + /// /// The number of elements in the set. [] val count: set:Set<'T> -> int @@ -177,40 +212,50 @@ namespace Microsoft.FSharp.Collections /// Tests if any element of the collection satisfies the given predicate. /// If the input function is predicate and the elements are i0...iN /// then computes p i0 or ... or p iN. + /// /// The function to test set elements. /// The input set. + /// /// True if any element of set satisfies predicate. [] val exists: predicate:('T -> bool) -> set:Set<'T> -> bool /// Returns a new collection containing only the elements of the collection /// for which the given predicate returns True. + /// /// The function to test set elements. /// The input set. + /// /// The set containing only the elements for which predicate returns true. [] val filter: predicate:('T -> bool) -> set:Set<'T> -> Set<'T> /// Returns a new collection containing the results of applying the /// given function to each element of the input set. + /// /// The function to transform elements of the input set. /// The input set. + /// /// A set containing the transformed elements. [] val map: mapping:('T -> 'U) -> set:Set<'T> -> Set<'U> /// Applies the given accumulating function to all the elements of the set + /// /// The accumulating function. /// The initial state. /// The input set. + /// /// The final state. [] val fold<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> set:Set<'T> -> 'State when 'T : comparison /// Applies the given accumulating function to all the elements of the set. + /// /// The accumulating function. /// The input set. /// The initial state. + /// /// The final state. [] val foldBack<'T,'State> : folder:('T -> 'State -> 'State) -> set:Set<'T> -> state:'State -> 'State when 'T : comparison @@ -218,46 +263,59 @@ namespace Microsoft.FSharp.Collections /// Tests if all elements of the collection satisfy the given predicate. /// If the input function is f and the elements are i0...iN and "j0...jN" /// then computes p i0 && ... && p iN. + /// /// The function to test set elements. /// The input set. + /// /// True if all elements of set satisfy predicate. [] val forall: predicate:('T -> bool) -> set:Set<'T> -> bool /// Computes the intersection of the two sets. + /// /// The first input set. /// The second input set. + /// /// The intersection of set1 and set2. [] val intersect: set1:Set<'T> -> set2:Set<'T> -> Set<'T> /// Computes the intersection of a sequence of sets. The sequence must be non-empty. + /// /// The sequence of sets to intersect. + /// /// The intersection of the input sets. [] val intersectMany: sets:seq> -> Set<'T> /// Computes the union of the two sets. + /// /// The first input set. /// The second input set. + /// /// The union of set1 and set2. [] val union: set1:Set<'T> -> set2:Set<'T> -> Set<'T> /// Computes the union of a sequence of sets. + /// /// The sequence of sets to union. + /// /// The union of the input sets. [] val unionMany: sets:seq> -> Set<'T> /// Returns "true" if the set is empty. + /// /// The input set. + /// /// True if set is empty. [] val isEmpty: set:Set<'T> -> bool /// Applies the given function to each element of the set, in order according /// to the comparison function. + /// /// The function to apply to each element. /// The input set. [] @@ -265,8 +323,10 @@ namespace Microsoft.FSharp.Collections /// Splits the set into two sets containing the elements for which the given predicate /// returns true and false respectively. + /// /// The function to test set elements. /// The input set. + /// /// A pair of sets with the first containing the elements for which predicate returns /// true and the second containing the elements for which predicate returns false. [] @@ -274,63 +334,83 @@ namespace Microsoft.FSharp.Collections /// Returns a new set with the given element removed. No exception is raised if /// the set doesn't contain the given element. + /// /// The element to remove. /// The input set. + /// /// The input set with value removed. [] val remove: value: 'T -> set:Set<'T> -> Set<'T> /// Returns the lowest element in the set according to the ordering being used for the set. + /// /// The input set. + /// /// The min value from the set. [] val minElement: set:Set<'T> -> 'T /// Returns the highest element in the set according to the ordering being used for the set. + /// /// The input set. + /// /// The max value from the set. [] val maxElement: set:Set<'T> -> 'T /// Builds a set that contains the same elements as the given list. + /// /// The input list. + /// /// A set containing the elements form the input list. [] val ofList: elements:'T list -> Set<'T> /// Builds a list that contains the elements of the set in order. + /// /// The input set. + /// /// An ordered list of the elements of set. [] val toList: set:Set<'T> -> 'T list /// Builds a set that contains the same elements as the given array. + /// /// The input array. + /// /// A set containing the elements of array. [] val ofArray: array:'T[] -> Set<'T> /// Builds an array that contains the elements of the set in order. + /// /// The input set. + /// /// An ordered array of the elements of set. [] val toArray: set:Set<'T> -> 'T[] /// Returns an ordered view of the collection as an enumerable object. + /// /// The input set. + /// /// An ordered sequence of the elements of set. [] val toSeq: set:Set<'T> -> seq<'T> /// Builds a new collection from the given enumerable object. + /// /// The input sequence. + /// /// The set containing elements. [] val ofSeq: elements:seq<'T> -> Set<'T> /// Returns a new set with the elements of the second set removed from the first. + /// /// The first input set. /// The set whose elements will be removed from set1. + /// /// The set with the elements of set2 removed from set1. [] val difference: set1:Set<'T> -> set2:Set<'T> -> Set<'T> diff --git a/src/fsharp/FSharp.Core/string.fsi b/src/fsharp/FSharp.Core/string.fsi index 59217506a6b..78c519aa1d5 100644 --- a/src/fsharp/FSharp.Core/string.fsi +++ b/src/fsharp/FSharp.Core/string.fsi @@ -20,13 +20,15 @@ namespace Microsoft.FSharp.Core /// The separator string to be inserted between the strings /// of the input sequence. /// The sequence of strings to be concatenated. + /// /// A new string consisting of the concatenated strings separated by /// the separation string. - /// Thrown when strings is null. + /// Thrown when strings is null. [] val concat: sep:string -> strings: seq -> string /// Applies the function action to each character in the string. + /// /// The function to be applied to each character of the string. /// The input string. [] @@ -34,6 +36,7 @@ namespace Microsoft.FSharp.Core /// Applies the function action to the index of each character in the string and the /// character itself. + /// /// The function to apply to each character and index of the string. /// The input string. [] @@ -41,16 +44,20 @@ namespace Microsoft.FSharp.Core /// Builds a new string whose characters are the results of applying the function mapping /// to each of the characters of the input string. + /// /// The function to apply to the characters of the string. /// The input string. + /// /// The resulting string. [] val map: mapping:(char -> char) -> str:string -> string /// Builds a new string whose characters are the results of applying the function mapping /// to each character and index of the input string. + /// /// The function to apply to each character and index of the string. /// The input string. + /// /// The resulting string. [] val mapi: mapping:(int -> char -> char) -> str:string -> string @@ -58,8 +65,10 @@ namespace Microsoft.FSharp.Core /// Builds a new string whose characters are the results of applying the function mapping /// to each of the characters of the input string and concatenating the resulting /// strings. + /// /// The function to produce a string from each character of the input string. /// The input string. + /// /// The concatenated string. [] val collect: mapping:(char -> string) -> str:string -> string @@ -71,6 +80,7 @@ namespace Microsoft.FSharp.Core /// /// A function to test whether each character in the input sequence should be included in the output string. /// The input string. + /// /// The resulting string. [] val filter: predicate:(char -> bool) -> str:string -> string @@ -78,38 +88,48 @@ namespace Microsoft.FSharp.Core /// Builds a new string whose characters are the results of applying the function mapping /// to each index from 0 to count-1 and concatenating the resulting /// strings. + /// /// The number of strings to initialize. /// The function to take an index and produce a string to /// be concatenated with the others. + /// /// The constructed string. - /// Thrown when count is negative. + /// Thrown when count is negative. [] val init: count:int -> initializer:(int -> string) -> string /// Tests if all characters in the string satisfy the given predicate. + /// /// The function to test each character of the string. /// The input string. + /// /// True if all characters return true for the predicate and false otherwise. [] val forall: predicate:(char -> bool) -> str:string -> bool /// Tests if any character of the string satisfies the given predicate. + /// /// The function to test each character of the string. /// The input string. + /// /// True if any character returns true for the predicate and false otherwise. [] val exists: predicate:(char -> bool) -> str:string -> bool /// Returns a string by concatenating count instances of str. + /// /// The number of copies of the input string will be copied. /// The input string. + /// /// The concatenated string. - /// Thrown when count is negative. + /// Thrown when count is negative. [] val replicate: count:int -> str: string -> string /// Returns the length of the string. + /// /// The input string. + /// /// The number of characters in the string. [] val length: str:string -> int diff --git a/src/fsharp/fsiaux.fsi b/src/fsharp/fsiaux.fsi index d557c17331b..a225e48e7aa 100644 --- a/src/fsharp/fsiaux.fsi +++ b/src/fsharp/fsiaux.fsi @@ -7,10 +7,12 @@ namespace FSharp.Compiler.Interactive type IEventLoop = /// Run the event loop. + /// /// True if the event loop was restarted; false otherwise. abstract Run : unit -> bool /// Request that the given operation be run synchronously on the event loop. + /// /// The result of the operation. abstract Invoke : (unit -> 'T) -> 'T diff --git a/src/fsharp/lib.fs b/src/fsharp/lib.fs index 5d8649d561f..8d89ac8fb37 100755 --- a/src/fsharp/lib.fs +++ b/src/fsharp/lib.fs @@ -96,29 +96,29 @@ module NameMap = //------------------------------------------------------------------------- module Check = - /// Throw System.InvalidOperationException() if argument is None. + /// Throw System.InvalidOperationException if argument is None. /// If there is a value (e.g. Some(value)) then value is returned. let NotNone argName (arg:'T option) : 'T = match arg with | None -> raise (new System.InvalidOperationException(argName)) | Some x -> x - /// Throw System.ArgumentNullException() if argument is null. + /// Throw System.ArgumentNullException if argument is null. let ArgumentNotNull arg argName = match box(arg) with | null -> raise (new System.ArgumentNullException(argName)) | _ -> () - /// Throw System.ArgumentNullException() if array argument is null. - /// Throw System.ArgumentOutOfRangeException() is array argument is empty. + /// Throw System.ArgumentNullException if array argument is null. + /// Throw System.ArgumentOutOfRangeException is array argument is empty. let ArrayArgumentNotNullOrEmpty (arr:'T[]) argName = ArgumentNotNull arr argName if (0 = arr.Length) then raise (new System.ArgumentOutOfRangeException(argName)) - /// Throw System.ArgumentNullException() if string argument is null. - /// Throw System.ArgumentOutOfRangeException() is string argument is empty. + /// Throw System.ArgumentNullException if string argument is null. + /// Throw System.ArgumentOutOfRangeException is string argument is empty. let StringArgumentNotNullOrEmpty (s:string) argName = ArgumentNotNull s argName if s.Length = 0 then diff --git a/src/fsharp/service/FSharpCheckerResults.fsi b/src/fsharp/service/FSharpCheckerResults.fsi index 67f4900b4a5..9705c1da0bf 100644 --- a/src/fsharp/service/FSharpCheckerResults.fsi +++ b/src/fsharp/service/FSharpCheckerResults.fsi @@ -236,10 +236,12 @@ type public FSharpCheckFileResults = member GetDisplayContextForPos : pos : pos -> Async /// Determines if a long ident is resolvable at a specific point. + /// /// An optional string used for tracing compiler operations associated with this request. member internal IsRelativeNameResolvable: cursorPos : pos * plid : string list * item: Item * ?userOpName: string -> Async /// Determines if a long ident is resolvable at a specific point. + /// /// An optional string used for tracing compiler operations associated with this request. member IsRelativeNameResolvableFromSymbol: cursorPos : pos * plid : string list * symbol: FSharpSymbol * ?userOpName: string -> Async diff --git a/src/fsharp/service/service.fsi b/src/fsharp/service/service.fsi index cb414c87ab1..3ed57fa2f27 100755 --- a/src/fsharp/service/service.fsi +++ b/src/fsharp/service/service.fsi @@ -314,6 +314,7 @@ type public FSharpChecker = /// /// TypeCheck and compile provided AST /// + /// /// An optional string used for tracing compiler operations associated with this request. member Compile: ast:ParsedInput list * assemblyName:string * outFile:string * dependencies:string list * ?pdbFile:string * ?executable:bool * ?noframework:bool * ?userOpName: string -> Async @@ -329,12 +330,14 @@ type public FSharpChecker = /// the given TextWriters are used for the stdout and stderr streams respectively. In this /// case, a global setting is modified during the execution. /// + /// /// An optional string used for tracing compiler operations associated with this request. member CompileToDynamicAssembly: otherFlags:string [] * execute:(TextWriter * TextWriter) option * ?userOpName: string -> Async /// /// TypeCheck and compile provided AST /// + /// /// An optional string used for tracing compiler operations associated with this request. member CompileToDynamicAssembly: ast:ParsedInput list * assemblyName:string * dependencies:string list * execute:(TextWriter * TextWriter) option * ?debug:bool * ?noframework:bool * ?userOpName: string -> Async @@ -344,6 +347,7 @@ type public FSharpChecker = /// If the source of the file has changed the results returned by this function may be out of date, though may /// still be usable for generating intellisense menus and information. /// + /// /// The filename for the file. /// The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. /// Optionally, specify source that must match the previous parse precisely. @@ -392,6 +396,7 @@ type public FSharpChecker = /// /// This function is called when a project has been cleaned/rebuilt, and thus any live type providers should be refreshed. /// + /// /// An optional string used for tracing compiler operations associated with this request. member NotifyProjectCleaned: options: FSharpProjectOptions * ?userOpName: string -> Async diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.cs index 37f6af8e8e2..9f6361691fa 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.cs @@ -2315,7 +2315,7 @@ public virtual void SetOrCreateBuildEventProperty(string propertyName, string pr } /// Support hex format (like 0xFF) - /// + /// /// Raise if invalid format /// The inner exception contains the real exception, of type FormatException, StackOverflowException ///