diff --git a/src/absil/illib.fs b/src/absil/illib.fs
index 63aabe9d01a..8f05c07365f 100644
--- a/src/absil/illib.fs
+++ b/src/absil/illib.fs
@@ -420,6 +420,12 @@ module List =
let mapiFoldSquared f z xss = mapFoldSquared f z (xss |> mapiSquared (fun i j x -> (i, j, x)))
+ let duplicates (xs: 'T list) =
+ xs
+ |> List.groupBy id
+ |> List.filter (fun (_, elems) -> Seq.length elems > 1)
+ |> List.map fst
+
module ResizeArray =
/// Split a ResizeArray into an array of smaller chunks.
diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs
index 5585ae6a6f9..63dba3fed83 100644
--- a/src/fsharp/CompileOps.fs
+++ b/src/fsharp/CompileOps.fs
@@ -404,6 +404,7 @@ let warningOn err level specificWarnOn =
| 1182 -> false // chkUnusedValue - off by default
| 3218 -> false // ArgumentsInSigAndImplMismatch - off by default
| 3180 -> false // abImplicitHeapAllocation - off by default
+ | 3390 -> false // xmlDocBadlyFormed - off by default
| _ -> level >= GetWarningLevel err
let SplitRelatedDiagnostics(err: PhasedDiagnostic) : PhasedDiagnostic * PhasedDiagnostic list =
diff --git a/src/fsharp/FSComp.txt b/src/fsharp/FSComp.txt
index b5d1d9806ec..7914b2e6919 100644
--- a/src/fsharp/FSComp.txt
+++ b/src/fsharp/FSComp.txt
@@ -1540,3 +1540,10 @@ forFormatInvalidForInterpolated4,"Interpolated strings used as type IFormattable
3382,parsEmptyFillInInterpolatedString,"Invalid interpolated string. This interpolated string expression fill is empty, an expression was expected."
3383,lexRBraceInInterpolatedString,"A '}}' character must be escaped (by doubling) in an interpolated string."
#3501 "This construct is not supported by your version of the F# compiler" CompilerMessage(ExperimentalAttributeMessages.NotSupportedYet, 3501, IsError=true)
+3390,xmlDocBadlyFormed,"This XML comment is invalid: '%s'"
+3390,xmlDocMissingParameterName,"This XML comment is invalid: missing 'name' attribute for parameter or parameter reference"
+3390,xmlDocMissingCrossReference,"This XML comment is invalid: missing 'cref' attribute for cross-reference"
+3390,xmlDocInvalidParameterName,"This XML comment is invalid: unknown parameter '%s'"
+3390,xmlDocDuplicateParameter,"This XML comment is invalid: multiple documentation entries for parameter '%s'"
+3390,xmlDocUnresolvedCrossReference,"This XML comment is invalid: unresolved cross-reference '%s'"
+3390,xmlDocMissingParameter,"This XML comment is incomplete: no documentation for parameter '%s'"
\ No newline at end of file
diff --git a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj
index dd4cc85f781..1b36d5a4740 100644
--- a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj
+++ b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj
@@ -12,7 +12,7 @@
$(DefineConstants);COMPILER$(DefineConstants);MSBUILD_AT_LEAST_15$(DefineConstants);LOCALIZATION_FCOMP
- $(OtherFlags) --warnon:1182 --maxerrors:20 --extraoptimizationloops:1
+ $(OtherFlags) --warnon:1182 /warnon:3390 --maxerrors:20 --extraoptimizationloops:1true
diff --git a/src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj b/src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
index c83d93afc3f..b4cc9aa0ce7 100644
--- a/src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
+++ b/src/fsharp/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
@@ -10,7 +10,7 @@
$(DefineConstants);COMPILER_SERVICE_AS_DLL$(DefineConstants);COMPILER$(DefineConstants);ENABLE_MONO_SUPPORT
- $(OtherFlags) /warnon:1182 --times
+ $(OtherFlags) /warnon:1182 /warnon:3390 --timestruetrue
@@ -21,7 +21,7 @@
FSharp.Compiler.Service.nuspectrueThe F# Compiler Services package For F# $(FSLanguageVersion) exposes additional functionality for implementing F# language bindings, additional tools based on the compiler or refactoring tools. The package also includes F# interactive service that can be used for embedding F# scripting into your applications. Contains code from the F# Software Foundation.
- /blob/main/release-notes.md#FSharp-Compilere-Service-$(FSharpCompilerServiceReleaseNotesVersion)
+ /blob/main/release-notes.md#FSharp-Compiler-Service-$(FSharpCompilerServiceReleaseNotesVersion)F#, fsharp, interactive, compiler, editor
diff --git a/src/fsharp/FSharp.Core/FSharp.Core.fsproj b/src/fsharp/FSharp.Core/FSharp.Core.fsproj
index 8eb2bb01a74..9aa06a0a61e 100644
--- a/src/fsharp/FSharp.Core/FSharp.Core.fsproj
+++ b/src/fsharp/FSharp.Core/FSharp.Core.fsproj
@@ -9,7 +9,7 @@
true$(DefineConstants);FSHARP_COREBUILDING_WITH_LKG;$(DefineConstants)
- $(OtherFlags) --warnon:1182 --compiling-fslib --compiling-fslib-40 --maxerrors:20 --extraoptimizationloops:1 --nowarn:57
+ $(OtherFlags) --warnon:1182 --warnon:3390 --compiling-fslib --compiling-fslib-40 --maxerrors:100 --extraoptimizationloops:1 --nowarn:57truetrue
diff --git a/src/fsharp/FSharp.Core/array.fsi b/src/fsharp/FSharp.Core/array.fsi
index f47baa49e2b..1d0ef4210f1 100644
--- a/src/fsharp/FSharp.Core/array.fsi
+++ b/src/fsharp/FSharp.Core/array.fsi
@@ -1010,7 +1010,7 @@ namespace Microsoft.FSharp.Collections
/// the remaining elements in a new array.
///
/// A function that evaluates an element of the array to a boolean value.
- /// The input array.
+ /// The input array.
///
/// The created sub array.
///
@@ -1293,7 +1293,7 @@ namespace Microsoft.FSharp.Collections
/// 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 input array.
///
/// The nth element of the array or None.
///
diff --git a/src/fsharp/FSharp.Core/async.fsi b/src/fsharp/FSharp.Core/async.fsi
index 5fea2c1a81d..0d2a1867fa5 100644
--- a/src/fsharp/FSharp.Core/async.fsi
+++ b/src/fsharp/FSharp.Core/async.fsi
@@ -229,6 +229,7 @@ namespace Microsoft.FSharp.Control
/// for the other child computations to complete.
///
/// A sequence of distinct computations to be parallelized.
+ /// The maximum degree of parallelism in the parallel execution.
///
/// A computation that returns an array of values from the sequence of input computations.
///
diff --git a/src/fsharp/FSharp.Core/eventmodule.fsi b/src/fsharp/FSharp.Core/eventmodule.fsi
index b4ea1078fe4..4e520b559f6 100644
--- a/src/fsharp/FSharp.Core/eventmodule.fsi
+++ b/src/fsharp/FSharp.Core/eventmodule.fsi
@@ -22,7 +22,7 @@ namespace Microsoft.FSharp.Control
/// Returns a new event that passes values transformed by the given function.
///
- /// The function to transform event values.
+ /// The function to transform event values.
/// The input event.
///
/// An event that passes the transformed values.
diff --git a/src/fsharp/FSharp.Core/list.fsi b/src/fsharp/FSharp.Core/list.fsi
index c4c560fb858..bbab64c1c80 100644
--- a/src/fsharp/FSharp.Core/list.fsi
+++ b/src/fsharp/FSharp.Core/list.fsi
@@ -956,7 +956,7 @@ namespace Microsoft.FSharp.Collections
/// Returns at most N elements in a new list.
///
/// The maximum number of items to return.
- /// The input list.
+ /// The input list.
///
/// The result list.
[]
diff --git a/src/fsharp/FSharp.Core/map.fsi b/src/fsharp/FSharp.Core/map.fsi
index 2f0360bf4cb..ebadc8f1a33 100644
--- a/src/fsharp/FSharp.Core/map.fsi
+++ b/src/fsharp/FSharp.Core/map.fsi
@@ -18,7 +18,8 @@ namespace Microsoft.FSharp.Collections
type Map<[]'Key,[]'Value when 'Key : comparison> =
/// 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 key to add.
+ /// The value to add.
///
/// The resulting map.
member Add: key:'Key * value:'Value -> Map<'Key,'Value>
diff --git a/src/fsharp/FSharp.Core/nativeptr.fsi b/src/fsharp/FSharp.Core/nativeptr.fsi
index a90abcdbfba..10ed7c3bd1f 100644
--- a/src/fsharp/FSharp.Core/nativeptr.fsi
+++ b/src/fsharp/FSharp.Core/nativeptr.fsi
@@ -41,7 +41,7 @@ namespace Microsoft.FSharp.NativeInterop
/// The untyped pointer.
///
/// A typed pointer.
- val inline ofVoidPtr : voidptr -> nativeptr<'T>
+ val inline ofVoidPtr : address: voidptr -> nativeptr<'T>
[]
[]
@@ -109,7 +109,7 @@ namespace Microsoft.FSharp.NativeInterop
/// A typed pointer to the allocated memory.
[]
[]
- val inline stackalloc : count:int -> nativeptr<'T>
+ val inline stackalloc: count:int -> nativeptr<'T>
/// Converts a given typed native pointer to a managed pointer.
///
@@ -118,4 +118,4 @@ namespace Microsoft.FSharp.NativeInterop
/// The managed pointer.
[]
[]
- val inline toByRef : nativeptr<'T> -> byref<'T>
+ val inline toByRef: address: nativeptr<'T> -> byref<'T>
diff --git a/src/fsharp/FSharp.Core/observable.fsi b/src/fsharp/FSharp.Core/observable.fsi
index 5a8ee380b76..bf3c218de57 100644
--- a/src/fsharp/FSharp.Core/observable.fsi
+++ b/src/fsharp/FSharp.Core/observable.fsi
@@ -43,7 +43,7 @@ namespace Microsoft.FSharp.Control
/// 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
+ /// The function to apply to observations to determine if it should
/// be kept.
/// The input Observable.
///
diff --git a/src/fsharp/FSharp.Core/option.fsi b/src/fsharp/FSharp.Core/option.fsi
index cff21e535b6..0bb89c1468f 100644
--- a/src/fsharp/FSharp.Core/option.fsi
+++ b/src/fsharp/FSharp.Core/option.fsi
@@ -161,7 +161,7 @@ module 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
+ val map2: mapping:('T1 -> 'T2 -> 'U) -> option1: 'T1 option -> option2: '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.
///
@@ -172,7 +172,7 @@ module 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
+ val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> option1: 'T1 option -> option2: 'T2 option -> option3: 'T3 option -> 'U option
/// bind f inp evaluates to match inp with None -> None | Some x -> f x
///
@@ -260,7 +260,7 @@ module ValueOption =
///
/// True if the value option is not ValueNone.
[]
- val inline isSome: voption:'T voption -> bool
+ val inline isSome: voption: 'T voption -> bool
/// Returns true if the value option is ValueNone.
///
@@ -268,7 +268,7 @@ module ValueOption =
///
/// True if the voption is ValueNone.
[]
- val inline isNone: voption:'T voption -> bool
+ 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.
///
@@ -278,7 +278,7 @@ module ValueOption =
/// 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
+ 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.
///
@@ -288,16 +288,16 @@ module ValueOption =
/// 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
+ val defaultWith: defThunk:(unit -> 'T) -> voption: 'T voption -> 'T
- /// Returns if it is Some, otherwise returns .
+ /// Returns if it is Some, otherwise returns .
///
- /// The value to use if is None.
- /// The input option.
+ /// 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
+ val orElse: ifNone:'T voption -> voption: 'T voption -> 'T voption
/// Returns if it is Some, otherwise evaluates and returns the result.
///
@@ -307,7 +307,7 @@ module ValueOption =
/// 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
+ val orElseWith: ifNoneThunk:(unit -> 'T voption) -> voption: 'T voption -> 'T voption
/// Gets the value associated with the option.
///
@@ -316,7 +316,7 @@ module ValueOption =
/// The value within the option.
/// Thrown when the option is ValueNone.
[]
- val get: voption:'T voption -> 'T
+ val get: voption: 'T voption -> 'T
/// count inp evaluates to match inp with ValueNone -> 0 | ValueSome _ -> 1.
///
@@ -324,7 +324,7 @@ module ValueOption =
///
/// A zero if the option is ValueNone, a one otherwise.
[]
- val count: voption:'T voption -> int
+ val count: voption: 'T voption -> int
/// fold f s inp evaluates to match inp with ValueNone -> s | ValueSome x -> f s x.
///
@@ -335,7 +335,7 @@ module ValueOption =
/// 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
+ 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.
///
@@ -346,7 +346,7 @@ module ValueOption =
/// 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
+ 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.
///
@@ -356,7 +356,7 @@ module ValueOption =
/// 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
+ val exists: predicate:('T -> bool) -> voption: 'T voption -> bool
/// forall p inp evaluates to match inp with ValueNone -> true | ValueSome x -> p x.
///
@@ -366,7 +366,7 @@ module ValueOption =
/// 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
+ val forall: predicate:('T -> bool) -> voption: 'T voption -> bool
/// Evaluates to true if is ValueSome and its value is equal to .
///
@@ -375,7 +375,7 @@ module ValueOption =
///
/// 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
+ val inline contains: value:'T -> voption: 'T voption -> bool when 'T : equality
/// iter f inp executes match inp with ValueNone -> () | ValueSome x -> f x.
///
@@ -385,7 +385,7 @@ module ValueOption =
/// 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
+ val iter: action:('T -> unit) -> voption: 'T voption -> unit
/// map f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> ValueSome (f x).
///
@@ -394,7 +394,7 @@ module ValueOption =
///
/// 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
+ 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.
///
@@ -415,7 +415,7 @@ module ValueOption =
///
/// 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
+ val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> voption1: 'T1 voption -> voption2: 'T2 voption -> voption3: 'T3 voption -> 'U voption
/// bind f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> f x
///
@@ -425,7 +425,7 @@ module ValueOption =
///
/// An option of the output type of the binder.
[]
- val bind: binder:('T -> 'U voption) -> voption:'T voption -> 'U voption
+ val bind: binder:('T -> 'U voption) -> voption: 'T voption -> 'U voption
/// flatten inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> x
///
@@ -434,7 +434,7 @@ module ValueOption =
/// A value option of the output type of the binder.
/// flatten is equivalent to bind id.
[]
- val flatten: voption:'T voption voption -> 'T voption
+ 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.
///
@@ -443,7 +443,7 @@ module ValueOption =
///
/// The input if the predicate evaluates to true; otherwise, ValueNone.
[]
- val filter: predicate:('T -> bool) -> voption:'T voption -> 'T voption
+ val filter: predicate:('T -> bool) -> voption: 'T voption -> 'T voption
/// Convert the value option to an array of length 0 or 1.
///
@@ -451,7 +451,7 @@ module ValueOption =
///
/// The result array.
[]
- val toArray: voption:'T voption -> 'T[]
+ val toArray: voption: 'T voption -> 'T[]
/// Convert the value option to a list of length 0 or 1.
///
@@ -459,7 +459,7 @@ module ValueOption =
///
/// The result list.
[]
- val toList: voption:'T voption -> 'T list
+ val toList: voption: 'T voption -> 'T list
/// Convert the value option to a Nullable value.
///
@@ -467,7 +467,7 @@ module ValueOption =
///
/// The result value.
[]
- val toNullable: voption:'T voption -> Nullable<'T>
+ val toNullable: voption: 'T voption -> Nullable<'T>
/// Convert a Nullable value to a value option.
///
diff --git a/src/fsharp/FSharp.Core/prim-types.fs b/src/fsharp/FSharp.Core/prim-types.fs
index 29750a8cc50..307fd22c20a 100644
--- a/src/fsharp/FSharp.Core/prim-types.fs
+++ b/src/fsharp/FSharp.Core/prim-types.fs
@@ -370,7 +370,7 @@ namespace Microsoft.FSharp.Core
[] type int16<[] 'Measure> = int16
[] type int64<[] 'Measure> = int64
- /// Represents a managed pointer in F# code.
+ /// Represents a managed pointer in F# code.
type byref<'T> = (# "!0&" #)
/// Represents a managed pointer in F# code.
diff --git a/src/fsharp/FSharp.Core/prim-types.fsi b/src/fsharp/FSharp.Core/prim-types.fsi
index c886299fc0a..95092137fc5 100644
--- a/src/fsharp/FSharp.Core/prim-types.fsi
+++ b/src/fsharp/FSharp.Core/prim-types.fsi
@@ -667,6 +667,7 @@ namespace Microsoft.FSharp.Core
/// Creates an instance of the attribute
///
/// Indicates the type of source construct.
+ /// Indicates the index in the sequence of constructs.
///
/// CompilationMappingAttribute
new : sourceConstructFlags:SourceConstructFlags * sequenceNumber: int -> CompilationMappingAttribute
@@ -674,6 +675,8 @@ namespace Microsoft.FSharp.Core
/// Creates an instance of the attribute
///
/// Indicates the type of source construct.
+ /// Indicates the index in the sequence of variants.
+ /// Indicates the index in the sequence of constructs.
///
/// CompilationMappingAttribute
new : sourceConstructFlags:SourceConstructFlags * variantNumber : int * sequenceNumber : int -> CompilationMappingAttribute
@@ -681,6 +684,7 @@ namespace Microsoft.FSharp.Core
/// Creates an instance of the attribute
///
/// Indicates the type definitions needed to resolve the source construct.
+ /// The name of the resource needed to resolve the source construct.
///
/// CompilationMappingAttribute
new : resourceName:string * typeDefinitions:System.Type[] -> CompilationMappingAttribute
@@ -1227,59 +1231,59 @@ namespace Microsoft.FSharp.Core
/// Creates a float value with units-of-measure
///
- /// The input float.
+ /// The input float.
///
/// The float with units-of-measure.
- val inline FloatWithMeasure : float -> float<'Measure>
+ val inline FloatWithMeasure : input: float -> float<'Measure>
/// Creates a float32 value with units-of-measure
///
- /// The input float.
+ /// The input float.
///
/// The float with units-of-measure.
- val inline Float32WithMeasure : float32 -> float32<'Measure>
+ val inline Float32WithMeasure : input: float32 -> float32<'Measure>
/// Creates a decimal value with units-of-measure
///
- /// The input decimal.
+ /// The input decimal.
///
/// The decimal with units of measure.
- val inline DecimalWithMeasure : decimal -> decimal<'Measure>
+ val inline DecimalWithMeasure : input: decimal -> decimal<'Measure>
/// Creates an int32 value with units-of-measure
///
- /// The input int.
+ /// The input int.
///
/// The int with units of measure.
- val inline Int32WithMeasure : int -> int<'Measure>
+ val inline Int32WithMeasure : input: int -> int<'Measure>
/// Creates an int64 value with units-of-measure
///
- /// The input int64.
+ /// The input int64.
///
/// The int64 with units of measure.
- val inline Int64WithMeasure : int64 -> int64<'Measure>
+ val inline Int64WithMeasure : input: int64 -> int64<'Measure>
/// Creates an int16 value with units-of-measure
///
- /// The input int16.
+ /// The input int16.
///
/// The int16 with units-of-measure.
- val inline Int16WithMeasure : int16 -> int16<'Measure>
+ val inline Int16WithMeasure : input: int16 -> int16<'Measure>
/// Creates an sbyte value with units-of-measure
///
- /// The input sbyte.
+ /// The input sbyte.
///
/// The sbyte with units-of-measure.
- val inline SByteWithMeasure : sbyte -> sbyte<'Measure>
+ val inline SByteWithMeasure : input: 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
+ val ParseInt32 : s: string -> int32
/// Parse an uint32 according to the rules used by the overloaded 'uint32' conversion operator when applied to strings
///
@@ -1946,42 +1950,42 @@ namespace Microsoft.FSharp.Core
/// Convert the given Action delegate object to an F# function value
///
- /// The input Action delegate.
+ /// 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 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 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 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 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 input Action delegate.
///
/// The F# function.
static member inline FromAction : action:Action<'T1,'T2,'T3,'T4,'T5> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> unit)
@@ -2292,7 +2296,7 @@ namespace Microsoft.FSharp.Core
/// The representation of "Value of type 'T"
///
- /// The input value.
+ /// The input value.
///
/// An option representing the value.
| ValueSome: 'T -> 'T voption
@@ -3724,11 +3728,11 @@ namespace Microsoft.FSharp.Core
/// 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 target 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 third dimension.
+ /// The end index of the third dimension.
/// The source array.
///
/// The one dimensional sub array from the given indices.
@@ -3737,7 +3741,7 @@ namespace Microsoft.FSharp.Core
/// Sets a 1D slice of a 3D array.
///
- /// The source array.
+ /// The target array.
/// The fixed index of the first dimension.
/// The start index of the second dimension.
/// The end index of the second dimension.
@@ -3750,7 +3754,7 @@ namespace Microsoft.FSharp.Core
/// Sets a 1D slice of a 3D array.
///
- /// The source array.
+ /// The target array.
/// The start index of the first dimension.
/// The end index of the first dimension.
/// The fixed index of the second dimension.
@@ -3958,9 +3962,9 @@ namespace Microsoft.FSharp.Core
/// 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
+ /// Sets a 3D slice of a 4D array
///
- /// The source array.
+ /// The target array.
/// The fixed index of the first dimension.
/// The start index of the second dimension.
/// The end index of the second dimension.
@@ -4358,7 +4362,7 @@ namespace Microsoft.FSharp.Core
///
/// The unboxed result.
[]
- val inline unbox<'T> : obj -> 'T
+ val inline unbox<'T> : value: obj -> 'T
/// Generate a default value for any type. This is null for reference types,
/// For structs, this is struct value where all fields have the default value.
@@ -4466,7 +4470,7 @@ namespace Microsoft.FSharp.Core
/// Calls GetHashCode() on the value
///
- /// The value.
+ /// The value.
///
/// The hash code.
[]
@@ -4718,7 +4722,7 @@ namespace Microsoft.FSharp.Control
/// A delegate type associated with the F# event type IEvent<_>
///
- /// The object that fired the event.
+ /// The object that fired the event.
/// The event arguments.
///
/// Events and Observables
diff --git a/src/fsharp/FSharp.Core/seq.fsi b/src/fsharp/FSharp.Core/seq.fsi
index d8f983de4b4..e357da420f4 100644
--- a/src/fsharp/FSharp.Core/seq.fsi
+++ b/src/fsharp/FSharp.Core/seq.fsi
@@ -752,7 +752,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.
+ /// The input collection.
///
/// Thrown when the input collection is null.
///
@@ -767,7 +767,7 @@ namespace Microsoft.FSharp.Collections
/// not be used with large or infinite sequences.
///
/// The function to transform elements from the input collection and accumulate the final value.
- /// The input collection.
+ /// The input collection.
/// The initial state.
///
/// Thrown when the input collection is null.
@@ -1092,7 +1092,7 @@ namespace Microsoft.FSharp.Collections
/// sequence and uses a stable sort, that is the original order of equal elements is preserved.
///
/// The function to compare the collection elements.
- /// The input sequence.
+ /// The input sequence.
///
/// The result sequence.
[]
diff --git a/src/fsharp/ParseHelpers.fs b/src/fsharp/ParseHelpers.fs
index 33e7872b186..6a94962108a 100644
--- a/src/fsharp/ParseHelpers.fs
+++ b/src/fsharp/ParseHelpers.fs
@@ -85,7 +85,7 @@ module LexbufLocalXmlDocStore =
lexbuf.BufferLocalStore.[xmlDocKey] <- box (XmlDocCollector())
/// Called from the lexer to save a single line of XML doc comment.
- let internal SaveXmlDocLine (lexbuf: Lexbuf, lineText, pos) =
+ let internal SaveXmlDocLine (lexbuf: Lexbuf, lineText, range: range) =
let collector =
match lexbuf.BufferLocalStore.TryGetValue xmlDocKey with
| true, collector -> collector
@@ -94,7 +94,7 @@ module LexbufLocalXmlDocStore =
lexbuf.BufferLocalStore.[xmlDocKey] <- collector
collector
let collector = unbox(collector)
- collector.AddXmlDocLine(lineText, pos)
+ collector.AddXmlDocLine(lineText, range)
/// Called from the parser each time we parse a construct that marks the end of an XML doc comment range,
/// e.g. a 'type' declaration. The markerRange is the range of the keyword that delimits the construct.
diff --git a/src/fsharp/PostInferenceChecks.fs b/src/fsharp/PostInferenceChecks.fs
index 1bd7e324dfd..fcaeb06d11b 100644
--- a/src/fsharp/PostInferenceChecks.fs
+++ b/src/fsharp/PostInferenceChecks.fs
@@ -2224,7 +2224,6 @@ let CheckEntityDefn cenv env (tycon: Entity) =
for (argty, _) in argtys do
CheckTypeNoInnerByrefs cenv env vref.Range argty
CheckTypeNoInnerByrefs cenv env vref.Range rty
-
| None -> ()
// Supported interface may not have byrefs
diff --git a/src/fsharp/SyntaxTree.fs b/src/fsharp/SyntaxTree.fs
index 4e9229b8df2..df5d2b7726b 100644
--- a/src/fsharp/SyntaxTree.fs
+++ b/src/fsharp/SyntaxTree.fs
@@ -1434,6 +1434,8 @@ type SynAttributes = SynAttributeList list
type SynValData =
| SynValData of MemberFlags option * SynValInfo * Ident option
+ member x.SynValInfo = (let (SynValData(_flags, synValInfo, _)) = x in synValInfo)
+
/// Represents a binding for a 'let' or 'member' declaration
[]
type SynBinding =
@@ -1764,9 +1766,16 @@ type SynValSig =
type SynValInfo =
/// SynValInfo(curriedArgInfos, returnInfo)
- | SynValInfo of SynArgInfo list list * SynArgInfo
+ | SynValInfo of curriedArgInfos: SynArgInfo list list * returnInfo: SynArgInfo
+
+ member x.CurriedArgInfos = (let (SynValInfo(args, _)) = x in args)
- member x.ArgInfos = (let (SynValInfo(args, _)) = x in args)
+ member x.ArgNames =
+ x.CurriedArgInfos
+ |> List.concat
+ |> List.map (fun info -> info.Ident)
+ |> List.choose id
+ |> List.map (fun id -> id.idText)
/// Represents the argument names and other metadata for a parameter for a member or function
[]
@@ -1777,6 +1786,8 @@ type SynArgInfo =
optional: bool *
ident: Ident option
+ member x.Ident : Ident option = let (SynArgInfo(_,_,id)) = x in id
+
/// Represents the names and other metadata for the type parameters for a member or function
[]
type SynValTyparDecls =
@@ -1882,6 +1893,7 @@ type SynMemberDefn =
attributes: SynAttributes *
ctorArgs: SynSimplePats *
selfIdentifier: Ident option *
+ doc: PreXmlDoc *
range: range
/// An implicit inherit definition, 'inherit (args...) as base'
diff --git a/src/fsharp/TypeChecker.fs b/src/fsharp/TypeChecker.fs
index 0d57eba641a..50dfa1b36f5 100755
--- a/src/fsharp/TypeChecker.fs
+++ b/src/fsharp/TypeChecker.fs
@@ -1257,6 +1257,8 @@ type ValScheme =
member x.GeneralizedTypars = let (ValScheme(_, TypeScheme(gtps, _), _, _, _, _, _, _, _, _, _, _)) = x in gtps
member x.TypeScheme = let (ValScheme(_, ts, _, _, _, _, _, _, _, _, _, _)) = x in ts
+
+ member x.ValReprInfo = let (ValScheme(_, _, topValInfo, _, _, _, _, _, _, _, _, _)) = x in topValInfo
/// Translation of patterns is split into three phases. The first collects names.
/// The second is run after val_specs have been created for those names and inference
@@ -2604,7 +2606,9 @@ module BindingNormalization =
| Binding (vis, bkind, isInline, isMutable, Attributes attrs, doc, valSynData, p, retInfo, rhsExpr, mBinding, spBind) ->
let (NormalizedBindingPat(pat, rhsExpr, valSynData, typars)) =
NormalizeBindingPattern cenv cenv.nameResolver isObjExprBinding env valSynData p (NormalizedBindingRhs ([], retInfo, rhsExpr))
- NormalizedBinding(vis, bkind, isInline, isMutable, attrs, doc.ToXmlDoc(), typars, valSynData, pat, rhsExpr, mBinding, spBind)
+ let paramNames = Some valSynData.SynValInfo.ArgNames
+ let doc = doc.ToXmlDoc(true, paramNames)
+ NormalizedBinding(vis, bkind, isInline, isMutable, attrs, doc, typars, valSynData, pat, rhsExpr, mBinding, spBind)
//-------------------------------------------------------------------------
// input is:
@@ -4544,7 +4548,7 @@ and TcValSpec cenv env declKind newOk containerInfo memFlagsOpt thisTyOpt tpenv
if SynInfo.HasOptionalArgs valSynInfo then
let curriedArgTys, returnTy = GetTopTauTypeInFSharpForm cenv.g argsData ty' m
let curriedArgTys =
- (List.zip (List.mapSquared fst curriedArgTys) valSynInfo.ArgInfos)
+ (List.zip (List.mapSquared fst curriedArgTys) valSynInfo.CurriedArgInfos)
|> List.map (fun (argTys, argInfos) ->
(List.zip argTys argInfos)
|> List.map (fun (argty, argInfo) ->
@@ -13037,7 +13041,13 @@ let TcAndPublishValSpec (cenv, env, containerInfo: ContainerInfo, declKind, memF
errorR(Error(FSComp.SR.tcValueInSignatureRequiresLiteralAttribute(), e.Range))
konst
- let vspec = MakeAndPublishVal cenv env (altActualParent, true, declKind, ValNotInRecScope, valscheme, attrs, doc.ToXmlDoc(), konst, false)
+ let paramNames =
+ match valscheme.ValReprInfo with
+ | None -> None
+ | Some topValInfo -> topValInfo.ArgNames
+
+ let doc = doc.ToXmlDoc(true, paramNames)
+ let vspec = MakeAndPublishVal cenv env (altActualParent, true, declKind, ValNotInRecScope, valscheme, attrs, doc, konst, false)
assert(vspec.InlineInfo = inlineFlag)
vspec, tpenv)
@@ -13106,12 +13116,15 @@ module TcRecdUnionAndEnumDeclarations = begin
let TcAnonFieldDecl cenv env parent tpenv nm (Field(Attributes attribs, isStatic, idOpt, ty, isMutable, xmldoc, vis, m)) =
let id = (match idOpt with None -> mkSynId m nm | Some id -> id)
- TcFieldDecl cenv env parent false tpenv (isStatic, attribs, id, idOpt.IsNone, ty, isMutable, xmldoc.ToXmlDoc(), vis, m)
+ let doc = xmldoc.ToXmlDoc(true, Some [])
+ TcFieldDecl cenv env parent false tpenv (isStatic, attribs, id, idOpt.IsNone, ty, isMutable, doc, vis, m)
let TcNamedFieldDecl cenv env parent isIncrClass tpenv (Field(Attributes attribs, isStatic, id, ty, isMutable, xmldoc, vis, m)) =
match id with
| None -> error (Error(FSComp.SR.tcFieldRequiresName(), m))
- | Some id -> TcFieldDecl cenv env parent isIncrClass tpenv (isStatic, attribs, id, false, ty, isMutable, xmldoc.ToXmlDoc(), vis, m)
+ | Some id ->
+ let doc = xmldoc.ToXmlDoc(true, Some [])
+ TcFieldDecl cenv env parent isIncrClass tpenv (isStatic, attribs, id, false, ty, isMutable, doc, vis, m)
let TcNamedFieldDecls cenv env parent isIncrClass tpenv fields =
fields |> List.map (TcNamedFieldDecl cenv env parent isIncrClass tpenv)
@@ -13181,7 +13194,9 @@ module TcRecdUnionAndEnumDeclarations = begin
if not (typeEquiv cenv.g recordTy thisTy) then
error(Error(FSComp.SR.tcReturnTypesForUnionMustBeSameAsType(), m))
rfields, recordTy
- Construct.NewUnionCase id rfields recordTy attrs (xmldoc.ToXmlDoc()) vis
+ let names = rfields |> List.map (fun f -> f.Name)
+ let doc = xmldoc.ToXmlDoc(true, Some names)
+ Construct.NewUnionCase id rfields recordTy attrs doc vis
let TcUnionCaseDecls cenv env parent (thisTy: TType) thisTyInst tpenv unionCases =
let unionCases' = unionCases |> List.map (TcUnionCaseDecl cenv env parent thisTy thisTyInst tpenv)
@@ -13198,7 +13213,8 @@ module TcRecdUnionAndEnumDeclarations = begin
let vis, _ = ComputeAccessAndCompPath env None m None None parent
let vis = CombineReprAccess parent vis
if id.idText = "value__" then errorR(Error(FSComp.SR.tcNotValidEnumCaseName(), id.idRange))
- Construct.NewRecdField true (Some v) id false thisTy false false [] attrs (xmldoc.ToXmlDoc()) vis false
+ let doc = xmldoc.ToXmlDoc(true, Some [])
+ Construct.NewRecdField true (Some v) id false thisTy false false [] attrs doc vis false
let TcEnumDecls cenv env parent thisTy enumCases =
let fieldTy = NewInferenceType ()
@@ -13387,7 +13403,7 @@ module IncrClassChecking =
/// Check and elaborate the "left hand side" of the implicit class construction
/// syntax.
- let TcImplicitCtorLhs_Phase2A(cenv, env, tpenv, tcref: TyconRef, vis, attrs, spats, thisIdOpt, baseValOpt: Val option, safeInitInfo, m, copyOfTyconTypars, objTy, thisTy) =
+ let TcImplicitCtorLhs_Phase2A(cenv, env, tpenv, tcref: TyconRef, vis, attrs, spats, thisIdOpt, baseValOpt: Val option, safeInitInfo, m, copyOfTyconTypars, objTy, thisTy, doc: PreXmlDoc) =
let baseValOpt =
match GetSuperTypeOfType cenv.g cenv.amap m objTy with
@@ -13432,7 +13448,9 @@ module IncrClassChecking =
let isComplete = ComputeIsComplete copyOfTyconTypars [] ctorTy
let topValInfo = InferGenericArityFromTyScheme prelimTyschemeG partialValReprInfo
let ctorValScheme = ValScheme(id, prelimTyschemeG, Some topValInfo, Some memberInfo, false, ValInline.Never, NormalVal, vis, false, true, false, false)
- let ctorVal = MakeAndPublishVal cenv env (Parent tcref, false, ModuleOrMemberBinding, ValInRecScope isComplete, ctorValScheme, attribs, XmlDoc.Empty, None, false)
+ let paramNames = topValInfo.ArgNames
+ let doc = doc.ToXmlDoc(true, paramNames)
+ let ctorVal = MakeAndPublishVal cenv env (Parent tcref, false, ModuleOrMemberBinding, ValInRecScope isComplete, ctorValScheme, attribs, doc, None, false)
ctorValScheme, ctorVal
// We only generate the cctor on demand, because we don't need it if there are no cctor actions.
@@ -14132,9 +14150,6 @@ module IncrClassChecking =
ctorBody, cctorBodyOpt, methodBinds, reps
-
-
-
// Checking of mutually recursive types, members and 'let' bindings in classes
//
// Technique: multiple passes.
@@ -14278,12 +14293,12 @@ module MutRecBindingChecking =
error(Error(FSComp.SR.tcEnumerationsMayNotHaveMembers(), (trimRangeToLine m)))
match classMemberDef, containerInfo with
- | SynMemberDefn.ImplicitCtor (vis, Attributes attrs, SynSimplePats.SimplePats(spats, _), thisIdOpt, m), ContainerInfo(_, Some(MemberOrValContainerInfo(tcref, _, baseValOpt, safeInitInfo, _))) ->
+ | SynMemberDefn.ImplicitCtor (vis, Attributes attrs, SynSimplePats.SimplePats(spats, _), thisIdOpt, doc, m), ContainerInfo(_, Some(MemberOrValContainerInfo(tcref, _, baseValOpt, safeInitInfo, _))) ->
if tcref.TypeOrMeasureKind = TyparKind.Measure then
error(Error(FSComp.SR.tcMeasureDeclarationsRequireStaticMembers(), m))
// Phase2A: make incrClassCtorLhs - ctorv, thisVal etc, type depends on argty(s)
- let incrClassCtorLhs = TcImplicitCtorLhs_Phase2A(cenv, envForTycon, tpenv, tcref, vis, attrs, spats, thisIdOpt, baseValOpt, safeInitInfo, m, copyOfTyconTypars, objTy, thisTy)
+ let incrClassCtorLhs = TcImplicitCtorLhs_Phase2A(cenv, envForTycon, tpenv, tcref, vis, attrs, spats, thisIdOpt, baseValOpt, safeInitInfo, m, copyOfTyconTypars, objTy, thisTy, doc)
// Phase2A: Add copyOfTyconTypars from incrClassCtorLhs - or from tcref
let envForTycon = AddDeclaredTypars CheckForDuplicateTypars incrClassCtorLhs.InstanceCtorDeclaredTypars envForTycon
let innerState = (Some incrClassCtorLhs, envForTycon, tpenv, recBindIdx, uncheckedBindsRev)
@@ -14929,7 +14944,6 @@ module MutRecBindingChecking =
// Phase2B: type check pass, convert from ast to tast and collects type assertions, and generalize
let defnsBs, generalizedRecBinds, tpenv = TcMutRecBindings_Phase2B_TypeCheckAndIncrementalGeneralization cenv tpenv envInitial (envMutRec, defnsAs, uncheckedRecBinds, scopem)
-
let generalizedTyparsForRecursiveBlock =
generalizedRecBinds
|> List.map (fun pgrbind -> pgrbind.GeneralizedTypars)
@@ -15554,7 +15568,8 @@ module TcExceptionDeclarations =
CheckForDuplicateConcreteType env (id.idText + "Exception") id.idRange
CheckForDuplicateConcreteType env id.idText id.idRange
let repr = TExnFresh (Construct.MakeRecdFieldsTable [])
- Construct.NewExn cpath id vis repr attrs (doc.ToXmlDoc())
+ let doc = doc.ToXmlDoc(true, Some [])
+ Construct.NewExn cpath id vis repr attrs doc
let TcExnDefnCore_Phase1G_EstablishRepresentation cenv env parent (exnc: Entity) (SynExceptionDefnRepr(_, UnionCase(_, _, args, _, _, _), reprIdOpt, _, _, m)) =
let g = cenv.g
@@ -15840,7 +15855,8 @@ module EstablishTypeDefinitionCores =
let envForDecls, mtypeAcc = MakeInnerEnv envInitial id modKind
let mty = Construct.NewEmptyModuleOrNamespaceType modKind
- let mspec = Construct.NewModuleOrNamespace (Some envInitial.eCompPath) vis id (xml.ToXmlDoc()) modAttrs (MaybeLazy.Strict mty)
+ let doc = xml.ToXmlDoc(true, Some [])
+ let mspec = Construct.NewModuleOrNamespace (Some envInitial.eCompPath) vis id doc modAttrs (MaybeLazy.Strict mty)
let innerParent = Parent (mkLocalModRef mspec)
let innerTypeNames = TypeNamesInMutRecDecls cenv envForDecls decls
MutRecDefnsPhase2DataForModule (mtypeAcc, mspec), (innerParent, innerTypeNames, envForDecls)
@@ -15883,9 +15899,15 @@ module EstablishTypeDefinitionCores =
// If we supported nested types and modules then additions would be needed here
let lmtyp = MaybeLazy.Strict (Construct.NewEmptyModuleOrNamespaceType ModuleOrType)
+ // '' documentation is allowed for delegates
+ let paramNames =
+ match synTyconRepr with
+ | SynTypeDefnSimpleRepr.General (TyconDelegate (_ty, arity), _, _, _, _, _, _, _) -> arity.ArgNames
+ | _ -> []
+ let doc = doc.ToXmlDoc(true, Some paramNames )
Construct.NewTycon
(cpath, id.idText, id.idRange, vis, visOfRepr, TyparKind.Type, LazyWithContext.NotLazy checkedTypars,
- doc.ToXmlDoc(), preferPostfix, preEstablishedHasDefaultCtor, hasSelfReferentialCtor, lmtyp)
+ doc, preferPostfix, preEstablishedHasDefaultCtor, hasSelfReferentialCtor, lmtyp)
//-------------------------------------------------------------------------
/// Establishing type definitions: early phase: work out the basic kind of the type definition
@@ -17220,7 +17242,7 @@ module TcDeclarations =
| SynMemberDefn.Member (_, m) :: _ -> errorR(InternalError("List.takeUntil is wrong, have binding", m))
| SynMemberDefn.AbstractSlot (_, _, m) :: _ -> errorR(InternalError("List.takeUntil is wrong, have slotsig", m))
| SynMemberDefn.Interface (_, _, m) :: _ -> errorR(InternalError("List.takeUntil is wrong, have interface", m))
- | SynMemberDefn.ImplicitCtor (_, _, _, _, m) :: _ -> errorR(InternalError("implicit class construction with two implicit constructions", m))
+ | SynMemberDefn.ImplicitCtor (_, _, _, _, _, m) :: _ -> errorR(InternalError("implicit class construction with two implicit constructions", m))
| SynMemberDefn.AutoProperty (_, _, _, _, _, _, _, _, _, _, m) :: _ -> errorR(InternalError("List.takeUntil is wrong, have auto property", m))
| SynMemberDefn.ImplicitInherit (_, _, _, m) :: _ -> errorR(Error(FSComp.SR.tcTypeDefinitionsWithImplicitConstructionMustHaveOneInherit(), m))
| SynMemberDefn.LetBindings (_, _, _, m) :: _ -> errorR(Error(FSComp.SR.tcTypeDefinitionsWithImplicitConstructionMustHaveLocalBindingsBeforeMembers(), m))
@@ -17232,7 +17254,7 @@ module TcDeclarations =
let _, ds = List.takeUntil (allFalse [isMember;isAbstractSlot;isInterface;isInherit;isField;isTycon]) ds
match ds with
| SynMemberDefn.Member (_, m) :: _ -> errorR(InternalError("CheckMembersForm: List.takeUntil is wrong", m))
- | SynMemberDefn.ImplicitCtor (_, _, _, _, m) :: _ -> errorR(InternalError("CheckMembersForm: implicit ctor line should be first", m))
+ | SynMemberDefn.ImplicitCtor (_, _, _, _, _, m) :: _ -> errorR(InternalError("CheckMembersForm: implicit ctor line should be first", m))
| SynMemberDefn.ImplicitInherit (_, _, _, m) :: _ -> errorR(Error(FSComp.SR.tcInheritConstructionCallNotPartOfImplicitSequence(), m))
| SynMemberDefn.AutoProperty(_, _, _, _, _, _, _, _, _, _, m) :: _ -> errorR(Error(FSComp.SR.tcAutoPropertyRequiresImplicitConstructionSequence(), m))
| SynMemberDefn.LetBindings (_, false, _, m) :: _ -> errorR(Error(FSComp.SR.tcLetAndDoRequiresImplicitConstructionSequence(), m))
@@ -17380,13 +17402,13 @@ module TcDeclarations =
let hasSelfReferentialCtor =
members |> List.exists (function
- | SynMemberDefn.ImplicitCtor (_, _, _, thisIdOpt, _)
+ | SynMemberDefn.ImplicitCtor (_, _, _, thisIdOpt, _, _)
| SynMemberDefn.Member(Binding(_, _, _, _, _, _, SynValData(_, _, thisIdOpt), _, _, _, _, _), _) -> thisIdOpt.IsSome
| _ -> false)
let implicitCtorSynPats =
members |> List.tryPick (function
- | SynMemberDefn.ImplicitCtor (_, _, (SynSimplePats.SimplePats _ as spats), _, _) -> Some spats
+ | SynMemberDefn.ImplicitCtor (_, _, (SynSimplePats.SimplePats _ as spats), _, _, _) -> Some spats
| _ -> None)
// An ugly bit of code to pre-determine if a type has a nullary constructor, prior to establishing the
@@ -17395,7 +17417,7 @@ module TcDeclarations =
members |> List.exists (function
| SynMemberDefn.Member(Binding(_, _, _, _, _, _, SynValData(Some memberFlags, _, _), SynPatForConstructorDecl SynPatForNullaryArgs, _, _, _, _), _) ->
memberFlags.MemberKind=MemberKind.Constructor
- | SynMemberDefn.ImplicitCtor (_, _, SynSimplePats.SimplePats(spats, _), _, _) -> isNil spats
+ | SynMemberDefn.ImplicitCtor (_, _, SynSimplePats.SimplePats(spats, _), _, _, _) -> isNil spats
| _ -> false)
let repr = SynTypeDefnSimpleRepr.General(kind, inherits, slotsigs, fields, isConcrete, isIncrClass, implicitCtorSynPats, m)
let isAtOriginalTyconDefn = not (isAugmentationTyconDefnRepr repr)
@@ -17524,7 +17546,7 @@ module TcDeclarations =
| SynMemberSig.Member (valSpfn, memberFlags, _) ->
memberFlags.MemberKind=MemberKind.Constructor &&
// REVIEW: This is a syntactic approximation
- (match valSpfn.SynType, valSpfn.SynInfo.ArgInfos with
+ (match valSpfn.SynType, valSpfn.SynInfo.CurriedArgInfos with
| StripParenTypes (SynType.Fun (StripParenTypes (SynType.LongIdent (LongIdentWithDots([id], _))), _, _)), [[_]] when id.idText = "unit" -> true
| _ -> false)
| _ -> false)
@@ -17664,7 +17686,8 @@ let rec TcSignatureElementNonMutRec cenv parent typeNames endm (env: TcEnv) synS
let id = ident (modName, id.idRange)
let mty = Construct.NewEmptyModuleOrNamespaceType modKind
- let mspec = Construct.NewModuleOrNamespace (Some env.eCompPath) vis id (xml.ToXmlDoc()) attribs (MaybeLazy.Strict mty)
+ let doc = xml.ToXmlDoc(true, Some [])
+ let mspec = Construct.NewModuleOrNamespace (Some env.eCompPath) vis id doc attribs (MaybeLazy.Strict mty)
let! (mtyp, _) = TcModuleOrNamespaceSignatureElementsNonMutRec cenv (Parent (mkLocalModRef mspec)) env (id, modKind, mdefs, m, xml)
@@ -17768,7 +17791,8 @@ and TcSignatureElements cenv parent endm env xml mutRecNSInfo defs =
eventually {
// Ensure the .Deref call in UpdateAccModuleOrNamespaceType succeeds
if cenv.compilingCanonicalFslibModuleType then
- ensureCcuHasModuleOrNamespaceAtPath cenv.topCcu env.ePath env.eCompPath (xml.ToXmlDoc())
+ let doc = xml.ToXmlDoc(true, Some [])
+ ensureCcuHasModuleOrNamespaceAtPath cenv.topCcu env.ePath env.eCompPath doc
let typeNames = EstablishTypeDefinitionCores.TypeNamesInNonMutRecSigDecls defs
match mutRecNSInfo with
@@ -17983,7 +18007,8 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem
// Create the new module specification to hold the accumulated results of the type of the module
// Also record this in the environment as the accumulator
let mty = Construct.NewEmptyModuleOrNamespaceType modKind
- let mspec = Construct.NewModuleOrNamespace (Some env.eCompPath) vis id (xml.ToXmlDoc()) modAttrs (MaybeLazy.Strict mty)
+ let doc = xml.ToXmlDoc(true, Some [])
+ let mspec = Construct.NewModuleOrNamespace (Some env.eCompPath) vis id doc modAttrs (MaybeLazy.Strict mty)
// Now typecheck.
let! mexpr, topAttrsNew, envAtEnd = TcModuleOrNamespaceElements cenv (Parent (mkLocalModRef mspec)) endm envForModule xml None mdefs
@@ -18189,7 +18214,8 @@ and TcModuleOrNamespaceElements cenv parent endm env xml mutRecNSInfo defs =
eventually {
// Ensure the deref_nlpath call in UpdateAccModuleOrNamespaceType succeeds
if cenv.compilingCanonicalFslibModuleType then
- ensureCcuHasModuleOrNamespaceAtPath cenv.topCcu env.ePath env.eCompPath (xml.ToXmlDoc())
+ let doc = xml.ToXmlDoc(true, Some [])
+ ensureCcuHasModuleOrNamespaceAtPath cenv.topCcu env.ePath env.eCompPath doc
// Collect the type names so we can implicitly add the compilation suffix to module names
let typeNames = EstablishTypeDefinitionCores.TypeNamesInNonMutRecDecls defs
diff --git a/src/fsharp/TypedTree.fs b/src/fsharp/TypedTree.fs
index 46019fae45b..2c9a2b2e8ce 100644
--- a/src/fsharp/TypedTree.fs
+++ b/src/fsharp/TypedTree.fs
@@ -745,7 +745,9 @@ type Entity =
member x.XmlDoc =
#if !NO_EXTENSIONTYPING
match x.TypeReprInfo with
- | TProvidedTypeExtensionPoint info -> XmlDoc (info.ProvidedType.PUntaintNoFailure(fun st -> (st :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(info.ProvidedType.TypeProvider.PUntaintNoFailure id)))
+ | TProvidedTypeExtensionPoint info ->
+ let lines = info.ProvidedType.PUntaintNoFailure(fun st -> (st :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(info.ProvidedType.TypeProvider.PUntaintNoFailure id))
+ XmlDoc (lines, x.DefinitionRange)
| _ ->
#endif
match x.entity_opt_data with
@@ -2141,7 +2143,7 @@ type Typar =
member x.SetAttribs attribs =
match attribs, x.typar_opt_data with
| [], None -> ()
- | [], Some { typar_il_name = None; typar_xmldoc = XmlDoc [||]; typar_constraints = [] } ->
+ | [], Some { typar_il_name = None; typar_xmldoc = doc; typar_constraints = [] } when doc.IsEmpty ->
x.typar_opt_data <- None
| _, Some optData -> optData.typar_attribs <- attribs
| _ -> x.typar_opt_data <- Some { typar_il_name = None; typar_xmldoc = XmlDoc.Empty; typar_constraints = []; typar_attribs = attribs }
@@ -2171,7 +2173,7 @@ type Typar =
member x.SetConstraints cs =
match cs, x.typar_opt_data with
| [], None -> ()
- | [], Some { typar_il_name = None; typar_xmldoc = XmlDoc [||]; typar_attribs = [] } ->
+ | [], Some { typar_il_name = None; typar_xmldoc = doc; typar_attribs = [] } when doc.IsEmpty ->
x.typar_opt_data <- None
| _, Some optData -> optData.typar_constraints <- cs
| _ -> x.typar_opt_data <- Some { typar_il_name = None; typar_xmldoc = XmlDoc.Empty; typar_constraints = cs; typar_attribs = [] }
@@ -4368,6 +4370,9 @@ type ValReprInfo =
| (_ :: _ :: h) :: t -> loop t (acc + h.Length + 2)
loop args 0
+ member x.ArgNames =
+ Some [ for argtys in x.ArgInfos do for arginfo in argtys do match arginfo.Name with None -> () | Some nm -> nm.idText ]
+
[]
member x.DebugText = x.ToString()
@@ -5437,7 +5442,7 @@ type Construct() =
entity_il_repr_cache = newCache()
entity_opt_data =
match xml, access with
- | XmlDoc [||], TAccess [] -> None
+ | doc, TAccess [] when doc.IsEmpty -> None
| _ -> Some { Entity.NewEmptyEntityOptData() with
entity_xmldoc = xml
entity_tycon_repr_accessibility = access
@@ -5490,7 +5495,7 @@ type Construct() =
OtherRangeOpt = None }
/// Create a new TAST Entity node for an F# exception definition
- static member NewExn cpath (id: Ident) access repr attribs doc =
+ static member NewExn cpath (id: Ident) access repr attribs (doc: XmlDoc) =
Tycon.New "exnc"
{ entity_stamp=newStamp()
entity_attribs=attribs
@@ -5506,7 +5511,7 @@ type Construct() =
entity_il_repr_cache= newCache()
entity_opt_data =
match doc, access, repr with
- | XmlDoc [||], TAccess [], TExnNone -> None
+ | doc, TAccess [], TExnNone when doc.IsEmpty -> None
| _ -> Some { Entity.NewEmptyEntityOptData() with entity_xmldoc = doc; entity_accessibility = access; entity_tycon_repr_accessibility = access; entity_exn_info = repr } }
/// Create a new TAST RecdField node for an F# class, struct or record field
@@ -5528,7 +5533,7 @@ type Construct() =
/// Create a new type definition node
- static member NewTycon (cpath, nm, m, access, reprAccess, kind, typars, docOption, usesPrefixDisplay, preEstablishedHasDefaultCtor, hasSelfReferentialCtor, mtyp) =
+ static member NewTycon (cpath, nm, m, access, reprAccess, kind, typars, doc: XmlDoc, usesPrefixDisplay, preEstablishedHasDefaultCtor, hasSelfReferentialCtor, mtyp) =
let stamp = newStamp()
Tycon.New "tycon"
{ entity_stamp=stamp
@@ -5544,9 +5549,9 @@ type Construct() =
entity_cpath = cpath
entity_il_repr_cache = newCache()
entity_opt_data =
- match kind, docOption, reprAccess, access with
- | TyparKind.Type, XmlDoc [||], TAccess [], TAccess [] -> None
- | _ -> Some { Entity.NewEmptyEntityOptData() with entity_kind = kind; entity_xmldoc = docOption; entity_tycon_repr_accessibility = reprAccess; entity_accessibility=access } }
+ match kind, doc, reprAccess, access with
+ | TyparKind.Type, doc, TAccess [], TAccess [] when doc.IsEmpty -> None
+ | _ -> Some { Entity.NewEmptyEntityOptData() with entity_kind = kind; entity_xmldoc = doc; entity_tycon_repr_accessibility = reprAccess; entity_accessibility=access } }
/// Create a new type definition node for a .NET type definition
static member NewILTycon nlpath (nm, m) tps (scoref: ILScopeRef, enc, tdef: ILTypeDef) mtyp =
@@ -5559,7 +5564,7 @@ type Construct() =
/// Create a new Val node
static member NewVal
(logicalName: string, m: range, compiledName, ty, isMutable, isCompGen, arity, access,
- recValInfo, specialRepr, baseOrThis, attribs, inlineInfo, doc, isModuleOrMemberBinding,
+ recValInfo, specialRepr, baseOrThis, attribs, inlineInfo, doc: XmlDoc, isModuleOrMemberBinding,
isExtensionMember, isIncrClassSpecialMember, isTyFunc, allowTypeInst, isGeneratedEventVal,
konst, actualParent) : Val =
@@ -5572,7 +5577,7 @@ type Construct() =
val_type = ty
val_opt_data =
match compiledName, arity, konst, access, doc, specialRepr, actualParent, attribs with
- | None, None, None, TAccess [], XmlDoc [||], None, ParentNone, [] -> None
+ | None, None, None, TAccess [], doc, None, ParentNone, [] when doc.IsEmpty -> None
| _ ->
Some { Val.NewEmptyValOptData() with
val_compiled_name = (match compiledName with Some v when v <> logicalName -> compiledName | _ -> None)
diff --git a/src/fsharp/TypedTreePickle.fs b/src/fsharp/TypedTreePickle.fs
index 837021b92e2..4d16db5e9b0 100644
--- a/src/fsharp/TypedTreePickle.fs
+++ b/src/fsharp/TypedTreePickle.fs
@@ -1345,7 +1345,7 @@ let p_range (x: range) st =
let p_dummy_range : range pickler = fun _x _st -> ()
let p_ident (x: Ident) st = p_tup2 p_string p_range (x.idText, x.idRange) st
-let p_xmldoc (XmlDoc x) st = p_array p_string x st
+let p_xmldoc (doc: XmlDoc) st = p_array p_string doc.UnprocessedLines st
let u_pos st = let a = u_int st in let b = u_int st in mkPos a b
let u_range st = let a = u_string st in let b = u_pos st in let c = u_pos st in mkRange a b c
@@ -1353,7 +1353,7 @@ let u_range st = let a = u_string st in let b = u_pos st in let c = u_pos st in
// Most ranges (e.g. on optimization expressions) can be elided from stored data
let u_dummy_range : range unpickler = fun _st -> range0
let u_ident st = let a = u_string st in let b = u_range st in ident(a, b)
-let u_xmldoc st = XmlDoc (u_array u_string st)
+let u_xmldoc st = XmlDoc (u_array u_string st, range0)
let p_local_item_ref ctxt tab st = p_osgn_ref ctxt tab st
@@ -1681,7 +1681,7 @@ let u_tyar_spec_data st =
typar_astype= Unchecked.defaultof<_>
typar_opt_data=
match g, e, c with
- | XmlDoc [||], [], [] -> None
+ | doc, [], [] when doc.IsEmpty -> None
| _ -> Some { typar_il_name = None; typar_xmldoc = g; typar_constraints = e; typar_attribs = c } }
let u_tyar_spec st =
diff --git a/src/fsharp/XmlDoc.fs b/src/fsharp/XmlDoc.fs
index dc183affeb6..9f53e338f3a 100644
--- a/src/fsharp/XmlDoc.fs
+++ b/src/fsharp/XmlDoc.fs
@@ -2,54 +2,151 @@
module public FSharp.Compiler.XmlDoc
+open System
+open System.Xml.Linq
+open FSharp.Compiler.ErrorLogger
+open FSharp.Compiler.Lib
open FSharp.Compiler.AbstractIL.Internal.Library
open FSharp.Compiler.Range
-/// Represents the final form of collected XmlDoc lines
-type XmlDoc =
- | XmlDoc of string[]
-
+/// Represents collected XmlDoc lines
+[]
+type XmlDoc(unprocessedLines: string[], range: range) =
+ let rec processLines (lines: string list) =
+ match lines with
+ | [] -> []
+ | (lineA :: rest) as lines ->
+ let lineAT = lineA.TrimStart([|' '|])
+ if lineAT = "" then processLines rest
+ elif lineAT.StartsWithOrdinal("<") then lines
+ else
+ [""] @
+ (lines |> List.map Microsoft.FSharp.Core.XmlAdapters.escape) @
+ [""]
+
+ /// Get the lines before insertion of implicit summary tags and encoding
+ member _.UnprocessedLines = unprocessedLines
+
+ /// Get the lines after insertion of implicit summary tags and encoding
+ member _.GetElaboratedXmlLines() =
+ let processedLines = processLines (Array.toList unprocessedLines)
+
+ let lines = Array.ofList processedLines
+
+ lines
+
+ member _.Range = range
+
static member Empty = XmlDocStatics.Empty
- member x.NonEmpty = (let (XmlDoc lines) = x in lines.Length <> 0)
+ member _.IsEmpty =
+ unprocessedLines |> Array.forall String.IsNullOrWhiteSpace
+
+ member doc.NonEmpty = not doc.IsEmpty
- static member Merge (XmlDoc lines) (XmlDoc lines') = XmlDoc (Array.append lines lines')
+ static member Merge (doc1: XmlDoc) (doc2: XmlDoc) =
+ XmlDoc(Array.append doc1.UnprocessedLines doc2.UnprocessedLines,
+ unionRanges doc1.Range doc2.Range)
- /// This code runs for .XML generation and thus influences cross-project xmldoc tooltips; for within-project tooltips,
- /// see XmlDocumentation.fs in the language service
- static member Process (XmlDoc lines) =
- let rec processLines (lines: string list) =
- match lines with
- | [] -> []
- | (lineA :: rest) as lines ->
- let lineAT = lineA.TrimStart([|' '|])
- if lineAT = "" then processLines rest
- else if lineAT.StartsWithOrdinal("<") then lines
- else [""] @
- (lines |> List.map (fun line -> Microsoft.FSharp.Core.XmlAdapters.escape line)) @
- [""]
-
- let lines = processLines (Array.toList lines)
- if isNil lines then XmlDoc.Empty
- else XmlDoc (Array.ofList lines)
+ member doc.GetXmlText() =
+ if doc.IsEmpty then ""
+ else
+ doc.GetElaboratedXmlLines()
+ |> String.concat Environment.NewLine
+
+ member doc.Check(paramNamesOpt: string list option) =
+ try
+ // We must wrap with in order to have only one root element
+ let xml =
+ XDocument.Parse("\n"+doc.GetXmlText()+"\n",
+ LoadOptions.SetLineInfo ||| LoadOptions.PreserveWhitespace)
+
+ // The parameter names are checked for consistency, so parameter references and
+ // parameter documentation must match an actual parameter. In addition, if any parameters
+ // have documentation then all parameters must have documentation
+ match paramNamesOpt with
+ | None -> ()
+ | Some paramNames ->
+ for p in xml.Descendants(XName.op_Implicit "param") do
+ match p.Attribute(XName.op_Implicit "name") with
+ | null ->
+ warning (Error (FSComp.SR.xmlDocMissingParameterName(), doc.Range))
+ | attr ->
+ let nm = attr.Value
+ if not (paramNames |> List.contains nm) then
+ warning (Error (FSComp.SR.xmlDocInvalidParameterName(nm), doc.Range))
+
+ let paramsWithDocs =
+ [ for p in xml.Descendants(XName.op_Implicit "param") do
+ match p.Attribute(XName.op_Implicit "name") with
+ | null -> ()
+ | attr -> attr.Value ]
+
+ if paramsWithDocs.Length > 0 then
+ for p in paramNames do
+ if not (paramsWithDocs |> List.contains p) then
+ warning (Error (FSComp.SR.xmlDocMissingParameter(p), doc.Range))
+
+ let duplicates = paramsWithDocs |> List.duplicates
+
+ for d in duplicates do
+ warning (Error (FSComp.SR.xmlDocDuplicateParameter(d), doc.Range))
+
+ for pref in xml.Descendants(XName.op_Implicit "paramref") do
+ match pref.Attribute(XName.op_Implicit "name") with
+ | null -> warning (Error (FSComp.SR.xmlDocMissingParameterName(), doc.Range))
+ | attr ->
+ let nm = attr.Value
+ if not (paramNames |> List.contains nm) then
+ warning (Error (FSComp.SR.xmlDocInvalidParameterName(nm), doc.Range))
+
+ with e ->
+ warning (Error (FSComp.SR.xmlDocBadlyFormed(e.Message), doc.Range))
+
+#if CREF_ELABORATION
+ member doc.Elaborate (crefResolver) =
+ for see in seq { yield! xml.Descendants(XName.op_Implicit "see")
+ yield! xml.Descendants(XName.op_Implicit "seealso")
+ yield! xml.Descendants(XName.op_Implicit "exception") } do
+ match see.Attribute(XName.op_Implicit "cref") with
+ | null -> warning (Error (FSComp.SR.xmlDocMissingCrossReference(), doc.Range))
+ | attr ->
+ let cref = attr.Value
+ if cref.StartsWith("T:") || cref.StartsWith("P:") || cref.StartsWith("M:") ||
+ cref.StartsWith("E:") || cref.StartsWith("F:") then
+ ()
+ else
+ match crefResolver cref with
+ | None ->
+ warning (Error (FSComp.SR.xmlDocUnresolvedCrossReference(nm), doc.Range))
+ | Some text ->
+ attr.Value <- text
+ modified <- true
+ if modified then
+ let m = doc.Range
+ let newLines =
+ [| for e in xml.Elements() do
+ yield! e.ToString().Split([| '\r'; '\n' |], StringSplitOptions.RemoveEmptyEntries) |]
+ lines <- newLines
+#endif
// Discriminated unions can't contain statics, so we use a separate type
and XmlDocStatics() =
- static let empty = XmlDoc[| |]
+ static let empty = XmlDoc ([| |], range0)
static member Empty = empty
/// Used to collect XML documentation during lexing and parsing.
type XmlDocCollector() =
- let mutable savedLines = new ResizeArray<(string * pos)>()
+ let mutable savedLines = new ResizeArray<(string * range)>()
let mutable savedGrabPoints = new ResizeArray()
let posCompare p1 p2 = if posGeq p1 p2 then 1 else if posEq p1 p2 then 0 else -1
let savedGrabPointsAsArray =
lazy (savedGrabPoints.ToArray() |> Array.sortWith posCompare)
let savedLinesAsArray =
- lazy (savedLines.ToArray() |> Array.sortWith (fun (_, p1) (_, p2) -> posCompare p1 p2))
+ lazy (savedLines.ToArray() |> Array.sortWith (fun (_, p1) (_, p2) -> posCompare p1.End p2.End))
let check() =
// can't add more XmlDoc elements to XmlDocCollector after extracting first XmlDoc from the overall results
@@ -59,15 +156,15 @@ type XmlDocCollector() =
check()
savedGrabPoints.Add pos
- member x.AddXmlDocLine(line, pos) =
+ member x.AddXmlDocLine(line, range) =
check()
- savedLines.Add(line, pos)
+ savedLines.Add(line, range)
member x.LinesBefore grabPointPos =
try
let lines = savedLinesAsArray.Force()
let grabPoints = savedGrabPointsAsArray.Force()
- let firstLineIndexAfterGrabPoint = Array.findFirstIndexWhereTrue lines (fun (_, pos) -> posGeq pos grabPointPos)
+ let firstLineIndexAfterGrabPoint = Array.findFirstIndexWhereTrue lines (fun (_, m) -> posGeq m.End grabPointPos)
let grabPointIndex = Array.findFirstIndexWhereTrue grabPoints (fun pos -> posGeq pos grabPointPos)
assert (posEq grabPoints.[grabPointIndex] grabPointPos)
let firstLineIndexAfterPrevGrabPoint =
@@ -75,10 +172,10 @@ type XmlDocCollector() =
0
else
let prevGrabPointPos = grabPoints.[grabPointIndex-1]
- Array.findFirstIndexWhereTrue lines (fun (_, pos) -> posGeq pos prevGrabPointPos)
+ Array.findFirstIndexWhereTrue lines (fun (_, m) -> posGeq m.End prevGrabPointPos)
let lines = lines.[firstLineIndexAfterPrevGrabPoint..firstLineIndexAfterGrabPoint-1]
- lines |> Array.map fst
+ lines
with e ->
[| |]
@@ -88,14 +185,21 @@ type PreXmlDoc =
| PreXmlDoc of pos * XmlDocCollector
| PreXmlDocEmpty
- member x.ToXmlDoc() =
+ member x.ToXmlDoc(check, paramNamesOpt: string list option) =
match x with
- | PreXmlMerge(a, b) -> XmlDoc.Merge (a.ToXmlDoc()) (b.ToXmlDoc())
+ | PreXmlMerge(a, b) -> XmlDoc.Merge (a.ToXmlDoc(check, paramNamesOpt)) (b.ToXmlDoc(check, paramNamesOpt))
| PreXmlDocEmpty -> XmlDoc.Empty
| PreXmlDoc (pos, collector) ->
- let lines = collector.LinesBefore pos
- if lines.Length = 0 then XmlDoc.Empty
- else XmlDoc lines
+ let preLines = collector.LinesBefore pos
+ if preLines.Length = 0 then
+ XmlDoc.Empty
+ else
+ let lines = Array.map fst preLines
+ let m = Array.reduce Range.unionRanges (Array.map snd preLines)
+ let doc = XmlDoc (lines, m)
+ if check then
+ doc.Check(paramNamesOpt)
+ doc
static member CreateFromGrabPoint(collector: XmlDocCollector, grabPointPos) =
collector.AddGrabPoint grabPointPos
diff --git a/src/fsharp/fsc.fs b/src/fsharp/fsc.fs
index 68e768acbf6..f2fbbbc921d 100644
--- a/src/fsharp/fsc.fs
+++ b/src/fsharp/fsc.fs
@@ -328,16 +328,7 @@ module InterfaceFileWriter =
module XmlDocWriter =
- let getDoc xmlDoc =
- match XmlDoc.Process xmlDoc with
- | XmlDoc [| |] -> ""
- | XmlDoc strs -> strs |> Array.toList |> String.concat Environment.NewLine
-
- let hasDoc xmlDoc =
- // No need to process the xml doc - just need to know if there's anything there
- match xmlDoc with
- | XmlDoc [| |] -> false
- | _ -> true
+ let hasDoc (doc: XmlDoc) = not doc.IsEmpty
let computeXmlDocSigs (tcGlobals, generatedCcu: CcuThunk) =
(* the xmlDocSigOf* functions encode type into string to be used in "id" *)
@@ -389,7 +380,7 @@ module XmlDocWriter =
let mutable members = []
let addMember id xmlDoc =
if hasDoc xmlDoc then
- let doc = getDoc xmlDoc
+ let doc = xmlDoc.GetXmlText()
members <- (id, doc) :: members
let doVal (v: Val) = addMember v.XmlDocSig v.XmlDoc
let doUnionCase (uc: UnionCase) = addMember uc.XmlDocSig uc.XmlDoc
diff --git a/src/fsharp/infos.fs b/src/fsharp/infos.fs
index 8b909c41829..a314acbd673 100755
--- a/src/fsharp/infos.fs
+++ b/src/fsharp/infos.fs
@@ -1064,7 +1064,8 @@ type MethInfo =
| DefaultStructCtor _ -> XmlDoc.Empty
#if !NO_EXTENSIONTYPING
| ProvidedMeth(_, mi, _, m)->
- XmlDoc (mi.PUntaint((fun mix -> (mix :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(mi.TypeProvider.PUntaintNoFailure id)), m))
+ let lines = mi.PUntaint((fun mix -> (mix :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(mi.TypeProvider.PUntaintNoFailure id)), m)
+ XmlDoc (lines, m)
#endif
/// Try to get an arbitrary F# ValRef associated with the member. This is to determine if the member is virtual, amongst other things.
@@ -2162,7 +2163,8 @@ type PropInfo =
| FSProp(_, _, None, None) -> failwith "unreachable"
#if !NO_EXTENSIONTYPING
| ProvidedProp(_, pi, m) ->
- XmlDoc (pi.PUntaint((fun pix -> (pix :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(pi.TypeProvider.PUntaintNoFailure id)), m))
+ let lines = pi.PUntaint((fun pix -> (pix :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(pi.TypeProvider.PUntaintNoFailure id)), m)
+ XmlDoc (lines, m)
#endif
/// Get the TcGlobals associated with the object
@@ -2416,7 +2418,8 @@ type EventInfo =
| FSEvent (_, p, _, _) -> p.XmlDoc
#if !NO_EXTENSIONTYPING
| ProvidedEvent (_, ei, m) ->
- XmlDoc (ei.PUntaint((fun eix -> (eix :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(ei.TypeProvider.PUntaintNoFailure id)), m))
+ let lines = ei.PUntaint((fun eix -> (eix :> IProvidedCustomAttributeProvider).GetXmlDocAttributes(ei.TypeProvider.PUntaintNoFailure id)), m)
+ XmlDoc (lines, m)
#endif
/// Get the logical name of the event.
diff --git a/src/fsharp/lex.fsl b/src/fsharp/lex.fsl
index 5322a3ddf48..e46718a3d1f 100644
--- a/src/fsharp/lex.fsl
+++ b/src/fsharp/lex.fsl
@@ -166,15 +166,17 @@ let startString args (lexbuf: UnicodeLexing.Lexbuf) =
// Utility functions for processing XML documentation
-let trySaveXmlDoc lexbuf (buff:option) =
+let trySaveXmlDoc (lexbuf: LexBuffer) (buff: (range * StringBuilder) option) =
match buff with
| None -> ()
- | Some sb -> LexbufLocalXmlDocStore.SaveXmlDocLine (lexbuf, sb.ToString(), posOfLexPosition lexbuf.StartPos)
+ | Some (start, sb) ->
+ let xmlCommentLineRange = mkFileIndexRange start.FileIndex start.Start (posOfLexPosition lexbuf.StartPos)
+ LexbufLocalXmlDocStore.SaveXmlDocLine (lexbuf, sb.ToString(), xmlCommentLineRange)
-let tryAppendXmlDoc (buff:option) (s:string) =
+let tryAppendXmlDoc (buff: (range * StringBuilder) option) (s:string) =
match buff with
| None -> ()
- | Some sb -> ignore(sb.Append s)
+ | Some (_, sb) -> ignore(sb.Append s)
// Utilities for parsing #if/#else/#endif
@@ -660,7 +662,7 @@ rule token args skip = parse
let doc = lexemeTrimLeft lexbuf 3
let sb = (new StringBuilder(100)).Append(doc)
if not skip then LINE_COMMENT (LexCont.SingleLineComment(args.ifdefStack, args.stringNest, 1, m))
- else singleLineComment (Some sb,1,m,args) skip lexbuf }
+ else singleLineComment (Some (m, sb),1,m,args) skip lexbuf }
| "//" op_char*
{ // Need to read all operator symbols too, otherwise it might be parsed by a rule below
diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy
index 88a334e927e..2f1bcf56641 100644
--- a/src/fsharp/pars.fsy
+++ b/src/fsharp/pars.fsy
@@ -1512,7 +1512,9 @@ tyconDefn:
let nameRange = rhs parseState 1
let (tcDefRepr, members) = $8 nameRange
let (ComponentInfo(_, _, _, lid, _, _, _, _)) = $1
- let memberCtorPattern = SynMemberDefn.ImplicitCtor (vis, $2, spats, az, rangeOfLid lid)
+ // Gets the XML doc comments prior to the implicit constructor
+ let xmlDoc = grabXmlDoc(parseState, 5)
+ let memberCtorPattern = SynMemberDefn.ImplicitCtor (vis, $2, spats, az, xmlDoc, rangeOfLid lid)
let tcDefRepr =
match tcDefRepr with
| SynTypeDefnRepr.ObjectModel (k, cspec, m) -> SynTypeDefnRepr.ObjectModel (k, memberCtorPattern :: cspec, m)
diff --git a/src/fsharp/service/FSharpCheckerResults.fsi b/src/fsharp/service/FSharpCheckerResults.fsi
index 9705c1da0bf..6011f7c6f51 100644
--- a/src/fsharp/service/FSharpCheckerResults.fsi
+++ b/src/fsharp/service/FSharpCheckerResults.fsi
@@ -235,14 +235,10 @@ type public FSharpCheckFileResults =
/// Find the most precise display environment for the given line and column.
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.
+ /// Determines if a long ident is resolvable at a specific point.
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.
+ /// Determines if a long ident is resolvable at a specific point.
member IsRelativeNameResolvableFromSymbol: cursorPos : pos * plid : string list * symbol: FSharpSymbol * ?userOpName: string -> Async
/// Represents complete typechecked implementation file, including its typechecked signatures if any.
diff --git a/src/fsharp/service/ServiceAssemblyContent.fs b/src/fsharp/service/ServiceAssemblyContent.fs
index 49a50e38180..b1406baadae 100644
--- a/src/fsharp/service/ServiceAssemblyContent.fs
+++ b/src/fsharp/service/ServiceAssemblyContent.fs
@@ -767,10 +767,11 @@ module ParsedInput =
walkTypeDefnSigRepr repr
List.iter walkMemberSig memberSigs
- and walkMember = function
+ and walkMember memb =
+ match memb with
| SynMemberDefn.AbstractSlot (valSig, _, _) -> walkValSig valSig
| SynMemberDefn.Member (binding, _) -> walkBinding binding
- | SynMemberDefn.ImplicitCtor (_, Attributes attrs, SynSimplePats.SimplePats(simplePats, _), _, _) ->
+ | SynMemberDefn.ImplicitCtor (_, Attributes attrs, SynSimplePats.SimplePats(simplePats, _), _, _, _) ->
List.iter walkAttribute attrs
List.iter walkSimplePat simplePats
| SynMemberDefn.ImplicitInherit (t, e, _, _) -> walkType t; walkExpr e
diff --git a/src/fsharp/service/ServiceParseTreeWalk.fs b/src/fsharp/service/ServiceParseTreeWalk.fs
index 500b93c22ab..7c2db37b98f 100755
--- a/src/fsharp/service/ServiceParseTreeWalk.fs
+++ b/src/fsharp/service/ServiceParseTreeWalk.fs
@@ -682,7 +682,7 @@ module public AstTraversal =
match m with
| SynMemberDefn.Open(_longIdent, _range) -> None
| SynMemberDefn.Member(synBinding, _range) -> traverseSynBinding path synBinding
- | SynMemberDefn.ImplicitCtor(_synAccessOption, _synAttributes, simplePats, _identOption, _range) ->
+ | SynMemberDefn.ImplicitCtor(_synAccessOption, _synAttributes, simplePats, _identOption, _doc, _range) ->
match simplePats with
| SynSimplePats.SimplePats(simplePats, _) -> visitor.VisitSimplePats(simplePats)
| _ -> None
diff --git a/src/fsharp/service/ServiceUntypedParse.fs b/src/fsharp/service/ServiceUntypedParse.fs
index c8d14e6af18..3342650b5ae 100755
--- a/src/fsharp/service/ServiceUntypedParse.fs
+++ b/src/fsharp/service/ServiceUntypedParse.fs
@@ -359,7 +359,7 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: ParsedInput option
[ match memb with
| SynMemberDefn.LetBindings(binds, _, _, _) -> yield! walkBinds binds
| SynMemberDefn.AutoProperty(_attribs, _isStatic, _id, _tyOpt, _propKind, _, _xmlDoc, _access, synExpr, _, _) -> yield! walkExpr true synExpr
- | SynMemberDefn.ImplicitCtor(_, _, _, _, m) -> yield! checkRange m
+ | SynMemberDefn.ImplicitCtor(_, _, _, _, _, m) -> yield! checkRange m
| SynMemberDefn.Member(bind, _) -> yield! walkBind bind
| SynMemberDefn.Interface(_, Some membs, _) -> for m in membs do yield! walkMember m
| SynMemberDefn.Inherit(_, _, m) ->
@@ -933,7 +933,7 @@ module UntypedParseImpl =
and walkMember = function
| SynMemberDefn.AbstractSlot (valSig, _, _) -> walkValSig valSig
| SynMemberDefn.Member(binding, _) -> walkBinding binding
- | SynMemberDefn.ImplicitCtor(_, Attributes attrs, SynSimplePats.SimplePats(simplePats, _), _, _) ->
+ | SynMemberDefn.ImplicitCtor(_, Attributes attrs, SynSimplePats.SimplePats(simplePats, _), _, _, _) ->
List.tryPick walkAttribute attrs |> Option.orElse (List.tryPick walkSimplePat simplePats)
| SynMemberDefn.ImplicitInherit(t, e, _, _) -> walkType t |> Option.orElse (walkExpr e)
| SynMemberDefn.LetBindings(bindings, _, _, _) -> List.tryPick walkBinding bindings
diff --git a/src/fsharp/service/ServiceXmlDocParser.fs b/src/fsharp/service/ServiceXmlDocParser.fs
index 01073ec599a..5cd1347a7df 100644
--- a/src/fsharp/service/ServiceXmlDocParser.fs
+++ b/src/fsharp/service/ServiceXmlDocParser.fs
@@ -18,7 +18,8 @@ module XmlDocParsing =
| Pats ps -> ps
| NamePatPairs(xs, _) -> List.map snd xs
- let rec digNamesFrom = function
+ let rec digNamesFrom pat =
+ match pat with
| SynPat.Named(_innerPat,id,_isTheThisVar,_access,_range) -> [id.idText]
| SynPat.Typed(pat,_type,_range) -> digNamesFrom pat
| SynPat.Attrib(pat,_attrs,_range) -> digNamesFrom pat
@@ -49,12 +50,10 @@ module XmlDocParsing =
i
let isEmptyXmlDoc (preXmlDoc: PreXmlDoc) =
- match preXmlDoc.ToXmlDoc() with
- | XmlDoc [||] -> true
- | XmlDoc [|x|] when x.Trim() = "" -> true
- | _ -> false
+ preXmlDoc.ToXmlDoc(false, None).IsEmpty
- let rec getXmlDocablesSynModuleDecl = function
+ let rec getXmlDocablesSynModuleDecl decl =
+ match decl with
| SynModuleDecl.NestedModule(_, _, synModuleDecls, _, _) ->
(synModuleDecls |> List.collect getXmlDocablesSynModuleDecl)
| SynModuleDecl.Let(_, synBindingList, range) ->
@@ -121,12 +120,12 @@ module XmlDocParsing =
let paramNames = digNamesFrom synPat
[XmlDocable(line,indent,paramNames)]
else []
- | SynMemberDefn.AbstractSlot(ValSpfn(synAttributes, _, _, _, SynValInfo(args, _), _, _, preXmlDoc, _, _, _), _, range) ->
+ | SynMemberDefn.AbstractSlot(ValSpfn(synAttributes, _, _, _, synValInfo, _, _, preXmlDoc, _, _, _), _, range) ->
if isEmptyXmlDoc preXmlDoc then
let fullRange = synAttributes |> List.fold (fun r a -> unionRanges r a.Range) range
let line = fullRange.StartLine
let indent = indentOf line
- let paramNames = args |> List.collect (fun az -> az |> List.choose (fun (SynArgInfo(_synAttributes, _, idOpt)) -> match idOpt with | Some id -> Some(id.idText) | _ -> None))
+ let paramNames = synValInfo.ArgNames
[XmlDocable(line,indent,paramNames)]
else []
| SynMemberDefn.Interface(_synType, synMemberDefnsOption, _range) ->
diff --git a/src/fsharp/service/service.fsi b/src/fsharp/service/service.fsi
index 3ed57fa2f27..3ffc2176ed3 100755
--- a/src/fsharp/service/service.fsi
+++ b/src/fsharp/service/service.fsi
@@ -75,7 +75,14 @@ type public FSharpChecker =
/// If false, do not keep full intermediate checking results from background checking suitable for returning from GetBackgroundCheckResultsForFileInProject. This reduces memory usage.
/// An optional resolver for non-file references, for legacy purposes
/// An optional resolver to access the contents of .NET binaries in a memory-efficient way
- static member Create : ?projectCacheSize: int * ?keepAssemblyContents: bool * ?keepAllBackgroundResolutions: bool * ?legacyReferenceResolver: ReferenceResolver.Resolver * ?tryGetMetadataSnapshot: ILReaderTryGetMetadataSnapshot * ?suggestNamesForErrors: bool * ?keepAllBackgroundSymbolUses: bool * ?enableBackgroundItemKeyStoreAndSemanticClassification: bool -> FSharpChecker
+ /// Indicate whether name suggestion should be enabled
+ /// Indicate whether all symbol uses should be kept in background checking
+ /// Indicates whether a table of symbol keys should be kept for background compilation
+ static member Create:
+ ?projectCacheSize: int * ?keepAssemblyContents: bool * ?keepAllBackgroundResolutions: bool *
+ ?legacyReferenceResolver: ReferenceResolver.Resolver * ?tryGetMetadataSnapshot: ILReaderTryGetMetadataSnapshot *
+ ?suggestNamesForErrors: bool * ?keepAllBackgroundSymbolUses: bool * ?enableBackgroundItemKeyStoreAndSemanticClassification: bool
+ -> FSharpChecker
///
/// Parse a source code file, returning information about brace matching in the file.
@@ -125,7 +132,7 @@ type public FSharpChecker =
///
///
/// The path for the file. The file name is also as a module name for implicit top level modules (e.g. in scripts).
- /// The source to be parsed.
+ /// The source to be parsed.
/// Parsing options for the project or script.
/// An optional string used for tracing compiler operations associated with this request.
[]
@@ -195,7 +202,7 @@ type public FSharpChecker =
///
/// The name of the file in the project whose source is being checked.
/// An integer that can be used to indicate the version of the file. This will be returned by TryGetRecentCheckResultsForFile when looking up the file.
- /// The full source for the file.
+ /// The source for the file.
/// The options for the project or script.
///
/// An item passed back to 'hasTextChangedSinceLastTypecheck' (from some calls made on 'FSharpCheckFileResults') to help determine if
@@ -219,14 +226,24 @@ type public FSharpChecker =
/// All files are read from the FileSystem API, except the file being checked.
///
///
- /// Used to differentiate between scripts, to consider each script a separate project.
- /// Also used in formatted error messages.
- ///
+ /// Used to differentiate between scripts, to consider each script a separate project. Also used in formatted error messages.
+ /// The source for the file.
+ /// Is the preview compiler enabled.
/// Indicates when the script was loaded into the editing environment,
/// so that an 'unload' and 'reload' action will cause the script to be considered as a new project,
/// so that references are re-resolved.
+ /// Other flags for compilation.
+ /// Add a default reference to the FSharp.Compiler.Interactive.Settings library.
+ /// Use the implicit references from the .NET SDK.
+ /// Set up compilation and analysis for .NET Framework scripts.
+ /// An extra data item added to the returned FSharpProjectOptions.
+ /// An optional unique stamp for the options.
/// An optional string used for tracing compiler operations associated with this request.
- member GetProjectOptionsFromScript : filename: string * sourceText: ISourceText * ?previewEnabled:bool * ?loadedTimeStamp: DateTime * ?otherFlags: string[] * ?useFsiAuxLib: bool * ?useSdkRefs: bool * ?assumeDotNetFramework: bool * ?extraProjectInfo: obj * ?optionsStamp: int64 * ?userOpName: string -> Async
+ member GetProjectOptionsFromScript:
+ filename: string * sourceText: ISourceText * ?previewEnabled:bool * ?loadedTimeStamp: DateTime *
+ ?otherFlags: string[] * ?useFsiAuxLib: bool * ?useSdkRefs: bool * ?assumeDotNetFramework: bool *
+ ?extraProjectInfo: obj * ?optionsStamp: int64 * ?userOpName: string
+ -> Async
///
/// Get the FSharpProjectOptions implied by a set of command line arguments.
@@ -237,6 +254,7 @@ type public FSharpChecker =
/// Indicates when the script was loaded into the editing environment,
/// so that an 'unload' and 'reload' action will cause the script to be considered as a new project,
/// so that references are re-resolved.
+ /// An extra data item added to the returned FSharpProjectOptions.
member GetProjectOptionsFromCommandLineArgs : projectFileName: string * argv: string[] * ?loadedTimeStamp: DateTime * ?extraProjectInfo: obj -> FSharpProjectOptions
///
@@ -245,6 +263,7 @@ type public FSharpChecker =
///
/// Initial source files list. Additional files may be added during argv evaluation.
/// The command line arguments for the project build.
+ /// Indicates that parsing should assume the INTERACTIVE define and related settings
member GetParsingOptionsFromCommandLineArgs: sourceFiles: string list * argv: string list * ?isInteractive: bool -> FSharpParsingOptions * FSharpErrorInfo list
///
@@ -252,14 +271,15 @@ type public FSharpChecker =
///
///
/// The command line arguments for the project build.
+ /// Indicates that parsing should assume the INTERACTIVE define and related settings
member GetParsingOptionsFromCommandLineArgs: argv: string list * ?isInteractive: bool -> FSharpParsingOptions * FSharpErrorInfo list
///
/// Get the FSharpParsingOptions implied by a FSharpProjectOptions.
///
///
- /// The command line arguments for the project build.
- member GetParsingOptionsFromProjectOptions: FSharpProjectOptions -> FSharpParsingOptions * FSharpErrorInfo list
+ /// The overall options.
+ member GetParsingOptionsFromProjectOptions: options: FSharpProjectOptions -> FSharpParsingOptions * FSharpErrorInfo list
///
/// Like ParseFile, but uses results from the background builder.
@@ -308,6 +328,8 @@ type public FSharpChecker =
/// The output file must be given by a -o flag.
/// The first argument is ignored and can just be "fsc.exe".
///
+ ///
+ /// The command line arguments for the project build.
/// An optional string used for tracing compiler operations associated with this request.
member Compile: argv:string[] * ?userOpName: string -> Async
@@ -315,6 +337,13 @@ type public FSharpChecker =
/// TypeCheck and compile provided AST
///
///
+ /// The syntax tree for the build.
+ /// The assembly name for the compiled output.
+ /// The output file for the compialtion.
+ /// The list of dependencies for the compialtion.
+ /// The output PDB file, if any.
+ /// Indicates if an executable is being produced.
+ /// Enables the /noframework flag.
/// 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
@@ -331,6 +360,8 @@ type public FSharpChecker =
/// case, a global setting is modified during the execution.
///
///
+ /// Other flags for compilation.
+ /// An optional pair of output streams, enabling execution of the result.
/// An optional string used for tracing compiler operations associated with this request.
member CompileToDynamicAssembly: otherFlags:string [] * execute:(TextWriter * TextWriter) option * ?userOpName: string -> Async
@@ -338,6 +369,12 @@ type public FSharpChecker =
/// TypeCheck and compile provided AST
///
///
+ /// The syntax tree for the build.
+ /// The assembly name for the compiled output.
+ /// The list of dependencies for the compialtion.
+ /// An optional pair of output streams, enabling execution of the result.
+ /// Enabled debug symbols
+ /// Enables the /noframework flag.
/// 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
@@ -397,6 +434,7 @@ type public FSharpChecker =
/// This function is called when a project has been cleaned/rebuilt, and thus any live type providers should be refreshed.
///
///
+ /// The options describing the project that has been cleaned.
/// An optional string used for tracing compiler operations associated with this request.
member NotifyProjectCleaned: options: FSharpProjectOptions * ?userOpName: string -> Async
diff --git a/src/fsharp/symbols/SymbolHelpers.fs b/src/fsharp/symbols/SymbolHelpers.fs
index bbe3e5b2de8..b161f26649b 100644
--- a/src/fsharp/symbols/SymbolHelpers.fs
+++ b/src/fsharp/symbols/SymbolHelpers.fs
@@ -227,7 +227,7 @@ type public Layout = Internal.Utilities.StructuredFormat.Layout
[]
type FSharpXmlDoc =
| None
- | Text of string
+ | Text of unprocessedLines: string[] * elaboratedXmlLines: string[]
| XmlDocFileSignature of (*File and Signature*) string * string
/// A single data tip display element
@@ -660,20 +660,10 @@ module internal SymbolHelpers =
/// Produce an XmlComment with a signature or raw text, given the F# comment and the item
let GetXmlCommentForItemAux (xmlDoc: XmlDoc option) (infoReader: InfoReader) m d =
- let result =
- match xmlDoc with
- | None | Some (XmlDoc [| |]) -> ""
- | Some (XmlDoc l) ->
- bufs (fun os ->
- bprintf os "\n"
- l |> Array.iter (fun (s: string) ->
- // Note: this code runs for local/within-project xmldoc tooltips, but not for cross-project or .XML
- bprintf os "\n%s" s))
-
- if String.IsNullOrEmpty result then
- GetXmlDocHelpSigOfItemForLookup infoReader m d
- else
- FSharpXmlDoc.Text result
+ match xmlDoc with
+ | Some xmlDoc when not xmlDoc.IsEmpty ->
+ FSharpXmlDoc.Text (xmlDoc.UnprocessedLines, xmlDoc.GetElaboratedXmlLines())
+ | _ -> GetXmlDocHelpSigOfItemForLookup infoReader m d
let mutable ToolTipFault = None
diff --git a/src/fsharp/symbols/SymbolHelpers.fsi b/src/fsharp/symbols/SymbolHelpers.fsi
index 664471ab440..f5f345e4ef2 100755
--- a/src/fsharp/symbols/SymbolHelpers.fsi
+++ b/src/fsharp/symbols/SymbolHelpers.fsi
@@ -50,10 +50,14 @@ type public FSharpXmlDoc =
/// No documentation is available
| None
- /// The text for documentation
- | Text of string
-
- /// Indicates that the text for the documentation can be found in a .xml documentation file, using the given signature key
+ /// The text for documentation for in-memory references. Here unprocessedText is the `\n` concatenated
+ /// text of the original source and processsedXmlLines is the
+ /// XML produced after all checking and processing by the F# compiler, including
+ /// insertion of summary tags, encoding and resolving of cross-references if
+ // supported.
+ | Text of unprocessedLines: string[] * elaboratedXmlLines: string[]
+
+ /// Indicates that the XML for the documentation can be found in a .xml documentation file, using the given signature key
| XmlDocFileSignature of (*File:*) string * (*Signature:*)string
type public Layout = Internal.Utilities.StructuredFormat.Layout
diff --git a/src/fsharp/symbols/Symbols.fs b/src/fsharp/symbols/Symbols.fs
index 4fe8986ec97..afe5c4a27fd 100644
--- a/src/fsharp/symbols/Symbols.fs
+++ b/src/fsharp/symbols/Symbols.fs
@@ -78,7 +78,11 @@ module Impl =
let makeReadOnlyCollection (arr: seq<'T>) =
System.Collections.ObjectModel.ReadOnlyCollection<_>(Seq.toArray arr) :> IList<_>
- let makeXmlDoc (XmlDoc x) = makeReadOnlyCollection x
+ let makeXmlDoc (doc: XmlDoc) =
+ makeReadOnlyCollection doc.UnprocessedLines
+
+ let makeElaboratedXmlDoc (doc: XmlDoc) =
+ makeReadOnlyCollection (doc.GetElaboratedXmlLines())
let rescopeEntity optViewedCcu (entity: Entity) =
match optViewedCcu with
@@ -646,6 +650,10 @@ and FSharpEntity(cenv: SymbolEnv, entity:EntityRef) =
if isUnresolved() then XmlDoc.Empty |> makeXmlDoc else
entity.XmlDoc |> makeXmlDoc
+ member __.ElaboratedXmlDoc =
+ if isUnresolved() then XmlDoc.Empty |> makeElaboratedXmlDoc else
+ entity.XmlDoc |> makeElaboratedXmlDoc
+
member x.StaticParameters =
match entity.TypeReprInfo with
#if !NO_EXTENSIONTYPING
@@ -815,6 +823,10 @@ and FSharpUnionCase(cenv, v: UnionCaseRef) =
if isUnresolved() then XmlDoc.Empty |> makeXmlDoc else
v.UnionCase.XmlDoc |> makeXmlDoc
+ member __.ElaboratedXmlDoc =
+ if isUnresolved() then XmlDoc.Empty |> makeElaboratedXmlDoc else
+ v.UnionCase.XmlDoc |> makeElaboratedXmlDoc
+
member __.Attributes =
if isUnresolved() then makeReadOnlyCollection [] else
v.Attribs |> List.map (fun a -> FSharpAttribute(cenv, AttribInfo.FSAttribInfo(cenv.g, a))) |> makeReadOnlyCollection
@@ -997,6 +1009,14 @@ and FSharpField(cenv: SymbolEnv, d: FSharpFieldData) =
| Choice3Of3 _ -> XmlDoc.Empty
|> makeXmlDoc
+ member __.ElaboratedXmlDoc =
+ if isUnresolved() then XmlDoc.Empty |> makeElaboratedXmlDoc else
+ match d.TryRecdField with
+ | Choice1Of3 r -> r.XmlDoc
+ | Choice2Of3 _ -> XmlDoc.Empty
+ | Choice3Of3 _ -> XmlDoc.Empty
+ |> makeElaboratedXmlDoc
+
member __.FieldType =
checkIsResolved()
let fty =
@@ -1107,6 +1127,10 @@ and FSharpActivePatternCase(cenv, apinfo: PrettyNaming.ActivePatternInfo, ty, n,
defaultArg (valOpt |> Option.map (fun vref -> vref.XmlDoc)) XmlDoc.Empty
|> makeXmlDoc
+ member __.ElaboratedXmlDoc =
+ defaultArg (valOpt |> Option.map (fun vref -> vref.XmlDoc)) XmlDoc.Empty
+ |> makeElaboratedXmlDoc
+
member __.XmlDocSig =
let xmlsig =
match valOpt with
@@ -1146,8 +1170,11 @@ and FSharpGenericParameter(cenv, v:Typar) =
member __.IsCompilerGenerated = v.IsCompilerGenerated
member __.IsMeasure = (v.Kind = TyparKind.Measure)
+
member __.XmlDoc = v.XmlDoc |> makeXmlDoc
+ member __.ElaboratedXmlDoc = v.XmlDoc |> makeElaboratedXmlDoc
+
member __.IsSolveAtCompileTime = (v.StaticReq = TyparStaticReq.HeadTypeStaticReq)
member __.Attributes =
@@ -1828,6 +1855,14 @@ and FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
| M m | C m -> m.XmlDoc |> makeXmlDoc
| V v -> v.XmlDoc |> makeXmlDoc
+ member __.ElaboratedXmlDoc =
+ if isUnresolved() then XmlDoc.Empty |> makeElaboratedXmlDoc else
+ match d with
+ | E e -> e.XmlDoc |> makeElaboratedXmlDoc
+ | P p -> p.XmlDoc |> makeElaboratedXmlDoc
+ | M m | C m -> m.XmlDoc |> makeElaboratedXmlDoc
+ | V v -> v.XmlDoc |> makeElaboratedXmlDoc
+
member x.CurriedParameterGroups =
checkIsResolved()
match d with
diff --git a/src/fsharp/symbols/Symbols.fsi b/src/fsharp/symbols/Symbols.fsi
index 1e088f3994d..bf994ea7c44 100644
--- a/src/fsharp/symbols/Symbols.fsi
+++ b/src/fsharp/symbols/Symbols.fsi
@@ -259,6 +259,10 @@ and [] public FSharpEntity =
/// Get the in-memory XML documentation for the entity, used when code is checked in-memory
member XmlDoc: IList
+ /// Get the elaborated XML documentation for the entity, used when code is checked in-memory,
+ /// after any checking and processing to XML performed by the F# compiler
+ member ElaboratedXmlDoc: IList
+
/// Get the XML documentation signature for the entity, used for .xml file lookup for compiled code
member XmlDocSig: string
@@ -399,6 +403,10 @@ and [] public FSharpUnionCase =
/// Get the in-memory XML documentation for the union case, used when code is checked in-memory
member XmlDoc: IList
+ /// Get the elaborated XML documentation for the union case, used when code is checked in-memory,
+ /// after any checking and processing to XML performed by the F# compiler
+ member ElaboratedXmlDoc: IList
+
/// Get the XML documentation signature for .xml file lookup for the union case, used for .xml file lookup for compiled code
member XmlDocSig: string
@@ -473,6 +481,10 @@ and [] public FSharpField =
/// Get the in-memory XML documentation for the field, used when code is checked in-memory
member XmlDoc: IList
+ /// Get the elaborated XML documentation for the field, used when code is checked in-memory,
+ /// after any checking and processing to XML performed by the F# compiler
+ member ElaboratedXmlDoc: IList
+
/// Get the XML documentation signature for .xml file lookup for the field, used for .xml file lookup for compiled code
member XmlDocSig: string
@@ -523,6 +535,10 @@ and [] public FSharpGenericParameter =
/// Get the in-memory XML documentation for the type parameter, used when code is checked in-memory
member XmlDoc : IList
+ /// Get the elaborated XML documentation for the type parameter, used when code is checked in-memory,
+ /// after any checking and processing to XML performed by the F# compiler
+ member ElaboratedXmlDoc: IList
+
/// Indicates if this is a statically resolved type variable
member IsSolveAtCompileTime : bool
@@ -834,6 +850,10 @@ and [] public FSharpMemberOrFunctionOrValue =
/// Get the in-memory XML documentation for the value, used when code is checked in-memory
member XmlDoc: IList
+ /// Get the elaborated XML documentation for the value, used when code is checked in-memory,
+ /// after any checking and processing to XML performed by the F# compiler
+ member ElaboratedXmlDoc: IList
+
/// XML documentation signature for the value, used for .xml file lookup for compiled code
member XmlDocSig: string
@@ -915,6 +935,10 @@ and [] public FSharpActivePatternCase =
/// Get the in-memory XML documentation for the active pattern case, used when code is checked in-memory
member XmlDoc: IList
+ /// Get the elaborated XML documentation for the active pattern case, used when code is checked in-memory,
+ /// after any checking and processing to XML performed by the F# compiler
+ member ElaboratedXmlDoc: IList
+
/// XML documentation signature for the active pattern case, used for .xml file lookup for compiled code
member XmlDocSig: string
diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf
index ee4520e2f46..9839f7d0bca 100644
--- a/src/fsharp/xlf/FSComp.txt.cs.xlf
+++ b/src/fsharp/xlf/FSComp.txt.cs.xlf
@@ -522,6 +522,41 @@
Pro odkazy na rozhraní .NET používejte referenční sestavení, pokud jsou k dispozici (ve výchozím nastavení povolené).
+
+ This XML comment is invalid: '{0}'
+ This XML comment is invalid: '{0}'
+
+
+
+ This XML comment is invalid: multiple documentation entries for parameter '{0}'
+ This XML comment is invalid: multiple documentation entries for parameter '{0}'
+
+
+
+ This XML comment is invalid: unknown parameter '{0}'
+ This XML comment is invalid: unknown parameter '{0}'
+
+
+
+ This XML comment is invalid: missing 'cref' attribute for cross-reference
+ This XML comment is invalid: missing 'cref' attribute for cross-reference
+
+
+
+ This XML comment is incomplete: no documentation for parameter '{0}'
+ This XML comment is incomplete: no documentation for parameter '{0}'
+
+
+
+ This XML comment is invalid: missing 'name' attribute for parameter or parameter reference
+ This XML comment is invalid: missing 'name' attribute for parameter or parameter reference
+
+
+
+ This XML comment is invalid: unresolved cross-reference '{0}'
+ This XML comment is invalid: unresolved cross-reference '{0}'
+
+ Consider using 'yield!' instead of 'yield'.Zvažte použití parametru yield! namísto yield.
diff --git a/src/fsharp/xlf/FSComp.txt.de.xlf b/src/fsharp/xlf/FSComp.txt.de.xlf
index 084d3c4031e..f0ddc681111 100644
--- a/src/fsharp/xlf/FSComp.txt.de.xlf
+++ b/src/fsharp/xlf/FSComp.txt.de.xlf
@@ -522,6 +522,41 @@
Verweisassemblys für .NET Framework-Verweise verwenden, wenn verfügbar (standardmäßig aktiviert).
+
+ This XML comment is invalid: '{0}'
+ This XML comment is invalid: '{0}'
+
+
+
+ This XML comment is invalid: multiple documentation entries for parameter '{0}'
+ This XML comment is invalid: multiple documentation entries for parameter '{0}'
+
+
+
+ This XML comment is invalid: unknown parameter '{0}'
+ This XML comment is invalid: unknown parameter '{0}'
+
+
+
+ This XML comment is invalid: missing 'cref' attribute for cross-reference
+ This XML comment is invalid: missing 'cref' attribute for cross-reference
+
+
+
+ This XML comment is incomplete: no documentation for parameter '{0}'
+ This XML comment is incomplete: no documentation for parameter '{0}'
+
+
+
+ This XML comment is invalid: missing 'name' attribute for parameter or parameter reference
+ This XML comment is invalid: missing 'name' attribute for parameter or parameter reference
+
+
+
+ This XML comment is invalid: unresolved cross-reference '{0}'
+ This XML comment is invalid: unresolved cross-reference '{0}'
+
+ Consider using 'yield!' instead of 'yield'.Verwenden Sie ggf. "yield!" anstelle von "yield".
diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf
index 83ba01bb5a5..24077dfabb0 100644
--- a/src/fsharp/xlf/FSComp.txt.es.xlf
+++ b/src/fsharp/xlf/FSComp.txt.es.xlf
@@ -522,6 +522,41 @@
Use ensamblados de referencia para las referencias de .NET Framework cuando estén disponibles (habilitado de forma predeterminada).
+
+ This XML comment is invalid: '{0}'
+ This XML comment is invalid: '{0}'
+
+
+
+ This XML comment is invalid: multiple documentation entries for parameter '{0}'
+ This XML comment is invalid: multiple documentation entries for parameter '{0}'
+
+
+
+ This XML comment is invalid: unknown parameter '{0}'
+ This XML comment is invalid: unknown parameter '{0}'
+
+
+
+ This XML comment is invalid: missing 'cref' attribute for cross-reference
+ This XML comment is invalid: missing 'cref' attribute for cross-reference
+
+
+
+ This XML comment is incomplete: no documentation for parameter '{0}'
+ This XML comment is incomplete: no documentation for parameter '{0}'
+
+
+
+ This XML comment is invalid: missing 'name' attribute for parameter or parameter reference
+ This XML comment is invalid: missing 'name' attribute for parameter or parameter reference
+
+
+
+ This XML comment is invalid: unresolved cross-reference '{0}'
+ This XML comment is invalid: unresolved cross-reference '{0}'
+
+ Consider using 'yield!' instead of 'yield'.Considere la posibilidad de usar "yield!" en lugar de "yield".
diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf
index 5e2edeccf43..505de283f8c 100644
--- a/src/fsharp/xlf/FSComp.txt.fr.xlf
+++ b/src/fsharp/xlf/FSComp.txt.fr.xlf
@@ -522,6 +522,41 @@
Utilisez des assemblys de référence pour les références .NET Framework quand ils sont disponibles (activé par défaut).
+
+ This XML comment is invalid: '{0}'
+ This XML comment is invalid: '{0}'
+
+
+
+ This XML comment is invalid: multiple documentation entries for parameter '{0}'
+ This XML comment is invalid: multiple documentation entries for parameter '{0}'
+
+
+
+ This XML comment is invalid: unknown parameter '{0}'
+ This XML comment is invalid: unknown parameter '{0}'
+
+
+
+ This XML comment is invalid: missing 'cref' attribute for cross-reference
+ This XML comment is invalid: missing 'cref' attribute for cross-reference
+
+
+
+ This XML comment is incomplete: no documentation for parameter '{0}'
+ This XML comment is incomplete: no documentation for parameter '{0}'
+
+
+
+ This XML comment is invalid: missing 'name' attribute for parameter or parameter reference
+ This XML comment is invalid: missing 'name' attribute for parameter or parameter reference
+
+
+
+ This XML comment is invalid: unresolved cross-reference '{0}'
+ This XML comment is invalid: unresolved cross-reference '{0}'
+
+ Consider using 'yield!' instead of 'yield'.Utilisez 'yield!' à la place de 'yield'.
diff --git a/src/fsharp/xlf/FSComp.txt.it.xlf b/src/fsharp/xlf/FSComp.txt.it.xlf
index d870e6feaac..b6527118704 100644
--- a/src/fsharp/xlf/FSComp.txt.it.xlf
+++ b/src/fsharp/xlf/FSComp.txt.it.xlf
@@ -522,6 +522,41 @@
Usa gli assembly di riferimento per i riferimenti a .NET Framework quando disponibili (abilitato per impostazione predefinita).
+
+ This XML comment is invalid: '{0}'
+ This XML comment is invalid: '{0}'
+
+
+
+ This XML comment is invalid: multiple documentation entries for parameter '{0}'
+ This XML comment is invalid: multiple documentation entries for parameter '{0}'
+
+
+
+ This XML comment is invalid: unknown parameter '{0}'
+ This XML comment is invalid: unknown parameter '{0}'
+
+
+
+ This XML comment is invalid: missing 'cref' attribute for cross-reference
+ This XML comment is invalid: missing 'cref' attribute for cross-reference
+
+
+
+ This XML comment is incomplete: no documentation for parameter '{0}'
+ This XML comment is incomplete: no documentation for parameter '{0}'
+
+
+
+ This XML comment is invalid: missing 'name' attribute for parameter or parameter reference
+ This XML comment is invalid: missing 'name' attribute for parameter or parameter reference
+
+
+
+ This XML comment is invalid: unresolved cross-reference '{0}'
+ This XML comment is invalid: unresolved cross-reference '{0}'
+
+ Consider using 'yield!' instead of 'yield'.Provare a usare 'yield!' invece di 'yield'.
diff --git a/src/fsharp/xlf/FSComp.txt.ja.xlf b/src/fsharp/xlf/FSComp.txt.ja.xlf
index 634025e3144..a361c41ff6b 100644
--- a/src/fsharp/xlf/FSComp.txt.ja.xlf
+++ b/src/fsharp/xlf/FSComp.txt.ja.xlf
@@ -2,7559 +2,7594 @@
-
- Feature '{0}' is not available in F# {1}. Please use language version {2} or greater.
- 機能 '{0}' は F# {1} では使用できません。{2} 以上の言語バージョンをお使いください。
+
+ The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling.
+ The argument names in the signature '{0}' and implementation '{1}' do not match. The argument name from the signature file will be used. This may cause problems when debugging or profiling.
-
- Feature '{0}' is not supported by target runtime.
- 機能 '{0}' は、ターゲット ランタイムではサポートされていません。
+
+ The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute.
+ The CallerMemberNameAttribute applied to parameter '{0}' will have no effect. It is overridden by the CallerFilePathAttribute.
-
- Feature '{0}' requires the F# library for language version {1} or greater.
- Feature '{0}' requires the F# library for language version {1} or greater.
+
+ The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'.
+ The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'.
-
- Available overloads:\n{0}
- 使用可能なオーバーロード:\n{0}
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature.
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature.
-
- A generic construct requires that a generic type parameter be known as a struct or reference type. Consider adding a type annotation.
- A generic construct requires that a generic type parameter be known as a struct or reference type. Consider adding a type annotation.
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3}
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abbreviations differ: {2} versus {3}
-
- Known types of arguments: {0}
- 既知の型の引数: {0}
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was required by the signature but was not specified by the implementation
-
- Known type of argument: {0}
- 既知の型の引数: {0}
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the abstract member '{2}' was present in the implementation but not in the signature
-
- Known return type: {0}
- 既知の戻り値の型: {0}
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation
-
- Known type parameters: {0}
- 既知の型パラメーター: {0}
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature
-
- Known type parameter: {0}
- 既知の型パラメーター: {0}
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'.
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field '{2}' was present in the implementation but not in the signature. Struct types must now reveal their fields in the signature for the type, though the fields may still be labelled 'private' or 'internal'.
-
- Argument at index {0} doesn't match
- インデックス {0} の引数が一致しません
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation
-
- Argument '{0}' doesn't match
- 引数 '{0}' が一致しません
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was required by the signature but was not specified by the implementation
-
- The type provider designer assembly '{0}' could not be loaded from folder '{1}' because a dependency was missing or could not loaded. All dependencies of the type provider designer assembly must be located in the same folder as that assembly. The exception reported was: {2} - {3}
- 依存関係がないか、または読み込めなかったため、型プロバイダーのデザイナー アセンブリ '{0}' をフォルダー '{1}' から読み込めませんでした。型プロバイダーのデザイナー アセンブリのすべての依存関係は、そのアセンブリと同じフォルダーに配置されている必要があります。次の例外が報告されました: {2} - {3}
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the field {2} was present in the implementation but not in the signature
-
- The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3}
- 型プロバイダーのデザイナー アセンブリ '{0}' をフォルダー '{1}' から読み込めませんでした。次の例外が報告されました: {2} - {3}
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the IL representations differ
-
- Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3}
- アセンブリ属性 '{0}' は、デザイナー アセンブリ '{1}' を参照していますが、これは読み込むことができないか、存在していません。報告された例外: {2} - {3}
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order)
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines the {2} '{3}' but the signature does not (or does, but not in the same order)
-
- applicative computation expressions
- 適用できる計算式
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation
-
- default interface member consumption
- 既定のインターフェイス メンバーの消費
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature.
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature.
-
- dotless float32 literal
- ドットなしの float32 リテラル
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation.
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation.
-
- fixed-index slice 3d/4d
- 固定インデックス スライス 3d/4d
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not
-
- from-end slicing
- 開始と終了を指定したスライス
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not
-
- implicit yield
- 暗黙的な yield
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature.
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature.
-
- interfaces with multiple generic instantiation
- interfaces with multiple generic instantiation
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented
-
- nameof
- nameof
+
+ The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation.
+ The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation.
-
- nullable optional interop
- Null 許容のオプションの相互運用
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the number of {2}s differ
-
- open type declaration
- open type declaration
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ
-
- overloads for custom operations
- overloads for custom operations
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the representations differ
-
- package management
- パッケージの管理
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not
-
- whitespace relexation
- 空白の緩和
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3}
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature declares a {2} while the implementation declares a {3}
-
- single underscore pattern
- 単一のアンダースコア パターン
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order)
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature defines the {2} '{3}' but the implementation does not (or does, but not in the same order)
-
- string interpolation
- string interpolation
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation.
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation.
-
- wild card in for loop
- for ループのワイルド カード
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not
-
- witness passing for trait constraints in F# quotations
- F# 引用での特性制約に対する監視の引き渡し
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not
-
- Interpolated strings may not use '%' format specifiers unless each is given an expression, e.g. '%d{{1+1}}'.
- Interpolated strings may not use '%' format specifiers unless each is given an expression, e.g. '%d{{1+1}}'.
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types are of different kinds
-
- .NET-style format specifiers such as '{{x,3}}' or '{{x:N5}}' may not be mixed with '%' format specifiers.
- .NET-style format specifiers such as '{{x,3}}' or '{{x:N5}}' may not be mixed with '%' format specifiers.
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because a type representation is being hidden by a signature
-
- The '%P' specifier may not be used explicitly.
- The '%P' specifier may not be used explicitly.
+
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types
+ The {0} definitions for type '{1}' in the signature and implementation are not compatible because the types have different base types
-
- Interpolated strings used as type IFormattable or type FormattableString may not use '%' specifiers, only .NET-style interpolands such as '{{expr}}', '{{expr,3}}' or '{{expr:N5}}' may be used.
- Interpolated strings used as type IFormattable or type FormattableString may not use '%' specifiers, only .NET-style interpolands such as '{{expr}}', '{{expr,3}}' or '{{expr:N5}}' may be used.
+
+ The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}.
+ The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}.
-
- - {0}
- - {0}
+
+ The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}
+ The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}
-
- From the end slicing with requires language version 5.0, use /langversion:preview.
- 言語バージョン 5.0 が必要な最後からのスライスで、/langversion:preview を使用してください。
+
+ The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}.
+ The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}.
-
- Invalid directive '#{0} {1}'
- Invalid directive '#{0} {1}'
+
+ The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}.
+ The exception definitions are not compatible because the field '{0}' was present in the implementation but not in the signature. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}.
-
- a byte string may not be interpolated
- a byte string may not be interpolated
+
+ The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}.
+ The exception definitions are not compatible because the field '{0}' was required by the signature but was not specified by the implementation. The module contains the exception definition\n {1} \nbut its signature specifies\n\t{2}.
-
- A '}}' character must be escaped (by doubling) in an interpolated string.
- A '}}' character must be escaped (by doubling) in an interpolated string.
+
+ The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}.
+ The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}.
-
- Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal.
- Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal.
+
+ The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}
+ The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}
-
- Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression.
- Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression.
+
+ The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}.
+ The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n {0} \nbut its signature specifies\n\t{1}.
-
- Stream does not begin with a null resource and is not in '.RES' format.
- ストリームは null リソースでは始まらず、'RES' 形式でもありません。
+
+ The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation
+ The module contains the field\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation
-
- Resource header beginning at offset {0} is malformed.
- オフセット {0} で始まるリソース ヘッダーの形式に誤りがあります。
+
+ The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ
+ The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'literal' modifiers differ
-
- Display the allowed values for language version, specify language version such as 'latest' or 'preview'
- 言語バージョンで許可された値を表示し、'最新' や 'プレビュー' などの言語バージョンを指定する
+
+ The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ
+ The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'mutable' modifiers differ
-
- Supported language versions:
- サポートされる言語バージョン:
+
+ The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ
+ The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe names differ
-
- Unrecognized value '{0}' for --langversion use --langversion:? for complete list
- --langversion の値 '{0}' が認識されません。完全なリストについては、--langversion:? を使用してください
+
+ The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ
+ The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe 'static' modifiers differ
-
- The package management feature requires language version 5.0 use /langversion:preview
- パッケージ管理機能では、言語バージョン 5.0 で /langversion:preview を使用する必要があります
+
+ The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ
+ The module contains the field\n {0} \nbut its signature specifies\n {1} \nThe types differ
-
- Invalid interpolated string. This interpolated string expression fill is empty, an expression was expected.
- Invalid interpolated string. This interpolated string expression fill is empty, an expression was expected.
+
+ Invalid recursive reference to an abstract slot
+ Invalid recursive reference to an abstract slot
-
- Incomplete interpolated string begun at or before here
- Incomplete interpolated string begun at or before here
+
+ The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation
+ The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nthe accessibility specified in the signature is more than that specified in the implementation
-
- Incomplete interpolated string expression fill begun at or before here
- Incomplete interpolated string expression fill begun at or before here
+
+ The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ
+ The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe respective number of data fields differ
-
- Incomplete interpolated triple-quote string begun at or before here
- Incomplete interpolated triple-quote string begun at or before here
+
+ The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ
+ The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe names differ
-
- Incomplete interpolated verbatim string begun at or before here
- Incomplete interpolated verbatim string begun at or before here
+
+ The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ
+ The module contains the constructor\n {0} \nbut its signature specifies\n {1} \nThe types of the fields differ
-
- Unexpected symbol '.' in member definition. Expected 'with', '=' or other token.
- メンバー定義に予期しない記号 '.' があります。'with'、'=' またはその他のトークンが必要です。
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't
-
- Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default)
- PDB に格納されているソース ファイル チェックサムを計算するためのアルゴリズムを指定します。サポートされる値は次のとおりです: SHA1 または SHA256 (既定)
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation
-
- Algorithm '{0}' is not supported
- アルゴリズム '{0}' はサポートされていません
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int.
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int.
-
- #i is not supported by the registered PackageManagers
- #i is not supported by the registered PackageManagers
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value
-
- This feature is not supported in this version of F#. You may need to add /langversion:preview to use this feature.
- この機能は、このバージョンの F# ではサポートされていません。この機能を使用するには、/langversion:preview の追加が必要な場合があります。
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ
-
- This is the wrong anonymous record. It should have the fields {0}.
- この匿名レコードは正しくありません。フィールド {0} を含んでいる必要があります。
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ
-
- This anonymous record does not have enough fields. Add the missing fields {0}.
- この匿名レコードには十分なフィールドがありません。不足しているフィールド {0} を追加してください。
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ
-
- This anonymous record has too many fields. Remove the extra fields {0}.
- この匿名レコードはフィールドが多すぎます。不要なフィールド {0} を削除してください。
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ
-
- Invalid Anonymous Record type declaration.
- Invalid Anonymous Record type declaration.
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not
-
- Attributes cannot be applied to type extensions.
- 属性を型拡張に適用することはできません。
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't
-
- Byref types are not allowed in an open type declaration.
- Byref types are not allowed in an open type declaration.
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute.
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute.
-
- Mismatch in interpolated string. Interpolated strings may not use '%' format specifiers unless each is given an expression, e.g. '%d{{1+1}}'
- Mismatch in interpolated string. Interpolated strings may not use '%' format specifiers unless each is given an expression, e.g. '%d{{1+1}}'
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4}
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4}
-
- Invalid alignment in interpolated string
- Invalid alignment in interpolated string
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ
-
- use! may not be combined with and!
- use! を and! と組み合わせて使用することはできません
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member
-
- Cannot assign a value to another value marked literal
- Cannot assign a value to another value marked literal
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ
-
- Cannot assign '{0}' to a value marked literal
- Cannot assign '{0}' to a value marked literal
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ
-
- The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSource' and 'Bind' methods
- 'let! ... and! ...' コンストラクトは、コンピュテーション式ビルダーが '{0}' メソッドまたは適切な 'MergeSource' および 'Bind' メソッドのいずれかを定義している場合にのみ使用できます
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not
-
- Invalid interpolated string. {0}
- Invalid interpolated string. {0}
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation.
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation.
-
- Interface member '{0}' does not have a most specific implementation.
- インターフェイス メンバー '{0}' には最も固有な実装がありません。
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't
-
- '{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.
- '{0}' cannot implement the interface '{1}' with the two instantiations '{2}' and '{3}' because they may unify.
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ
-
- You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.
- You cannot implement the interface '{0}' with the two instantiations '{1}' and '{2}' because they may unify.
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member
-
- The type '{0}' does not define the field, constructor or member '{1}'.
- 型 '{0}' は、フィールド、コンストラクター、またはメンバー '{1}' を定義していません。
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't
-
- The namespace '{0}' is not defined.
- 名前空間 '{0}' が定義されていません。
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ
-
- The namespace or module '{0}' is not defined.
- 名前空間またはモジュール '{0}' が定義されていません。
+
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't
+ Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't
-
- The field, constructor or member '{0}' is not defined.
- フィールド、コンストラクター、またはメンバー '{0}' が定義されていません。
+
+ The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed.
+ The mutable local '{0}' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed.
-
- The value, constructor, namespace or type '{0}' is not defined.
- 値、コンストラクター、名前空間、または型 '{0}' が定義されていません。
+
+ Active pattern '{0}' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
+ Active pattern '{0}' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x'
-
- The value or constructor '{0}' is not defined.
- 値またはコンストラクター '{0}' が定義されていません。
+
+ Active pattern '{0}' is not a function
+ Active pattern '{0}' is not a function
-
- The value, namespace, type or module '{0}' is not defined.
- 値、名前空間、型、またはモジュール '{0}' が定義されていません。
+
+ Add . for indexer access.
+ Add . for indexer access.
-
- The constructor, module or namespace '{0}' is not defined.
- コンストラクター、モジュール、または名前空間 '{0}' が定義されていません。
+
+ All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'.
+ All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'.
-
- The type '{0}' is not defined.
- 型 '{0}' が定義されていません。
+
+ Found by AssemblyFoldersEx registry key
+ Found by AssemblyFoldersEx registry key
-
- The type '{0}' is not defined in '{1}'.
- {1}' で型 '{0}' が定義されていません。
+
+ Found by AssemblyFolders registry key
+ Found by AssemblyFolders registry key
-
- The record label or namespace '{0}' is not defined.
- レコード ラベルまたは名前空間 '{0}' が定義されていません。
+
+ Global Assembly Cache
+ Global Assembly Cache
-
- The record label '{0}' is not defined.
- レコード ラベル '{0}' が定義されていません。
+
+ .NET Framework
+ .NET Framework
-
- Maybe you want one of the following:
- 次のいずれかの可能性はありませんか:
+
+ This indexer notation has been removed from the F# language
+ This indexer notation has been removed from the F# language
-
- The type parameter {0} is not defined.
- 型パラメーター {0} が定義されていません。
+
+ Invalid expression on left of assignment
+ Invalid expression on left of assignment
-
- The pattern discriminator '{0}' is not defined.
- パターン識別子 '{0}' が定義されていません。
+
+ Error while parsing embedded IL
+ Error while parsing embedded IL
-
- Replace with '{0}'
- '{0}' で置換
+
+ Error while parsing embedded IL type
+ Error while parsing embedded IL type
-
- Add . for indexer access.
- インデクサーにアクセスするには . を追加します。
+
+ A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable'
+ A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable'
-
- All elements of a list must be of the same type as the first element, which here is '{0}'. This element has type '{1}'.
- リスト コンストラクター式のすべての要素は同じ型である必要があります。この式に必要な型は '{0}' ですが、ここでは型 '{1}' になっています。
+
+ The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes
+ The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes
-
- All elements of an array must be of the same type as the first element, which here is '{0}'. This element has type '{1}'.
- 配列コンストラクター式の要素はすべて同じ型である必要があります。この式に必要な型は '{0}' ですが、ここでは型 '{1}' になっています。
+
+ A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable'
+ A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable'
-
- This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '{0}'.
- 'if' 式に 'else' ブランチがありません。'then' ブランチは型 '{0}' です。'if' はステートメントではなく式であるため、同じ型の値を返す 'else' ブランチを追加してください。
+
+ This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison'
+ This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison'
-
- The 'if' expression needs to have type '{0}' to satisfy context type requirements. It currently has type '{1}'.
- コンテキストの型要件を満たすためには、'if' 式の型は '{0}' である必要があります。現在の型は '{1}' です。
+
+ A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes
+ A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes
-
- All branches of an 'if' expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'.
- if' 式のすべてのブランチは同じ型である必要があります。この式に必要な型は '{0}' ですが、ここでは型 '{1}' になっています。
+
+ A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes
+ A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes
-
- All branches of a pattern match expression must return values of the same type as the first branch, which here is '{0}'. This branch returns a value of type '{1}'.
- パターン マッチ式のすべてのブランチは、同じ型の値を返す必要があります。最初のブランチが返した値の型は '{0}' ですが、このブランチが返した値の型は '{1}' です。
+
+ The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute
+ The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute
-
- A pattern match guard must be of type 'bool', but this 'when' expression is of type '{0}'.
- パターン マッチ ガードは型 'bool' である必要がありますが、この 'when' 式は型 '{0}' です。
+
+ The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'.
+ The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'.
-
- A ';' is used to separate field values in records. Consider replacing ',' with ';'.
- ';' は、レコード内でフィールド値を区切るために使われます。',' を ';' で置き換えることを検討してください。
+
+ Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes
+ Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes
-
- The '!' operator is used to dereference a ref cell. Consider using 'not expr' here.
- '!' 演算子は ref セルの逆参照に使用されます。ここに 'not expr' を使用することをご検討ください。
+
+ A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable'
+ A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable'
-
- The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s)
- 非ジェネリック型 '{0}' に型引数は使用できませんが、{1} 個の型引数があります
+
+ The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute
+ The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute
-
- Consider using 'return!' instead of 'return'.
- 'return' の代わりに 'return!' を使うことを検討してください。
+
+ The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes
+ The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes
-
- Use reference assemblies for .NET framework references when available (Enabled by default).
- 使用可能な場合は、.NET Framework リファレンスの参照アセンブリを使用します (既定で有効)。
+
+ A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes
+ A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes
-
- Consider using 'yield!' instead of 'yield'.
- 'yield' の代わりに 'yield!' を使うことを検討してください。
+
+ '{0}' is not a valid floating point argument
+ '{0}' is not a valid floating point argument
-
- \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface.
- \n1 つ以上の引数についてタプル型を指定する必要があります。指定した引数を追加のかっこ内にラップすることを検討するか、インターフェイスの定義を確認してください。
+
+ '{0}' is not a valid integer argument
+ '{0}' is not a valid integer argument
-
- Invalid warning number '{0}'
- 警告番号 '{0}' が無効です
+
+ Assembly resolution failure at or near this location
+ Assembly resolution failure at or near this location
-
- Invalid version string '{0}'
- バージョン文字列 '{0}' が無効です
+
+ Unable to read assembly '{0}'
+ Unable to read assembly '{0}'
-
- Invalid version file '{0}'
- バージョン ファイル '{0}' が無効です
+
+ The file extensions '.ml' and '.mli' are for ML compatibility
+ The file extensions '.ml' and '.mli' are for ML compatibility
+
+
+
+ Source file '{0}' could not be found
+ Source file '{0}' could not be found
+
+
+
+ Could not resolve assembly '{0}'
+ Could not resolve assembly '{0}'
+
+
+
+ Could not resolve assembly '{0}' required by '{1}'
+ Could not resolve assembly '{0}' required by '{1}'
+
+
+
+ The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F#
+ The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F#
+
+
+
+ Directives inside modules are ignored
+ Directives inside modules are ignored
-
- Problem with filename '{0}': {1}
- ファイル名 '{0}' に問題があります: {1}
+
+ Error opening binary file '{0}': {1}
+ Error opening binary file '{0}': {1}
-
- No inputs specified
- 入力が指定されていません
+
+ File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required.
+ File '{0}' not found alongside FSharp.Core. File expected in {1}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required.
-
- The '--pdb' option requires the '--debug' option to be used
- '--pdb' オプションでは '--debug' オプションを使用する必要があります
+
+ FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required.
+ FSharp.Core.sigdata not found alongside FSharp.Core. File expected in {0}. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required.
-
- The search directory '{0}' is invalid
- 検索ディレクトリ '{0}' が無効です
+
+ An implementation of the file or module '{0}' has already been given
+ An implementation of the file or module '{0}' has already been given
-
- The search directory '{0}' could not be found
- 検索ディレクトリ '{0}' が見つかりませんでした
+
+ An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer.
+ An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer.
-
- '{0}' is not a valid filename
- '{0}' は有効なファイル名ではありません
+
+ The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file.
+ The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file.'{0}' is not a valid assembly name
- '{0}' は有効なアセンブリ名ではありません
+ '{0}' is not a valid assembly name
-
- Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private'
- マネージド リソースの認識されないプライバシー設定 '{0}'。有効なオプションは 'public' および 'private' です。
-
-
-
- Unable to read assembly '{0}'
- アセンブリ '{0}' を読み取れません
+
+ '{0}' is not a valid filename
+ '{0}' is not a valid filename
-
- Assembly resolution failure at or near this location
- この場所またはこの場所付近でアセンブリ解決エラーが発生しました
+
+ Invalid directive. Expected '#I \"<path>\"'.
+ Invalid directive. Expected '#I \"<path>\"'.
-
- The declarations in this file will be placed in an implicit module '{0}' based on the file name '{1}'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file.
- このファイルの宣言は、ファイル名 '{1}' に基づいて、暗黙的なモジュール '{0}' に配置されます。ただし、これは有効な F# 識別子ではないため、その内容には他のファイルからアクセスできません。ファイル名を変更するか、ファイルの一番上に 'module' または 'namespace' の宣言を追加してください。
+
+ Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'.
+ Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'.
-
- Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration.
- ライブラリまたは複数ファイル アプリケーション内のファイルは、名前空間またはモジュールの宣言から開始する必要があります (例: 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule')。アプリケーションの最後のソース ファイルのみ、このような宣言を省略できます。
+
+ Invalid directive. Expected '#r \"<file-or-assembly>\"'.
+ Invalid directive. Expected '#r \"<file-or-assembly>\"'.
-
- Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error.
- ライブラリ内のファイル、または複数ファイル アプリケーション内のファイルでは、先頭に名前空間宣言またはモジュール宣言を置く必要があります。ファイルの先頭にモジュール宣言を置く場合、'=' 記号は指定できません。これが最上位レベルのモジュールである場合は、このエラーを解決するために = を削除することを検討してください。
+
+ Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'.
+ Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'.
-
- This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules.
- このファイルには、'module SomeNamespace.SomeModule' という形式の宣言が複数含まれます。1 ファイル内で指定できるこの形式の宣言は 1 つのみです。最初の名前空間宣言を使用するようにファイルを変更するか、'module ModuleName = ...' を使用してモジュールを定義してください。
+
+ Invalid module or namespace name
+ Invalid module or namespace name
-
- Option requires parameter: {0}
- オプションにパラメーターが必要です: {0}
+
+ Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private'
+ Unrecognized privacy setting '{0}' for managed resource, valid options are 'public' and 'private'
-
- Source file '{0}' could not be found
- ソース ファイル '{0}' が見つかりませんでした
+
+ The search directory '{0}' is invalid
+ The search directory '{0}' is invalidThe file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli.
- '{0}' のファイル拡張子は認識されません。ソース ファイルの拡張子は .fs、.fsi、.fsx、.fsscript、.ml、または .mli にする必要があります。
+ The file extension of '{0}' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli.
-
- Could not resolve assembly '{0}'
- アセンブリ '{0}' を解決できませんでした
+
+ Invalid version file '{0}'
+ Invalid version file '{0}'
-
- Could not resolve assembly '{0}' required by '{1}'
- {1}' に必要なアセンブリ '{0}' を解決できませんでした
+
+ Invalid version string '{0}'
+ Invalid version string '{0}'
-
- Error opening binary file '{0}': {1}
- バイナリ ファイル '{0}' を開くときにエラーが発生しました: {1}
+
+ Invalid warning number '{0}'
+ Invalid warning number '{0}'
-
- The F#-compiled DLL '{0}' needs to be recompiled to be used with this version of F#
- F# でコンパイルされたこの DLL '{0}' は、このバージョンの F# で使用するために再コンパイルする必要があります
+
+ Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration.
+ Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration.
-
- Invalid directive. Expected '#I \"<path>\"'.
- ディレクティブが無効です。'#I \"<path>\"' が必要でした。
+
+ This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules.
+ This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules.
-
- Invalid directive. Expected '#r \"<file-or-assembly>\"'.
- ディレクティブが無効です。'#r \"<file-or-assembly>\"' という形式で指定する必要があります。
+
+ No inputs specified
+ No inputs specified
-
- Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'.
- ディレクティブが無効です。'#load \"<file>\" ... \"<file>\"' が必要でした。
+
+ Option requires parameter: {0}
+ Option requires parameter: {0}
-
- Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'.
- ディレクティブが無効です。'#time'、'#time \"on\"'、または '#time \"off\"' という形式で指定する必要があります。
+
+ The '--pdb' option requires the '--debug' option to be used
+ The '--pdb' option requires the '--debug' option to be used
-
- Directives inside modules are ignored
- モジュール内のディレクティブは無視されます
+
+ Problem reading assembly '{0}': {1}
+ Problem reading assembly '{0}': {1}
-
- A signature for the file or module '{0}' has already been specified
- ファイルまたはモジュール '{0}' のシグネチャは指定済みです
+
+ Problem with filename '{0}': {1}
+ Problem with filename '{0}': {1}
-
- An implementation of file or module '{0}' has already been given. Compilation order is significant in F# because of type inference. You may need to adjust the order of your files to place the signature file before the implementation. In Visual Studio files are type-checked in the order they appear in the project file, which can be edited manually or adjusted using the solution explorer.
- ファイルまたはモジュール '{0}' の実装は指定済みです。型推論があるため、F# ではコンパイルの順序が重要です。必要に応じて、実装の前にシグネチャ ファイルを配置するよう、ファイルの順序を調整します。Visual Studio では、プロジェクト ファイル内の出現順にファイルが型チェックされます。プロジェクト ファイルは、手動で編集するか、ソリューション エクスプローラーを使用して調整することができます。
+
+ The search directory '{0}' could not be found
+ The search directory '{0}' could not be found
-
- An implementation of the file or module '{0}' has already been given
- ファイルまたはモジュール '{0}' の実装は指定済みです
+
+ A signature for the file or module '{0}' has already been specified
+ A signature for the file or module '{0}' has already been specifiedThe signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match.
- シグネチャ ファイル '{0}' に対応する実装ファイルがありません。実装ファイルが存在する場合、シグネチャ ファイルおよび実装ファイル内の 'module' 宣言や 'namespace' 宣言が一致することを確認してください。
+ The signature file '{0}' does not have a corresponding implementation file. If an implementation file exists then check the 'module' and 'namespace' declarations in the signature and implementation files match.
-
- '{0}' is not a valid integer argument
- '{0}' は有効な整数引数ではありません
+
+ Filename '{0}' contains invalid character '{1}'
+ Filename '{0}' contains invalid character '{1}'
-
- '{0}' is not a valid floating point argument
- '{0}' は有効な浮動小数点引数ではありません
+
+ The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s)
+ The non-generic type '{0}' does not expect any type arguments, but here is given {1} type argument(s)Unrecognized option: '{0}'
- 認識されないオプション:'{0}'
+ Unrecognized option: '{0}'
-
- Invalid module or namespace name
- モジュール名または名前空間名が無効です
+
+ The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'.
+ The operator '{0}' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'.
-
- Error reading/writing metadata for the F# compiled DLL '{0}'. Was the DLL compiled with an earlier version of the F# compiler? (error: '{1}').
- F# でコンパイルした DLL '{0}' のメタデータの読み取り/書き込み中にエラーが発生しました。旧バージョンの F# コンパイラーでコンパイルした DLL ですか? (エラー: '{1}')
+
+ Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns.
+ Lowercase literal '{0}' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns.
-
- The type/module '{0}' is not a concrete module or type
- 型/モジュール '{0}' は具象モジュールまたは具象型ではありません
+
+ Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic.
+ Type inference caused the type variable {0} to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic.
-
- The type '{0}' has an inline assembly code representation
- 型 '{0}' にはインライン アセンブラー コード表現があります
+
+ Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic.
+ Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic.
-
- A namespace and a module named '{0}' both occur in two parts of this assembly
- '{0}' という名前空間とモジュールの両方がこのアセンブリの 2 か所で発生しています
+
+ Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments.
+ Redundant arguments are being ignored in function '{0}'. Expected {1} but got {2} arguments.
-
- Two modules named '{0}' occur in two parts of this assembly
- '{0}' という 2 つのモジュールがこのアセンブリの 2 か所で使用されています
+
+ The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element.
+ The attribute type '{0}' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element.
-
- Two type definitions named '{0}' occur in namespace '{1}' in two parts of this assembly
- {0}' という 2 つの型の定義が、このアセンブリの 2 か所の名前空間 '{1}' で発生しています
+
+ The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls.
+ The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls.
-
- A module and a type definition named '{0}' occur in namespace '{1}' in two parts of this assembly
- {0}' というモジュールおよび型の定義が、このアセンブリの 2 か所の名前空間 '{1}' で発生しています
+
+ The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions.
+ The byref-typed variable '{0}' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions.
-
- Invalid member signature encountered because of an earlier error
- 前に発生しているエラーのために、メンバーのシグネチャが無効です
+
+ A type would store a byref typed value. This is not permitted by Common IL.
+ A type would store a byref typed value. This is not permitted by Common IL.
-
- This value does not have a valid property setter type
- この値には、有効なプロパティの set アクセス操作子の型がありません
+
+ Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments
+ Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments
-
- Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax.
- プロパティのゲッターの形式が無効です。明示的な構文を使用する場合、少なくとも 1 つの '()' 引数が必要です。
+
+ Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'.
+ Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}'.
-
- Invalid form for a property setter. At least one argument is required.
- プロパティの set アクセス操作子の形式が無効です。少なくとも 1 つの引数が必要です。
+
+ The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments.
+ The method '{0}' has curried arguments but has the same name as another method in type '{1}'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments.
-
- Unexpected use of a byref-typed variable
- byref 型変数の予期しない使用方法です:
+
+ Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type.
+ Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type.
-
- Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'.
- 定数式の変更は無効です。変更可能なローカルに式をコピーしてください (たとえば、'let mutable x = ...')。
+
+ Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased.
+ Duplicate method. The abstract method '{0}' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased.
-
- The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed
- この操作で元の値が変更されないように、値はコピーされました
+
+ Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased.
+ Duplicate method. The method '{0}' has the same name and signature as another method in type '{1}' once tuples, functions, units of measure and/or provided types are erased.
-
- Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding
- 再帰的に定義された値は、再帰的な束縛内にあるタプル値の構造の一部として直接使用することはできません。
+
+ Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'.
+ Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}'.
-
- Recursive values cannot appear directly as a construction of the type '{0}' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead.
- 再帰的な値は、再帰的な束縛内の型 '{0}' の構造として直接使用することはできません。この機能は F# 言語から削除されました。代わりにレコードを使用してください。
+
+ Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased.
+ Duplicate property. The property '{0}' has the same name and signature as another property in type '{1}' once tuples, functions, units of measure and/or provided types are erased.
-
- Recursive values cannot be directly assigned to the non-mutable field '{0}' of the type '{1}' within a recursive binding. Consider using a mutable field instead.
- 再帰的な値は、再帰的な束縛内の型 '{1}' の変更可能ではないフィールド '{0}' に直接割り当てることはできません。代わりに変更可能なフィールドを使用してください。
+
+ A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence.
+ A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence.
-
- Unexpected decode of AutoOpenAttribute
- AutoOpenAttribute の予期しないデコードです:
+
+ Calls to 'reraise' may only occur directly in a handler of a try-with
+ Calls to 'reraise' may only occur directly in a handler of a try-with
-
- Unexpected decode of InternalsVisibleToAttribute
- InternalsVisibleToAttribute の予期しないデコードです:
+
+ A type instantiation involves a byref type. This is not permitted by the rules of Common IL.
+ A type instantiation involves a byref type. This is not permitted by the rules of Common IL.
-
- Unexpected decode of InterfaceDataVersionAttribute
- InterfaceDataVersionAttribute の予期しないデコードです:
+
+ Feature '{0}' is not available in F# {1}. Please use language version {2} or greater.
+ Feature '{0}' is not available in F# {1}. Please use language version {2} or greater.
-
- Active patterns cannot return more than 7 possibilities
- アクティブ パターンが返すことができる結果は 7 個以下です
+
+ Feature '{0}' is not supported by target runtime.
+ Feature '{0}' is not supported by target runtime.
-
- This is not a valid constant expression or custom attribute value
- これは有効な定数式でもカスタム属性値でもありません
+
+ Feature '{0}' requires the F# library for language version {1} or greater.
+ Feature '{0}' requires the F# library for language version {1} or greater.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe mutability attributes differ
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。変更可能属性が異なります。
+
+ The type of a first-class function cannot contain byrefs
+ The type of a first-class function cannot contain byrefs
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe names differ
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。名前が異なります。
+
+ A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'.
+ A property's getter and setter must have the same type. Property '{0}' has getter of type '{1}' but setter of type '{2}'.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled names differ
- モジュール '{0}' には\n {1} \nが含まれていますが、シグネチャには\n {2} \nが指定されています。コンパイル名が異なります。
+
+ The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well.
+ The property '{0}' of type '{1}' has a getter and a setter that do not match. If one is abstract then the other must be as well.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe display names differ
- モジュール '{0}' には\n {1} \nが含まれていますが、シグネチャには\n {2} \nが指定されています。表示名が異なります。
+
+ Invalid custom attribute value (not a constant or literal)
+ Invalid custom attribute value (not a constant or literal)
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe accessibility specified in the signature is more than that specified in the implementation
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャでは\n {2} \nを指定しています。シグネチャに指定されたアクセシビリティの方が、実装よりも高い設定です。
+
+ The parameter '{0}' has an invalid type '{1}'. This is not permitted by the rules of Common IL.
+ The parameter '{0}' has an invalid type '{1}'. This is not permitted by the rules of Common IL.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe inline flags differ
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。インライン フラグが異なります。
+
+ The function or method has an invalid return type '{0}'. This is not permitted by the rules of Common IL.
+ The function or method has an invalid return type '{0}'. This is not permitted by the rules of Common IL.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe literal constant values and/or attributes differ
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。リテラル定数値、属性、またはその両方が異なります。
+
+ 'base' values may only be used to make direct calls to the base implementations of overridden members
+ 'base' values may only be used to make direct calls to the base implementations of overridden members
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation.
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方は型関数ですが、もう一方は違います。型パラメーターが実装にある場合、シグネチャには明示的な型パラメーターが必要です。
+
+ The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference.
+ The member '{0}' is used in an invalid way. A use of '{1}' has been inferred prior to its definition at or near '{2}'. This is an invalid forward reference.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe respective type parameter counts differ
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。それぞれの型パラメーター数が異なります。
+
+ This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#.
+ This type implements the same interface at different generic instantiations '{0}' and '{1}'. This is not permitted in this version of F#.
+
+
+
+ The address of the field '{0}' cannot be used at this point
+ The address of the field '{0}' cannot be used at this point
+
+
+
+ The address of an array element cannot be used at this point
+ The address of an array element cannot be used at this point
+
+
+
+ The address of the variable '{0}' cannot be used at this point
+ The address of the variable '{0}' cannot be used at this point
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe types differ
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。型が異なります。
+
+ The address of the static field '{0}' cannot be used at this point
+ The address of the static field '{0}' cannot be used at this point
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is an extension member and the other is not
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方は拡張メンバーですが、もう一方は違います。
+
+ The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope.
+ The address of the variable '{0}' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nAn arity was not inferred for this value
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。この値の項数は推論されませんでした。
+
+ The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope.
+ The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe number of generic parameters in the signature and implementation differ (the signature declares {3} but the implementation declares {4}
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。シグネチャと実装のジェネリック パラメーター数が異なります (シグネチャは {3} 個を宣言しましたが、実装は {4} 個です)。
+
+ A byref typed value would be stored here. Top-level let-bound byref values are not permitted.
+ A byref typed value would be stored here. Top-level let-bound byref values are not permitted.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute.
- モジュール '{0}' には\n {1} \nが含まれていますが、シグネチャで指定されているのは\n {2} です \nシグネチャと実装の汎用パラメーターの種類が異なります。[<Measure>] 属性が欠落している可能性があります。
+
+ The byref typed value '{0}' cannot be used at this point
+ The byref typed value '{0}' cannot be used at this point
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe arities in the signature and implementation differ. The signature specifies that '{3}' is function definition or lambda expression accepting at least {4} argument(s), but the implementation is a computed function value. To declare that a computed function value is a permitted implementation simply parenthesize its type in the signature, e.g.\n\tval {5}: int -> (int -> int)\ninstead of\n\tval {6}: int -> int -> int.
- モジュール '{0}' には\n {1} が含まれていますが、 \nシグネチャでは\n {2} が指定されています \nシグネチャと実装の項数が異なります。シグネチャは、'{3}' が {4} 個以上の引数を受け入れる関数定義またはラムダ式であると指定していますが、実装は計算された関数値です。計算された関数値が許可された実装であることを宣言するには、シグネチャの型をかっこで囲んでください。たとえば、\n\tval {6}: int -> int -> int ではなく、\n\tval {5}: int -> (int -> int) と指定します。
+
+ The type abbreviation contains byrefs. This is not permitted by F#.
+ The type abbreviation contains byrefs. This is not permitted by F#.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe CLI member names differ
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。CLI メンバー名が異なります。
+
+ The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope.
+ The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is static and the other isn't
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方は静的ですが、もう一方は違います。
+
+ Type '{0}' is illegal because in byref<T>, T cannot contain byref types.
+ Type '{0}' is illegal because in byref<T>, T cannot contain byref types.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is virtual and the other isn't
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方は仮想ですが、もう一方は違います。
+
+ First-class uses of the address-of operators are not permitted
+ First-class uses of the address-of operators are not permitted
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is abstract and the other isn't
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方は抽象ですが、もう一方は違います。
+
+ Using the 'nameof' operator as a first-class function value is not permitted.
+ Using the 'nameof' operator as a first-class function value is not permitted.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is final and the other isn't
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方は final ですが、もう一方は違います。
+
+ First-class uses of the 'reraise' function is not permitted
+ First-class uses of the 'reraise' function is not permitted
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is marked as an override and the other isn't
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方はオーバーライドとマークされていますが、もう一方は違います。
+
+ First-class uses of the expression-splicing operator are not permitted
+ First-class uses of the expression-splicing operator are not permitted
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nOne is a constructor/property and the other is not
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。一方はコンストラクター/プロパティですが、もう一方は違います。
+
+ ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter
+ ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。このメソッドのコンパイル済み表現は静的メンバーとして指定されていますが、シグネチャが示すコンパイル済み表現はインスタンス メンバーです。
+
+ A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope.
+ A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope.
-
- Module '{0}' contains\n {1} \nbut its signature specifies\n {2} \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member
- モジュール '{0}' には\n {1} \nが含まれますが、シグネチャには\n {2} \nを指定しています。このメソッドのコンパイル済み表現はインスタンス メンバーとして指定されていますが、シグネチャが示すコンパイル済み表現は静的メンバーです。
+
+ The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope.
+ The Span or IsByRefLike variable '{0}' cannot be used at this point. This is to ensure the address of the local value does not escape its scope.
-
- The {0} definitions in the signature and implementation are not compatible because the names differ. The type is called '{1}' in the signature file but '{2}' in implementation.
- シグネチャおよび実装内の {0} 定義は、名前が異なるため、互換性がありません。この型はシグネチャ ファイルでは '{1}' という名前ですが、実装では '{2}' という名前です。
+
+ This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope.
+ This value can't be assigned because the target '{0}' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope.
-
- The {0} definitions for type '{1}' in the signature and implementation are not compatible because the respective type parameter counts differ
- 型パラメーターの数が異なるため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません
+
+ Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL.
+ Object constructors cannot directly use try/with and try/finally prior to the initialization of the object. This includes constructs such as 'for x in ...' that may elaborate to uses of these constructs. This is a limitation imposed by Common IL.
-
- The {0} definitions for type '{1}' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation
- シグネチャに指定されたアクセシビリティが実装の指定よりも高いため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません
+
+ The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties.
+ The property '{0}' has the same name as another property in type '{1}', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties.
-
- The {0} definitions for type '{1}' in the signature and implementation are not compatible because the signature requires that the type supports the interface {2} but the interface has not been implemented
- シグネチャでは型がインターフェイス {2} をサポートする必要がありますが、インターフェイスが実装されていないため、シグネチャおよび実装内の型 '{1}' の {0} 定義は互換性がありません
+
+