diff --git a/FSharp.sln b/FSharp.sln index b6509cdb8d..ba69de522c 100644 --- a/FSharp.sln +++ b/FSharp.sln @@ -52,7 +52,7 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Private.Scr EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "DependencyManager", "src\fsharp\Microsoft.DotNet.DependencyManager\Microsoft.DotNet.DependencyManager.fsproj", "{B5A043F8-6D7F-4D4E-B8AD-5880070180B6}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.ComponentTests", "tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj", "{FAC5A3BF-C0D6-437A-868A-E962AA00B418}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.ComponentTests", "tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj", "{FAC5A3BF-C0D6-437A-868A-E962AA00B418}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fsharpqa", "fsharpqa", "{292C4F92-A313-4CAF-9552-731F39C6C21F}" EndProject diff --git a/FSharpBuild.Directory.Build.targets b/FSharpBuild.Directory.Build.targets index 66b5508aa5..91acf15aa3 100644 --- a/FSharpBuild.Directory.Build.targets +++ b/FSharpBuild.Directory.Build.targets @@ -19,6 +19,7 @@ <_ReplacementText>$([System.IO.File]::ReadAllText('%(NoneSubstituteText.FullPath)')) <_ReplacementText Condition="'%(NoneSubstituteText.Pattern1)' != ''">$(_ReplacementText.Replace('%(NoneSubstituteText.Pattern1)', '%(NoneSubstituteText.Replacement1)')) <_ReplacementText Condition="'%(NoneSubstituteText.Pattern2)' != ''">$(_ReplacementText.Replace('%(NoneSubstituteText.Pattern2)', '%(NoneSubstituteText.Replacement2)')) + <_ReplacementText Condition="'%(NoneSubstituteText.Pattern3)' != ''">$(_ReplacementText.Replace('%(NoneSubstituteText.Pattern3)', '%(NoneSubstituteText.Replacement3)')) <_CopyToOutputDirectory Condition="'%(NoneSubstituteText.CopyToOutputDirectory)' != ''">%(NoneSubstituteText.CopyToOutputDirectory) <_CopyToOutputDirectory Condition="'%(NoneSubstituteText.CopyToOutputDirectory)' == ''">Never diff --git a/VisualFSharp.sln b/VisualFSharp.sln index f395a7701d..242480ec92 100644 --- a/VisualFSharp.sln +++ b/VisualFSharp.sln @@ -140,8 +140,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{647810D0 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.FSharp.Compiler", "src\fsharp\FSharp.Compiler.nuget\Microsoft.FSharp.Compiler.csproj", "{04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.Core.nuget", "src\fsharp\FSharp.Core.nuget\FSharp.Core.nuget.csproj", "{8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}" -EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Private.Scripting", "src\fsharp\FSharp.Compiler.Private.Scripting\FSharp.Compiler.Private.Scripting.fsproj", "{20B7BC36-CF51-4D75-9E13-66681C07977F}" EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Compiler.Private.Scripting.UnitTests", "tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj", "{09F56540-AFA5-4694-B7A6-0DBF6D4618C2}" @@ -832,18 +830,6 @@ Global {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Release|Any CPU.Build.0 = Release|Any CPU {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Release|x86.ActiveCfg = Release|Any CPU {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8}.Release|x86.Build.0 = Release|Any CPU - {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Debug|x86.ActiveCfg = Debug|Any CPU - {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Debug|x86.Build.0 = Debug|Any CPU - {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Proto|Any CPU.ActiveCfg = Release|Any CPU - {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Proto|Any CPU.Build.0 = Release|Any CPU - {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Proto|x86.ActiveCfg = Release|Any CPU - {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Proto|x86.Build.0 = Release|Any CPU - {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Release|Any CPU.Build.0 = Release|Any CPU - {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Release|x86.ActiveCfg = Release|Any CPU - {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC}.Release|x86.Build.0 = Release|Any CPU {20B7BC36-CF51-4D75-9E13-66681C07977F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {20B7BC36-CF51-4D75-9E13-66681C07977F}.Debug|Any CPU.Build.0 = Debug|Any CPU {20B7BC36-CF51-4D75-9E13-66681C07977F}.Debug|x86.ActiveCfg = Debug|Any CPU @@ -1017,7 +1003,6 @@ Global {E93E7D28-1C6B-4E04-BE83-68428CF7E039} = {6235B3AF-774D-4EA1-8F37-789E767F6368} {9482211E-23D0-4BD0-9893-E4AA5559F67A} = {6235B3AF-774D-4EA1-8F37-789E767F6368} {04C59F6E-1C76-4F6A-AC21-2EA7F296A1B8} = {647810D0-5307-448F-99A2-E83917010DAE} - {8EC30B2E-F1F9-4A98-BBB5-DD0CF6C84DDC} = {647810D0-5307-448F-99A2-E83917010DAE} {20B7BC36-CF51-4D75-9E13-66681C07977F} = {B8DDA694-7939-42E3-95E5-265C2217C142} {09F56540-AFA5-4694-B7A6-0DBF6D4618C2} = {CFE3259A-2D30-4EB0-80D5-E8B5F3D01449} {DFA30881-C0B1-4813-B087-C21B5AF9B77F} = {3881429D-A97A-49EB-B7AE-A82BA5FE9C77} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 75b2c65495..576608de1b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -446,7 +446,7 @@ stages: - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - template: eng/release/insert-into-vs.yml parameters: - componentBranchName: refs/heads/release/dev16.7 + componentBranchName: refs/heads/release/dev16.8 insertTargetBranch: master insertTeamEmail: fsharpteam@microsoft.com insertTeamName: 'F#' diff --git a/eng/Build.ps1 b/eng/Build.ps1 index add0d3f7da..630406eae9 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -37,6 +37,7 @@ param ( [string]$bootstrapConfiguration = "Proto", [string]$bootstrapTfm = "net472", [switch][Alias('bl')]$binaryLog, + [switch][Alias('nobl')]$excludeCIBinaryLog, [switch]$ci, [switch]$official, [switch]$procdump, @@ -69,6 +70,7 @@ function Print-Usage() { Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]" Write-Host " -deployExtensions Deploy built vsixes" Write-Host " -binaryLog Create MSBuild binary log (short: -bl)" + Write-Host " -excludeCIBinaryLog When running on CI, allow no binary log (short: -nobl)" Write-Host "" Write-Host "Actions:" Write-Host " -restore Restore packages (short: -r)" @@ -173,7 +175,12 @@ function BuildSolution() { Write-Host "$($solution):" + if ($binaryLog -and $excludeCIBinaryLog) { + Write-Host "Invalid argument -binarylog(-bl) and -excludeCIBinaryLog(-nobl) cannot be set at the same time" + ExitWithExitCode 1 + } $bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" } + $projects = Join-Path $RepoRoot $solution $officialBuildId = if ($official) { $env:BUILD_BUILDNUMBER } else { "" } $toolsetBuildProj = InitializeToolset @@ -498,8 +505,10 @@ try { if ($testCompiler) { if (-not $noVisualStudio) { + TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $desktopTargetFramework TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $desktopTargetFramework } + TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $coreclrTargetFramework TestUsingNUnit -testProject "$RepoRoot\tests\FSharp.Compiler.UnitTests\FSharp.Compiler.UnitTests.fsproj" -targetFramework $coreclrTargetFramework } diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 2e53d45f49..0d23aab716 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -3,9 +3,9 @@ - + https://github.com/dotnet/arcade - ff5d4b6c8dbdaeacb6e6159d3f8185118dffd915 + f6192d1e284a08ac05041d05fa6e60dec74b24f5 diff --git a/eng/Versions.props b/eng/Versions.props index 5860bae01c..8b4df92674 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -174,6 +174,7 @@ 1.0.30 8.0.0-alpha 2.7.0 + 3.1.0 3.0.0-preview-27318-01 3.0.0-preview-27318-01 16.6.1 diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 88a758afb1..b9fe796f0d 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -127,29 +127,40 @@ endif() # Specify link flags +function(add_toolchain_linker_flag Flag) + set(Config "${ARGV1}") + set(CONFIG_SUFFIX "") + if (NOT Config STREQUAL "") + set(CONFIG_SUFFIX "_${Config}") + endif() + set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE) + set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE) +endfunction() + + if(TARGET_ARCH_NAME STREQUAL "armel") if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only - add_link_options("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") - add_link_options("-L${CROSS_ROOTFS}/lib") - add_link_options("-L${CROSS_ROOTFS}/usr/lib") - add_link_options("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") endif() elseif(TARGET_ARCH_NAME STREQUAL "arm64") if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only - add_link_options("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") - add_link_options("-L${CROSS_ROOTFS}/lib64") - add_link_options("-L${CROSS_ROOTFS}/usr/lib64") - add_link_options("-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") - - add_link_options("-Wl,--rpath-link=${CROSS_ROOTFS}/lib64") - add_link_options("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") - add_link_options("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") + + add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib64") + add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") + add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") endif() elseif(TARGET_ARCH_NAME STREQUAL "x86") - add_link_options(-m32) + add_toolchain_linker_flag(-m32) elseif(ILLUMOS) - add_link_options("-L${CROSS_ROOTFS}/lib/amd64") - add_link_options("-L${CROSS_ROOTFS}/usr/amd64/lib") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64") + add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/amd64/lib") endif() # Specify compile options diff --git a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj index 1877813d06..91ee080573 100644 --- a/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj +++ b/fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj @@ -10,7 +10,6 @@ $(DefineConstants);COMPILER $(DefineConstants);ENABLE_MONO_SUPPORT $(DefineConstants);NO_STRONG_NAMES - $(DefineConstants);LOCALIZATION_FSCOMP $(TargetFramework)\ $(TargetFramework)\ $(OtherFlags) /warnon:1182 @@ -20,6 +19,11 @@ true true embedded + 16.6 + $(MicrosoftBuildOverallPackagesVersion) + $(MicrosoftBuildOverallPackagesVersion) + $(MicrosoftBuildOverallPackagesVersion) + $(MicrosoftBuildOverallPackagesVersion) The F# compiler as library. For editors, for tools, for scripting. For you. @@ -289,6 +293,7 @@ ReferenceResolution/SimulatedMSBuildReferenceResolver.fs + CompilerLocation/CompilerLocationUtils.fs @@ -723,6 +728,9 @@ + + + diff --git a/fcs/netfx.props b/fcs/netfx.props index 064f29b180..45cd945c14 100644 --- a/fcs/netfx.props +++ b/fcs/netfx.props @@ -20,6 +20,8 @@ $(BaseFrameworkPathOverrideForMono)/4.6.2-api $(BaseFrameworkPathOverrideForMono)/4.7-api $(BaseFrameworkPathOverrideForMono)/4.7.1-api + $(BaseFrameworkPathOverrideForMono)/4.7.2-api + $(BaseFrameworkPathOverrideForMono)/4.8-api true diff --git a/global.json b/global.json index 219afd2284..085df85e57 100644 --- a/global.json +++ b/global.json @@ -9,7 +9,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20364.3", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20374.1", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } diff --git a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj index 10140a10d0..f38e6d7e8e 100644 --- a/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj +++ b/setup/Swix/Microsoft.FSharp.Compiler.MSBuild/Microsoft.FSharp.Compiler.MSBuild.csproj @@ -48,7 +48,7 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp\%(_XlfLanguages file source="$(ArtifactsBinDir)FSharp.Build\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Build.resources.dll" file source="$(ArtifactsBinDir)FSharp.Compiler.Interactive.Settings\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Compiler.Interactive.Settings.resources.dll" file source="$(ArtifactsBinDir)FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\%(_XlfLanguages.Identity)\FSharp.Compiler.Private.resources.dll" - file source="$(ArtifactsBinDir)FSharp.Core\$(Configuration)\net45\%(_XlfLanguages.Identity)\FSharp.Core.resources.dll" + file source="$(ArtifactsBinDir)FSharp.Core\$(Configuration)\netstandard2.0\%(_XlfLanguages.Identity)\FSharp.Core.resources.dll" ]]> @@ -98,9 +98,9 @@ folder "InstallDir:Common7\IDE\CommonExtensions\Microsoft\FSharp" file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\System.Runtime.CompilerServices.Unsafe.dll" file source="$(BinariesFolder)\FSharp.Compiler.Private\$(Configuration)\$(TargetFramework)\System.Threading.Tasks.Dataflow.dll" file source="$(BinariesFolder)\FSharp.Compiler.Server.Shared\$(Configuration)\$(TargetFramework)\FSharp.Compiler.Server.Shared.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 - file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 - file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.optdata" - file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\net45\FSharp.Core.sigdata" + file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\netstandard2.0\FSharp.Core.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 + file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\netstandard2.0\FSharp.Core.optdata" + file source="$(BinariesFolder)\FSharp.Core\$(Configuration)\netstandard2.0\FSharp.Core.sigdata" file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\FSharp.Build.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(BinariesFolder)\Microsoft.DotNet.DependencyManager\$(Configuration)\net472\Microsoft.DotNet.DependencyManager.dll" vs.file.ngen=yes vs.file.ngenArchitecture=All vs.file.ngenPriority=2 file source="$(BinariesFolder)\FSharp.Build\$(Configuration)\$(TargetFramework)\Microsoft.Build.Framework.dll" diff --git a/src/absil/ilnativeres.fs b/src/absil/ilnativeres.fs index 53321b9eef..96cff41513 100644 --- a/src/absil/ilnativeres.fs +++ b/src/absil/ilnativeres.fs @@ -279,8 +279,10 @@ type VersionHelper() = /// /// Parses a version string of the form "major [ '.' minor [ '.' build [ '.' revision ] ] ]". /// + /// /// The version string to parse. /// If parsing succeeds, the parsed version. Otherwise a version that represents as much of the input as could be parsed successfully. + /// /// True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise. static member TryParse(s: string, [] version: byref) = VersionHelper.TryParse (s, false, UInt16.MaxValue, true, ref version) @@ -289,12 +291,14 @@ type VersionHelper() = /// Parses a version string of the form "major [ '.' minor [ '.' ( '*' | ( build [ '.' ( '*' | revision ) ] ) ) ] ]" /// as accepted by System.Reflection.AssemblyVersionAttribute. /// + /// /// The version string to parse. /// Indicates whether or not a wildcard is accepted as the terminal component. /// /// If parsing succeeded, the parsed version. Otherwise a version instance with all parts set to zero. /// If contains * the version build and/or revision numbers are set to . /// + /// /// True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise. static member TryParseAssemblyVersion (s: string, allowWildcard: bool, [] version: byref) = @@ -306,6 +310,7 @@ type VersionHelper() = /// Parses a version string of the form "major [ '.' minor [ '.' ( '*' | ( build [ '.' ( '*' | revision ) ] ) ) ] ]" /// as accepted by System.Reflection.AssemblyVersionAttribute. /// + /// /// The version string to parse. /// Indicates whether or not we're parsing an assembly version string. If so, wildcards are accepted and each component must be less than 65535. /// The maximum value that a version component may have. @@ -314,6 +319,7 @@ type VersionHelper() = /// If parsing succeeded, the parsed version. When is true a version with values up to the first invalid character set. Otherwise a version with all parts set to zero. /// If contains * and wildcard is allowed the version build and/or revision numbers are set to . /// + /// /// True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise. static member private TryParse(s: string, allowWildcard: bool, maxValue: uint16, allowPartialParse: bool, [] version: byref) = Debug.Assert (not allowWildcard || maxValue < UInt16.MaxValue) diff --git a/src/fsharp/AttributeChecking.fs b/src/fsharp/AttributeChecking.fs index 075f70669a..f7554e44c3 100644 --- a/src/fsharp/AttributeChecking.fs +++ b/src/fsharp/AttributeChecking.fs @@ -299,7 +299,11 @@ let CheckFSharpAttributes (g:TcGlobals) attribs m = match namedArgs with | ExtractAttribNamedArg "IsError" (AttribBoolArg v) -> v | _ -> false - if isError && (not g.compilingFslib || n <> 1204) then ErrorD msg else WarnD msg + // If we are using a compiler that supports nameof then error 3501 is always suppressed. + // See attribute on FSharp.Core 'nameof' + if n = 3501 then CompleteD + elif isError && (not g.compilingFslib || n <> 1204) then ErrorD msg + else WarnD msg | _ -> CompleteD ) ++ (fun () -> diff --git a/src/fsharp/CheckFormatStrings.fs b/src/fsharp/CheckFormatStrings.fs index 4b09c88665..8ef9d1a68c 100644 --- a/src/fsharp/CheckFormatStrings.fs +++ b/src/fsharp/CheckFormatStrings.fs @@ -2,9 +2,11 @@ module internal FSharp.Compiler.CheckFormatStrings +open System.Text open FSharp.Compiler open FSharp.Compiler.AbstractIL.Internal.Library open FSharp.Compiler.ConstraintSolver +open FSharp.Compiler.Lib open FSharp.Compiler.NameResolution open FSharp.Compiler.Range open FSharp.Compiler.SyntaxTree @@ -47,31 +49,153 @@ let newInfo () = addZeros = false precision = false} -let parseFormatStringInternal (m:range) (g: TcGlobals) (context: FormatStringCheckContext option) fmt bty cty = - // Offset is used to adjust ranges depending on whether input string is regular, verbatim or triple-quote. - // We construct a new 'fmt' string since the current 'fmt' string doesn't distinguish between "\n" and escaped "\\n". - let (offset, fmt) = +let parseFormatStringInternal (m: range) (fragRanges: range list) (g: TcGlobals) isInterpolated isFormattableString (context: FormatStringCheckContext option) fmt printerArgTy printerResidueTy = + + // As background: the F# compiler tokenizes strings on the assumption that the only thing you need from + // them is the actual corresponding text, e.g. of a string literal. This means many different textual input strings + // in the input file correspond to the 'fmt' string we have here. + // + // The problem with this is that when we go to colorize the format specifiers in string, we need to do + // that with respect to the original string source text in order to lay down accurate colorizations. + // + // One approach would be to change the F# lexer to also crack every string in a more structured way, recording + // both the original source text and the actual string literal. However this would be invasive and possibly + // too expensive since the vast majority of strings don't need this treatment. + // + // So instead, for format strings alone - and only when processing in the IDE - we crack the "original" + // source of the string by going back and getting the format string from the input source file by using the + // relevant ranges + // + // For interpolated strings this may involve many fragments, e.g. + // $"abc %d{" + // "} def %s{" + // "} xyz" + // In this case we are given the range of each fragment. One annoying thing is that we must lop off the + // quotations, $, {, } symbols off the end of each string fragment. This information should probably + // be given to us by the lexer. + // + // Note this also means that when compiling (command-line or background IncrementalBuilder in the IDE + // there are no accurate intra-string ranges available for exact error message locations within the string. + // The 'm' range passed as an input is however accurate and covers the whole string. + /// + let fmt, fragments = + + //printfn "--------------------" + //printfn "context.IsSome = %b" context.IsSome + //printfn "fmt = <<<%s>>>" fmt + //printfn "isInterpolated = %b" isInterpolated + //printfn "fragRanges = %A" fragRanges + match context with - | Some context -> + | Some context when fragRanges.Length > 0 -> let sourceText = context.SourceText + //printfn "sourceText.IsSome = %b" sourceText.IsSome let lineStartPositions = context.LineStartPositions + //printfn "lineStartPositions.Length = %d" lineStartPositions.Length let length = sourceText.Length - if m.EndLine < lineStartPositions.Length then - let startIndex = lineStartPositions.[m.StartLine-1] + m.StartColumn - let endIndex = lineStartPositions.[m.EndLine-1] + m.EndColumn - 1 - if startIndex < length-3 && sourceText.SubTextEquals("\"\"\"", startIndex) then - (3, sourceText.GetSubTextString(startIndex + 3, endIndex - startIndex)) - elif startIndex < length-2 && sourceText.SubTextEquals("@\"", startIndex) then - (2, sourceText.GetSubTextString(startIndex + 2, endIndex + 1 - startIndex)) - else (1, sourceText.GetSubTextString(startIndex + 1, endIndex - startIndex)) - else (1, fmt) - | None -> (1, fmt) - - let len = String.length fmt + let numFrags = fragRanges.Length + let fmts = + [ for i, fragRange in List.indexed fragRanges do + let m = fragRange + //printfn "m.EndLine = %d" m.EndLine + if m.StartLine - 1 < lineStartPositions.Length && m.EndLine - 1 < lineStartPositions.Length then + let startIndex = lineStartPositions.[m.StartLine-1] + m.StartColumn + let endIndex = lineStartPositions.[m.EndLine-1] + m.EndColumn + // Note, some extra """ text may be included at end of these snippets, meaning CheckFormatString in the IDE + // may be using a slightly false format string to colorize the %d markers. This doesn't matter as there + // won't be relevant %d in these sections + // + // However we make an effort to remove these to keep the calls to GetSubStringText valid. So + // we work out how much extra text there is at the end of the last line of the fragment, + // which may or may not be quote markers. If there's no flex, we don't trim the quote marks + let endNextLineIndex = if m.EndLine < lineStartPositions.Length then lineStartPositions.[m.EndLine] else endIndex + let endIndexFlex = endNextLineIndex - endIndex + let mLength = endIndex - startIndex + + //let startIndex2 = if m.StartLine < lineStartPositions.Length then lineStartPositions.[m.StartLine] else startIndex + //let sourceLineFromOffset = sourceText.GetSubTextString(startIndex, (startIndex2 - startIndex)) + //printfn "i = %d, mLength = %d, endIndexFlex = %d, sourceLineFromOffset = <<<%s>>>" i mLength endIndexFlex sourceLineFromOffset + + if isInterpolated && i=0 && startIndex < length-4 && sourceText.SubTextEquals("$\"\"\"", startIndex) then + // Take of the ending triple quote or '{' + let fragLength = mLength - 4 - min endIndexFlex (if i = numFrags-1 then 3 else 1) + (4, sourceText.GetSubTextString(startIndex + 4, fragLength), m) + elif not isInterpolated && i=0 && startIndex < length-3 && sourceText.SubTextEquals("\"\"\"", startIndex) then + // Take of the ending triple quote or '{' + let fragLength = mLength - 2 - min endIndexFlex (if i = numFrags-1 then 3 else 1) + (3, sourceText.GetSubTextString(startIndex + 3, fragLength), m) + elif isInterpolated && i=0 && startIndex < length-3 && sourceText.SubTextEquals("$@\"", startIndex) then + // Take of the ending quote or '{', always length 1 + let fragLength = mLength - 3 - min endIndexFlex 1 + (3, sourceText.GetSubTextString(startIndex + 3, fragLength), m) + elif isInterpolated && i=0 && startIndex < length-3 && sourceText.SubTextEquals("@$\"", startIndex) then + // Take of the ending quote or '{', always length 1 + let fragLength = mLength - 3 - min endIndexFlex 1 + (3, sourceText.GetSubTextString(startIndex + 3, fragLength), m) + elif not isInterpolated && i=0 && startIndex < length-2 && sourceText.SubTextEquals("@\"", startIndex) then + // Take of the ending quote or '{', always length 1 + let fragLength = mLength - 2 - min endIndexFlex 1 + (2, sourceText.GetSubTextString(startIndex + 2, fragLength), m) + elif isInterpolated && i=0 && startIndex < length-2 && sourceText.SubTextEquals("$\"", startIndex) then + // Take of the ending quote or '{', always length 1 + let fragLength = mLength - 2 - min endIndexFlex 1 + (2, sourceText.GetSubTextString(startIndex + 2, fragLength), m) + elif isInterpolated && i <> 0 && startIndex < length-1 && sourceText.SubTextEquals("}", startIndex) then + // Take of the ending quote or '{', always length 1 + let fragLength = mLength - 1 - min endIndexFlex 1 + (1, sourceText.GetSubTextString(startIndex + 1, fragLength), m) + else + // Take of the ending quote or '{', always length 1 + let fragLength = mLength - 1 - min endIndexFlex 1 + (1, sourceText.GetSubTextString(startIndex + 1, fragLength), m) + else (1, fmt, m) ] + + //printfn "fmts = %A" fmts + + // Join the fragments with holes. Note this join is only used on the IDE path, + // the TypeChecker.fs does its own joining with the right alignments etc. substituted + // On the IDE path we don't do any checking of these in this file (some checking is + // done in TypeChecker.fs) so it's ok to join with just '%P()'. + let fmt = fmts |> List.map p23 |> String.concat "%P()" + let fragments, _ = + (0, fmts) ||> List.mapFold (fun i (offset, fmt, fragRange) -> + (i, offset, fragRange), i + fmt.Length + 4) // the '4' is the length of '%P()' joins + + //printfn "fmt2 = <<<%s>>>" fmt + //printfn "fragments = %A" fragments + fmt, fragments + | _ -> + // Don't muck with the fmt when there is no source code context to go get the original + // source code (i.e. when compiling or background checking) + fmt, [ (0, 1, m) ] + + let len = fmt.Length let specifierLocations = ResizeArray() - let rec parseLoop acc (i, relLine, relCol) = + // For FormattableString we collect a .NET Format String with {0} etc. replacing text. '%%' are replaced + // by '%', we check there are no '%' formats, and '{{' and '}}' are *not* replaced since the subsequent + // call to String.Format etc. will process them. + let dotnetFormatString = StringBuilder() + let appendToDotnetFormatString (s: string) = dotnetFormatString.Append(s) |> ignore + let mutable dotnetFormatStringInterpolationHoleCount = 0 + let percentATys = ResizeArray<_>() + + // fragLine, fragCol - track our location w.r.t. the marker for the start of this chunk + // + let rec parseLoop acc (i, fragLine, fragCol) fragments = + + // Check if we've moved into the next fragment. Note this will always activate on + // the first step, i.e. when i=0 + let (struct (fragLine, fragCol, fragments)) = + match fragments with + | (idx, fragOffset, fragRange: range)::rest when i >= idx -> + //printfn "i = %d, idx = %d, moving into next fragment at %A plus fragOffset %d" i idx fragRange fragOffset + struct (fragRange.StartLine, fragRange.StartColumn + fragOffset, rest) + + | _ -> struct (fragLine, fragCol, fragments) + //printfn "parseLoop: i = %d, fragLine = %d, fragCol = %d" i fragLine fragCol + if i >= len then let argtys = if acc |> List.forall (fun (p, _) -> p = None) then // without positional specifiers @@ -80,13 +204,14 @@ let parseFormatStringInternal (m:range) (g: TcGlobals) (context: FormatStringChe failwithf "%s" <| FSComp.SR.forPositionalSpecifiersNotPermitted() argtys elif System.Char.IsSurrogatePair(fmt,i) then - parseLoop acc (i+2, relLine, relCol+2) + appendToDotnetFormatString (fmt.[i..i+1]) + parseLoop acc (i+2, fragLine, fragCol+2) fragments else let c = fmt.[i] match c with | '%' -> - let startCol = relCol - let relCol = relCol+1 + let startFragCol = fragCol + let fragCol = fragCol+1 let i = i+1 if i >= len then failwithf "%s" <| FSComp.SR.forMissingFormatSpecifier() let info = newInfo() @@ -110,7 +235,7 @@ let parseFormatStringInternal (m:range) (g: TcGlobals) (context: FormatStringChe if info.numPrefixIfPos <> None then failwithf "%s" <| FSComp.SR.forPrefixFlagSpacePlusSetTwice() info.numPrefixIfPos <- Some ' ' flags(i+1) - | '#' -> failwithf "%s" <| FSComp.SR.forHashSpecifierIsInvalid() + | '#' -> failwithf "%s" <| FSComp.SR.forHashSpecifierIsInvalid() | _ -> i let rec digitsPrecision i = @@ -132,18 +257,18 @@ let parseFormatStringInternal (m:range) (g: TcGlobals) (context: FormatStringChe | '.' -> precision (i+1) | _ -> false,i - let rec digitsWidthAndPrecision i = + let rec digitsWidthAndPrecision n i = if i >= len then failwithf "%s" <| FSComp.SR.forBadPrecision() match fmt.[i] with - | c when System.Char.IsDigit c -> digitsWidthAndPrecision (i+1) - | _ -> optionalDotAndPrecision i + | c when System.Char.IsDigit c -> digitsWidthAndPrecision (n*10 + int c - int '0') (i+1) + | _ -> Some n, optionalDotAndPrecision i let widthAndPrecision i = if i >= len then failwithf "%s" <| FSComp.SR.forBadPrecision() match fmt.[i] with - | c when System.Char.IsDigit c -> false,digitsWidthAndPrecision i - | '*' -> true,optionalDotAndPrecision (i+1) - | _ -> false,optionalDotAndPrecision i + | c when System.Char.IsDigit c -> false,digitsWidthAndPrecision 0 i + | '*' -> true, (None, optionalDotAndPrecision (i+1)) + | _ -> false, (None, optionalDotAndPrecision i) let rec digitsPosition n i = if i >= len then failwithf "%s" <| FSComp.SR.forBadPrecision() @@ -161,15 +286,15 @@ let parseFormatStringInternal (m:range) (g: TcGlobals) (context: FormatStringChe let oldI = i let posi, i = position i - let relCol = relCol + i - oldI + let fragCol = fragCol + i - oldI let oldI = i let i = flags i - let relCol = relCol + i - oldI + let fragCol = fragCol + i - oldI let oldI = i - let widthArg,(precisionArg,i) = widthAndPrecision i - let relCol = relCol + i - oldI + let widthArg,(widthValue, (precisionArg,i)) = widthAndPrecision i + let fragCol = fragCol + i - oldI if i >= len then failwithf "%s" <| FSComp.SR.forBadPrecision() @@ -177,127 +302,185 @@ let parseFormatStringInternal (m:range) (g: TcGlobals) (context: FormatStringChe let acc = if widthArg then (Option.map ((+)1) posi, g.int_ty) :: acc else acc - let checkNoPrecision c = if info.precision then failwithf "%s" <| FSComp.SR.forFormatDoesntSupportPrecision(c.ToString()) - let checkNoZeroFlag c = if info.addZeros then failwithf "%s" <| FSComp.SR.forDoesNotSupportZeroFlag(c.ToString()) - let checkNoNumericPrefix c = if info.numPrefixIfPos <> None then - failwithf "%s" <| FSComp.SR.forDoesNotSupportPrefixFlag(c.ToString(), (Option.get info.numPrefixIfPos).ToString()) + let checkNoPrecision c = + if info.precision then failwithf "%s" <| FSComp.SR.forFormatDoesntSupportPrecision(c.ToString()) + + let checkNoZeroFlag c = + if info.addZeros then failwithf "%s" <| FSComp.SR.forDoesNotSupportZeroFlag(c.ToString()) + + let checkNoNumericPrefix c = + match info.numPrefixIfPos with + | Some n -> failwithf "%s" <| FSComp.SR.forDoesNotSupportPrefixFlag(c.ToString(), n.ToString()) + | None -> () let checkOtherFlags c = checkNoPrecision c checkNoZeroFlag c checkNoNumericPrefix c - let collectSpecifierLocation relLine relCol numStdArgs = - let numArgsForSpecifier = - numStdArgs + (if widthArg then 1 else 0) + (if precisionArg then 1 else 0) - match relLine with - | 0 -> + // Explicitly typed holes in interpolated strings "....%d{x}..." get additional '%P()' as a hole place marker + let skipPossibleInterpolationHole i = + if isInterpolated then + if i+1 < len && fmt.[i] = '%' && fmt.[i+1] = 'P' then + let i = i + 2 + if i+1 < len && fmt.[i] = '(' && fmt.[i+1] = ')' then + if isFormattableString then + failwithf "%s" <| FSComp.SR.forFormatInvalidForInterpolated4() + i + 2 + else + failwithf "%s" <| FSComp.SR.forFormatInvalidForInterpolated2() + else + failwithf "%s" <| FSComp.SR.forFormatInvalidForInterpolated() + else i + + // Implicitly typed holes in interpolated strings are translated to '... %P(...)...' in the + // type checker. They should always have '(...)' after for format string. + let requireAndSkipInterpolationHoleFormat i = + if i < len && fmt.[i] = '(' then + let i2 = fmt.IndexOf(")", i+1) + if i2 = -1 then + failwithf "%s" <| FSComp.SR.forFormatInvalidForInterpolated3() + else + let dotnetAlignment = match widthValue with None -> "" | Some w -> "," + (if info.leftJustify then "-" else "") + string w + let dotnetNumberFormat = match fmt.[i+1..i2-1] with "" -> "" | s -> ":" + s + appendToDotnetFormatString ("{" + string dotnetFormatStringInterpolationHoleCount + dotnetAlignment + dotnetNumberFormat + "}") + dotnetFormatStringInterpolationHoleCount <- dotnetFormatStringInterpolationHoleCount + 1 + i2+1 + else + failwithf "%s" <| FSComp.SR.forFormatInvalidForInterpolated3() + + let collectSpecifierLocation fragLine fragCol numStdArgs = + match context with + | Some _ -> + let numArgsForSpecifier = + numStdArgs + (if widthArg then 1 else 0) + (if precisionArg then 1 else 0) specifierLocations.Add( - (Range.mkFileIndexRange m.FileIndex - (Range.mkPos m.StartLine (startCol + offset)) - (Range.mkPos m.StartLine (relCol + offset + 1))), numArgsForSpecifier) - | _ -> - specifierLocations.Add( - (Range.mkFileIndexRange m.FileIndex - (Range.mkPos (m.StartLine + relLine) startCol) - (Range.mkPos (m.StartLine + relLine) (relCol + 1))), numArgsForSpecifier) + (Range.mkFileIndexRange m.FileIndex + (Range.mkPos fragLine startFragCol) + (Range.mkPos fragLine (fragCol + 1))), numArgsForSpecifier) + | None -> () let ch = fmt.[i] match ch with | '%' -> - collectSpecifierLocation relLine relCol 0 - parseLoop acc (i+1, relLine, relCol+1) + collectSpecifierLocation fragLine fragCol 0 + appendToDotnetFormatString "%" + parseLoop acc (i+1, fragLine, fragCol+1) fragments | ('d' | 'i' | 'o' | 'u' | 'x' | 'X') -> if info.precision then failwithf "%s" <| FSComp.SR.forFormatDoesntSupportPrecision(ch.ToString()) - collectSpecifierLocation relLine relCol 1 - parseLoop ((posi, mkFlexibleIntFormatTypar g m) :: acc) (i+1, relLine, relCol+1) + collectSpecifierLocation fragLine fragCol 1 + let i = skipPossibleInterpolationHole (i+1) + parseLoop ((posi, mkFlexibleIntFormatTypar g m) :: acc) (i, fragLine, fragCol+1) fragments | ('l' | 'L') -> if info.precision then failwithf "%s" <| FSComp.SR.forFormatDoesntSupportPrecision(ch.ToString()) - let relCol = relCol+1 + let fragCol = fragCol+1 let i = i+1 // "bad format specifier ... In F# code you can use %d, %x, %o or %u instead ..." if i >= len then - failwithf "%s" <| FSComp.SR.forBadFormatSpecifier() + raise (Failure (FSComp.SR.forBadFormatSpecifier())) // Always error for %l and %Lx failwithf "%s" <| FSComp.SR.forLIsUnnecessary() match fmt.[i] with | ('d' | 'i' | 'o' | 'u' | 'x' | 'X') -> - collectSpecifierLocation relLine relCol 1 - parseLoop ((posi, mkFlexibleIntFormatTypar g m) :: acc) (i+1, relLine, relCol+1) + collectSpecifierLocation fragLine fragCol 1 + let i = skipPossibleInterpolationHole (i+1) + parseLoop ((posi, mkFlexibleIntFormatTypar g m) :: acc) (i, fragLine, fragCol+1) fragments | _ -> failwithf "%s" <| FSComp.SR.forBadFormatSpecifier() | ('h' | 'H') -> failwithf "%s" <| FSComp.SR.forHIsUnnecessary() | 'M' -> - collectSpecifierLocation relLine relCol 1 - parseLoop ((posi, mkFlexibleDecimalFormatTypar g m) :: acc) (i+1, relLine, relCol+1) + collectSpecifierLocation fragLine fragCol 1 + let i = skipPossibleInterpolationHole (i+1) + parseLoop ((posi, mkFlexibleDecimalFormatTypar g m) :: acc) (i, fragLine, fragCol+1) fragments | ('f' | 'F' | 'e' | 'E' | 'g' | 'G') -> - collectSpecifierLocation relLine relCol 1 - parseLoop ((posi, mkFlexibleFloatFormatTypar g m) :: acc) (i+1, relLine, relCol+1) + collectSpecifierLocation fragLine fragCol 1 + let i = skipPossibleInterpolationHole (i+1) + parseLoop ((posi, mkFlexibleFloatFormatTypar g m) :: acc) (i, fragLine, fragCol+1) fragments | 'b' -> checkOtherFlags ch - collectSpecifierLocation relLine relCol 1 - parseLoop ((posi, g.bool_ty) :: acc) (i+1, relLine, relCol+1) + collectSpecifierLocation fragLine fragCol 1 + let i = skipPossibleInterpolationHole (i+1) + parseLoop ((posi, g.bool_ty) :: acc) (i, fragLine, fragCol+1) fragments | 'c' -> checkOtherFlags ch - collectSpecifierLocation relLine relCol 1 - parseLoop ((posi, g.char_ty) :: acc) (i+1, relLine, relCol+1) + collectSpecifierLocation fragLine fragCol 1 + let i = skipPossibleInterpolationHole (i+1) + parseLoop ((posi, g.char_ty) :: acc) (i, fragLine, fragCol+1) fragments | 's' -> checkOtherFlags ch - collectSpecifierLocation relLine relCol 1 - parseLoop ((posi, g.string_ty) :: acc) (i+1, relLine, relCol+1) + collectSpecifierLocation fragLine fragCol 1 + let i = skipPossibleInterpolationHole (i+1) + parseLoop ((posi, g.string_ty) :: acc) (i, fragLine, fragCol+1) fragments | 'O' -> checkOtherFlags ch - collectSpecifierLocation relLine relCol 1 - parseLoop ((posi, NewInferenceType ()) :: acc) (i+1, relLine, relCol+1) + collectSpecifierLocation fragLine fragCol 1 + let i = skipPossibleInterpolationHole (i+1) + parseLoop ((posi, NewInferenceType ()) :: acc) (i, fragLine, fragCol+1) fragments + + // residue of hole "...{n}..." in interpolated strings become %P(...) + | 'P' when isInterpolated -> + checkOtherFlags ch + let i = requireAndSkipInterpolationHoleFormat (i+1) + // Note, the fragCol doesn't advance at all as these are magically inserted. + parseLoop ((posi, NewInferenceType ()) :: acc) (i, fragLine, startFragCol) fragments | 'A' -> match info.numPrefixIfPos with | None // %A has BindingFlags=Public, %+A has BindingFlags=Public | NonPublic | Some '+' -> - collectSpecifierLocation relLine relCol 1 - parseLoop ((posi, NewInferenceType ()) :: acc) (i+1, relLine, relCol+1) - | Some _ -> failwithf "%s" <| FSComp.SR.forDoesNotSupportPrefixFlag(ch.ToString(), (Option.get info.numPrefixIfPos).ToString()) + collectSpecifierLocation fragLine fragCol 1 + let i = skipPossibleInterpolationHole (i+1) + let xty = NewInferenceType () + percentATys.Add(xty) + parseLoop ((posi, xty) :: acc) (i, fragLine, fragCol+1) fragments + | Some n -> failwithf "%s" <| FSComp.SR.forDoesNotSupportPrefixFlag(ch.ToString(), n.ToString()) | 'a' -> checkOtherFlags ch let xty = NewInferenceType () - let fty = bty --> (xty --> cty) - collectSpecifierLocation relLine relCol 2 - parseLoop ((Option.map ((+)1) posi, xty) :: (posi, fty) :: acc) (i+1, relLine, relCol+1) + let fty = printerArgTy --> (xty --> printerResidueTy) + collectSpecifierLocation fragLine fragCol 2 + let i = skipPossibleInterpolationHole (i+1) + parseLoop ((Option.map ((+)1) posi, xty) :: (posi, fty) :: acc) (i, fragLine, fragCol+1) fragments | 't' -> checkOtherFlags ch - collectSpecifierLocation relLine relCol 1 - parseLoop ((posi, bty --> cty) :: acc) (i+1, relLine, relCol+1) + collectSpecifierLocation fragLine fragCol 1 + let i = skipPossibleInterpolationHole (i+1) + parseLoop ((posi, printerArgTy --> printerResidueTy) :: acc) (i, fragLine, fragCol+1) fragments - | c -> failwithf "%s" <| FSComp.SR.forBadFormatSpecifierGeneral(String.make 1 c) + | c -> failwithf "%s" <| FSComp.SR.forBadFormatSpecifierGeneral(String.make 1 c) - | '\n' -> parseLoop acc (i+1, relLine+1, 0) - | _ -> parseLoop acc (i+1, relLine, relCol+1) + | '\n' -> + appendToDotnetFormatString fmt.[i..i] + parseLoop acc (i+1, fragLine+1, 0) fragments + | _ -> + appendToDotnetFormatString fmt.[i..i] + parseLoop acc (i+1, fragLine, fragCol+1) fragments - let results = parseLoop [] (0, 0, m.StartColumn) - results, Seq.toList specifierLocations + let results = parseLoop [] (0, 0, m.StartColumn) fragments + results, Seq.toList specifierLocations, dotnetFormatString.ToString(), percentATys.ToArray() -let ParseFormatString m g formatStringCheckContext fmt bty cty dty = - let argtys, specifierLocations = parseFormatStringInternal m g formatStringCheckContext fmt bty cty - let aty = List.foldBack (-->) argtys dty - let ety = mkRefTupledTy g argtys - (aty, ety), specifierLocations +let ParseFormatString m ms g isInterpolated isFormattableString formatStringCheckContext fmt printerArgTy printerResidueTy printerResultTy = + let argTys, specifierLocations, dotnetFormatString, percentATys = parseFormatStringInternal m ms g isInterpolated isFormattableString formatStringCheckContext fmt printerArgTy printerResidueTy + let printerTy = List.foldBack (-->) argTys printerResultTy + let printerTupleTy = mkRefTupledTy g argTys + argTys, printerTy, printerTupleTy, percentATys, specifierLocations, dotnetFormatString -let TryCountFormatStringArguments m g fmt bty cty = +let TryCountFormatStringArguments m g isInterpolated fmt printerArgTy printerResidueTy = try - let argtys, _specifierLocations = parseFormatStringInternal m g None fmt bty cty - Some argtys.Length + let argTys, _specifierLocations, _dotnetFormatString, _percentATys = parseFormatStringInternal m [] g isInterpolated false None fmt printerArgTy printerResidueTy + Some argTys.Length with _ -> None diff --git a/src/fsharp/CheckFormatStrings.fsi b/src/fsharp/CheckFormatStrings.fsi index 91cce79b7d..b96e8f88a8 100644 --- a/src/fsharp/CheckFormatStrings.fsi +++ b/src/fsharp/CheckFormatStrings.fsi @@ -9,9 +9,10 @@ module internal FSharp.Compiler.CheckFormatStrings open FSharp.Compiler open FSharp.Compiler.NameResolution +open FSharp.Compiler.Range open FSharp.Compiler.TypedTree open FSharp.Compiler.TcGlobals -val ParseFormatString : Range.range -> TcGlobals -> formatStringCheckContext: FormatStringCheckContext option -> fmt: string -> bty: TType -> cty: TType -> dty: TType -> (TType * TType) * (Range.range * int) list +val ParseFormatString : m: range -> fragmentRanges: range list -> g: TcGlobals -> isInterpolated: bool -> isFormattableString: bool -> formatStringCheckContext: FormatStringCheckContext option -> fmt: string -> bty: TType -> cty: TType -> dty: TType -> TType list * TType * TType * TType[] * (range * int) list * string -val TryCountFormatStringArguments : m:Range.range -> g:TcGlobals -> fmt:string -> bty:TType -> cty:TType -> int option +val TryCountFormatStringArguments: m: range -> g: TcGlobals -> isInterpolated: bool -> fmt:string -> bty:TType -> cty:TType -> int option diff --git a/src/fsharp/CompileOps.fs b/src/fsharp/CompileOps.fs index 3042ad88da..fbbda436e5 100644 --- a/src/fsharp/CompileOps.fs +++ b/src/fsharp/CompileOps.fs @@ -1166,6 +1166,10 @@ let OutputPhasedErrorR (os: StringBuilder) (err: PhasedDiagnostic) (canSuggestNa | Parser.TOKEN_EOF -> getErrorString("Parser.TOKEN.EOF") | Parser.TOKEN_CONST -> getErrorString("Parser.TOKEN.CONST") | Parser.TOKEN_FIXED -> getErrorString("Parser.TOKEN.FIXED") + | Parser.TOKEN_INTERP_STRING_BEGIN_END -> getErrorString("Parser.TOKEN.INTERP.STRING.BEGIN.END") + | Parser.TOKEN_INTERP_STRING_BEGIN_PART -> getErrorString("Parser.TOKEN.INTERP.STRING.BEGIN.PART") + | Parser.TOKEN_INTERP_STRING_PART -> getErrorString("Parser.TOKEN.INTERP.STRING.PART") + | Parser.TOKEN_INTERP_STRING_END -> getErrorString("Parser.TOKEN.INTERP.STRING.END") | unknown -> Debug.Assert(false, "unknown token tag") let result = sprintf "%+A" unknown @@ -2418,8 +2422,7 @@ type TcConfigBuilder = deterministic = false preferredUiLang = None lcid = None - // See bug 6071 for product banner spec - productNameForBannerText = FSComp.SR.buildProductName(FSharpEnvironment.FSharpBannerVersion) + productNameForBannerText = FSharpEnvironment.FSharpProductName showBanner = true showTimes = false showLoadedAssemblies = false @@ -3589,13 +3592,13 @@ let ParseOneInputLexbuf (tcConfig: TcConfig, lexResourceManager, conditionalComp use unwindbuildphase = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse try let skip = true in (* don't report whitespace from lexer *) - let lightSyntaxStatus = LightSyntaxStatus (tcConfig.ComputeLightSyntaxInitialStatus filename, true) - let lexargs = mkLexargs (filename, conditionalCompilationDefines@tcConfig.conditionalCompilationDefines, lightSyntaxStatus, lexResourceManager, [], errorLogger, tcConfig.pathMap) + let lightStatus = LightSyntaxStatus (tcConfig.ComputeLightSyntaxInitialStatus filename, true) + let lexargs = mkLexargs (conditionalCompilationDefines@tcConfig.conditionalCompilationDefines, lightStatus, lexResourceManager, [], errorLogger, tcConfig.pathMap) let shortFilename = SanitizeFileName filename tcConfig.implicitIncludeDir let input = Lexhelp.usingLexbufForParsing (lexbuf, filename) (fun lexbuf -> if verbose then dprintn ("Parsing... "+shortFilename) - let tokenizer = LexFilter.LexFilter(lightSyntaxStatus, tcConfig.compilingFslib, Lexer.token lexargs skip, lexbuf) + let tokenizer = LexFilter.LexFilter(lightStatus, tcConfig.compilingFslib, Lexer.token lexargs skip, lexbuf) if tcConfig.tokenizeOnly then while true do @@ -3701,12 +3704,17 @@ type TcAssemblyResolutions(tcConfig: TcConfig, results: AssemblyResolution list, static member GetAllDllReferences (tcConfig: TcConfig) = [ let primaryReference = tcConfig.PrimaryAssemblyDllReference() - //yield primaryReference + + let assumeDotNetFramework = primaryReference.SimpleAssemblyNameIs("mscorlib") if not tcConfig.compilingFslib then yield tcConfig.CoreLibraryDllReference() + if assumeDotNetFramework then + // When building desktop then we need these additional dependencies + yield AssemblyReference(rangeStartup, "System.Numerics.dll", None) + yield AssemblyReference(rangeStartup, "System.dll", None) + yield AssemblyReference(rangeStartup, "netstandard.dll", None) - let assumeDotNetFramework = primaryReference.SimpleAssemblyNameIs("mscorlib") if tcConfig.framework then for s in defaultReferencesForScriptsAndOutOfProjectSources tcConfig.useFsiAuxLib assumeDotNetFramework tcConfig.useSdkRefs do yield AssemblyReference(rangeStartup, (if s.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) then s else s+".dll"), None) @@ -4108,7 +4116,6 @@ and [] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse | None -> tcImports.ImplicitLoadIfAllowed(ctok, m, assemblyName, lookupOnly) look tcImports - member tcImports.FindDllInfo (ctok, m, assemblyName) = match tcImports.TryFindDllInfo (ctok, m, assemblyName, lookupOnly=false) with @@ -4785,7 +4792,7 @@ and [] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse // If the user is asking for the default framework then also try to resolve other implicit assemblies as they are discovered. // Using this flag to mean 'allow implicit discover of assemblies'. let tcConfig = tcConfigP.Get ctok - if not lookupOnly && tcConfig.implicitlyResolveAssemblies then + if not lookupOnly && tcConfig.implicitlyResolveAssemblies then let tryFile speculativeFileName = let foundFile = tcImports.TryResolveAssemblyReference (ctok, AssemblyReference (m, speculativeFileName, None), ResolveAssemblyReferenceMode.Speculative) match foundFile with @@ -4826,7 +4833,7 @@ and [] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse ResultD [assemblyResolution] | None -> #if NO_MSBUILD_REFERENCE_RESOLUTION - try + try ResultD [tcConfig.ResolveLibWithDirectories assemblyReference] with e -> ErrorD e @@ -4847,7 +4854,7 @@ and [] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse ResultD [resolved] | None -> ErrorD(AssemblyNotResolved(assemblyReference.Text, assemblyReference.Range)) - else + else // This is a previously unencountered assembly. Resolve it and add it to the list. // But don't cache resolution failures because the assembly may appear on the disk later. let resolved, unresolved = TcConfig.TryResolveLibsUsingMSBuildRules(tcConfig, [ assemblyReference ], assemblyReference.Range, mode) @@ -4862,9 +4869,7 @@ and [] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse // Note, if mode=ResolveAssemblyReferenceMode.Speculative and the resolution failed then TryResolveLibsUsingMSBuildRules returns // the empty list and we convert the failure into an AssemblyNotResolved here. ErrorD(AssemblyNotResolved(assemblyReference.Text, assemblyReference.Range)) - -#endif - +#endif member tcImports.ResolveAssemblyReference(ctok, assemblyReference, mode) : AssemblyResolution list = CommitOperationResult(tcImports.TryResolveAssemblyReference(ctok, assemblyReference, mode)) diff --git a/src/fsharp/CompileOps.fsi b/src/fsharp/CompileOps.fsi index b6dff421ab..f5d59f0079 100644 --- a/src/fsharp/CompileOps.fsi +++ b/src/fsharp/CompileOps.fsi @@ -673,6 +673,8 @@ type TcImports = member ReportUnresolvedAssemblyReferences: UnresolvedAssemblyReference list -> unit member SystemRuntimeContainsType: string -> bool + member internal Base: TcImports option + static member BuildFrameworkTcImports : CompilationThreadToken * TcConfigProvider * AssemblyResolution list * AssemblyResolution list -> Cancellable static member BuildNonFrameworkTcImports : CompilationThreadToken * TcConfigProvider * TcGlobals * TcImports * AssemblyResolution list * UnresolvedAssemblyReference list -> Cancellable static member BuildTcImports : CompilationThreadToken * TcConfigProvider -> Cancellable diff --git a/src/fsharp/CompileOptions.fs b/src/fsharp/CompileOptions.fs index 4b5ff777e6..a06169304f 100644 --- a/src/fsharp/CompileOptions.fs +++ b/src/fsharp/CompileOptions.fs @@ -983,7 +983,9 @@ let advancedFlagsFsc tcConfigB = yield CompilerOption ("staticlink", tagFile, - OptionString (fun s -> tcConfigB.extraStaticLinkRoots <- tcConfigB.extraStaticLinkRoots @ [s]), None, + OptionString (fun s -> + tcConfigB.extraStaticLinkRoots <- tcConfigB.extraStaticLinkRoots @ [s] + tcConfigB.implicitlyResolveAssemblies <- true), None, Some (FSComp.SR.optsStaticlink())) #if ENABLE_MONO_SUPPORT diff --git a/src/fsharp/ErrorLogger.fs b/src/fsharp/ErrorLogger.fs old mode 100755 new mode 100644 index 83ff5dba6d..c7974e5c20 --- a/src/fsharp/ErrorLogger.fs +++ b/src/fsharp/ErrorLogger.fs @@ -702,4 +702,9 @@ let internal tryLanguageFeatureErrorRecover langVersion langFeature m = | None -> () let internal tryLanguageFeatureErrorOption langVersion langFeature m = - tryLanguageFeatureErrorAux langVersion langFeature m \ No newline at end of file + tryLanguageFeatureErrorAux langVersion langFeature m + +let internal languageFeatureNotSupportedInLibraryError (langVersion: LanguageVersion) (langFeature: LanguageFeature) (m: range) = + let featureStr = langVersion.GetFeatureString langFeature + let suggestedVersionStr = langVersion.GetFeatureVersionString langFeature + error (Error(FSComp.SR.chkFeatureNotSupportedInLibrary(featureStr, suggestedVersionStr), m)) diff --git a/src/fsharp/FSComp.txt b/src/fsharp/FSComp.txt index e3264b5ef7..2733248bea 100644 --- a/src/fsharp/FSComp.txt +++ b/src/fsharp/FSComp.txt @@ -34,8 +34,6 @@ tupleRequiredInAbstractMethod,"\nA tuple type is required for one or more argume 203,buildInvalidWarningNumber,"Invalid warning number '%s'" 204,buildInvalidVersionString,"Invalid version string '%s'" 205,buildInvalidVersionFile,"Invalid version file '%s'" -buildProductName,"Microsoft (R) F# Compiler version %s" -buildProductNameCommunity,"F# Compiler for F# %s" 206,buildProblemWithFilename,"Problem with filename '%s': %s" 207,buildNoInputsSpecified,"No inputs specified" 209,buildPdbRequiresDebug,"The '--pdb' option requires the '--debug' option to be used" @@ -716,7 +714,7 @@ tcUnnamedArgumentsDoNotFormPrefix,"The unnamed arguments do not form a prefix of 871,tcConstructorsIllegalForThisType,"Constructors cannot be defined for this type" 872,tcRecursiveBindingsWithMembersMustBeDirectAugmentation,"Recursive bindings that include member specifications can only occur as a direct augmentation of a type" 873,tcOnlySimplePatternsInLetRec,"Only simple variable patterns can be bound in 'let rec' constructs" -874,tcOnlyRecordFieldsAndSimpleLetCanBeMutable,"Only record fields and simple, non-recursive 'let' bindings may be marked mutable" +874,tcOnlyRecordFieldsAndSimpleLetCanBeMutable,"Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces" 875,tcMemberIsNotSufficientlyGeneric,"This member is not sufficiently generic" 876,tcLiteralAttributeRequiresConstantValue,"A declaration may only be the [] attribute if a constant value is also given, e.g. 'val x : int = 1'" 877,tcValueInSignatureRequiresLiteralAttribute,"A declaration may only be given a value in a signature if the declaration has the [] attribute" @@ -1492,8 +1490,8 @@ notAFunctionButMaybeDeclaration,"This value is not a function and cannot be appl 3350,chkFeatureNotLanguageSupported,"Feature '%s' is not available in F# %s. Please use language version %s or greater." 3351,chkFeatureNotRuntimeSupported,"Feature '%s' is not supported by target runtime." 3352,typrelInterfaceMemberNoMostSpecificImplementation,"Interface member '%s' does not have a most specific implementation." +3353,chkFeatureNotSupportedInLibrary,"Feature '%s' requires the F# library for language version %s or greater." useSdkRefs,"Use reference assemblies for .NET framework references when available (Enabled by default)." -fSharpBannerVersion,"%s for F# %s" optsLangVersion,"Display the allowed values for language version, specify language version such as 'latest' or 'preview'" optsSupportedLangVersions,"Supported language versions:" nativeResourceFormatError,"Stream does not begin with a null resource and is not in '.RES' format." @@ -1512,8 +1510,27 @@ featureFixedIndexSlice3d4d,"fixed-index slice 3d/4d" featureAndBang,"applicative computation expressions" featureNullableOptionalInterop,"nullable optional interop" featureDefaultInterfaceMemberConsumption,"default interface member consumption" +featureStringInterpolation,"string interpolation" featureWitnessPassing,"witness passing for trait constraints in F# quotations" 3353,fsiInvalidDirective,"Invalid directive '#%s %s'" 3360,typrelInterfaceWithConcreteAndVariable,"'%s' cannot implement the interface '%s' with the two instantiations '%s' and '%s' because they may unify." 3361,typrelInterfaceWithConcreteAndVariableObjectExpression,"You cannot implement the interface '%s' with the two instantiations '%s' and '%s' because they may unify." featureInterfacesWithMultipleGenericInstantiation,"interfaces with multiple generic instantiation" +3362,tcLiteralFieldAssignmentWithArg,"Cannot assign '%s' to a value marked literal" +3363,tcLiteralFieldAssignmentNoArg,"Cannot assign a value to another value marked literal" +forFormatInvalidForInterpolated,"Interpolated strings may not use '%%' format specifiers unless each is given an expression, e.g. '%%d{{1+1}}'." +forFormatInvalidForInterpolated2,".NET-style format specifiers such as '{{x,3}}' or '{{x:N5}}' may not be mixed with '%%' format specifiers." +forFormatInvalidForInterpolated3,"The '%%P' specifier may not be used explicitly." +forFormatInvalidForInterpolated4,"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." +3371,tcInterpolationMixedWithPercent,"Mismatch in interpolated string. Interpolated strings may not use '%%' format specifiers unless each is given an expression, e.g. '%%d{{1+1}}'" +3372,tcInvalidAlignmentInInterpolatedString,"Invalid alignment in interpolated string" +3373,lexSingleQuoteInSingleQuote,"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." +3374,lexTripleQuoteInTripleQuote,"Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression." +3376,tcUnableToParseInterpolatedString,"Invalid interpolated string. %s" +3377,lexByteStringMayNotBeInterpolated,"a byte string may not be interpolated" +3378,parsEofInInterpolatedStringFill,"Incomplete interpolated string expression fill begun at or before here" +3379,parsEofInInterpolatedString,"Incomplete interpolated string begun at or before here" +3380,parsEofInInterpolatedVerbatimString,"Incomplete interpolated verbatim string begun at or before here" +3381,parsEofInInterpolatedTripleQuoteString,"Incomplete interpolated triple-quote string begun at or before here" +3382,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) diff --git a/src/fsharp/FSStrings.resx b/src/fsharp/FSStrings.resx index e593da16d0..288a96c8ef 100644 --- a/src/fsharp/FSStrings.resx +++ b/src/fsharp/FSStrings.resx @@ -441,6 +441,18 @@ keyword 'fixed' + + interpolated string + + + interpolated string (first part) + + + interpolated string (part) + + + interpolated string (final part) + keyword 'constraint' diff --git a/src/fsharp/FSharp.Build/FSBuild.txt b/src/fsharp/FSharp.Build/FSBuild.txt index 47d1ee7431..b429a789bd 100644 --- a/src/fsharp/FSharp.Build/FSBuild.txt +++ b/src/fsharp/FSharp.Build/FSBuild.txt @@ -1,3 +1,6 @@ # FSharp.Build resource strings toolpathUnknown,"ToolPath is unknown; specify the path to the tool." -fSharpBannerVersion,"%s for F# %s" +mapSourceRootsContainsDuplicate,"SourceRoot contains duplicate items '%s' with conflicting metadata '%s': '%s' and '%s'" +mapSourceRootsPathMustEndWithSlashOrBackslash,"SourceRoot paths are required to end with a slash or backslash: '%s'" +mapSourceRootsNoTopLevelSourceRoot,"SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true" +mapSourceRootsNoSuchTopLevelSourceRoot,"The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '%s'" \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/FSharp.Build.fsproj b/src/fsharp/FSharp.Build/FSharp.Build.fsproj index 2960aec351..c62b2c2d93 100644 --- a/src/fsharp/FSharp.Build/FSharp.Build.fsproj +++ b/src/fsharp/FSharp.Build/FSharp.Build.fsproj @@ -18,6 +18,7 @@ + @@ -27,6 +28,7 @@ + @@ -36,6 +38,8 @@ $(FSharpCoreShippedPackageVersion) {{FSharpCorePreviewPackageVersion}} $(FSharpCorePreviewPackageVersion) + {{FSCorePackageVersion}} + $(FSCorePackageVersion) diff --git a/src/fsharp/FSharp.Build/MapSourceRoots.fs b/src/fsharp/FSharp.Build/MapSourceRoots.fs new file mode 100644 index 0000000000..84310352b8 --- /dev/null +++ b/src/fsharp/FSharp.Build/MapSourceRoots.fs @@ -0,0 +1,191 @@ +namespace FSharp.Build + +open System +open System.IO +open Microsoft.Build.Framework +open Microsoft.Build.Utilities +open System.Collections.Generic + +(* + This type is a translation of the matching MapSourceRoots task in Roslyn, + which is planned to move to a shared location at some point in the future. + + Until then, this version will be used. The exact source used is: + https://github.com/dotnet/roslyn/blob/69d3fb733e6c74a41c118bf905739163cf5aef2a/src/Compilers/Core/MSBuildTask/MapSourceRoots.cs, + with matching targets usage at: + https://github.com/dotnet/roslyn/blob/69d3fb733e6c74a41c118bf905739163cf5aef2a/src/Compilers/Core/MSBuildTask/Microsoft.Managed.Core.targets#L79-L127 + +*) + +module Utilities = + /// + /// Copied from msbuild. ItemSpecs are normalized using this method. + /// + let FixFilePath (path: string) = + if String.IsNullOrEmpty(path) || Path.DirectorySeparatorChar = '\\' + then path + else path.Replace('\\', '/'); + +/// +/// Given a list of SourceRoot items produces a list of the same items with added MappedPath metadata that +/// contains calculated deterministic source path for each SourceRoot. +/// +/// +/// Does not perform any path validation. +/// +/// The MappedPath is either the path (ItemSpec) itself, when is false, +/// or a calculated deterministic source path (starting with prefix '/_/', '/_1/', etc.), otherwise. +/// +type MapSourceRoots () = + inherit Task () + + static let MappedPath = "MappedPath" + static let SourceControl = "SourceControl" + static let NestedRoot = "NestedRoot" + static let ContainingRoot = "ContainingRoot" + static let RevisionId = "RevisionId" + static let SourceLinkUrl = "SourceLinkUrl" + static let knownMetadataNames = + [ + SourceControl + RevisionId + NestedRoot + ContainingRoot + MappedPath + SourceLinkUrl + ] + + static let (|NullOrEmpty|HasValue|) (s: string) = if String.IsNullOrEmpty s then NullOrEmpty else HasValue s + static let ensureEndsWithSlash (path: string) = + if path.EndsWith "/" + then path + else path + "/" + + static let endsWithDirectorySeparator (path: string) = + if path.Length = 0 + then false + else + let endChar = path.[path.Length - 1] + endChar = Path.DirectorySeparatorChar || endChar = Path.AltDirectorySeparatorChar + + static let reportConflictingWellKnownMetadata (log: TaskLoggingHelper) (l: ITaskItem) (r: ITaskItem) = + for name in knownMetadataNames do + match l.GetMetadata name, r.GetMetadata name with + | HasValue lValue, HasValue rValue when lValue <> rValue -> + log.LogWarning(FSBuild.SR.mapSourceRootsContainsDuplicate(r.ItemSpec, name, lValue, rValue)) + | _, _ -> () + + + static member PerformMapping (log: TaskLoggingHelper) (sourceRoots: ITaskItem []) deterministic = + let mappedSourceRoots = ResizeArray<_>() + let rootByItemSpec = Dictionary(); + + for sourceRoot in sourceRoots do + // The SourceRoot is required to have a trailing directory separator. + // We do not append one implicitly as we do not know which separator to append on Windows. + // The usage of SourceRoot might be sensitive to what kind of separator is used (e.g. in SourceLink where it needs + // to match the corresponding separators used in paths given to the compiler). + if not (endsWithDirectorySeparator sourceRoot.ItemSpec) + then + log.LogError(FSBuild.SR.mapSourceRootsPathMustEndWithSlashOrBackslash sourceRoot.ItemSpec) + + match rootByItemSpec.TryGetValue sourceRoot.ItemSpec with + | true, existingRoot -> + reportConflictingWellKnownMetadata log existingRoot sourceRoot + sourceRoot.CopyMetadataTo existingRoot + | false, _ -> + rootByItemSpec.[sourceRoot.ItemSpec] <- sourceRoot + mappedSourceRoots.Add sourceRoot + + if log.HasLoggedErrors + then None + else + if deterministic + then + let topLevelMappedPaths = Dictionary<_,_>() + let setTopLevelMappedPaths isSourceControlled = + + let mapNestedRootIfEmpty (root: ITaskItem) = + let localPath = root.ItemSpec + match root.GetMetadata NestedRoot with + | NullOrEmpty -> + // root isn't nested + if topLevelMappedPaths.ContainsKey(localPath) + then + log.LogError(FSBuild.SR.mapSourceRootsContainsDuplicate(localPath, NestedRoot, "", "")); + else + let index = topLevelMappedPaths.Count; + let mappedPath = "/_" + (if index = 0 then "" else string index) + "/" + topLevelMappedPaths.[localPath] <- mappedPath + root.SetMetadata(MappedPath, mappedPath) + | HasValue _ -> () + + for root in mappedSourceRoots do + match root.GetMetadata SourceControl with + | HasValue v when isSourceControlled -> mapNestedRootIfEmpty root + | NullOrEmpty when not isSourceControlled -> mapNestedRootIfEmpty root + | _ -> () + + // assign mapped paths to process source-controlled top-level roots first: + setTopLevelMappedPaths true + + // then assign mapped paths to other source-controlled top-level roots: + setTopLevelMappedPaths false + + if topLevelMappedPaths.Count = 0 + then + log.LogError(FSBuild.SR.mapSourceRootsNoTopLevelSourceRoot ()) + else + // finally, calculate mapped paths of nested roots: + for root in mappedSourceRoots do + match root.GetMetadata NestedRoot with + | HasValue nestedRoot -> + match root.GetMetadata ContainingRoot with + | HasValue containingRoot -> + // The value of ContainingRoot metadata is a file path that is compared with ItemSpec values of SourceRoot items. + // Since the paths in ItemSpec have backslashes replaced with slashes on non-Windows platforms we need to do the same for ContainingRoot. + match topLevelMappedPaths.TryGetValue(Utilities.FixFilePath(containingRoot)) with + | true, mappedTopLevelPath -> + root.SetMetadata(MappedPath, mappedTopLevelPath + ensureEndsWithSlash(nestedRoot.Replace('\\', '/'))); + | false, _ -> + log.LogError(FSBuild.SR.mapSourceRootsNoSuchTopLevelSourceRoot containingRoot) + | NullOrEmpty -> + log.LogError(FSBuild.SR.mapSourceRootsNoSuchTopLevelSourceRoot "") + | NullOrEmpty -> () + else + for root in mappedSourceRoots do + root.SetMetadata(MappedPath, root.ItemSpec) + + if log.HasLoggedErrors then None else Some (mappedSourceRoots.ToArray()) + + + /// + /// SourceRoot items with the following optional well-known metadata: + /// + /// SourceControlIndicates name of the source control system the source root is tracked by (e.g. Git, TFVC, etc.), if any. + /// NestedRootIf a value is specified the source root is nested (e.g. git submodule). The value is a path to this root relative to the containing root. + /// ContainingRootIdentifies another source root item that this source root is nested under. + /// + /// + [] + member val SourceRoots: ITaskItem[] = null with get, set + + /// + /// True if the mapped paths should be deterministic. + /// + member val Deterministic = false with get, set + + /// + /// SourceRoot items with MappedPath metadata set. + /// Items listed in that have the same ItemSpec will be merged into a single item in this list. + /// + [] + member val MappedSourceRoots: ITaskItem[] = null with get, set + + override this.Execute() = + match MapSourceRoots.PerformMapping this.Log this.SourceRoots this.Deterministic with + | None -> + false + | Some mappings -> + this.MappedSourceRoots <- mappings + true \ No newline at end of file diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.props b/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.props index f8bae0ab9a..3a51d7287a 100644 --- a/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.props +++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.props @@ -74,12 +74,32 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and 4.4.0 - {{FSharpCoreShippedPackageVersion}} - {{FSharpCorePreviewPackageVersion}} $(DefaultValueTuplePackageVersion) - $(DefaultFSharpCorePackageVersion) + {{FSharpCoreShippedPackageVersion}} + {{FSharpCorePreviewPackageVersion}} + {{FSCorePackageVersion}} + + + + + + + + + + + + - - - - true diff --git a/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.targets b/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.targets index de13273e2a..a04f7854de 100644 --- a/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.targets +++ b/src/fsharp/FSharp.Build/Microsoft.FSharp.NetSdk.targets @@ -12,7 +12,8 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and --> - + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) @@ -52,10 +53,8 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and $(TargetsForTfmSpecificContentInPackage);PackageFSharpDesignTimeTools - - - $(DefaultFSharpCorePreviewPackageVersion) - $(RestoreSources); https://dotnet.myget.org/F/fsharp/api/v3/index.json + + $(RestoreAdditionalProjectSources);https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json @@ -92,16 +91,74 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and $(FSharpToolsDirectory)/$(FSharpDesignTimeProtocol)/%(_ResolvedOutputFiles.NearestTargetFramework)/%(_ResolvedOutputFiles.FileName)%(_ResolvedOutputFiles.Extension) - + + + + + + true + + + + + + + + <_MappedSourceRoot Remove="@(_MappedSourceRoot)" /> + + + + + - - - - + + + + + true + + + + diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.cs.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.cs.xlf index e34a840079..bd142be883 100644 --- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.cs.xlf +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.cs.xlf @@ -2,9 +2,24 @@ - - {0} for F# {1} - {0} pro F# {1} + + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + + + + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + + + + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + + + + SourceRoot paths are required to end with a slash or backslash: '{0}' + SourceRoot paths are required to end with a slash or backslash: '{0}' diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.de.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.de.xlf index 8014aa4559..8854852659 100644 --- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.de.xlf +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.de.xlf @@ -2,9 +2,24 @@ - - {0} for F# {1} - {0} für F# {1} + + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + + + + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + + + + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + + + + SourceRoot paths are required to end with a slash or backslash: '{0}' + SourceRoot paths are required to end with a slash or backslash: '{0}' diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.es.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.es.xlf index e70e526aa7..180307863c 100644 --- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.es.xlf +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.es.xlf @@ -2,9 +2,24 @@ - - {0} for F# {1} - {0} para F# {1} + + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + + + + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + + + + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + + + + SourceRoot paths are required to end with a slash or backslash: '{0}' + SourceRoot paths are required to end with a slash or backslash: '{0}' diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.fr.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.fr.xlf index 967ceecc6e..cd98018c01 100644 --- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.fr.xlf +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.fr.xlf @@ -2,9 +2,24 @@ - - {0} for F# {1} - {0} pour F# {1} + + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + + + + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + + + + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + + + + SourceRoot paths are required to end with a slash or backslash: '{0}' + SourceRoot paths are required to end with a slash or backslash: '{0}' diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.it.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.it.xlf index a0c02bd765..a694adff73 100644 --- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.it.xlf +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.it.xlf @@ -2,9 +2,24 @@ - - {0} for F# {1} - {0} per F# {1} + + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + + + + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + + + + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + + + + SourceRoot paths are required to end with a slash or backslash: '{0}' + SourceRoot paths are required to end with a slash or backslash: '{0}' diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ja.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ja.xlf index 558d9a4705..c4638dc9e5 100644 --- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ja.xlf +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ja.xlf @@ -2,9 +2,24 @@ - - {0} for F# {1} - F# {1} のための {0} + + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + + + + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + + + + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + + + + SourceRoot paths are required to end with a slash or backslash: '{0}' + SourceRoot paths are required to end with a slash or backslash: '{0}' diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ko.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ko.xlf index d007db16c3..767de522e9 100644 --- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ko.xlf +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ko.xlf @@ -2,9 +2,24 @@ - - {0} for F# {1} - F# {1}용 {0} + + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + + + + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + + + + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + + + + SourceRoot paths are required to end with a slash or backslash: '{0}' + SourceRoot paths are required to end with a slash or backslash: '{0}' diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pl.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pl.xlf index 565fdd2b8d..91acbeb662 100644 --- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pl.xlf +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pl.xlf @@ -2,9 +2,24 @@ - - {0} for F# {1} - {0} dla języka F# {1} + + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + + + + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + + + + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + + + + SourceRoot paths are required to end with a slash or backslash: '{0}' + SourceRoot paths are required to end with a slash or backslash: '{0}' diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pt-BR.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pt-BR.xlf index 2d6ac4cf6c..2f4a683f5a 100644 --- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pt-BR.xlf +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.pt-BR.xlf @@ -2,9 +2,24 @@ - - {0} for F# {1} - {0} para F# {1} + + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + + + + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + + + + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + + + + SourceRoot paths are required to end with a slash or backslash: '{0}' + SourceRoot paths are required to end with a slash or backslash: '{0}' diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ru.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ru.xlf index 23dc6215bd..e960f420a6 100644 --- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ru.xlf +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.ru.xlf @@ -2,9 +2,24 @@ - - {0} for F# {1} - {0} для F# {1} + + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + + + + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + + + + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + + + + SourceRoot paths are required to end with a slash or backslash: '{0}' + SourceRoot paths are required to end with a slash or backslash: '{0}' diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.tr.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.tr.xlf index b56fc71590..3a8ad0841e 100644 --- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.tr.xlf +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.tr.xlf @@ -2,9 +2,24 @@ - - {0} for F# {1} - F# {1} için {0} + + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + + + + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + + + + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + + + + SourceRoot paths are required to end with a slash or backslash: '{0}' + SourceRoot paths are required to end with a slash or backslash: '{0}' diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hans.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hans.xlf index f514600395..a4e15083f2 100644 --- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hans.xlf +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hans.xlf @@ -2,9 +2,24 @@ - - {0} for F# {1} - F# {1} 的 {0} + + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + + + + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + + + + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + + + + SourceRoot paths are required to end with a slash or backslash: '{0}' + SourceRoot paths are required to end with a slash or backslash: '{0}' diff --git a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hant.xlf b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hant.xlf index e3f63746fa..6b18b193fe 100644 --- a/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hant.xlf +++ b/src/fsharp/FSharp.Build/xlf/FSBuild.txt.zh-Hant.xlf @@ -2,9 +2,24 @@ - - {0} for F# {1} - F # {1} 的 {0} + + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + SourceRoot contains duplicate items '{0}' with conflicting metadata '{1}': '{2}' and '{3}' + + + + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + The value of SourceRoot.ContainingRoot was not found in SourceRoot items, or the corresponding item is not a top-level source root: '{0}' + + + + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + SourceRoot items must include at least one top-level (not nested) item when DeterministicSourcePaths is true + + + + SourceRoot paths are required to end with a slash or backslash: '{0}' + SourceRoot paths are required to end with a slash or backslash: '{0}' diff --git a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharp.Compiler.Private.Scripting.fsproj b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharp.Compiler.Private.Scripting.fsproj index 58472c59e3..3adf2846f7 100644 --- a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharp.Compiler.Private.Scripting.fsproj +++ b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharp.Compiler.Private.Scripting.fsproj @@ -13,7 +13,8 @@ - + + diff --git a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharp.Compiler.Private.Scripting.nuspec b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharp.Compiler.Private.Scripting.nuspec index 0e52e1b430..0048526226 100644 --- a/src/fsharp/FSharp.Compiler.Private.Scripting/FSharp.Compiler.Private.Scripting.nuspec +++ b/src/fsharp/FSharp.Compiler.Private.Scripting/FSharp.Compiler.Private.Scripting.nuspec @@ -5,13 +5,12 @@ en-US + $CommonFileElements$ - - diff --git a/src/fsharp/FSharp.Compiler.Private/.gitignore b/src/fsharp/FSharp.Compiler.Private/.gitignore deleted file mode 100644 index fa6bb93f54..0000000000 --- a/src/fsharp/FSharp.Compiler.Private/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -illex.fs -ilpars.fs -ilpars.fsi -lex.fs -pars.fs -pars.fsi -pplex.fs -pppars.fs -pppars.fsi diff --git a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj index c527a50d4a..492c6f0f2d 100644 --- a/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj +++ b/src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj @@ -1,4 +1,4 @@ - + @@ -16,6 +16,11 @@ true + + $(IntermediateOutputPath)$(TargetFramework)/ + $(IntermediateOutputPath)$(TargetFramework)/ + + $(BaseOutputPath)\$(Configuration)\$(TargetFramework) @@ -236,11 +241,11 @@ AbsIL\ilsupp.fs - - AbsIL\ilpars.fs + + $(FsYaccOutputFolder)AbsIL\ilpars.fs - - AbsIL\illex.fs + + $(FsLexOutputFolder)AbsIL\illex.fs AbsIL\ilbinary.fsi @@ -283,6 +288,7 @@ ReferenceResolution/SimulatedMSBuildReferenceResolver.fs + CompilerLocation\CompilerLocationUtils.fs @@ -344,11 +350,11 @@ ParserAndUntypedAST\ParseHelpers.fs - - ParserAndUntypedAST\pppars.fs + + $(FsYaccOutputFolder)ParserAndUntypedAST\pppars.fs - - ParserAndUntypedAST\pars.fs + + $(FsYaccOutputFolder)ParserAndUntypedAST\pars.fs ParserAndUntypedAST\lexhelp.fsi @@ -356,14 +362,14 @@ ParserAndUntypedAST\lexhelp.fs - - ParserAndUntypedAST\pplex.fs + + $(FsYaccOutputFolder)ParserAndUntypedAST\pplex.fs - - ParserAndUntypedAST\lex.fs + + $(FsYaccOutputFolder)ParserAndUntypedAST\lex.fs - ParserAndUntypedAST\lexfilter.fs + ParserAndUntypedAST\LexFilter.fs TypedTree\tainted.fsi diff --git a/src/fsharp/FSharp.Core.nuget/Directory.Build.props b/src/fsharp/FSharp.Core.nuget/Directory.Build.props deleted file mode 100644 index 7509ab35a1..0000000000 --- a/src/fsharp/FSharp.Core.nuget/Directory.Build.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - true - - - - - diff --git a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj b/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj deleted file mode 100644 index 4bc3e61c16..0000000000 --- a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuget.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - true - net45;netstandard2.0 - FSharp.Core - FSharp.Core.nuspec - true - FSharp.Core redistributables from Visual F# Tools version $(FSPackageMajorVersion) For F# $(FSCoreMajorVersion). Contains code from the F# Software Foundation. - - - - - false - - - - - - diff --git a/src/fsharp/FSharp.Core/FSharp.Core.fsproj b/src/fsharp/FSharp.Core/FSharp.Core.fsproj index f7f046c4d7..1a0a96f85d 100644 --- a/src/fsharp/FSharp.Core/FSharp.Core.fsproj +++ b/src/fsharp/FSharp.Core/FSharp.Core.fsproj @@ -4,8 +4,7 @@ Library - net45;netstandard2.0 - netstandard2.0 + netstandard2.0 $(NoWarn);45;55;62;75;1204 true $(DefineConstants);FSHARP_CORE @@ -13,6 +12,12 @@ $(OtherFlags) --warnon:1182 --compiling-fslib --compiling-fslib-40 --maxerrors:20 --extraoptimizationloops:1 --nowarn:57 true true + + true + FSharp.Core + FSharp.Core.nuspec + true + FSharp.Core redistributables from Visual F# Tools version $(FSPackageMajorVersion) For F# $(FSCoreMajorVersion). Contains code from the F# Software Foundation. diff --git a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuspec b/src/fsharp/FSharp.Core/FSharp.Core.nuspec similarity index 62% rename from src/fsharp/FSharp.Core.nuget/FSharp.Core.nuspec rename to src/fsharp/FSharp.Core/FSharp.Core.nuspec index e7f9bcb7da..0a11203fc6 100644 --- a/src/fsharp/FSharp.Core.nuget/FSharp.Core.nuspec +++ b/src/fsharp/FSharp.Core/FSharp.Core.nuspec @@ -5,7 +5,6 @@ en-US - @@ -16,13 +15,7 @@ - - - - - - diff --git a/src/fsharp/FSharp.Core/Linq.fsi b/src/fsharp/FSharp.Core/Linq.fsi index a46ebe44de..cc62fe99b5 100644 --- a/src/fsharp/FSharp.Core/Linq.fsi +++ b/src/fsharp/FSharp.Core/Linq.fsi @@ -8,6 +8,13 @@ open Microsoft.FSharp.Core open Microsoft.FSharp.Collections open Microsoft.FSharp.Quotations +/// +/// Contains functionality to convert F# quotations to LINQ expression trees. +/// +/// +/// +/// Library functionality associated with converting F# quotations to .NET LINQ expression trees. +/// module LeafExpressionConverter = /// When used in a quotation, this function indicates a specific conversion /// should be performed when converting the quotation to a LINQ expression. diff --git a/src/fsharp/FSharp.Core/MutableTuple.fs b/src/fsharp/FSharp.Core/MutableTuple.fs index 89c84dca36..79e7d5c73e 100644 --- a/src/fsharp/FSharp.Core/MutableTuple.fs +++ b/src/fsharp/FSharp.Core/MutableTuple.fs @@ -22,14 +22,16 @@ open Microsoft.FSharp.Core // This terminology mistake also runs all the way through Query.fs. // ---------------------------------------------------------------------------- -/// This type shouldn't be used directly from user code. +/// This type shouldn't be used directly from user code. +/// type AnonymousObject<'T1> = val private item1 : 'T1 member x.Item1 = x.item1 new (Item1) = { item1 = Item1 } -/// This type shouldn't be used directly from user code. +/// This type shouldn't be used directly from user code. +/// type AnonymousObject<'T1, 'T2> = val private item1 : 'T1 member x.Item1 = x.item1 @@ -39,7 +41,8 @@ type AnonymousObject<'T1, 'T2> = new (Item1, Item2) = { item1 = Item1; item2 = Item2 } -/// This type shouldn't be used directly from user code. +/// This type shouldn't be used directly from user code. +/// type AnonymousObject<'T1, 'T2, 'T3> = val private item1 : 'T1 member x.Item1 = x.item1 @@ -53,7 +56,8 @@ type AnonymousObject<'T1, 'T2, 'T3> = new (Item1, Item2, Item3) = { item1 = Item1; item2 = Item2; item3 = Item3 } -/// This type shouldn't be used directly from user code. +/// This type shouldn't be used directly from user code. +/// type AnonymousObject<'T1, 'T2, 'T3, 'T4> = val private item1 : 'T1 member x.Item1 = x.item1 @@ -71,7 +75,8 @@ type AnonymousObject<'T1, 'T2, 'T3, 'T4> = -/// This type shouldn't be used directly from user code. +/// This type shouldn't be used directly from user code. +/// type AnonymousObject<'T1, 'T2, 'T3, 'T4, 'T5> = val private item1 : 'T1 member x.Item1 = x.item1 @@ -91,7 +96,8 @@ type AnonymousObject<'T1, 'T2, 'T3, 'T4, 'T5> = new (Item1, Item2, Item3, Item4, Item5) = { item1 = Item1; item2 = Item2; item3 = Item3; item4 = Item4 ; item5 = Item5 } -/// This type shouldn't be used directly from user code. +/// This type shouldn't be used directly from user code. +/// type AnonymousObject<'T1, 'T2, 'T3, 'T4, 'T5, 'T6> = val private item1 : 'T1 member x.Item1 = x.item1 @@ -114,7 +120,8 @@ type AnonymousObject<'T1, 'T2, 'T3, 'T4, 'T5, 'T6> = new (Item1, Item2, Item3, Item4, Item5, Item6) = { item1 = Item1; item2 = Item2; item3 = Item3; item4 = Item4 ; item5 = Item5 ; item6 = Item6 } -/// This type shouldn't be used directly from user code. +/// This type shouldn't be used directly from user code. +/// type AnonymousObject<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7> = val private item1 : 'T1 member x.Item1 = x.item1 @@ -139,7 +146,8 @@ type AnonymousObject<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7> = new (Item1, Item2, Item3, Item4, Item5, Item6, Item7) = { item1 = Item1; item2 = Item2; item3 = Item3; item4 = Item4 ; item5 = Item5 ; item6 = Item6 ; item7 = Item7 } -/// This type shouldn't be used directly from user code. +/// This type shouldn't be used directly from user code. +/// type AnonymousObject<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'T8> = val private item1 : 'T1 member x.Item1 = x.item1 diff --git a/src/fsharp/FSharp.Core/Nullable.fsi b/src/fsharp/FSharp.Core/Nullable.fsi index 777aecdc7a..0b18896ef8 100644 --- a/src/fsharp/FSharp.Core/Nullable.fsi +++ b/src/fsharp/FSharp.Core/Nullable.fsi @@ -117,6 +117,7 @@ module Nullable = /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. /// The input value. + /// /// The converted byte [] val inline byte : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> byte) and default ^T : int @@ -124,7 +125,9 @@ module Nullable = /// Converts the argument to byte. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted byte [] val inline uint8 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> uint8) and default ^T : int @@ -132,7 +135,9 @@ module Nullable = /// Converts the argument to signed byte. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted sbyte [] val inline sbyte : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> sbyte) and default ^T : int @@ -140,7 +145,9 @@ module Nullable = /// Converts the argument to signed byte. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted sbyte [] val inline int8 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> int8) and default ^T : int @@ -148,7 +155,9 @@ module Nullable = /// Converts the argument to signed 16-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int16 [] val inline int16 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> int16) and default ^T : int @@ -156,7 +165,9 @@ module Nullable = /// Converts the argument to unsigned 16-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint16 [] val inline uint16 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> uint16) and default ^T : int @@ -164,7 +175,9 @@ module Nullable = /// Converts the argument to signed 32-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int [] val inline int : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> int) and default ^T : int @@ -172,13 +185,17 @@ module Nullable = /// Converts the argument to an unsigned 32-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted unsigned integer [] val inline uint: value: Nullable< ^T > -> Nullable when ^T :(static member op_Explicit: ^T -> uint) and default ^T : uint /// Converts the argument to a particular enum type. + /// /// The input value. + /// /// The converted enum type. [] val inline enum : value:Nullable< int32 > -> Nullable< ^U > when ^U : enum @@ -186,7 +203,9 @@ module Nullable = /// Converts the argument to signed 32-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int32 [] val inline int32 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> int32) and default ^T : int @@ -194,7 +213,9 @@ module Nullable = /// Converts the argument to unsigned 32-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint32 [] val inline uint32 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> uint32) and default ^T : int @@ -202,7 +223,9 @@ module Nullable = /// Converts the argument to signed 64-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int64 [] val inline int64 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> int64) and default ^T : int @@ -210,7 +233,9 @@ module Nullable = /// Converts the argument to unsigned 64-bit integer. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint64 [] val inline uint64 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> uint64) and default ^T : int @@ -218,7 +243,9 @@ module Nullable = /// Converts the argument to 32-bit float. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted float32 [] val inline float32 : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> float32) and default ^T : int @@ -226,7 +253,9 @@ module Nullable = /// Converts the argument to 64-bit float. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted float [] val inline float : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> float) and default ^T : int @@ -234,7 +263,9 @@ module Nullable = /// Converts the argument to 32-bit float. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted float32 [] val inline single : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> single) and default ^T : int @@ -242,7 +273,9 @@ module Nullable = /// Converts the argument to 64-bit float. This is a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted float [] val inline double : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> double) and default ^T : int @@ -250,7 +283,9 @@ module Nullable = /// Converts the argument to signed native integer. This is a direct conversion for all /// primitive numeric types. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted nativeint [] val inline nativeint : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> nativeint) and default ^T : int @@ -258,7 +293,9 @@ module Nullable = /// Converts the argument to unsigned native integer using a direct conversion for all /// primitive numeric types. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted unativeint [] val inline unativeint : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> unativeint) and default ^T : int @@ -266,14 +303,18 @@ module Nullable = /// Converts the argument to System.Decimal using a direct conversion for all /// primitive numeric types. The operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted decimal. [] val inline decimal : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> decimal) and default ^T : int /// Converts the argument to character. Numeric inputs are converted according to the UTF-16 /// encoding for characters. The operation requires an appropriate static conversion method on the input type. + /// /// The input value. + /// /// The converted char. [] val inline char : value:Nullable< ^T > -> Nullable when ^T : (static member op_Explicit : ^T -> char) and default ^T : int diff --git a/src/fsharp/FSharp.Core/Query.fsi b/src/fsharp/FSharp.Core/Query.fsi index bda2b9f2ca..7017fe693e 100644 --- a/src/fsharp/FSharp.Core/Query.fsi +++ b/src/fsharp/FSharp.Core/Query.fsi @@ -11,19 +11,28 @@ namespace Microsoft.FSharp.Linq open System.Collections.Generic [] + /// /// A partial input or result in an F# query. This type is used to support the F# query syntax. + /// + /// + /// + /// Library functionality for F# query syntax and interoperability with .NET LINQ Expressions. See + /// also F# Query Expressions in the F# Language Guide. + /// type QuerySource<'T, 'Q> = /// /// A method used to support the F# query syntax. /// new : seq<'T> -> QuerySource<'T,'Q> + /// /// A property used to support the F# query syntax. /// member Source : seq<'T> [] - /// The type used to support the F# query syntax. Use 'query { ... }' to use the query syntax. + /// The type used to support the F# query syntax. Use 'query { ... }' to use the query syntax. See + /// also F# Query Expressions in the F# Language Guide. type QueryBuilder = /// Create an instance of this builder. Use 'query { ... }' to use the query syntax. new : unit -> QueryBuilder @@ -350,6 +359,13 @@ namespace Microsoft.FSharp.Linq.QueryRunExtensions open Microsoft.FSharp.Core + /// + /// A module used to support the F# query syntax. + /// + /// + /// + /// Contains modules used to support the F# query syntax. + /// module LowPriority = type Microsoft.FSharp.Linq.QueryBuilder with /// @@ -358,6 +374,9 @@ namespace Microsoft.FSharp.Linq.QueryRunExtensions [] member Run : Microsoft.FSharp.Quotations.Expr<'T> -> 'T + /// + /// A module used to support the F# query syntax. + /// module HighPriority = type Microsoft.FSharp.Linq.QueryBuilder with /// diff --git a/src/fsharp/FSharp.Core/array.fsi b/src/fsharp/FSharp.Core/array.fsi index 5ede87a3c6..f47baa49e2 100644 --- a/src/fsharp/FSharp.Core/array.fsi +++ b/src/fsharp/FSharp.Core/array.fsi @@ -7,32 +7,45 @@ namespace Microsoft.FSharp.Collections open Microsoft.FSharp.Collections open System.Collections.Generic - /// Basic operations on arrays. + /// Contains operations for working with arrays. + /// + /// + /// See also F# Language Guide - Arrays. + /// [] [] module Array = /// Returns a new array that contains all pairings of elements from the first and second arrays. + /// /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. + /// + /// Thrown when either of the input arrays is null. + /// /// The resulting array of pairs. [] val allPairs: array1:'T1[] -> array2:'T2[] -> ('T1 * 'T2)[] /// Builds a new array that contains the elements of the first array followed by the elements of the second array. + /// /// The first input array. /// The second input array. + /// /// The resulting array. - /// Thrown when either of the input arrays is null. + /// + /// Thrown when either of the input arrays is null. [] val append: array1:'T[] -> array2:'T[] -> 'T[] /// Returns the average of the elements in the array. + /// /// The input array. - /// Thrown when array is empty. + /// + /// Thrown when array is empty. + /// Thrown when the input array is null. + /// /// The average of the elements in the array. - /// Thrown when the input array is null. [] val inline average : array:^T[] -> ^T when ^T : (static member ( + ) : ^T * ^T -> ^T) @@ -41,11 +54,15 @@ namespace Microsoft.FSharp.Collections /// Returns the average of the elements generated by applying the function to each element of the array. + /// /// The function to transform the array elements before averaging. /// The input array. - /// Thrown when array is empty. + /// + /// Thrown when array is empty. + /// /// The computed average. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val inline averageBy : projection:('T -> ^U) -> array:'T[] -> ^U when ^U : (static member ( + ) : ^U * ^U -> ^U) @@ -53,22 +70,27 @@ namespace Microsoft.FSharp.Collections and ^U : (static member Zero : ^U) /// Reads a range of elements from the first array and write them into the second. + /// /// The source array. /// The starting index of the source array. /// The target array. /// The starting index of the target array. /// The number of elements to copy. - /// Thrown when either of the input arrays is null. - /// Thrown when any of sourceIndex, targetIndex or count are negative, + /// + /// Thrown when either of the input arrays is null. + /// Thrown when any of sourceIndex, targetIndex or count are negative, /// or when there aren't enough elements in source or target. [] val inline blit: source:'T[] -> sourceIndex:int -> target:'T[] -> targetIndex:int -> count:int -> unit /// For each element of the array, applies the given function. Concatenates all the results and return the combined array. + /// /// The function to create sub-arrays from the input array elements. /// The input array. + /// /// The concatenation of the sub-arrays. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val collect : mapping:('T -> 'U[]) -> array:'T[] -> 'U[] @@ -85,30 +107,39 @@ namespace Microsoft.FSharp.Collections /// arrays, 1 is returned if the first array is longer, 0 is returned if they are equal in /// length, and -1 is returned when the second array is longer. /// - /// Thrown when either of the input arrays + /// Thrown when either of the input arrays /// is null. [] val inline compareWith: comparer:('T -> 'T -> int) -> array1:'T[] -> array2:'T[] -> int /// Builds a new array that contains the elements of each of the given sequence of arrays. + /// /// The input sequence of arrays. + /// /// The concatenation of the sequence of input arrays. - /// Thrown when the input sequence is null. + /// + /// Thrown when the input sequence is null. [] val concat: arrays:seq<'T[]> -> 'T[] /// Tests if the array contains the specified element. + /// /// The value to locate in the input array. /// The input array. + /// /// True if the input array contains the specified element; false otherwise. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val inline contains: value:'T -> array:'T[] -> bool when 'T : equality /// Builds a new array that contains the elements of the given array. + /// /// The input array. + /// /// A copy of the input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val copy: array:'T[] -> 'T[] @@ -121,22 +152,28 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val countBy : projection:('T -> 'Key) -> array:'T[] -> ('Key * int)[] when 'Key : equality /// Creates an array whose elements are all initially the given value. + /// /// The length of the array to create. /// The value for the elements. + /// /// The created array. - /// Thrown when count is negative. + /// + /// Thrown when count is negative. [] val create: count:int -> value:'T -> 'T[] /// Returns the first element of the array, or /// None if the array is empty. + /// /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. + /// /// The first element of the array or None. [] val tryHead: array:'T[] -> 'T option @@ -144,31 +181,39 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to successive elements, returning the first /// result where function returns Some(x) for some x. If the function /// never returns Some(x) then None is returned. + /// /// The function to transform the array elements into options. /// The input array. + /// /// The first transformed element that is Some(x). - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val tryPick: chooser:('T -> 'U option) -> array:'T[] -> 'U option /// Fills a range of elements of the array with the given value. + /// /// The target array. /// The index of the first element to set. /// The number of elements to set. /// The value to set. - /// Thrown when the input array is null. - /// Thrown when either targetIndex or count is negative. + /// + /// Thrown when the input array is null. + /// Thrown when either targetIndex or count is negative. [] val fill: target:'T[] -> targetIndex:int -> count:int -> value:'T -> unit /// Applies the given function to successive elements, returning the first /// result where function returns Some(x) for some x. If the function - /// never returns Some(x) then KeyNotFoundException is raised. + /// never returns Some(x) then is raised. + /// /// The function to generate options from the elements. /// The input array. - /// Thrown when the input array is null. - /// Thrown if every result from + /// + /// Thrown when the input array is null. + /// Thrown if every result from /// chooser is None. + /// /// The first result. [] val pick: chooser:('T -> 'U option) -> array:'T[] -> 'U @@ -176,19 +221,25 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to each element of the array. Returns /// the array comprised of the results "x" for each element where /// the function returns Some(x) + /// /// The function to generate options from the elements. /// The input array. + /// /// The array of results. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val choose: chooser:('T -> 'U option) -> array:'T[] -> 'U[] /// Divides the input array into chunks of size at most chunkSize. + /// /// The maximum size of each chunk. /// The input array. + /// /// The array divided into chunks. - /// Thrown when the input array is null. - /// Thrown when chunkSize is not positive. + /// + /// Thrown when the input array is null. + /// Thrown when chunkSize is not positive. [] val chunkBySize: chunkSize:int -> array:'T[] -> 'T[][] @@ -200,7 +251,7 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val distinct: array:'T[] -> 'T[] when 'T : equality @@ -213,16 +264,19 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val distinctBy: projection:('T -> 'Key) -> array:'T[] -> 'T[] when 'Key : equality /// Splits the input array into at most count chunks. + /// /// The maximum number of chunks. /// The input array. + /// /// The array split into chunks. - /// Thrown when the input array is null. - /// Thrown when count is not positive. + /// + /// Thrown when the input array is null. + /// Thrown when count is not positive. [] val splitInto: count:int -> array:'T[] -> 'T[][] @@ -238,8 +292,8 @@ namespace Microsoft.FSharp.Collections /// /// The only element of the array. /// - /// Thrown when the input array is null. - /// Thrown when the input does not have precisely one element. + /// Thrown when the input array is null. + /// Thrown when the input does not have precisely one element. [] val exactlyOne: array:'T[] -> 'T @@ -249,7 +303,7 @@ namespace Microsoft.FSharp.Collections /// /// The only element of the array or None. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val tryExactlyOne: array:'T[] -> 'T option @@ -262,7 +316,7 @@ namespace Microsoft.FSharp.Collections /// /// An array that contains the distinct elements of array that do not appear in itemsToExclude. /// - /// Thrown when either itemsToExclude or array is null. + /// Thrown when either itemsToExclude or array is null. [] val except: itemsToExclude:seq<'T> -> array:'T[] -> 'T[] when 'T : equality @@ -271,10 +325,13 @@ namespace Microsoft.FSharp.Collections /// The predicate is applied to the elements of the input array. If any application /// returns true then the overall result is true and no further elements are tested. /// Otherwise, false is returned. + /// /// The function to test the input elements. /// The input array. + /// /// True if any result from predicate is true. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val exists: predicate:('T -> bool) -> array:'T[] -> bool @@ -285,66 +342,84 @@ namespace Microsoft.FSharp.Collections /// true and no further elements are tested. Otherwise, if one collections is longer /// than the other then the ArgumentException exception is raised. /// Otherwise, false is returned. + /// /// The function to test the input elements. /// The first input array. /// The second input array. + /// /// True if any result from predicate is true. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. [] val exists2: predicate:('T1 -> 'T2 -> bool) -> array1:'T1[] -> array2:'T2[] -> bool /// Returns a new collection containing only the elements of the collection /// for which the given predicate returns "true". + /// /// The function to test the input elements. /// The input array. + /// /// An array containing the elements for which the given predicate returns true. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val filter: predicate:('T -> bool) -> array:'T[] -> 'T[] /// Returns the first element for which the given function returns 'true'. - /// Raise KeyNotFoundException if no such element exists. + /// Raise if no such element exists. + /// /// The function to test the input elements. /// The input array. - /// Thrown when the input array is null. - /// Thrown if predicate + /// + /// Thrown when the input array is null. + /// Thrown if predicate /// never returns true. + /// /// The first element for which predicate returns true. [] val find: predicate:('T -> bool) -> array:'T[] -> 'T /// Returns the last element for which the given function returns 'true'. - /// Raise KeyNotFoundException if no such element exists. + /// Raise if no such element exists. + /// /// The function to test the input elements. /// The input array. - /// Thrown if predicate + /// + /// Thrown if predicate /// never returns true. - /// Thrown when the input array is null. + /// Thrown when the input array is null. + /// /// The last element for which predicate returns true. [] val findBack: predicate:('T -> bool) -> array:'T[] -> 'T /// Returns the index of the first element in the array - /// that satisfies the given predicate. Raise KeyNotFoundException if + /// that satisfies the given predicate. Raise if /// none of the elements satisfy the predicate. + /// /// The function to test the input elements. /// The input array. - /// Thrown if predicate + /// + /// Thrown if predicate /// never returns true. - /// Thrown when the input array is null. + /// Thrown when the input array is null. + /// /// The index of the first element in the array that satisfies the given predicate. [] val findIndex: predicate:('T -> bool) -> array:'T[] -> int /// Returns the index of the last element in the array - /// that satisfies the given predicate. Raise KeyNotFoundException if + /// that satisfies the given predicate. Raise if /// none of the elements satisfy the predicate. + /// /// The function to test the input elements. /// The input array. - /// Thrown if predicate + /// + /// Thrown if predicate /// never returns true. - /// Thrown when the input array is null. + /// Thrown when the input array is null. + /// /// The index of the last element in the array that satisfies the given predicate. [] val findIndexBack: predicate:('T -> bool) -> array:'T[] -> int @@ -354,10 +429,13 @@ namespace Microsoft.FSharp.Collections /// The predicate is applied to the elements of the input collection. If any application /// returns false then the overall result is false and no further elements are tested. /// Otherwise, true is returned. + /// /// The function to test the input elements. /// The input array. + /// /// True if all of the array elements satisfy the predicate. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val forall: predicate:('T -> bool) -> array:'T[] -> bool @@ -369,11 +447,14 @@ namespace Microsoft.FSharp.Collections /// false and no further elements are tested. Otherwise, if one collection is longer /// than the other then the ArgumentException exception is raised. /// Otherwise, true is returned. + /// /// The function to test the input elements. /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. + /// /// True if all of the array elements satisfy the predicate. [] val forall2: predicate:('T1 -> 'T2 -> bool) -> array1:'T1[] -> array2:'T2[] -> bool @@ -381,22 +462,28 @@ namespace Microsoft.FSharp.Collections /// Applies a function to each element of the collection, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN then computes /// f (... (f s i0)...) iN + /// /// The function to update the state given the input elements. /// The initial state. /// The input array. + /// /// The final state. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val fold<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> array: 'T[] -> 'State /// Applies a function to each element of the array, starting from the end, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN then computes /// f i0 (...(f iN s)) + /// /// The function to update the state given the input elements. /// The input array. /// The initial state. + /// /// The state object after the folding function is applied to each element of the array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val foldBack<'T,'State> : folder:('T -> 'State -> 'State) -> array:'T[] -> state:'State -> 'State @@ -405,12 +492,15 @@ namespace Microsoft.FSharp.Collections /// through the computation. The two input /// arrays must have the same lengths, otherwise an ArgumentException is /// raised. + /// /// The function to update the state given the input elements. /// The initial state. /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. + /// /// The final state. [] val fold2<'T1,'T2,'State> : folder:('State -> 'T1 -> 'T2 -> 'State) -> state:'State -> array1:'T1[] -> array2:'T2[] -> 'State @@ -419,22 +509,28 @@ namespace Microsoft.FSharp.Collections /// threading an accumulator argument through the computation. The two input /// arrays must have the same lengths, otherwise an ArgumentException is /// raised. + /// /// The function to update the state given the input elements. /// The first input array. /// The second input array. /// The initial state. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. + /// /// The final state. [] val foldBack2<'T1,'T2,'State> : folder:('T1 -> 'T2 -> 'State -> 'State) -> array1:'T1[] -> array2:'T2[] -> state:'State -> 'State /// Gets an element from an array. + /// /// The input array. /// The input index. + /// /// The value of the array at the given index. - /// Thrown when the input array is null. - /// Thrown when the index is negative or the input array does not contain enough elements. + /// + /// Thrown when the input array is null. + /// Thrown when the index is negative or the input array does not contain enough elements. [] val get: array:'T[] -> index:int -> 'T @@ -444,8 +540,8 @@ namespace Microsoft.FSharp.Collections /// /// The first element of the array. /// - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// Thrown when the input array is null. + /// Thrown when the input array is empty. [] val head: array:'T[] -> 'T @@ -458,115 +554,150 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val groupBy : projection:('T -> 'Key) -> array:'T[] -> ('Key * 'T[])[] when 'Key : equality /// Builds a new array whose elements are the corresponding elements of the input array /// paired with the integer index (from 0) of each element. + /// /// The input array. + /// /// The array of indexed elements. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val indexed: array:'T[] -> (int * 'T)[] /// Creates an array given the dimension and a generator function to compute the elements. + /// /// The number of elements to initialize. /// The function to generate the initial values for each index. + /// /// The created array. - /// Thrown when count is negative. + /// + /// Thrown when count is negative. [] val inline init: count:int -> initializer:(int -> 'T) -> 'T[] /// Creates an array where the entries are initially the default value Unchecked.defaultof<'T>. + /// /// The length of the array to create. + /// /// The created array. - /// Thrown when count is negative. + /// + /// Thrown when count is negative. [] val zeroCreate: count:int -> 'T[] /// Returns true if the given array is empty, otherwise false. + /// /// The input array. + /// /// True if the array is empty. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val isEmpty: array:'T[] -> bool /// Applies the given function to each element of the array. + /// /// The function to apply. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val inline iter: action:('T -> unit) -> array:'T[] -> unit /// Applies the given function to pair of elements drawn from matching indices in two arrays. The /// two arrays must have the same lengths, otherwise an ArgumentException is /// raised. + /// /// The function to apply. /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. [] val iter2: action:('T1 -> 'T2 -> unit) -> array1:'T1[] -> array2:'T2[] -> unit /// Applies the given function to each element of the array. The integer passed to the /// function indicates the index of element. + /// /// The function to apply to each index and element. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val iteri: action:(int -> 'T -> unit) -> array:'T[] -> unit /// Applies the given function to pair of elements drawn from matching indices in two arrays, /// also passing the index of the elements. The two arrays must have the same lengths, /// otherwise an ArgumentException is raised. + /// /// The function to apply to each index and pair of elements. /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. [] val iteri2: action:(int -> 'T1 -> 'T2 -> unit) -> array1:'T1[] -> array2:'T2[] -> unit /// Returns the last element of the array. + /// /// The input array. + /// /// The last element of the array. - /// Thrown when the input array is null. - /// Thrown when the input does not have any elements. + /// + /// Thrown when the input array is null. + /// Thrown when the input does not have any elements. [] val inline last: array:'T[] -> 'T /// Gets an element from an array. + /// /// The input index. /// The input array. + /// /// The value of the array at the given index. - /// Thrown when the input array is null. - /// Thrown when the index is negative or the input array does not contain enough elements. + /// + /// Thrown when the input array is null. + /// Thrown when the index is negative or the input array does not contain enough elements. [] val item: index:int -> array:'T[] -> 'T /// Returns the length of an array. You can also use property arr.Length. + /// /// The input array. + /// /// The length of the array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val length: array:'T[] -> int /// Returns the last element of the array. /// Return None if no such element exists. + /// /// The input array. + /// /// The last element of the array or None. - /// Thrown when the input sequence is null. + /// + /// Thrown when the input sequence is null. [] val tryLast: array:'T[] -> 'T option /// Builds a new array whose elements are the results of applying the given function /// to each of the elements of the array. + /// /// The function to transform elements of the array. /// The input array. + /// /// The array of transformed elements. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val inline map: mapping:('T -> 'U) -> array:'T[] -> 'U[] @@ -574,31 +705,40 @@ namespace Microsoft.FSharp.Collections /// to the corresponding elements of the two collections pairwise. The two input /// arrays must have the same lengths, otherwise an ArgumentException is /// raised. + /// /// The function to transform the pairs of the input elements. /// The first input array. /// The second input array. - /// Thrown when the input arrays differ in length. - /// Thrown when either of the input arrays is null. + /// + /// Thrown when the input arrays differ in length. + /// Thrown when either of the input arrays is null. + /// /// The array of transformed elements. [] val map2: mapping:('T1 -> 'T2 -> 'U) -> array1:'T1[] -> array2:'T2[] -> 'U[] /// Combines map and fold. Builds a new array whose elements are the results of applying the given function /// to each of the elements of the input array. The function is also used to accumulate a final value. + /// /// The function to transform elements from the input array and accumulate the final value. /// The initial state. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. + /// /// The array of transformed elements, and the final accumulated value. [] val mapFold<'T,'State,'Result> : mapping:('State -> 'T -> 'Result * 'State) -> state:'State -> array:'T[] -> 'Result[] * 'State /// Combines map and foldBack. Builds a new array whose elements are the results of applying the given function /// to each of the elements of the input array. The function is also used to accumulate a final value. + /// /// The function to transform elements from the input array and accumulate the final value. /// The input array. /// The initial state. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. + /// /// The array of transformed elements, and the final accumulated value. [] val mapFoldBack<'T,'State,'Result> : mapping:('T -> 'State -> 'Result * 'State) -> array:'T[] -> state:'State -> 'Result[] * 'State @@ -607,12 +747,15 @@ namespace Microsoft.FSharp.Collections /// to the corresponding triples from the three collections. The three input /// arrays must have the same length, otherwise an ArgumentException is /// raised. + /// /// The function to transform the pairs of the input elements. /// The first input array. /// The second input array. /// The third input array. - /// Thrown when the input arrays differ in length. - /// Thrown when any of the input arrays is null. + /// + /// Thrown when the input arrays differ in length. + /// Thrown when any of the input arrays is null. + /// /// The array of transformed elements. [] val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> array1:'T1[] -> array2:'T2[] -> array3:'T3[] -> 'U[] @@ -621,11 +764,14 @@ namespace Microsoft.FSharp.Collections /// to the corresponding elements of the two collections pairwise, also passing the index of /// the elements. The two input arrays must have the same lengths, otherwise an ArgumentException is /// raised. + /// /// The function to transform pairs of input elements and their indices. /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. + /// /// The array of transformed elements. [] val mapi2: mapping:(int -> 'T1 -> 'T2 -> 'U) -> array1:'T1[] -> array2:'T2[] -> 'U[] @@ -633,19 +779,25 @@ namespace Microsoft.FSharp.Collections /// Builds a new array whose elements are the results of applying the given function /// to each of the elements of the array. The integer index passed to the /// function indicates the index of element being transformed. + /// /// The function to transform elements and their indices. /// The input array. + /// /// The array of transformed elements. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val mapi: mapping:(int -> 'T -> 'U) -> array:'T[] -> 'U[] /// Returns the greatest of all elements of the array, compared via Operators.max on the function result. /// /// Throws ArgumentException for empty arrays. + /// /// The input array. - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// /// The maximum element. [] val inline max : array:'T[] -> 'T when 'T : comparison @@ -653,10 +805,13 @@ namespace Microsoft.FSharp.Collections /// Returns the greatest of all elements of the array, compared via Operators.max on the function result. /// /// Throws ArgumentException for empty arrays. + /// /// The function to transform the elements into a type supporting comparison. /// The input array. - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// /// The maximum element. [] val inline maxBy : projection:('T -> 'U) -> array:'T[] -> 'T when 'U : comparison @@ -664,9 +819,12 @@ namespace Microsoft.FSharp.Collections /// Returns the lowest of all elements of the array, compared via Operators.min. /// /// Throws ArgumentException for empty arrays + /// /// The input array. - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// /// The minimum element. [] val inline min : array:'T[] -> 'T when 'T : comparison @@ -674,24 +832,32 @@ namespace Microsoft.FSharp.Collections /// Returns the lowest of all elements of the array, compared via Operators.min on the function result. /// /// Throws ArgumentException for empty arrays. + /// /// The function to transform the elements into a type supporting comparison. /// The input array. - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// /// The minimum element. [] val inline minBy : projection:('T -> 'U) -> array:'T[] -> 'T when 'U : comparison /// Builds an array from the given list. + /// /// The input list. + /// /// The array of elements from the list. [] val ofList: list:'T list -> 'T[] /// Builds a new array from the given enumerable object. + /// /// The input sequence. + /// /// The array of elements from the sequence. - /// Thrown when the input sequence is null. + /// + /// Thrown when the input sequence is null. [] val ofSeq: source:seq<'T> -> 'T[] @@ -702,28 +868,34 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val pairwise: array:'T[] -> ('T * 'T)[] /// Splits the collection into two collections, containing the /// elements for which the given predicate returns "true" and "false" /// respectively. + /// /// The function to test the input elements. /// The input array. + /// /// A pair of arrays. The first containing the elements the predicate evaluated to true, /// and the second containing those evaluated to false. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val partition: predicate:('T -> bool) -> array:'T[] -> 'T[] * 'T[] /// Returns an array with all elements permuted according to the /// specified permutation. + /// /// The function that maps input indices to output indices. /// The input array. + /// /// The output array. - /// Thrown when the input array is null. - /// Thrown when indexMap does not produce a valid permutation. + /// + /// Thrown when the input array is null. + /// Thrown when indexMap does not produce a valid permutation. [] val permute : indexMap:(int -> int) -> array:'T[] -> 'T[] @@ -731,10 +903,13 @@ namespace Microsoft.FSharp.Collections /// through the computation. If the input function is f and the elements are i0...iN /// then computes f (... (f i0 i1)...) iN. /// Raises ArgumentException if the array has size zero. + /// /// The function to reduce a pair of elements to a single element. /// The input array. - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// /// The final result of the reductions. [] val reduce: reduction:('T -> 'T -> 'T) -> array:'T[] -> 'T @@ -742,45 +917,60 @@ namespace Microsoft.FSharp.Collections /// Applies a function to each element of the array, starting from the end, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN /// then computes f i0 (...(f iN-1 iN)). + /// /// A function that takes in the next-to-last element of the list and the /// current accumulated result to produce the next accumulated result. /// The input array. - /// Thrown when the input array is null. - /// Thrown when the input array is empty. + /// + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// /// The final result of the reductions. [] val reduceBack: reduction:('T -> 'T -> 'T) -> array:'T[] -> 'T /// Creates an array by replicating the given initial value. + /// /// The number of elements to replicate. /// The value to replicate + /// /// The generated array. - /// Thrown when count is negative. + /// + /// Thrown when count is negative. [] val replicate: count:int -> initial:'T -> 'T[] /// Returns a new array with the elements in reverse order. + /// /// The input array. + /// /// The reversed array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val rev: array:'T[] -> 'T[] /// Like fold, but return the intermediary and final results. + /// /// The function to update the state given the input elements. /// The initial state. /// The input array. + /// /// The array of state values. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val scan<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> array:'T[] -> 'State[] /// Like foldBack, but return both the intermediary and final results. + /// /// The function to update the state given the input elements. /// The input array. /// The initial state. + /// /// The array of state values. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val scanBack<'T,'State> : folder:('T -> 'State -> 'State) -> array:'T[] -> state:'State -> 'State[] @@ -793,140 +983,175 @@ namespace Microsoft.FSharp.Collections val inline singleton: value:'T -> 'T[] /// Sets an element of an array. + /// /// The input array. /// The input index. /// The input value. - /// Thrown when the input array is null. - /// Thrown when the index is negative or the input array does not contain enough elements. + /// + /// Thrown when the input array is null. + /// Thrown when the index is negative or the input array does not contain enough elements. [] val set: array:'T[] -> index:int -> value:'T -> unit /// Builds a new array that contains the elements of the given array, excluding the first N elements. + /// /// The number of elements to skip. /// The input array. + /// /// A copy of the input array, after removing the first N elements. - /// Thrown when the input array is null. - /// Thrown when count is negative or exceeds the number of + /// + /// Thrown when the input array is null. + /// Thrown when count is negative or exceeds the number of /// elements in the array. [] val skip: count:int -> array:'T[] -> 'T[] /// Bypasses elements in an array while the given predicate returns True, and then returns /// the remaining elements in a new array. + /// /// A function that evaluates an element of the array to a boolean value. /// The input array. + /// /// The created sub array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val skipWhile: predicate:('T -> bool) -> array:'T[] -> 'T[] /// Builds a new array that contains the given subrange specified by /// starting index and length. + /// /// The input array. /// The index of the first element of the sub array. /// The length of the sub array. + /// /// The created sub array. - /// Thrown when the input array is null. - /// Thrown when either startIndex or count is negative, + /// + /// Thrown when the input array is null. + /// Thrown when either startIndex or count is negative, /// or when there aren't enough elements in the input array. [] val sub: array:'T[] -> startIndex:int -> count:int -> 'T[] - /// Sorts the elements of an array, returning a new array. Elements are compared using Operators.compare. + /// Sorts the elements of an array, returning a new array. Elements are compared using . /// /// This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - /// For a stable sort, consider using Seq.sort. + /// For a stable sort, consider using . + /// /// The input array. + /// /// The sorted array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val sort: array:'T[] -> 'T[] when 'T : comparison /// Sorts the elements of an array, using the given projection for the keys and returning a new array. - /// Elements are compared using Operators.compare. + /// Elements are compared using . /// /// This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - /// For a stable sort, consider using Seq.sort. + /// For a stable sort, consider using . + /// /// The function to transform array elements into the type that is compared. /// The input array. + /// /// The sorted array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val sortBy: projection:('T -> 'Key) -> array:'T[] -> 'T[] when 'Key : comparison /// Sorts the elements of an array, using the given comparison function as the order, returning a new array. /// /// This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - /// For a stable sort, consider using Seq.sort. + /// For a stable sort, consider using . + /// /// The function to compare pairs of array elements. /// The input array. + /// /// The sorted array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val sortWith: comparer:('T -> 'T -> int) -> array:'T[] -> 'T[] /// Sorts the elements of an array by mutating the array in-place, using the given projection for the keys. - /// Elements are compared using Operators.compare. + /// Elements are compared using . /// /// This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - /// For a stable sort, consider using Seq.sort. + /// For a stable sort, consider using . + /// /// The function to transform array elements into the type that is compared. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val sortInPlaceBy: projection:('T -> 'Key) -> array:'T[] -> unit when 'Key : comparison /// Sorts the elements of an array by mutating the array in-place, using the given comparison function as the order. + /// /// The function to compare pairs of array elements. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val sortInPlaceWith: comparer:('T -> 'T -> int) -> array:'T[] -> unit /// Sorts the elements of an array by mutating the array in-place, using the given comparison function. - /// Elements are compared using Operators.compare. + /// Elements are compared using . + /// /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val sortInPlace: array:'T[] -> unit when 'T : comparison /// Splits an array into two arrays, at the given index. + /// /// The index at which the array is split. /// The input array. + /// /// The two split arrays. /// - /// Thrown when the input array is null. - /// Thrown when split index exceeds the number of elements + /// Thrown when the input array is null. + /// Thrown when split index exceeds the number of elements /// in the array. [] val splitAt: index:int -> array:'T[] -> ('T[] * 'T[]) - /// Sorts the elements of an array, in descending order, returning a new array. Elements are compared using Operators.compare. + /// Sorts the elements of an array, in descending order, returning a new array. Elements are compared using . /// /// This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - /// For a stable sort, consider using Seq.sort. + /// For a stable sort, consider using . + /// /// The input array. + /// /// The sorted array. [] val inline sortDescending: array:'T[] -> 'T[] when 'T : comparison /// Sorts the elements of an array, in descending order, using the given projection for the keys and returning a new array. - /// Elements are compared using Operators.compare. + /// Elements are compared using . /// /// This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - /// For a stable sort, consider using Seq.sort. + /// For a stable sort, consider using . + /// /// The function to transform array elements into the type that is compared. /// The input array. + /// /// The sorted array. [] val inline sortByDescending: projection:('T -> 'Key) -> array:'T[] -> 'T[] when 'Key : comparison /// Returns the sum of the elements in the array. + /// /// The input array. + /// /// The resulting sum. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val inline sum : array: ^T[] -> ^T when ^T : (static member ( + ) : ^T * ^T -> ^T) @@ -934,10 +1159,13 @@ namespace Microsoft.FSharp.Collections /// Returns the sum of the results generated by applying the function to each element of the array. + /// /// The function to transform the array elements into the type to be summed. /// The input array. + /// /// The resulting sum. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val inline sumBy : projection:('T -> ^U) -> array:'T[] -> ^U when ^U : (static member ( + ) : ^U * ^U -> ^U) @@ -953,9 +1181,9 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input array is null. - /// Thrown when the input array is empty. - /// Thrown when count exceeds the number of elements + /// Thrown when the input array is null. + /// Thrown when the input array is empty. + /// Thrown when count exceeds the number of elements /// in the list. [] val take: count:int -> array:'T[] -> 'T[] @@ -968,154 +1196,202 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val takeWhile: predicate:('T -> bool) -> array:'T[] -> 'T[] /// Returns a new array containing the elements of the original except the first element. /// /// The input array. - /// Thrown when the array is empty. - /// Thrown when the input array is null. + /// + /// Thrown when the array is empty. + /// Thrown when the input array is null. + /// /// A new array containing the elements of the original except the first element. [] val tail: array:'T[] -> 'T[] /// Builds a list from the given array. + /// /// The input array. + /// /// The list of array elements. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val toList: array:'T[] -> 'T list /// Views the given array as a sequence. + /// /// The input array. + /// /// The sequence of array elements. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val toSeq: array:'T[] -> seq<'T> /// Returns the transpose of the given sequence of arrays. + /// /// The input sequence of arrays. + /// /// The transposed array. - /// Thrown when the input sequence is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when the input sequence is null. + /// Thrown when the input arrays differ in length. [] val transpose: arrays:seq<'T[]> -> 'T[][] /// Returns at most N elements in a new array. + /// /// The maximum number of items to return. /// The input array. + /// /// The result array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val truncate: count:int -> array:'T[] -> 'T[] /// Returns the first element for which the given function returns True. /// Return None if no such element exists. + /// /// The function to test the input elements. /// The input array. + /// /// The first element that satisfies the predicate, or None. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val tryFind: predicate:('T -> bool) -> array:'T[] -> 'T option /// Returns the last element for which the given function returns True. /// Return None if no such element exists. + /// /// The function to test the input elements. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. + /// /// The last element that satisfies the predicate, or None. [] val tryFindBack: predicate:('T -> bool) -> array:'T[] -> 'T option /// Returns the index of the first element in the array /// that satisfies the given predicate. + /// /// The function to test the input elements. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. + /// /// The index of the first element that satisfies the predicate, or None. [] val tryFindIndex : predicate:('T -> bool) -> array:'T[] -> int option /// Tries to find the nth element in the array. /// Returns None if index is negative or the input array does not contain enough elements. + /// /// The index of element to retrieve. /// The input array. + /// /// The nth element of the array or None. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val tryItem: index:int -> array:'T[] -> 'T option /// Returns the index of the last element in the array /// that satisfies the given predicate. + /// /// The function to test the input elements. /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. + /// /// The index of the last element that satisfies the predicate, or None. [] val tryFindIndexBack : predicate:('T -> bool) -> array:'T[] -> int option /// Returns an array that contains the elements generated by the given computation. /// The given initial state argument is passed to the element generator. + /// /// A function that takes in the current state and returns an option tuple of the next /// element of the array and the next state value. /// The initial state value. + /// /// The result array. [] val unfold<'T,'State> : generator:('State -> ('T * 'State) option) -> state:'State -> 'T[] /// Splits an array of pairs into two arrays. + /// /// The input array. + /// /// The two arrays. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val unzip: array:('T1 * 'T2)[] -> ('T1[] * 'T2[]) /// Splits an array of triples into three arrays. + /// /// The input array. + /// /// The tuple of three arrays. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val unzip3: array:('T1 * 'T2 * 'T3)[] -> ('T1[] * 'T2[] * 'T3[]) /// Returns a new array containing only the elements of the array /// for which the given predicate returns "true". + /// /// The function to test the input elements. /// The input array. + /// /// An array containing the elements for which the given predicate returns true. /// - /// Thrown when the input array is null. + /// Thrown when the input array is null. [] val where: predicate:('T -> bool) -> array:'T[] -> 'T[] /// Returns an array of sliding windows containing elements drawn from the input /// array. Each window is returned as a fresh array. + /// /// The number of elements in each window. /// The input array. + /// /// The result array. - /// Thrown when the input array is null. - /// Thrown when windowSize is not positive. + /// + /// Thrown when the input array is null. + /// Thrown when windowSize is not positive. [] val windowed : windowSize:int -> array:'T[] -> 'T[][] /// Combines the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is /// raised. + /// /// The first input array. /// The second input array. - /// Thrown when either of the input arrays is null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when either of the input arrays is null. + /// Thrown when the input arrays differ in length. + /// /// The array of tupled elements. [] val zip: array1:'T1[] -> array2:'T2[] -> ('T1 * 'T2)[] /// Combines three arrays into an array of pairs. The three arrays must have equal lengths, otherwise an ArgumentException is /// raised. + /// /// The first input array. /// The second input array. /// The third input array. - /// Thrown when any of the input arrays are null. - /// Thrown when the input arrays differ in length. + /// + /// Thrown when any of the input arrays are null. + /// Thrown when the input arrays differ in length. + /// /// The array of tupled elements. [] val zip3: array1:'T1[] -> array2:'T2[] -> array3:'T3[] -> ('T1 * 'T2 * 'T3)[] @@ -1127,35 +1403,44 @@ namespace Microsoft.FSharp.Collections /// the array comprised of the results "x" for each element where /// the function returns Some(x). /// - /// Performs the operation in parallel using System.Threading.Parallel.For. + /// Performs the operation in parallel using . /// The order in which the given function is applied to elements of the input array is not specified. + /// /// The function to generate options from the elements. /// The input array. - /// 'U[] - /// Thrown when the input array is null. + /// + /// The array of results. + /// + /// Thrown when the input array is null. [] val choose: chooser:('T -> 'U option) -> array:'T[] -> 'U[] /// For each element of the array, apply the given function. Concatenate all the results and return the combined array. /// - /// Performs the operation in parallel using System.Threading.Parallel.For. + /// Performs the operation in parallel using . /// The order in which the given function is applied to elements of the input array is not specified. + /// /// /// The input array. + /// /// 'U[] - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val collect : mapping:('T -> 'U[]) -> array:'T[] -> 'U[] /// Build a new array whose elements are the results of applying the given function /// to each of the elements of the array. /// - /// Performs the operation in parallel using System.Threading.Parallel.For. + /// Performs the operation in parallel using . /// The order in which the given function is applied to elements of the input array is not specified. + /// /// /// The input array. - /// 'U[] - /// Thrown when the input array is null. + /// + /// The array of results. + /// + /// Thrown when the input array is null. [] val map : mapping:('T -> 'U) -> array:'T[] -> 'U[] @@ -1163,43 +1448,52 @@ namespace Microsoft.FSharp.Collections /// to each of the elements of the array. The integer index passed to the /// function indicates the index of element being transformed. /// - /// Performs the operation in parallel using System.Threading.Parallel.For. + /// Performs the operation in parallel using . /// The order in which the given function is applied to elements of the input array is not specified. + /// /// /// The input array. - /// 'U[] - /// Thrown when the input array is null. + /// + /// The array of results. + /// + /// Thrown when the input array is null. [] val mapi: mapping:(int -> 'T -> 'U) -> array:'T[] -> 'U[] /// Apply the given function to each element of the array. /// - /// Performs the operation in parallel using System.Threading.Parallel.For. + /// Performs the operation in parallel using . /// The order in which the given function is applied to elements of the input array is not specified. + /// /// /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val iter : action:('T -> unit) -> array:'T[] -> unit /// Apply the given function to each element of the array. The integer passed to the /// function indicates the index of element. /// - /// Performs the operation in parallel using System.Threading.Parallel.For. + /// Performs the operation in parallel using . /// The order in which the given function is applied to elements of the input array is not specified. + /// /// /// The input array. - /// Thrown when the input array is null. + /// + /// Thrown when the input array is null. [] val iteri: action:(int -> 'T -> unit) -> array:'T[] -> unit /// Create an array given the dimension and a generator function to compute the elements. /// - /// Performs the operation in parallel using System.Threading.Parallel.For. + /// Performs the operation in parallel using . /// The order in which the given function is applied to indices is not specified. + /// /// /// - /// 'T[] + /// + /// The array of results. [] val init : count:int -> initializer:(int -> 'T) -> 'T[] @@ -1207,11 +1501,14 @@ namespace Microsoft.FSharp.Collections /// elements for which the given predicate returns "true" and "false" /// respectively /// - /// Performs the operation in parallel using System.Threading.Parallel.For. + /// Performs the operation in parallel using . /// The order in which the given function is applied to indices is not specified. + /// /// The function to test the input elements. /// The input array. - /// 'T[] * 'T[] - /// Thrown when the input array is null. + /// + /// The two arrays of results. + /// + /// Thrown when the input array is null. [] val partition : predicate:('T -> bool) -> array:'T[] -> 'T[] * 'T[] diff --git a/src/fsharp/FSharp.Core/array2.fsi b/src/fsharp/FSharp.Core/array2.fsi index 86a3d5be5c..372bc13141 100644 --- a/src/fsharp/FSharp.Core/array2.fsi +++ b/src/fsharp/FSharp.Core/array2.fsi @@ -8,9 +8,12 @@ namespace Microsoft.FSharp.Collections [] [] - /// Basic operations on 2-dimensional arrays. + /// Contains operations for working with 2-dimensional arrays. /// - /// F# and CLI multi-dimensional arrays are typically zero-based. + /// + /// See also F# Language Guide - Arrays. + /// + /// F# and CLI multi-dimensional arrays are typically zero-based. /// However, CLI multi-dimensional arrays used in conjunction with external /// libraries (e.g. libraries associated with Visual Basic) be /// non-zero based, using a potentially different base for each dimension. @@ -18,7 +21,8 @@ namespace Microsoft.FSharp.Collections /// the basing on an input array will be propagated to a matching output /// array on the Array2D.map and Array2D.mapi operations. /// Non-zero-based arrays can also be created using Array2D.zeroCreateBased, - /// Array2D.createBased and Array2D.initBased. + /// Array2D.createBased and Array2D.initBased. + /// module Array2D = /// Fetches the base-index for the first dimension of the array. @@ -58,7 +62,7 @@ namespace Microsoft.FSharp.Collections /// The second-dimension index to begin copying into in the target array. /// The number of elements to copy across the first dimension of the arrays. /// The number of elements to copy across the second dimension of the arrays. - /// Thrown when any of the indices are negative or if either of + /// Thrown when any of the indices are negative or if either of /// the counts are larger than the dimensions of the array allow. [] val blit: source:'T[,] -> sourceIndex1:int -> sourceIndex2:int -> target:'T[,] -> targetIndex1:int -> targetIndex2:int -> length1:int -> length2:int -> unit @@ -70,7 +74,7 @@ namespace Microsoft.FSharp.Collections /// A function to produce elements of the array given the two indices. /// /// The generated array. - /// Thrown when either of the lengths is negative. + /// Thrown when either of the lengths is negative. [] val init: length1:int -> length2:int -> initializer:(int -> int -> 'T) -> 'T[,] @@ -81,7 +85,7 @@ namespace Microsoft.FSharp.Collections /// The value to populate the new array. /// /// The created array. - /// Thrown when length1 or length2 is negative. + /// Thrown when length1 or length2 is negative. [] val create: length1:int -> length2:int -> value:'T -> 'T[,] @@ -91,7 +95,7 @@ namespace Microsoft.FSharp.Collections /// The length of the second dimension of the array. /// /// The created array. - /// Thrown when length1 or length2 is negative. + /// Thrown when length1 or length2 is negative. [] val zeroCreate : length1:int -> length2:int -> 'T[,] @@ -104,7 +108,7 @@ namespace Microsoft.FSharp.Collections /// A function to produce elements of the array given the two indices. /// /// The created array. - /// Thrown when base1, base2, length1, or length2 is negative. + /// Thrown when base1, base2, length1, or length2 is negative. [] val initBased: base1:int -> base2:int -> length1:int -> length2:int -> initializer:(int -> int -> 'T) -> 'T[,] @@ -117,7 +121,7 @@ namespace Microsoft.FSharp.Collections /// The value to populate the new array. /// /// The created array. - /// Thrown when base1, base2, length1, or length2 is negative. + /// Thrown when base1, base2, length1, or length2 is negative. [] val createBased: base1:int -> base2:int -> length1:int -> length2:int -> initial: 'T -> 'T[,] @@ -129,7 +133,7 @@ namespace Microsoft.FSharp.Collections /// The length of the second dimension of the array. /// /// The created array. - /// Thrown when base1, base2, length1, or length2 is negative. + /// Thrown when base1, base2, length1, or length2 is negative. [] val zeroCreateBased : base1:int -> base2:int -> length1:int -> length2:int -> 'T[,] @@ -209,7 +213,7 @@ namespace Microsoft.FSharp.Collections /// The index along the first dimension. /// The index along the second dimension. /// The value to set in the array. - /// Thrown when the indices are negative or exceed the bounds of the array. + /// Thrown when the indices are negative or exceed the bounds of the array. [] val set: array:'T[,] -> index1:int -> index2:int -> value:'T -> unit @@ -220,7 +224,7 @@ namespace Microsoft.FSharp.Collections /// The index along the second dimension. /// /// The value of the array at the given index. - /// Thrown when the indices are negative or exceed the bounds of the array. + /// Thrown when the indices are negative or exceed the bounds of the array. [] val get: array:'T[,] -> index1:int -> index2:int -> 'T diff --git a/src/fsharp/FSharp.Core/array3.fsi b/src/fsharp/FSharp.Core/array3.fsi index e5372c9084..60be384d0d 100644 --- a/src/fsharp/FSharp.Core/array3.fsi +++ b/src/fsharp/FSharp.Core/array3.fsi @@ -9,7 +9,11 @@ namespace Microsoft.FSharp.Collections [] [] - /// Basic operations on rank 3 arrays. + /// Contains operations for working with rank 3 arrays. + /// + /// + /// See also F# Language Guide - Arrays. + /// module Array3D = /// Creates an array whose elements are all initially the given value. @@ -17,29 +21,35 @@ namespace Microsoft.FSharp.Collections /// The length of the second dimension. /// The length of the third dimension. /// The value of the array elements. + /// /// The created array. [] val create: length1:int -> length2:int -> length3:int -> initial:'T -> 'T[,,] /// Creates an array given the dimensions and a generator function to compute the elements. + /// /// The length of the first dimension. /// The length of the second dimension. /// The length of the third dimension. /// The function to create an initial value at each index into the array. + /// /// The created array. [] val init: length1:int -> length2:int -> length3:int -> initializer:(int -> int -> int -> 'T) -> 'T[,,] /// Fetches an element from a 3D array. You can also use the syntax 'array.[index1,index2,index3]' + /// /// The input array. /// The index along the first dimension. /// The index along the second dimension. /// The index along the third dimension. + /// /// The value at the given index. [] val get: array:'T[,,] -> index1:int -> index2:int -> index3:int -> 'T /// Applies the given function to each element of the array. + /// /// The function to apply to each element of the array. /// The input array. [] @@ -47,25 +57,32 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to each element of the array. The integer indices passed to the /// function indicates the index of element. + /// /// The function to apply to each element of the array. /// The input array. [] val iteri: action:(int -> int -> int -> 'T -> unit) -> array:'T[,,] -> unit /// Returns the length of an array in the first dimension + /// /// The input array. + /// /// The length of the array in the first dimension. [] val length1: array:'T[,,] -> int /// Returns the length of an array in the second dimension. + /// /// The input array. + /// /// The length of the array in the second dimension. [] val length2: array:'T[,,] -> int /// Returns the length of an array in the third dimension. + /// /// The input array. + /// /// The length of the array in the third dimension. [] val length3: array:'T[,,] -> int @@ -77,6 +94,7 @@ namespace Microsoft.FSharp.Collections /// array. /// The function to transform each element of the array. /// The input array. + /// /// The array created from the transformed elements. [] val map: mapping:('T -> 'U) -> array:'T[,,] -> 'U[,,] @@ -89,12 +107,14 @@ namespace Microsoft.FSharp.Collections /// array. /// The function to transform the elements at each index in the array. /// The input array. + /// /// The array created from the transformed elements. [] val mapi: mapping:(int -> int -> int -> 'T -> 'U) -> array:'T[,,] -> 'U[,,] /// Sets the value of an element in an array. You can also /// use the syntax 'array.[index1,index2,index3] <- value'. + /// /// The input array. /// The index along the first dimension. /// The index along the second dimension. @@ -104,9 +124,11 @@ namespace Microsoft.FSharp.Collections val set: array:'T[,,] -> index1:int -> index2:int -> index3:int -> value:'T -> unit /// Creates an array where the entries are initially the "default" value. + /// /// The length of the first dimension. /// The length of the second dimension. /// The length of the third dimension. + /// /// The created array. [] val zeroCreate: length1:int -> length2:int -> length3:int -> 'T[,,] @@ -115,74 +137,91 @@ namespace Microsoft.FSharp.Collections [] [] - /// Basic operations on rank 4 arrays. + /// Contains operations for working with rank 4 arrays. module Array4D = /// Creates an array whose elements are all initially the given value + /// /// The length of the first dimension. /// The length of the second dimension. /// The length of the third dimension. /// The length of the fourth dimension. /// The initial value for each element of the array. + /// /// The created array. [] val create: length1:int -> length2:int -> length3:int -> length4:int -> initial:'T -> 'T[,,,] /// Creates an array given the dimensions and a generator function to compute the elements. + /// /// The length of the first dimension. /// The length of the second dimension. /// The length of the third dimension. /// The length of the fourth dimension. /// The function to create an initial value at each index in the array. + /// /// The created array. [] val init: length1:int -> length2:int -> length3:int -> length4:int -> initializer:(int -> int -> int -> int -> 'T) -> 'T[,,,] /// Returns the length of an array in the first dimension + /// /// The input array. + /// /// The length of the array in the first dimension. [] val length1: array:'T[,,,] -> int /// Returns the length of an array in the second dimension. + /// /// The input array. + /// /// The length of the array in the second dimension. [] val length2: array:'T[,,,] -> int /// Returns the length of an array in the third dimension. + /// /// The input array. + /// /// The length of the array in the third dimension. [] val length3: array:'T[,,,] -> int /// Returns the length of an array in the fourth dimension. + /// /// The input array. + /// /// The length of the array in the fourth dimension. [] val length4: array:'T[,,,] -> int /// Creates an array where the entries are initially the "default" value. + /// /// The length of the first dimension. /// The length of the second dimension. /// The length of the third dimension. /// The length of the fourth dimension. + /// /// The created array. [] val zeroCreate: length1:int -> length2:int -> length3:int -> length4:int -> 'T[,,,] /// Fetches an element from a 4D array. You can also use the syntax 'array.[index1,index2,index3,index4]' + /// /// The input array. /// The index along the first dimension. /// The index along the second dimension. /// The index along the third dimension. /// The index along the fourth dimension. + /// /// The value at the given index. [] val get: array:'T[,,,] -> index1:int -> index2:int -> index3:int -> index4:int -> 'T /// Sets the value of an element in an array. You can also /// use the syntax 'array.[index1,index2,index3,index4] <- value'. + /// /// The input array. /// The index along the first dimension. /// The index along the second dimension. diff --git a/src/fsharp/FSharp.Core/async.fsi b/src/fsharp/FSharp.Core/async.fsi index 72502b9d26..5fea2c1a81 100644 --- a/src/fsharp/FSharp.Core/async.fsi +++ b/src/fsharp/FSharp.Core/async.fsi @@ -11,24 +11,37 @@ namespace Microsoft.FSharp.Control open Microsoft.FSharp.Control open Microsoft.FSharp.Collections - /// A compositional asynchronous computation, which, when run, will eventually produce a value - /// of type T, or else raises an exception. + /// + /// An asynchronous computation, which, when run, will eventually produce a value of type T, or else raises an exception. + /// /// - /// Asynchronous computations are normally specified using an F# computation expression. + /// + /// This type has no members. Asynchronous computations are normally specified either by using an async expression + /// or the static methods in the type. /// - /// When run, asynchronous computations have two modes: as a work item (executing synchronous - /// code), or as a wait item (waiting for an event or I/O completion). + /// See also F# Language Guide - Async Workflows. + /// /// - /// When run, asynchronous computations can be governed by CancellationToken. This can usually - /// be specified when the async computation is started. The associated CancellationTokenSource - /// may be used to cancel the asynchronous computation. Asynchronous computations built using - /// computation expressions can check the cancellation condition regularly. Synchronous - /// computations within an asynchronous computation do not automatically check this condition. + /// + /// Library functionality for asynchronous programming, events and agents. See also + /// Asynchronous Programming, + /// Events and + /// Lazy Expressions in the + /// F# Language Guide. + /// + /// + /// Async Programming [] type Async<'T> - /// This static class holds members for creating and manipulating asynchronous computations. + /// Holds static members for creating and manipulating asynchronous computations. + /// + /// + /// See also F# Language Guide - Async Workflows. + /// + /// + /// Async Programming [] [] @@ -43,49 +56,69 @@ namespace Microsoft.FSharp.Control /// /// The timeout parameter is given in milliseconds. A value of -1 is equivalent to /// System.Threading.Timeout.Infinite. + /// /// The computation to run. /// The amount of time in milliseconds to wait for the result of the - /// computation before raising a System.TimeoutException. If no value is provided - /// for timeout then a default of -1 is used to correspond to System.Threading.Timeout.Infinite. + /// computation before raising a . If no value is provided + /// for timeout then a default of -1 is used to correspond to . /// If a cancellable cancellationToken is provided, timeout parameter will be ignored /// The cancellation token to be associated with the computation. /// If one is not supplied, the default cancellation token is used. + /// /// The result of the computation. + /// + /// Starting Async Computations static member RunSynchronously : computation:Async<'T> * ?timeout : int * ?cancellationToken:CancellationToken-> 'T /// Starts the asynchronous computation in the thread pool. Do not await its result. /// /// If no cancellation token is provided then the default cancellation token is used. + /// /// The computation to run asynchronously. /// The cancellation token to be associated with the computation. /// If one is not supplied, the default cancellation token is used. + /// + /// Starting Async Computations static member Start : computation:Async * ?cancellationToken:CancellationToken -> unit /// Executes a computation in the thread pool. + /// /// If no cancellation token is provided then the default cancellation token is used. - /// A System.Threading.Tasks.Task that will be completed + /// + /// A that will be completed /// in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled) - /// + /// + /// Starting Async Computations static member StartAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions * ?cancellationToken:CancellationToken -> Task<'T> - /// Creates an asynchronous computation which starts the given computation as a System.Threading.Tasks.Task + /// Creates an asynchronous computation which starts the given computation as a + /// + /// Starting Async Computations static member StartChildAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions -> Async> /// Creates an asynchronous computation that executes computation. /// If this computation completes successfully then return Choice1Of2 with the returned /// value. If this computation raises an exception before it completes then return Choice2Of2 /// with the raised exception. + /// /// The input computation that returns the type T. + /// /// A computation that returns a choice of type T or exception. + /// + /// Cancellation and Exceptions static member Catch : computation:Async<'T> -> Async> /// Creates an asynchronous computation that executes computation. /// If this computation is cancelled before it completes then the computation generated by /// running compensation is executed. + /// /// The input asynchronous computation. /// The function to be run if the computation is cancelled. + /// /// An asynchronous computation that runs the compensation if the input computation /// is cancelled. + /// + /// Cancellation and Exceptions static member TryCancelled : computation:Async<'T> * compensation:(OperationCanceledException -> unit) -> Async<'T> /// Generates a scoped, cooperative cancellation handler for use within an asynchronous workflow. @@ -97,28 +130,41 @@ namespace Microsoft.FSharp.Control /// interruption is executed on the thread that is performing the cancellation. This can /// be used to arrange for a computation to be asynchronously notified that a cancellation /// has occurred, e.g. by setting a flag, or deregistering a pending I/O action. + /// /// The function that is executed on the thread performing the /// cancellation. + /// /// An asynchronous computation that triggers the interruption if it is cancelled /// before being disposed. + /// + /// Cancellation and Exceptions static member OnCancel : interruption: (unit -> unit) -> Async /// Creates an asynchronous computation that returns the CancellationToken governing the execution /// of the computation. + /// /// In async { let! token = Async.CancellationToken ...} token can be used to initiate other /// asynchronous operations that will cancel cooperatively with this workflow. + /// /// An asynchronous computation capable of retrieving the CancellationToken from a computation /// expression. + /// + /// Cancellation and Exceptions static member CancellationToken : Async /// Raises the cancellation condition for the most recent set of asynchronous computations started /// without any specific CancellationToken. Replaces the global CancellationTokenSource with a new /// global token source for any asynchronous computations created after this point without any /// specific CancellationToken. + /// + /// Cancellation and Exceptions static member CancelDefaultToken : unit -> unit /// Gets the default cancellation token for executing asynchronous computations. + /// /// The default CancellationToken. + /// + /// Cancellation and Exceptions static member DefaultCancellationToken : CancellationToken //---------- Parallelism @@ -128,7 +174,7 @@ namespace Microsoft.FSharp.Control /// /// This method should normally be used as the immediate /// right-hand-side of a let! binding in an F# asynchronous workflow, that is, - /// + /// /// async { ... /// let! completor1 = childComputation1 |> Async.StartChild /// let! completor2 = childComputation2 |> Async.StartChild @@ -136,14 +182,19 @@ namespace Microsoft.FSharp.Control /// let! result1 = completor1 /// let! result2 = completor2 /// ... } + /// /// /// When used in this way, each use of StartChild starts an instance of childComputation /// and returns a completor object representing a computation to wait for the completion of the operation. /// When executed, the completor awaits the completion of childComputation. + /// /// The child computation. /// The timeout value in milliseconds. If one is not provided - /// then the default value of -1 corresponding to System.Threading.Timeout.Infinite. + /// then the default value of -1 corresponding to . + /// /// A new computation that waits for the input computation to finish. + /// + /// Cancellation and Exceptions static member StartChild : computation:Async<'T> * ?millisecondsTimeout : int -> Async> /// Creates an asynchronous computation that executes all the given asynchronous computations, @@ -157,8 +208,12 @@ namespace Microsoft.FSharp.Control /// The overall computation will respond to cancellation while executing the child computations. /// If cancelled, the computation will cancel any remaining child computations but will still wait /// for the other child computations to complete. + /// /// A sequence of distinct computations to be parallelized. + /// /// A computation that returns an array of values from the sequence of input computations. + /// + /// Composing Async Computations static member Parallel : computations:seq> -> Async<'T[]> /// Creates an asynchronous computation that executes all the given asynchronous computations, @@ -172,8 +227,12 @@ namespace Microsoft.FSharp.Control /// The overall computation will respond to cancellation while executing the child computations. /// If cancelled, the computation will cancel any remaining child computations but will still wait /// for the other child computations to complete. + /// /// A sequence of distinct computations to be parallelized. + /// /// A computation that returns an array of values from the sequence of input computations. + /// + /// Composing Async Computations static member Parallel : computations:seq> * ?maxDegreeOfParallelism : int -> Async<'T[]> /// Creates an asynchronous computation that executes all the given asynchronous computations sequentially. @@ -186,8 +245,12 @@ namespace Microsoft.FSharp.Control /// The overall computation will respond to cancellation while executing the child computations. /// If cancelled, the computation will cancel any remaining child computations but will still wait /// for the other child computations to complete. + /// /// A sequence of distinct computations to be run in sequence. + /// /// A computation that returns an array of values from the sequence of input computations. + /// + /// Composing Async Computations static member Sequential : computations:seq> -> Async<'T[]> /// Creates an asynchronous computation that executes all given asynchronous computations in parallel, @@ -201,35 +264,53 @@ namespace Microsoft.FSharp.Control /// The overall computation will respond to cancellation while executing the child computations. /// If cancelled, the computation will cancel any remaining child computations but will still wait /// for the other child computations to complete. + /// /// A sequence of computations to be parallelized. + /// /// A computation that returns the first succeeding computation. + /// + /// Composing Async Computations static member Choice : computations:seq> -> Async<'T option> //---------- Thread Control /// Creates an asynchronous computation that creates a new thread and runs /// its continuation in that thread. + /// /// A computation that will execute on a new thread. + /// + /// Threads and Contexts static member SwitchToNewThread : unit -> Async /// Creates an asynchronous computation that queues a work item that runs /// its continuation. + /// /// A computation that generates a new work item in the thread pool. + /// + /// Threads and Contexts static member SwitchToThreadPool : unit -> Async /// Creates an asynchronous computation that runs /// its continuation using syncContext.Post. If syncContext is null /// then the asynchronous computation is equivalent to SwitchToThreadPool(). + /// /// The synchronization context to accept the posted computation. + /// /// An asynchronous computation that uses the syncContext context to execute. + /// + /// Threads and Contexts static member SwitchToContext : syncContext:System.Threading.SynchronizationContext -> Async /// Creates an asynchronous computation that captures the current /// success, exception and cancellation continuations. The callback must /// eventually call exactly one of the given continuations. + /// /// The function that accepts the current success, exception, and cancellation /// continuations. + /// /// An asynchronous computation that provides the callback with the current continuations. + /// + /// Composing Async Computations static member FromContinuations : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T> /// Creates an asynchronous computation that waits for a single invocation of a CLI @@ -242,101 +323,137 @@ namespace Microsoft.FSharp.Control /// /// If cancelAction is not specified, then cancellation causes the computation /// to cancel immediately. + /// /// The event to handle once. /// An optional function to execute instead of cancelling when a /// cancellation is issued. + /// /// An asynchronous computation that waits for the event to be invoked. + /// + /// Awaiting Results static member AwaitEvent: event:IEvent<'Del,'T> * ?cancelAction : (unit -> unit) -> Async<'T> when 'Del : delegate<'T,unit> and 'Del :> System.Delegate /// Creates an asynchronous computation that will wait on the given WaitHandle. /// /// The computation returns true if the handle indicated a result within the given timeout. + /// /// The WaitHandle that can be signalled. /// The timeout value in milliseconds. If one is not provided - /// then the default value of -1 corresponding to System.Threading.Timeout.Infinite. + /// then the default value of -1 corresponding to . + /// /// An asynchronous computation that waits on the given WaitHandle. + /// + /// Awaiting Results static member AwaitWaitHandle: waitHandle: WaitHandle * ?millisecondsTimeout:int -> Async /// Creates an asynchronous computation that will wait on the IAsyncResult. /// /// The computation returns true if the handle indicated a result within the given timeout. + /// /// The IAsyncResult to wait on. /// The timeout value in milliseconds. If one is not provided - /// then the default value of -1 corresponding to System.Threading.Timeout.Infinite. + /// then the default value of -1 corresponding to . + /// /// An asynchronous computation that waits on the given IAsyncResult. + /// + /// Awaiting Results static member AwaitIAsyncResult: iar: System.IAsyncResult * ?millisecondsTimeout:int -> Async - /// Return an asynchronous computation that will wait for the given task to complete and return - /// its result. + /// Return an asynchronous computation that will wait for the given task to complete and return + /// its result. + /// + /// The task to await. + /// + /// Awaiting Results static member AwaitTask: task: Task<'T> -> Async<'T> - /// Return an asynchronous computation that will wait for the given task to complete and return - /// its result. + + /// Return an asynchronous computation that will wait for the given task to complete and return + /// its result. + /// + /// The task to await. + /// + /// Awaiting Results static member AwaitTask: task: Task -> Async - /// Creates an asynchronous computation that will sleep for the given time. This is scheduled - /// using a System.Threading.Timer object. The operation will not block operating system threads - /// for the duration of the wait. + /// + /// Creates an asynchronous computation that will sleep for the given time. This is scheduled + /// using a System.Threading.Timer object. The operation will not block operating system threads + /// for the duration of the wait. + /// + /// /// The number of milliseconds to sleep. + /// /// An asynchronous computation that will sleep for the given time. - /// Thrown when the due time is negative + /// + /// Thrown when the due time is negative /// and not infinite. + /// + /// Awaiting Results static member Sleep: millisecondsDueTime:int -> Async - /// Creates an asynchronous computation that will sleep for the given time. This is scheduled - /// using a System.Threading.Timer object. The operation will not block operating system threads - /// for the duration of the wait. + /// + /// Creates an asynchronous computation that will sleep for the given time. This is scheduled + /// using a System.Threading.Timer object. The operation will not block operating system threads + /// for the duration of the wait. + /// + /// /// The amount of time to sleep. + /// /// An asynchronous computation that will sleep for the given time. - /// Thrown when the due time is negative. + /// + /// Thrown when the due time is negative. + /// + /// Awaiting Results static member Sleep: dueTime:TimeSpan -> Async - /// Creates an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in CLI APIs. For example, - /// Async.FromBeginEnd(ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, beginFunc is executed, with - /// a callback which represents the continuation of the computation. - /// When the callback is invoked, the overall result is fetched using endFunc. + /// + /// Creates an asynchronous computation in terms of a Begin/End pair of actions in + /// the style used in CLI APIs. + /// /// - /// The computation will respond to cancellation while waiting for the completion + /// + /// The computation will respond to cancellation while waiting for the completion /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is /// executed, and the computation continues to wait for the completion of the operation. /// /// If cancelAction is not specified, then cancellation causes the computation /// to stop immediately, and subsequent invocations of the callback are ignored. + /// /// The function initiating a traditional CLI asynchronous operation. /// The function completing a traditional CLI asynchronous operation. /// An optional function to be executed when a cancellation is requested. + /// /// An asynchronous computation wrapping the given Begin/End functions. + /// + /// Legacy .NET Async Interoperability static member FromBeginEnd : beginAction:(System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> - /// Creates an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in CLI APIs. This overload should be used if the operation is - /// qualified by one argument. For example, - /// Async.FromBeginEnd(place,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, beginFunc is executed, with - /// a callback which represents the continuation of the computation. - /// When the callback is invoked, the overall result is fetched using endFunc. + /// + /// Creates an asynchronous computation in terms of a Begin/End pair of actions in + /// the style used in .NET 2.0 APIs. + /// /// /// The computation will respond to cancellation while waiting for the completion /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is /// executed, and the computation continues to wait for the completion of the operation. - /// - /// If cancelAction is not specified, then cancellation causes the computation - /// to stop immediately, and subsequent invocations of the callback are ignored. + /// + /// If cancelAction is not specified, then cancellation causes the computation + /// to stop immediately, and subsequent invocations of the callback are ignored. + /// + /// /// The argument for the operation. /// The function initiating a traditional CLI asynchronous operation. /// The function completing a traditional CLI asynchronous operation. /// An optional function to be executed when a cancellation is requested. + /// /// An asynchronous computation wrapping the given Begin/End functions. + /// + /// Legacy .NET Async Interoperability static member FromBeginEnd : arg:'Arg1 * beginAction:('Arg1 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> - /// Creates an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in CLI APIs. This overload should be used if the operation is - /// qualified by two arguments. For example, - /// Async.FromBeginEnd(arg1,arg2,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, beginFunc is executed, with - /// a callback which represents the continuation of the computation. - /// When the callback is invoked, the overall result is fetched using endFunc. + /// + /// Creates an asynchronous computation in terms of a Begin/End pair of actions in + /// the style used in .NET 2.0 APIs. /// /// The computation will respond to cancellation while waiting for the completion /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is @@ -344,21 +461,20 @@ namespace Microsoft.FSharp.Control /// /// If cancelAction is not specified, then cancellation causes the computation /// to stop immediately, and subsequent invocations of the callback are ignored. + /// /// The first argument for the operation. /// The second argument for the operation. /// The function initiating a traditional CLI asynchronous operation. /// The function completing a traditional CLI asynchronous operation. /// An optional function to be executed when a cancellation is requested. + /// /// An asynchronous computation wrapping the given Begin/End functions. + /// + /// Legacy .NET Async Interoperability static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * beginAction:('Arg1 * 'Arg2 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> /// Creates an asynchronous computation in terms of a Begin/End pair of actions in - /// the style used in CLI APIs. This overload should be used if the operation is - /// qualified by three arguments. For example, - /// Async.FromBeginEnd(arg1,arg2,arg3,ws.BeginGetWeather,ws.EndGetWeather) - /// When the computation is run, beginFunc is executed, with - /// a callback which represents the continuation of the computation. - /// When the callback is invoked, the overall result is fetched using endFunc. + /// the style used in .NET 2.0 APIs. /// /// The computation will respond to cancellation while waiting for the completion /// of the operation. If a cancellation occurs, and cancelAction is specified, then it is @@ -366,49 +482,28 @@ namespace Microsoft.FSharp.Control /// /// If cancelAction is not specified, then cancellation causes the computation /// to stop immediately, and subsequent invocations of the callback are ignored. + /// /// The first argument for the operation. /// The second argument for the operation. /// The third argument for the operation. /// The function initiating a traditional CLI asynchronous operation. /// The function completing a traditional CLI asynchronous operation. /// An optional function to be executed when a cancellation is requested. + /// /// An asynchronous computation wrapping the given Begin/End functions. + /// + /// Legacy .NET Async Interoperability static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * arg3:'Arg3 * beginAction:('Arg1 * 'Arg2 * 'Arg3 * System.AsyncCallback * obj -> System.IAsyncResult) * endAction:(System.IAsyncResult -> 'T) * ?cancelAction : (unit -> unit) -> Async<'T> - /// Creates three functions that can be used to implement the .NET Asynchronous + /// Creates three functions that can be used to implement the .NET 1.0 Asynchronous /// Programming Model (APM) for a given asynchronous computation. - /// - /// The functions should normally be published as members with prefix Begin, - /// End and Cancel, and can be used within a type definition as follows: - /// - /// let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun arg -> computation) - /// member x.BeginSomeOperation(arg,callback,state:obj) = beginAction(arg,callback,state) - /// member x.EndSomeOperation(iar) = endAction(iar) - /// member x.CancelSomeOperation(iar) = cancelAction(iar) - /// - /// - /// If the asynchronous computation takes no arguments, then AsBeginEnd is used as follows: - /// - /// let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun () -> computation) - /// member x.BeginSomeOperation(callback,state:obj) = beginAction((),callback,state) - /// member x.EndSomeOperation(iar) = endAction(iar) - /// member x.CancelSomeOperation(iar) = cancelAction(iar) - /// - /// - /// - /// If the asynchronous computation takes two arguments, then AsBeginEnd is used as follows: - /// - /// let beginAction,endAction,cancelAction = Async.AsBeginEnd (fun arg1 arg2 -> computation) - /// member x.BeginSomeOperation(arg1,arg2,callback,state:obj) = beginAction((),callback,state) - /// member x.EndSomeOperation(iar) = endAction(iar) - /// member x.CancelSomeOperation(iar) = cancelAction(iar) - /// - /// - /// In each case, the resulting API will be familiar to programmers in other CLI languages and - /// is a useful way to publish asynchronous computations in CLI components. + /// /// A function generating the asynchronous computation to split into the traditional /// .NET Asynchronous Programming Model. + /// /// A tuple of the begin, end, and cancel members. + /// + /// Legacy .NET Async Interoperability static member AsBeginEnd : computation:('Arg -> Async<'T>) -> // The 'Begin' member ('Arg * System.AsyncCallback * obj -> System.IAsyncResult) * @@ -419,20 +514,28 @@ namespace Microsoft.FSharp.Control /// Creates an asynchronous computation that runs the given computation and ignores /// its result. + /// /// The input computation. + /// /// A computation that is equivalent to the input computation, but disregards the result. + /// + /// Composing Async Computations static member Ignore : computation: Async<'T> -> Async /// Runs an asynchronous computation, starting immediately on the current operating system /// thread. Call one of the three continuations when the operation completes. + /// /// If no cancellation token is provided then the default cancellation token /// is used. + /// /// The asynchronous computation to execute. /// The function called on success. /// The function called on exception. /// The function called on cancellation. /// The CancellationToken to associate with the computation. /// The default is used if this parameter is not provided. + /// + /// Starting Async Computations static member StartWithContinuations: computation:Async<'T> * continuation:('T -> unit) * exceptionContinuation:(exn -> unit) * cancellationContinuation:(OperationCanceledException -> unit) * @@ -445,34 +548,47 @@ namespace Microsoft.FSharp.Control /// Runs an asynchronous computation, starting immediately on the current operating system /// thread. + /// /// If no cancellation token is provided then the default cancellation token is used. + /// /// The asynchronous computation to execute. /// The CancellationToken to associate with the computation. /// The default is used if this parameter is not provided. + /// + /// Starting Async Computations static member StartImmediate: computation:Async * ?cancellationToken:CancellationToken-> unit /// Runs an asynchronous computation, starting immediately on the current operating system - /// thread, but also returns the execution as System.Threading.Tasks.Task + /// thread, but also returns the execution as /// + /// /// If no cancellation token is provided then the default cancellation token is used. /// You may prefer using this method if you want to achive a similar behviour to async await in C# as /// async computation starts on the current thread with an ability to return a result. /// + /// /// The asynchronous computation to execute. /// The CancellationToken to associate with the computation. /// The default is used if this parameter is not provided. - /// A System.Threading.Tasks.Task that will be completed + /// + /// A that will be completed /// in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled) + /// + /// Starting Async Computations static member StartImmediateAsTask: computation:Async<'T> * ?cancellationToken:CancellationToken-> Task<'T> /// The F# compiler emits references to this type to implement F# async expressions. + /// + /// Async Internals type AsyncReturn /// The F# compiler emits references to this type to implement F# async expressions. [] + /// + /// Async Internals type AsyncActivation<'T> = /// The F# compiler emits calls to this function to implement F# async expressions. @@ -507,6 +623,8 @@ namespace Microsoft.FSharp.Control [] /// Entry points for generated code + /// + /// Async Internals module AsyncPrimitives = /// The F# compiler emits calls to this function to implement F# async expressions. @@ -527,7 +645,7 @@ namespace Microsoft.FSharp.Control /// The F# compiler emits calls to this function to implement constructs for F# async expressions. /// /// The async activation. - /// The result of the first part of the computation. + /// The result of the first part of the computation. /// A function returning the second part of the computation. /// /// A value indicating asynchronous execution. @@ -536,6 +654,7 @@ namespace Microsoft.FSharp.Control /// The F# compiler emits calls to this function to implement the let! construct for F# async expressions. /// /// The async activation. + /// The first part of the computation. /// A function returning the second part of the computation. /// /// An async activation suitable for running part1 of the asynchronous execution. @@ -578,6 +697,8 @@ namespace Microsoft.FSharp.Control [] [] /// The type of the async operator, used to build workflows for asynchronous computations. + /// + /// Async Programming type AsyncBuilder = /// Creates an asynchronous computation that enumerates the sequence seq /// on demand and runs body for each element. @@ -586,9 +707,11 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of for in the /// async { ... } computation expression syntax. + /// /// The sequence to enumerate. /// A function to take an item from the sequence and create /// an asynchronous computation. Can be seen as the body of the for expression. + /// /// An asynchronous computation that will enumerate the sequence and run body /// for each element. member For: sequence:seq<'T> * body:('T -> Async) -> Async @@ -609,8 +732,10 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of expression sequencing in the /// async { ... } computation expression syntax. + /// /// The first part of the sequenced computation. /// The second part of the sequenced computation. + /// /// An asynchronous computation that runs both of the computations sequentially. member inline Combine : computation1:Async * computation2:Async<'T> -> Async<'T> @@ -621,9 +746,11 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of while in the /// async { ... } computation expression syntax. + /// /// The function to determine when to stop executing computation. /// The function to be executed. Equivalent to the body /// of a while expression. + /// /// An asynchronous computation that behaves similarly to a while loop when run. member While : guard:(unit -> bool) * computation:Async -> Async @@ -633,7 +760,9 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of return in the /// async { ... } computation expression syntax. + /// /// The value to return from the computation. + /// /// An asynchronous computation that returns value when executed. member inline Return : value:'T -> Async<'T> @@ -641,14 +770,18 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of return! in the /// async { ... } computation expression syntax. + /// /// The input computation. + /// /// The input computation. member inline ReturnFrom : computation:Async<'T> -> Async<'T> /// Creates an asynchronous computation that runs generator. /// /// A cancellation check is performed when the computation is executed. + /// /// The function to run. + /// /// An asynchronous computation that runs generator. member Delay : generator:(unit -> Async<'T>) -> Async<'T> @@ -660,9 +793,11 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of use and use! in the /// async { ... } computation expression syntax. + /// /// The resource to be used and disposed. /// The function that takes the resource and returns an asynchronous /// computation. + /// /// An asynchronous computation that binds and eventually disposes resource. member Using: resource:'T * binder:('T -> Async<'U>) -> Async<'U> when 'T :> System.IDisposable @@ -673,8 +808,10 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of let! in the /// async { ... } computation expression syntax. + /// /// The computation to provide an unbound result. /// The function to bind the result of computation. + /// /// An asynchronous computation that performs a monadic bind on the result /// of computation. member inline Bind: computation: Async<'T> * binder: ('T -> Async<'U>) -> Async<'U> @@ -687,9 +824,11 @@ namespace Microsoft.FSharp.Control /// /// The existence of this method permits the use of try/finally in the /// async { ... } computation expression syntax. + /// /// The input computation. /// The action to be run after computation completes or raises an /// exception (including cancellation). + /// /// An asynchronous computation that executes computation and compensation afterwards or /// when an exception is raised. member inline TryFinally : computation:Async<'T> * compensation:(unit -> unit) -> Async<'T> @@ -704,6 +843,7 @@ namespace Microsoft.FSharp.Control /// /// The input computation. /// The function to run when computation throws an exception. + /// /// An asynchronous computation that executes computation and calls catchHandler if an /// exception is thrown. member inline TryWith : computation:Async<'T> * catchHandler:(exn -> Async<'T>) -> Async<'T> @@ -718,6 +858,8 @@ namespace Microsoft.FSharp.Control [] /// A module of extension members providing asynchronous operations for some basic CLI types related to concurrency and I/O. + /// + /// Async Programming module CommonExtensions = type System.IO.Stream with @@ -726,27 +868,32 @@ namespace Microsoft.FSharp.Control /// The buffer to read into. /// An optional offset as a number of bytes in the stream. /// An optional number of bytes to read from the stream. + /// /// An asynchronous computation that will read from the stream into the given buffer. - /// Thrown when the sum of offset and count is longer than + /// Thrown when the sum of offset and count is longer than /// the buffer length. - /// Thrown when offset or count is negative. + /// Thrown when offset or count is negative. [] // give the extension member a nice, unmangled compiled name, unique within this module member AsyncRead : buffer:byte[] * ?offset:int * ?count:int -> Async /// Returns an asynchronous computation that will read the given number of bytes from the stream. + /// /// The number of bytes to read. + /// /// An asynchronous computation that returns the read byte[] when run. [] // give the extension member a nice, unmangled compiled name, unique within this module member AsyncRead : count:int -> Async /// Returns an asynchronous computation that will write the given bytes to the stream. + /// /// The buffer to write from. /// An optional offset as a number of bytes in the stream. /// An optional number of bytes to write to the stream. + /// /// An asynchronous computation that will write the given bytes to the stream. - /// Thrown when the sum of offset and count is longer than + /// Thrown when the sum of offset and count is longer than /// the buffer length. - /// Thrown when offset or count is negative. + /// Thrown when offset or count is negative. [] // give the extension member a nice, unmangled compiled name, unique within this module member AsyncWrite : buffer:byte[] * ?offset:int * ?count:int -> Async @@ -755,6 +902,7 @@ namespace Microsoft.FSharp.Control type IObservable<'T> with /// Permanently connects a listener function to the observable. The listener will /// be invoked for each observation. + /// /// The function to be called for each observation. [] // give the extension member a nice, unmangled compiled name, unique within this module member Add: callback:('T -> unit) -> unit @@ -762,12 +910,16 @@ namespace Microsoft.FSharp.Control /// Connects a listener function to the observable. The listener will /// be invoked for each observation. The listener can be removed by /// calling Dispose on the returned IDisposable object. + /// /// The function to be called for each observation. + /// /// An object that will remove the listener if disposed. [] // give the extension member a nice, unmangled compiled name, unique within this module member Subscribe: callback:('T -> unit) -> System.IDisposable /// A module of extension members providing asynchronous operations for some basic Web operations. + /// + /// Async Programming [] module WebExtensions = @@ -780,20 +932,26 @@ namespace Microsoft.FSharp.Control type System.Net.WebClient with /// Returns an asynchronous computation that, when run, will wait for the download of the given URI. + /// /// The URI to retrieve. + /// /// An asynchronous computation that will wait for the download of the URI. [] // give the extension member a nice, unmangled compiled name, unique within this module member AsyncDownloadString : address:System.Uri -> Async /// Returns an asynchronous computation that, when run, will wait for the download of the given URI. + /// /// The URI to retrieve. + /// /// An asynchronous computation that will wait for the download of the URI. [] // give the extension member a nice, unmangled compiled name, unique within this module member AsyncDownloadData : address:System.Uri -> Async /// Returns an asynchronous computation that, when run, will wait for the download of the given URI to specified file. + /// /// The URI to retrieve. /// The filename to save download to. + /// /// An asynchronous computation that will wait for the download of the URI to specified file. [] // give the extension member a nice, unmangled compiled name, unique within this module member AsyncDownloadFile : address:System.Uri * fileName: string -> Async diff --git a/src/fsharp/FSharp.Core/collections.fsi b/src/fsharp/FSharp.Core/collections.fsi index ad7f4363d1..ce063e711a 100644 --- a/src/fsharp/FSharp.Core/collections.fsi +++ b/src/fsharp/FSharp.Core/collections.fsi @@ -9,44 +9,63 @@ namespace Microsoft.FSharp.Collections open System open System.Collections.Generic - /// Common notions of comparison identity used with sorted data structures. + /// Common notions of value ordering implementing the + /// interface, for constructing sorted data structures and performing sorting operations. module ComparisonIdentity = - /// Structural comparison. Compare using Operators.compare. + /// Get an implementation of comparison semantics using structural comparison. + /// + /// An object implementing using . val inline Structural<'T> : IComparer<'T> when 'T : comparison - /// Non-structural comparison. Compare using NonStructuralComparison.compare. + /// Get an implementation of comparison semantics using non-structural comparison. + /// + /// An object implementing using . val inline NonStructural< ^T > : IComparer< ^T > when ^T : (static member ( < ) : ^T * ^T -> bool) and ^T : (static member ( > ) : ^T * ^T -> bool) - /// Compare using the given comparer function. + /// Get an implementation of comparison semantics using the given function. + /// /// A function to compare two values. - /// An object implementing IComparer using the supplied comparer. + /// + /// An object implementing using the supplied function. val FromFunction : comparer:('T -> 'T -> int) -> IComparer<'T> - /// Common notions of value identity used with hash tables. + /// Common notions of value identity implementing the + /// interface, for constructing objects and other collections module HashIdentity = - /// Structural hashing. Hash using Operators.(=) and Operators.hash. + /// Get an implementation of equality semantics using structural equality and structural hashing. + /// + /// An object implementing using and . val inline Structural<'T> : IEqualityComparer<'T> when 'T : equality - /// Non-structural hashing. Equality using NonStructuralComparison.(=) and NonStructuralComparison.hash. + /// Get an implementation of equality semantics using non-structural equality and non-structural hashing. + /// + /// + /// An object implementing using + /// and . + /// val inline NonStructural<'T> : IEqualityComparer< ^T > when ^T : equality and ^T : (static member ( = ) : ^T * ^T -> bool) + /// Get an implementation of equality semantics semantics using structural equality and structural hashing. + /// + /// An object implementing . val inline LimitedStructural<'T> : limit: int -> IEqualityComparer<'T> when 'T : equality - /// Physical hashing (hash on reference identity of objects, and the contents of value types). - /// Hash using LanguagePrimitives.PhysicalEquality and LanguagePrimitives.PhysicalHash, - /// That is, for value types use GetHashCode and Object.Equals (if no other optimization available), - /// and for reference types use System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode and - /// reference equality. + /// Get an implementation of equality semantics using reference equality and reference hashing. + /// + /// + /// An object implementing using + /// and . + /// val Reference<'T> : IEqualityComparer<'T> when 'T : not struct - /// Hash using the given hashing and equality functions. + /// Get an implementation of equality semantics using the given functions. + /// /// A function to generate a hash code from a value. /// A function to test equality of two values. - /// An object implementing IEqualityComparer using the supplied functions. - - // inline justification: allows inlining of hash functions + /// + /// An object implementing using the given functions. val inline FromFunctions<'T> : hasher:('T -> int) -> equality:('T -> 'T -> bool) -> IEqualityComparer<'T> diff --git a/src/fsharp/FSharp.Core/event.fsi b/src/fsharp/FSharp.Core/event.fsi index 23bc85ceea..855a259121 100644 --- a/src/fsharp/FSharp.Core/event.fsi +++ b/src/fsharp/FSharp.Core/event.fsi @@ -9,6 +9,8 @@ namespace Microsoft.FSharp.Control open Microsoft.FSharp.Collections /// Event implementations for an arbitrary type of delegate. + /// + /// Events and Observables [] type DelegateEvent<'Delegate when 'Delegate :> System.Delegate> = /// Creates an event object suitable for implementing an arbitrary type of delegate. @@ -21,12 +23,15 @@ namespace Microsoft.FSharp.Control member Publish : IDelegateEvent<'Delegate> /// Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument. + /// + /// Events and Observables [] type Event<'Delegate,'Args when 'Delegate : delegate<'Args,unit> and 'Delegate :> System.Delegate > = /// Creates an event object suitable for delegate types following the standard .NET Framework convention of a first 'sender' argument. /// The created event. new : unit -> Event<'Delegate,'Args> /// Triggers the event using the given sender object and parameters. The sender object may be null. + /// /// The object triggering the event. /// The parameters for the event. member Trigger : sender:obj * args:'Args -> unit @@ -35,12 +40,15 @@ namespace Microsoft.FSharp.Control /// Event implementations for the IEvent<_> type. + /// + /// Events and Observables [] type Event<'T> = /// Creates an observable object. /// The created event. new : unit -> Event<'T> /// Triggers an observation using the given parameters. + /// /// The event parameters. member Trigger : arg:'T -> unit /// Publishes an observation as a first class value. diff --git a/src/fsharp/FSharp.Core/eventmodule.fsi b/src/fsharp/FSharp.Core/eventmodule.fsi index c3f5f3cc9f..b4ea1078fe 100644 --- a/src/fsharp/FSharp.Core/eventmodule.fsi +++ b/src/fsharp/FSharp.Core/eventmodule.fsi @@ -7,26 +7,34 @@ namespace Microsoft.FSharp.Control [] [] + /// Contains operations for working with values of type . + /// + /// Events and Observables module Event = /// Fires the output event when either of the input events fire. /// The first input event. /// The second input event. + /// /// An event that fires when either of the input events fire. [] val merge: event1:IEvent<'Del1,'T> -> event2:IEvent<'Del2,'T> -> IEvent<'T> /// Returns a new event that passes values transformed by the given function. + /// /// The function to transform event values. /// The input event. + /// /// An event that passes the transformed values. [] val map: mapping:('T -> 'U) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> /// Returns a new event that listens to the original event and triggers the resulting /// event only when the argument to the event passes the given function. + /// /// The function to determine which triggers from the event to propagate. /// The input event. + /// /// An event that only passes values that pass the predicate. [] val filter: predicate:('T -> bool) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'T> @@ -34,8 +42,10 @@ namespace Microsoft.FSharp.Control /// Returns a new event that listens to the original event and triggers the /// first resulting event if the application of the predicate to the event arguments /// returned true, and the second event if it returned false. + /// /// The function to determine which output event to trigger. /// The input event. + /// /// A tuple of events. The first is triggered when the predicate evaluates to true /// and the second when the predicate evaluates to false. [] @@ -44,8 +54,10 @@ namespace Microsoft.FSharp.Control /// Returns a new event that listens to the original event and triggers the /// first resulting event if the application of the function to the event arguments /// returned a Choice1Of2, and the second event if it returns a Choice2Of2. + /// /// The function to transform event values into one of two types. /// The input event. + /// /// A tuple of events. The first fires whenever splitter evaluates to Choice1of1 and /// the second fires whenever splitter evaluates to Choice2of2. [] @@ -53,8 +65,10 @@ namespace Microsoft.FSharp.Control /// Returns a new event which fires on a selection of messages from the original event. /// The selection function takes an original message to an optional new message. + /// /// The function to select and transform event values to pass on. /// The input event. + /// /// An event that fires only when the chooser returns Some. [] val choose: chooser:('T -> 'U option) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> @@ -65,13 +79,16 @@ namespace Microsoft.FSharp.Control /// records the current value of the state parameter. The internal state is not locked during the /// execution of the accumulation function, so care should be taken that the /// input IEvent not triggered by multiple threads simultaneously. + /// /// The function to update the state with each event value. /// The initial state. /// The input event. + /// /// An event that fires on the updated state values. val scan: collector:('U -> 'T -> 'U) -> state:'U -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U> /// Runs the given function each time the given event is triggered. + /// /// The function to call when the event is triggered. /// The input event. [] @@ -81,7 +98,9 @@ namespace Microsoft.FSharp.Control /// The Nth triggering of the input event passes the arguments from the N-1th and Nth triggering as /// a pair. The argument passed to the N-1th triggering is held in hidden internal state until the /// Nth triggering occurs. + /// /// The input event. + /// /// An event that triggers on pairs of consecutive values passed from the source event. [] val pairwise: sourceEvent:IEvent<'Del,'T> -> IEvent<'T * 'T> diff --git a/src/fsharp/FSharp.Core/fslib-extra-pervasives.fsi b/src/fsharp/FSharp.Core/fslib-extra-pervasives.fsi index 6b43ddef90..c7ae3fc6cf 100644 --- a/src/fsharp/FSharp.Core/fslib-extra-pervasives.fsi +++ b/src/fsharp/FSharp.Core/fslib-extra-pervasives.fsi @@ -4,6 +4,9 @@ namespace Microsoft.FSharp.Core [] +/// A set of extra operators and functions. This module is automatically opened in all F# code. +/// +/// Basic Operators module ExtraTopLevelOperators = open System @@ -13,58 +16,76 @@ module ExtraTopLevelOperators = open Microsoft.FSharp.Text /// Print to stdout using the given format. + /// /// The formatter. + /// /// The formatted result. [] - val printf : format:Printf.TextWriterFormat<'T> -> 'T + val printf: format:Printf.TextWriterFormat<'T> -> 'T /// Print to stdout using the given format, and add a newline. + /// /// The formatter. + /// /// The formatted result. [] - val printfn : format:Printf.TextWriterFormat<'T> -> 'T + val printfn: format:Printf.TextWriterFormat<'T> -> 'T /// Print to stderr using the given format. + /// /// The formatter. + /// /// The formatted result. [] - val eprintf : format:Printf.TextWriterFormat<'T> -> 'T + val eprintf: format:Printf.TextWriterFormat<'T> -> 'T /// Print to stderr using the given format, and add a newline. + /// /// The formatter. + /// /// The formatted result. [] - val eprintfn : format:Printf.TextWriterFormat<'T> -> 'T + val eprintfn: format:Printf.TextWriterFormat<'T> -> 'T /// Print to a string using the given format. + /// /// The formatter. + /// /// The formatted result. [] - val sprintf : format:Printf.StringFormat<'T> -> 'T + val sprintf: format:Printf.StringFormat<'T> -> 'T /// Print to a string buffer and raise an exception with the given - /// result. Helper printers must return strings. + /// result. Helper printers must return strings. + /// /// The formatter. + /// /// The formatted result. [] val failwithf: format:Printf.StringFormat<'T,'Result> -> 'T /// Print to a file using the given format. + /// /// The file TextWriter. /// The formatter. + /// /// The formatted result. [] val fprintf : textWriter:System.IO.TextWriter -> format:Printf.TextWriterFormat<'T> -> 'T /// Print to a file using the given format, and add a newline. + /// /// The file TextWriter. /// The formatter. + /// /// The formatted result. [] val fprintfn : textWriter:System.IO.TextWriter -> format:Printf.TextWriterFormat<'T> -> 'T /// Builds a set from a sequence of objects. The objects are indexed using generic comparison. + /// /// The input sequence of elements. + /// /// The created set. [] val set : elements:seq<'T> -> Set<'T> @@ -155,6 +176,11 @@ namespace Microsoft.FSharp.Core.CompilerServices /// Represents the product of two measure expressions when returned as a generic argument of a provided type. + /// + /// + /// Library functionality for supporting type providers and code generated by the F# compiler. See + /// also F# Type Providers in the F# Language Guide. + /// type MeasureProduct<'Measure1, 'Measure2> /// Represents the inverse of a measure expressions when returned as a generic argument of a provided type. @@ -285,7 +311,9 @@ namespace Microsoft.FSharp.Core.CompilerServices /// /// Get the static parameters for a provided type. /// + /// /// A type returned by GetTypes or ResolveTypeName + /// /// abstract GetStaticParameters : typeWithoutArguments:Type -> ParameterInfo[] @@ -296,14 +324,17 @@ namespace Microsoft.FSharp.Core.CompilerServices /// the provided type definition which has static parameters /// the full path of the type, including encoded representations of static parameters /// the static parameters, indexed by name + /// /// abstract ApplyStaticArguments : typeWithoutArguments:Type * typePathWithArguments:string[] * staticArguments:obj[] -> Type /// /// Called by the compiler to ask for an Expression tree to replace the given MethodBase with. /// + /// /// MethodBase that was given to the compiler by a type returned by a GetType(s) call. /// Expressions that represent the parameters to this call. + /// /// An expression that the compiler will use in place of the given method base. abstract GetInvokerExpression : syntheticMethodBase:MethodBase * parameters:Expr[] -> Expr @@ -324,7 +355,9 @@ namespace Microsoft.FSharp.Core.CompilerServices /// /// Get the static parameters for a provided method. /// + /// /// A method returned by GetMethod on a provided type + /// /// The static parameters of the provided method, if any abstract GetStaticParametersForMethod : methodWithoutArguments:MethodBase -> ParameterInfo[] @@ -336,6 +369,7 @@ namespace Microsoft.FSharp.Core.CompilerServices /// the provided method definition which has static parameters /// the full name of the method that must be returned, including encoded representations of static parameters /// the values of the static parameters, indexed by name + /// /// The provided method definition corresponding to the given static parameter values abstract ApplyStaticArgumentsForMethod : methodWithoutArguments:MethodBase * methodNameWithArguments:string * staticArguments:obj[] -> MethodBase diff --git a/src/fsharp/FSharp.Core/list.fsi b/src/fsharp/FSharp.Core/list.fsi index 26c5dad94e..c4c560fb85 100644 --- a/src/fsharp/FSharp.Core/list.fsi +++ b/src/fsharp/FSharp.Core/list.fsi @@ -7,31 +7,41 @@ namespace Microsoft.FSharp.Collections open Microsoft.FSharp.Core open Microsoft.FSharp.Collections - /// Basic operations on lists. + /// Contains operations for working with values of type . + /// + /// Operations for collections such as lists, arrays, sets, maps and sequences. See also + /// F# Collection Types in the F# Language Guide. + /// [] [] module List = /// Returns a new list that contains all pairings of elements from the first and second lists. + /// /// The first input list. /// The second input list. + /// /// The resulting list of pairs. [] val allPairs: list1:'T1 list -> list2:'T2 list -> ('T1 * 'T2) list /// Returns a new list that contains the elements of the first list /// followed by elements of the second. + /// /// The first input list. /// The second input list. + /// /// The resulting list. [] val append: list1:'T list -> list2:'T list -> 'T list /// Returns the average of the elements in the list. /// - /// Raises System.ArgumentException if list is empty. + /// Raises if list is empty. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The resulting average. [] val inline average : list:^T list -> ^T @@ -41,10 +51,12 @@ namespace Microsoft.FSharp.Collections /// Returns the average of the elements generated by applying the function to each element of the list. /// - /// Raises System.ArgumentException if list is empty. + /// Raises if list is empty. /// The function to transform the list elements into the type to be averaged. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The resulting average. [] val inline averageBy : projection:('T -> ^U) -> list:'T list -> ^U @@ -55,23 +67,30 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to each element of the list. Returns /// the list comprised of the results x for each element where /// the function returns Some(x) + /// /// The function to generate options from the elements. /// The input list. + /// /// The list comprising the values selected from the chooser function. [] val choose: chooser:('T -> 'U option) -> list:'T list -> 'U list /// Divides the input list into chunks of size at most chunkSize. + /// /// The maximum size of each chunk. /// The input list. + /// /// The list divided into chunks. - /// Thrown when chunkSize is not positive. + /// + /// Thrown when chunkSize is not positive. [] val chunkBySize: chunkSize:int -> list:'T list -> 'T list list /// For each element of the list, applies the given function. Concatenates all the results and return the combined list. + /// /// The function to transform each input element into a sublist to be concatenated. /// The input list. + /// /// The concatenation of the transformed sublists. [] val collect: mapping:('T -> 'U list) -> list:'T list -> 'U list @@ -92,14 +111,18 @@ namespace Microsoft.FSharp.Collections val inline compareWith: comparer:('T -> 'T -> int) -> list1:'T list -> list2:'T list -> int /// Returns a new list that contains the elements of each the lists in order. + /// /// The input sequence of lists. + /// /// The resulting concatenated list. [] val concat: lists:seq<'T list> -> 'T list /// Tests if the list contains the specified element. + /// /// The value to locate in the input list. /// The input list. + /// /// True if the input list contains the specified element; false otherwise. [] val inline contains: value:'T -> source:'T list -> bool when 'T : equality @@ -137,10 +160,13 @@ namespace Microsoft.FSharp.Collections val countBy : projection:('T -> 'Key) -> list:'T list -> ('Key * int) list when 'Key : equality /// Splits the input list into at most count chunks. + /// /// The maximum number of chunks. /// The input list. + /// /// The list split into chunks. - /// Thrown when count is not positive. + /// + /// Thrown when count is not positive. [] val splitInto: count:int -> list:'T list -> 'T list list @@ -158,7 +184,7 @@ namespace Microsoft.FSharp.Collections /// /// A list that contains the distinct elements of list that do not appear in itemsToExclude. /// - /// Thrown when itemsToExclude is null. + /// Thrown when itemsToExclude is null. [] val except: itemsToExclude:seq<'T> -> list:'T list -> 'T list when 'T : equality @@ -168,7 +194,7 @@ namespace Microsoft.FSharp.Collections /// /// The only element of the list. /// - /// Thrown when the input does not have precisely one element. + /// Thrown when the input does not have precisely one element. [] val exactlyOne: list:'T list -> 'T @@ -187,6 +213,7 @@ namespace Microsoft.FSharp.Collections /// Otherwise, false is returned. /// The function to test the input elements. /// The input list. + /// /// True if any element satisfies the predicate. [] val exists: predicate:('T -> bool) -> list:'T list -> bool @@ -196,32 +223,41 @@ namespace Microsoft.FSharp.Collections /// The predicate is applied to matching elements in the two collections up to the lesser of the /// two lengths of the collections. If any application returns true then the overall result is /// true and no further elements are tested. Otherwise, if one collections is longer - /// than the other then the System.ArgumentException exception is raised. + /// than the other then the exception is raised. /// Otherwise, false is returned. + /// /// The function to test the input elements. /// The first input list. /// The second input list. - /// Thrown when the input lists differ in length. + /// + /// Thrown when the input lists differ in length. + /// /// True if any pair of elements satisfy the predicate. [] val exists2: predicate:('T1 -> 'T2 -> bool) -> list1:'T1 list -> list2:'T2 list -> bool /// Returns the first element for which the given function returns True. /// Raises KeyNotFoundException if no such element exists. + /// /// The function to test the input elements. /// The input list. - /// Thrown if the predicate evaluates to false for + /// + /// Thrown if the predicate evaluates to false for /// all the elements of the list. + /// /// The first element that satisfies the predicate. [] val find: predicate:('T -> bool) -> list:'T list -> 'T /// Returns the last element for which the given function returns True. /// Raises KeyNotFoundException if no such element exists. + /// /// The function to test the input elements. /// The input list. - /// Thrown if the predicate evaluates to false for + /// + /// Thrown if the predicate evaluates to false for /// all the elements of the list. + /// /// The last element that satisfies the predicate. [] val findBack: predicate:('T -> bool) -> list:'T list -> 'T @@ -229,10 +265,13 @@ namespace Microsoft.FSharp.Collections /// Returns the index of the first element in the list /// that satisfies the given predicate. /// Raises KeyNotFoundException if no such element exists. + /// /// The function to test the input elements. /// The input list. - /// Thrown if the predicate evaluates to false for all the + /// + /// Thrown if the predicate evaluates to false for all the /// elements of the list. + /// /// The index of the first element that satisfies the predicate. [] val findIndex: predicate:('T -> bool) -> list:'T list -> int @@ -240,18 +279,23 @@ namespace Microsoft.FSharp.Collections /// Returns the index of the last element in the list /// that satisfies the given predicate. /// Raises KeyNotFoundException if no such element exists. + /// /// The function to test the input elements. /// The input list. - /// Thrown if the predicate evaluates to false for all the + /// + /// Thrown if the predicate evaluates to false for all the /// elements of the list. + /// /// The index of the last element that satisfies the predicate. [] val findIndexBack: predicate:('T -> bool) -> list:'T list -> int /// Returns a new collection containing only the elements of the collection /// for which the given predicate returns "true" + /// /// The function to test the input elements. /// The input list. + /// /// A list containing only the elements that satisfy the predicate. [] val filter: predicate:('T -> bool) -> list:'T list -> 'T list @@ -262,9 +306,11 @@ namespace Microsoft.FSharp.Collections /// with the second element and so on. Return the final result. /// If the input function is f and the elements are i0...iN then /// computes f (... (f s i0) i1 ...) iN. + /// /// The function to update the state given the input elements. /// The initial state. /// The input list. + /// /// The final state value. [] val fold<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> list:'T list -> 'State @@ -273,10 +319,12 @@ namespace Microsoft.FSharp.Collections /// through the computation. The collections must have identical sizes. /// If the input function is f and the elements are i0...iN and j0...jN /// then computes f (... (f s i0 j0)...) iN jN. + /// /// The function to update the state given the input elements. /// The initial state. /// The first input list. /// The second input list. + /// /// The final state value. [] val fold2<'T1,'T2,'State> : folder:('State -> 'T1 -> 'T2 -> 'State) -> state:'State -> list1:'T1 list -> list2:'T2 list -> 'State @@ -284,9 +332,11 @@ namespace Microsoft.FSharp.Collections /// Applies a function to each element of the collection, starting from the end, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN then /// computes f i0 (...(f iN s)). + /// /// The function to update the state given the input elements. /// The input list. /// The initial state. + /// /// The state object after the folding function is applied to each element of the list. [] val foldBack<'T,'State> : folder:('T -> 'State -> 'State) -> list:'T list -> state:'State -> 'State @@ -295,10 +345,12 @@ namespace Microsoft.FSharp.Collections /// through the computation. The collections must have identical sizes. /// If the input function is f and the elements are i0...iN and j0...jN /// then computes f i0 j0 (...(f iN jN s)). + /// /// The function to update the state given the input elements. /// The first input list. /// The second input list. /// The initial state. + /// /// The final state value. [] val foldBack2<'T1,'T2,'State> : folder:('T1 -> 'T2 -> 'State -> 'State) -> list1:'T1 list -> list2:'T2 list -> state:'State -> 'State @@ -310,6 +362,7 @@ namespace Microsoft.FSharp.Collections /// Otherwise, true is returned. /// The function to test the input elements. /// The input list. + /// /// True if all of the elements satisfy the predicate. [] val forall: predicate:('T -> bool) -> list:'T list -> bool @@ -319,12 +372,14 @@ namespace Microsoft.FSharp.Collections /// The predicate is applied to matching elements in the two collections up to the lesser of the /// two lengths of the collections. If any application returns false then the overall result is /// false and no further elements are tested. Otherwise, if one collection is longer - /// than the other then the System.ArgumentException exception is raised. + /// than the other then the exception is raised. /// Otherwise, true is returned. /// The function to test the input elements. /// The first input list. /// The second input list. - /// Thrown when the input lists differ in length. + /// + /// Thrown when the input lists differ in length. + /// /// True if all of the pairs of elements satisfy the predicate. [] val forall2: predicate:('T1 -> 'T2 -> bool) -> list1:'T1 list -> list2:'T2 list -> bool @@ -343,40 +398,52 @@ namespace Microsoft.FSharp.Collections /// Returns the first element of the list. /// /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The first element of the list. [] val head: list:'T list -> 'T /// Returns a new list whose elements are the corresponding elements /// of the input list paired with the index (from 0) of each element. + /// /// The input list. + /// /// The list of indexed elements. [] val indexed: list:'T list -> (int * 'T) list /// Creates a list by calling the given generator on each index. + /// /// The length of the list to generate. /// The function to generate an element from an index. + /// /// The list of generated elements. [] val init: length:int -> initializer:(int -> 'T) -> 'T list /// Returns true if the list contains no elements, false otherwise. + /// /// The input list. + /// /// True if the list is empty. [] val isEmpty: list:'T list -> bool /// Indexes into the list. The first element has index 0. + /// /// The index to retrieve. /// The input list. + /// /// The value at the given index. - /// Thrown when the index is negative or the input list does not contain enough elements. + /// + /// Thrown when the index is negative or the input list does not contain enough elements. [] val item: index:int -> list:'T list -> 'T /// Applies the given function to each element of the collection. + /// /// The function to apply to elements from the input list. /// The input list. [] @@ -384,6 +451,7 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to two collections simultaneously. The /// collections must have identical size. + /// /// The function to apply to pairs of elements from the input lists. /// The first input list. /// The second input list. @@ -392,6 +460,7 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to each element of the collection. The integer passed to the /// function indicates the index of element. + /// /// The function to apply to the elements of the list along with their index. /// The input list. [] @@ -400,6 +469,7 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to two collections simultaneously. The /// collections must have identical size. The integer passed to the /// function indicates the index of element. + /// /// The function to apply to a pair of elements from the input lists along with their index. /// The first input list. /// The second input list. @@ -407,66 +477,83 @@ namespace Microsoft.FSharp.Collections val iteri2: action:(int -> 'T1 -> 'T2 -> unit) -> list1:'T1 list -> list2:'T2 list -> unit /// Returns the last element of the list. + /// /// The input list. + /// /// The last element of the list. - /// Thrown when the input does not have any elements. + /// + /// Thrown when the input does not have any elements. [] val last: list:'T list -> 'T /// Returns the length of the list. + /// /// The input list. + /// /// The length of the list. [] val length: list:'T list -> int /// Returns the last element of the list. /// Return None if no such element exists. + /// /// The input list. + /// /// The last element of the list or None. [] val tryLast: list:'T list -> 'T option /// Builds a new collection whose elements are the results of applying the given function /// to each of the elements of the collection. + /// /// The function to transform elements from the input list. /// The input list. + /// /// The list of transformed elements. [] val map: mapping:('T -> 'U) -> list:'T list -> 'U list /// Builds a new collection whose elements are the results of applying the given function /// to the corresponding elements of the two collections pairwise. + /// /// The function to transform pairs of elements from the input lists. /// The first input list. /// The second input list. + /// /// The list of transformed elements. [] val map2: mapping:('T1 -> 'T2 -> 'U) -> list1:'T1 list -> list2:'T2 list -> 'U list /// Builds a new collection whose elements are the results of applying the given function /// to the corresponding elements of the three collections simultaneously. + /// /// The function to transform triples of elements from the input lists. /// The first input list. /// The second input list. /// The third input list. + /// /// The list of transformed elements. [] val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> list1:'T1 list -> list2:'T2 list -> list3:'T3 list -> 'U list /// Combines map and fold. Builds a new list whose elements are the results of applying the given function /// to each of the elements of the input list. The function is also used to accumulate a final value. + /// /// The function to transform elements from the input list and accumulate the final value. /// The initial state. /// The input list. + /// /// The list of transformed elements, and the final accumulated value. [] val mapFold<'T,'State,'Result> : mapping:('State -> 'T -> 'Result * 'State) -> state:'State -> list:'T list -> 'Result list * 'State /// Combines map and foldBack. Builds a new list whose elements are the results of applying the given function /// to each of the elements of the input list. The function is also used to accumulate a final value. + /// /// The function to transform elements from the input list and accumulate the final value. /// The input list. /// The initial state. + /// /// The list of transformed elements, and the final accumulated value. [] val mapFoldBack<'T,'State,'Result> : mapping:('T -> 'State -> 'Result * 'State) -> list:'T list -> state:'State -> 'Result list * 'State @@ -474,75 +561,94 @@ namespace Microsoft.FSharp.Collections /// Builds a new collection whose elements are the results of applying the given function /// to each of the elements of the collection. The integer index passed to the /// function indicates the index (from 0) of element being transformed. + /// /// The function to transform elements and their indices. /// The input list. + /// /// The list of transformed elements. [] val mapi: mapping:(int -> 'T -> 'U) -> list:'T list -> 'U list /// Like mapi, but mapping corresponding elements from two lists of equal length. + /// /// The function to transform pairs of elements from the two lists and their index. /// The first input list. /// The second input list. + /// /// The list of transformed elements. [] val mapi2: mapping:(int -> 'T1 -> 'T2 -> 'U) -> list1:'T1 list -> list2:'T2 list -> 'U list /// Return the greatest of all elements of the list, compared via Operators.max. /// - /// Raises System.ArgumentException if list is empty + /// Raises if list is empty /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The maximum element. [] val inline max : list:'T list -> 'T when 'T : comparison /// Returns the greatest of all elements of the list, compared via Operators.max on the function result. /// - /// Raises System.ArgumentException if list is empty. + /// Raises if list is empty. /// The function to transform the list elements into the type to be compared. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The maximum element. [] val inline maxBy : projection:('T -> 'U) -> list:'T list -> 'T when 'U : comparison /// Returns the lowest of all elements of the list, compared via Operators.min. /// - /// Raises System.ArgumentException if list is empty + /// Raises if list is empty /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The minimum value. [] val inline min : list:'T list -> 'T when 'T : comparison /// Returns the lowest of all elements of the list, compared via Operators.min on the function result /// - /// Raises System.ArgumentException if list is empty. + /// Raises if list is empty. /// The function to transform list elements into the type to be compared. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The minimum value. [] val inline minBy : projection:('T -> 'U) -> list:'T list -> 'T when 'U : comparison /// Indexes into the list. The first element has index 0. + /// /// The input list. /// The index to retrieve. + /// /// The value at the given index. - /// Thrown when the index is negative or the input list does not contain enough elements. + /// + /// Thrown when the index is negative or the input list does not contain enough elements. [] [] val nth: list:'T list -> index:int -> 'T /// Builds a list from the given array. + /// /// The input array. + /// /// The list of elements from the array. [] val ofArray : array:'T[] -> 'T list /// Builds a new list from the given enumerable object. + /// /// The input sequence. + /// /// The list of elements from the sequence. [] val ofSeq: source:seq<'T> -> 'T list @@ -559,8 +665,10 @@ namespace Microsoft.FSharp.Collections /// Splits the collection into two collections, containing the /// elements for which the given predicate returns True and False /// respectively. Element order is preserved in both of the created lists. + /// /// The function to test the input elements. /// The input list. + /// /// A list containing the elements for which the predicate evaluated to false and a list /// containing the elements for which the predicate evaluated to true. [] @@ -568,20 +676,26 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to successive elements, returning the first /// result where function returns Some(x) for some x. If no such - /// element exists then raise System.Collections.Generic.KeyNotFoundException + /// element exists then raise + /// /// The function to generate options from the elements. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The first resulting value. [] val pick: chooser:('T -> 'U option) -> list:'T list -> 'U /// Returns a list with all elements permuted according to the /// specified permutation. + /// /// The function to map input indices to output indices. /// The input list. + /// /// The permuted list. - /// Thrown when indexMap does not produce a valid permutation. + /// + /// Thrown when indexMap does not produce a valid permutation. [] val permute : indexMap:(int -> int) -> list:'T list -> 'T list @@ -591,10 +705,13 @@ namespace Microsoft.FSharp.Collections /// Return the final result. If the input function is f and the elements are i0...iN then computes /// f (... (f i0 i1) i2 ...) iN. /// - /// Raises System.ArgumentException if list is empty + /// Raises if list is empty + /// /// The function to reduce two list elements to a single element. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The final reduced value. [] val reduce: reduction:('T -> 'T -> 'T) -> list:'T list -> 'T @@ -602,23 +719,30 @@ namespace Microsoft.FSharp.Collections /// Applies a function to each element of the collection, starting from the end, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN then computes /// f i0 (...(f iN-1 iN)). + /// /// A function that takes in the next-to-last element of the list and the /// current accumulated result to produce the next accumulated result. /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The final result of the reductions. [] val reduceBack: reduction:('T -> 'T -> 'T) -> list:'T list -> 'T /// Creates a list by replicating the given initial value. + /// /// The number of elements to replicate. /// The value to replicate + /// /// The generated list. [] val replicate: count:int -> initial:'T -> 'T list /// Returns a new list with the elements in reverse order. + /// /// The input list. + /// /// The reversed list. [] val rev: list:'T list -> 'T list @@ -627,17 +751,21 @@ namespace Microsoft.FSharp.Collections /// through the computation. Take the second argument, and apply the function to it /// and the first element of the list. Then feed this result into the function along /// with the second element and so on. Returns the list of intermediate results and the final result. + /// /// The function to update the state given the input elements. /// The initial state. /// The input list. + /// /// The list of states. [] val scan<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> list:'T list -> 'State list /// Like foldBack, but returns both the intermediary and final results + /// /// The function to update the state given the input elements. /// The input list. /// The initial state. + /// /// The list of states. [] val scanBack<'T,'State> : folder:('T -> 'State -> 'State) -> list:'T list -> state:'State -> 'State list @@ -651,18 +779,23 @@ namespace Microsoft.FSharp.Collections val inline singleton: value:'T -> 'T list /// Returns the list after removing the first N elements. + /// /// The number of elements to skip. /// The input list. + /// /// The list after removing the first N elements. - /// Thrown when count is negative or exceeds the number of + /// + /// Thrown when count is negative or exceeds the number of /// elements in the list. [] val skip: count:int -> list: 'T list -> 'T list /// Bypasses elements in a list while the given predicate returns True, and then returns /// the remaining elements of the list. + /// /// A function that evaluates an element of the list to a boolean value. /// The input list. + /// /// The result list. [] val skipWhile: predicate:('T -> bool) -> list:'T list -> 'T list @@ -672,56 +805,65 @@ namespace Microsoft.FSharp.Collections /// This is a stable sort, i.e. the original order of equal elements is preserved. /// The function to compare the list elements. /// The input list. + /// /// The sorted list. [] val sortWith: comparer:('T -> 'T -> int) -> list:'T list -> 'T list - /// Sorts the given list using keys given by the given projection. Keys are compared using Operators.compare. + /// Sorts the given list using keys given by the given projection. Keys are compared using . /// /// This is a stable sort, i.e. the original order of equal elements is preserved. /// The function to transform the list elements into the type to be compared. /// The input list. + /// /// The sorted list. [] val sortBy: projection:('T -> 'Key) -> list:'T list -> 'T list when 'Key : comparison - /// Sorts the given list using Operators.compare. + /// Sorts the given list using . /// /// This is a stable sort, i.e. the original order of equal elements is preserved. /// The input list. + /// /// The sorted list. [] val sort: list:'T list -> 'T list when 'T : comparison /// Splits a list into two lists, at the given index. + /// /// The index at which the list is split. /// The input list. + /// /// The two split lists. /// - /// Thrown when split index exceeds the number of elements + /// Thrown when split index exceeds the number of elements /// in the list. [] val splitAt: index:int -> list:'T list -> ('T list * 'T list) - /// Sorts the given list in descending order using keys given by the given projection. Keys are compared using Operators.compare. + /// Sorts the given list in descending order using keys given by the given projection. Keys are compared using . /// /// This is a stable sort, i.e. the original order of equal elements is preserved. /// The function to transform the list elements into the type to be compared. /// The input list. + /// /// The sorted list. [] val inline sortByDescending: projection:('T -> 'Key) -> list:'T list -> 'T list when 'Key : comparison - /// Sorts the given list in descending order using Operators.compare. + /// Sorts the given list in descending order using . /// /// This is a stable sort, i.e. the original order of equal elements is preserved. /// The input list. + /// /// The sorted list. [] val inline sortDescending: list:'T list -> 'T list when 'T : comparison /// Returns the sum of the elements in the list. + /// /// The input list. + /// /// The resulting sum. [] val inline sum : list:^T list -> ^T @@ -729,8 +871,10 @@ namespace Microsoft.FSharp.Collections and ^T : (static member Zero : ^T) /// Returns the sum of the results generated by applying the function to each element of the list. + /// /// The function to transform the list elements into the type to be summed. /// The input list. + /// /// The resulting sum. [] val inline sumBy : projection:('T -> ^U) -> list:'T list -> ^U @@ -740,7 +884,9 @@ namespace Microsoft.FSharp.Collections /// Returns the list after removing the first element. /// /// The input list. - /// Thrown when the list is empty. + /// + /// Thrown when the list is empty. + /// /// The list after removing the first element. [] val tail: list:'T list -> 'T list @@ -755,8 +901,8 @@ namespace Microsoft.FSharp.Collections /// /// The result list. /// - /// Thrown when the input list is empty. - /// Thrown when count exceeds the number of elements + /// Thrown when the input list is empty. + /// Thrown when count exceeds the number of elements /// in the list. [] val take: count:int -> list:'T list -> 'T list @@ -772,35 +918,46 @@ namespace Microsoft.FSharp.Collections val takeWhile: predicate:('T -> bool) -> list:'T list -> 'T list /// Builds an array from the given list. + /// /// The input list. + /// /// The array containing the elements of the list. [] val toArray: list:'T list -> 'T[] /// Views the given list as a sequence. + /// /// The input list. + /// /// The sequence of elements in the list. [] val toSeq: list:'T list -> seq<'T> /// Returns the first element of the list, or /// None if the list is empty. + /// /// The input list. + /// /// The first element of the list or None. [] val tryHead: list:'T list -> 'T option /// Returns the transpose of the given sequence of lists. + /// /// The input sequence of list. + /// /// The transposed list. - /// Thrown when the input sequence is null. - /// Thrown when the input lists differ in length. + /// + /// Thrown when the input sequence is null. + /// Thrown when the input lists differ in length. [] val transpose: lists:seq<'T list> -> 'T list list /// Returns at most N elements in a new list. + /// /// The maximum number of items to return. /// The input list. + /// /// The result list. [] val truncate: count:int -> list:'T list -> 'T list @@ -808,16 +965,20 @@ namespace Microsoft.FSharp.Collections /// Applies the given function to successive elements, returning Some(x) the first /// result where function returns Some(x) for some x. If no such element /// exists then return None. + /// /// The function to generate options from the elements. /// The input list. + /// /// The first resulting value or None. [] val tryPick: chooser:('T -> 'U option) -> list:'T list -> 'U option /// Returns the first element for which the given function returns True. /// Return None if no such element exists. + /// /// The function to test the input elements. /// The input list. + /// /// The first element for which the predicate returns true, or None if /// every element evaluates to false. [] @@ -825,8 +986,10 @@ namespace Microsoft.FSharp.Collections /// Returns the last element for which the given function returns True. /// Return None if no such element exists. + /// /// The function to test the input elements. /// The input list. + /// /// The last element for which the predicate returns true, or None if /// every element evaluates to false. [] @@ -835,8 +998,10 @@ namespace Microsoft.FSharp.Collections /// Returns the index of the first element in the list /// that satisfies the given predicate. /// Return None if no such element exists. + /// /// The function to test the input elements. /// The input list. + /// /// The index of the first element for which the predicate returns true, or None if /// every element evaluates to false. [] @@ -844,8 +1009,10 @@ namespace Microsoft.FSharp.Collections /// Tries to find the nth element in the list. /// Returns None if index is negative or the list does not contain enough elements. + /// /// The index to retrieve. /// The input list. + /// /// The value at the given index or None. [] val tryItem: index:int -> list:'T list -> 'T option @@ -853,8 +1020,10 @@ namespace Microsoft.FSharp.Collections /// Returns the index of the last element in the list /// that satisfies the given predicate. /// Return None if no such element exists. + /// /// The function to test the input elements. /// The input list. + /// /// The index of the last element for which the predicate returns true, or None if /// every element evaluates to false. [] @@ -862,53 +1031,68 @@ namespace Microsoft.FSharp.Collections /// Returns a list that contains the elements generated by the given computation. /// The given initial state argument is passed to the element generator. + /// /// A function that takes in the current state and returns an option tuple of the next /// element of the list and the next state value. /// The initial state value. + /// /// The result list. [] val unfold<'T,'State> : generator:('State -> ('T * 'State) option) -> state:'State -> 'T list /// Splits a list of pairs into two lists. + /// /// The input list. + /// /// Two lists of split elements. [] val unzip: list:('T1 * 'T2) list -> ('T1 list * 'T2 list) /// Splits a list of triples into three lists. + /// /// The input list. + /// /// Three lists of split elements. [] val unzip3: list:('T1 * 'T2 * 'T3) list -> ('T1 list * 'T2 list * 'T3 list) /// Returns a new list containing only the elements of the list /// for which the given predicate returns "true" + /// /// The function to test the input elements. /// The input list. + /// /// A list containing only the elements that satisfy the predicate. [] val where: predicate:('T -> bool) -> list:'T list -> 'T list /// Returns a list of sliding windows containing elements drawn from the input /// list. Each window is returned as a fresh list. + /// /// The number of elements in each window. /// The input list. + /// /// The result list. - /// Thrown when windowSize is not positive. + /// + /// Thrown when windowSize is not positive. [] val windowed : windowSize:int -> list:'T list -> 'T list list /// Combines the two lists into a list of pairs. The two lists must have equal lengths. + /// /// The first input list. /// The second input list. + /// /// A single list containing pairs of matching elements from the input lists. [] val zip: list1:'T1 list -> list2:'T2 list -> ('T1 * 'T2) list /// Combines the three lists into a list of triples. The lists must have equal lengths. + /// /// The first input list. /// The second input list. /// The third input list. + /// /// A single list containing triples of matching elements from the input lists. [] val zip3: list1:'T1 list -> list2:'T2 list -> list3:'T3 list -> ('T1 * 'T2 * 'T3) list diff --git a/src/fsharp/FSharp.Core/mailbox.fsi b/src/fsharp/FSharp.Core/mailbox.fsi index 6d818299e0..3f36a6f9de 100644 --- a/src/fsharp/FSharp.Core/mailbox.fsi +++ b/src/fsharp/FSharp.Core/mailbox.fsi @@ -9,6 +9,8 @@ namespace Microsoft.FSharp.Control [] /// A handle to a capability to reply to a PostAndReply message. + /// + /// Agents type AsyncReplyChannel<'Reply> = /// Sends a reply to a PostAndReply message. /// The value to send. @@ -22,29 +24,36 @@ namespace Microsoft.FSharp.Control /// /// The agent may wait for messages using the Receive or TryReceive methods or /// scan through all available messages using the Scan or TryScan method. + /// + /// Agents [] type MailboxProcessor<'Msg> = /// Creates an agent. The body function is used to generate the asynchronous /// computation executed by the agent. This function is not executed until /// Start is called. + /// /// The function to produce an asynchronous computation that will be executed /// as the read loop for the MailboxProcessor when Start is called. /// An optional cancellation token for the body. /// Defaults to Async.DefaultCancellationToken. + /// /// The created MailboxProcessor. new : body:(MailboxProcessor<'Msg> -> Async) * ?cancellationToken: CancellationToken -> MailboxProcessor<'Msg> /// Creates and starts an agent. The body function is used to generate the asynchronous /// computation executed by the agent. + /// /// The function to produce an asynchronous computation that will be executed /// as the read loop for the MailboxProcessor when Start is called. /// An optional cancellation token for the body. /// Defaults to Async.DefaultCancellationToken. + /// /// The created MailboxProcessor. static member Start : body:(MailboxProcessor<'Msg> -> Async) * ?cancellationToken: CancellationToken -> MailboxProcessor<'Msg> /// Posts a message to the message queue of the MailboxProcessor, asynchronously. + /// /// The message to post. member Post : message:'Msg -> unit @@ -56,7 +65,8 @@ namespace Microsoft.FSharp.Control /// The function to incorporate the AsyncReplyChannel into /// the message to be sent. /// An optional timeout parameter (in milliseconds) to wait for a reply message. - /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + /// Defaults to -1 which corresponds to . + /// /// The reply from the agent. member PostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> 'Reply @@ -68,23 +78,28 @@ namespace Microsoft.FSharp.Control /// The function to incorporate the AsyncReplyChannel into /// the message to be sent. /// An optional timeout parameter (in milliseconds) to wait for a reply message. - /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + /// Defaults to -1 which corresponds to . + /// /// An asynchronous computation that will wait for the reply from the agent. member PostAndAsyncReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> Async<'Reply> /// Like PostAndReply, but returns None if no reply within the timeout period. + /// /// The function to incorporate the AsyncReplyChannel into /// the message to be sent. /// An optional timeout parameter (in milliseconds) to wait for a reply message. - /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + /// Defaults to -1 which corresponds to . + /// /// The reply from the agent or None if the timeout expires. member TryPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> 'Reply option /// Like AsyncPostAndReply, but returns None if no reply within the timeout period. + /// /// The function to incorporate the AsyncReplyChannel into /// the message to be sent. /// An optional timeout parameter (in milliseconds) to wait for a reply message. - /// Defaults to -1 which corresponds to System.Threading.Timeout.Infinite. + /// Defaults to -1 which corresponds to . + /// /// An asynchronous computation that will return the reply or None if the timeout expires. member PostAndTryAsyncReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout : int -> Async<'Reply option> @@ -96,9 +111,10 @@ namespace Microsoft.FSharp.Control /// one concurrent reader may be active, so no more than one concurrent call to /// Receive, TryReceive, Scan and/or TryScan may be active. /// An optional timeout in milliseconds. Defaults to -1 which corresponds - /// to System.Threading.Timeout.Infinite. + /// to . + /// /// An asynchronous computation that returns the received message. - /// Thrown when the timeout is exceeded. + /// Thrown when the timeout is exceeded. member Receive : ?timeout:int -> Async<'Msg> /// Waits for a message. This will consume the first message in arrival order. @@ -111,7 +127,8 @@ namespace Microsoft.FSharp.Control /// one concurrent reader may be active, so no more than one concurrent call to /// Receive, TryReceive, Scan and/or TryScan may be active. /// An optional timeout in milliseconds. Defaults to -1 which - /// corresponds to System.Threading.Timeout.Infinite. + /// corresponds to . + /// /// An asynchronous computation that returns the received message or /// None if the timeout is exceeded. member TryReceive : ?timeout:int -> Async<'Msg option> @@ -127,9 +144,10 @@ namespace Microsoft.FSharp.Control /// The function to return None if the message is to be skipped /// or Some if the message is to be processed and removed from the queue. /// An optional timeout in milliseconds. Defaults to -1 which corresponds - /// to System.Threading.Timeout.Infinite. + /// to . + /// /// An asynchronous computation that scanner built off the read message. - /// Thrown when the timeout is exceeded. + /// Thrown when the timeout is exceeded. member Scan : scanner:('Msg -> (Async<'T>) option) * ?timeout:int -> Async<'T> /// Scans for a message by looking through messages in arrival order until scanner @@ -141,7 +159,8 @@ namespace Microsoft.FSharp.Control /// The function to return None if the message is to be skipped /// or Some if the message is to be processed and removed from the queue. /// An optional timeout in milliseconds. Defaults to -1 which corresponds - /// to System.Threading.Timeout.Infinite. + /// to . + /// /// An asynchronous computation that scanner built off the read message. member TryScan : scanner:('Msg -> (Async<'T>) option) * ?timeout:int -> Async<'T option> diff --git a/src/fsharp/FSharp.Core/map.fsi b/src/fsharp/FSharp.Core/map.fsi index 04e6b04832..2f0360bf4c 100644 --- a/src/fsharp/FSharp.Core/map.fsi +++ b/src/fsharp/FSharp.Core/map.fsi @@ -7,10 +7,10 @@ namespace Microsoft.FSharp.Collections open Microsoft.FSharp.Core open Microsoft.FSharp.Collections - /// Immutable maps. Keys are ordered by F# generic comparison. + /// Immutable maps based on binary trees, where keys are ordered by F# generic comparison. By default + /// comparison is the F# structural comparison function or uses implementations of the IComparable interface on key values. /// - /// Maps based on generic comparison are efficient for small keys. They are not a suitable choice if keys are recursive data structures - /// or if keys require bespoke comparison semantics. + /// See the module for further operations on maps. /// /// All members of this class are thread-safe and may be used concurrently from multiple threads. [] @@ -19,12 +19,15 @@ namespace Microsoft.FSharp.Collections /// Returns a new map with the binding added to the given map. /// If a binding with the given key already exists in the input map, the existing binding is replaced by the new binding in the result map. /// The input key. + /// /// The resulting map. member Add: key:'Key * value:'Value -> Map<'Key,'Value> /// Returns a new map with the value stored under key changed according to f. + /// /// The input key. /// The change function. + /// /// The resulting map. member Change: key:'Key * f:('Value option -> 'Value option) -> Map<'Key,'Value> @@ -32,12 +35,16 @@ namespace Microsoft.FSharp.Collections member IsEmpty: bool /// Builds a map that contains the bindings of the given IEnumerable. + /// /// The input sequence of key/value pairs. + /// /// The resulting map. new : elements:seq<'Key * 'Value> -> Map<'Key,'Value> /// Tests if an element is in the domain of the map. + /// /// The input key. + /// /// True if the map contains the given key. member ContainsKey: key:'Key -> bool @@ -46,26 +53,34 @@ namespace Microsoft.FSharp.Collections /// Lookup an element in the map. Raise KeyNotFoundException if no binding /// exists in the map. + /// /// The input key. - /// Thrown when the key is not found. + /// Thrown when the key is not found. + /// /// The value mapped to the key. member Item : key:'Key -> 'Value with get /// Removes an element from the domain of the map. No exception is raised if the element is not present. + /// /// The input key. + /// /// The resulting map. member Remove: key:'Key -> Map<'Key,'Value> /// Lookup an element in the map, returning a Some value if the element is in the domain /// of the map and None if not. + /// /// The input key. + /// /// The mapped value, or None if the key is not in the map. member TryFind: key:'Key -> 'Value option /// Lookup an element in the map, assigning to value if the element is in the domain /// of the map and returning false if not. + /// /// The input key. /// A reference to the output value. + /// /// true if the value is present, false if not. member TryGetValue: key:'Key * [] value:byref<'Value> -> bool @@ -78,69 +93,87 @@ namespace Microsoft.FSharp.Collections interface IReadOnlyDictionary<'Key,'Value> override Equals : obj -> bool - /// Functional programming operators related to the Map<_,_> type. + /// Contains operations for working with values of type . [] [] module Map = /// Returns a new map with the binding added to the given map. /// If a binding with the given key already exists in the input map, the existing binding is replaced by the new binding in the result map. + /// /// The input key. /// The input value. /// The input map. + /// /// The resulting map. [] val add: key:'Key -> value:'T -> table:Map<'Key,'T> -> Map<'Key,'T> /// Returns a new map with the value stored under key changed according to f. + /// /// The input key. /// The change function. /// The input map. + /// /// The resulting map. [] val change: key:'Key -> f:('T option -> 'T option) -> table:Map<'Key,'T> -> Map<'Key,'T> /// Returns a new map made from the given bindings. + /// /// The input list of key/value pairs. + /// /// The resulting map. [] val ofList: elements:('Key * 'T) list -> Map<'Key,'T> /// Returns a new map made from the given bindings. + /// /// The input array of key/value pairs. + /// /// The resulting map. [] val ofArray: elements:('Key * 'T)[] -> Map<'Key,'T> /// Returns a new map made from the given bindings. + /// /// The input sequence of key/value pairs. + /// /// The resulting map. [] val ofSeq: elements:seq<'Key * 'T> -> Map<'Key,'T> /// Views the collection as an enumerable sequence of pairs. /// The sequence will be ordered by the keys of the map. + /// /// The input map. + /// /// The sequence of key/value pairs. [] val toSeq: table:Map<'Key,'T> -> seq<'Key * 'T> /// Returns a list of all key-value pairs in the mapping. /// The list will be ordered by the keys of the map. + /// /// The input map. + /// /// The list of key/value pairs. [] val toList: table:Map<'Key,'T> -> ('Key * 'T) list /// Returns an array of all key-value pairs in the mapping. /// The array will be ordered by the keys of the map. + /// /// The input map. + /// /// The array of key/value pairs. [] val toArray: table:Map<'Key,'T> -> ('Key * 'T)[] /// Is the map empty? + /// /// The input map. + /// /// True if the map is empty. [] val isEmpty: table:Map<'Key,'T> -> bool @@ -152,44 +185,55 @@ namespace Microsoft.FSharp.Collections /// Lookup an element in the map, raising KeyNotFoundException if no binding /// exists in the map. + /// /// The input key. /// The input map. - /// Thrown when the key does not exist in the map. + /// Thrown when the key does not exist in the map. + /// /// The value mapped to the given key. [] val find: key:'Key -> table:Map<'Key,'T> -> 'T /// Searches the map looking for the first element where the given function returns a Some value. + /// /// The function to generate options from the key/value pairs. /// The input map. + /// /// The first result. [] val tryPick: chooser:('Key -> 'T -> 'U option) -> table:Map<'Key,'T> -> 'U option /// Searches the map looking for the first element where the given function returns a Some value + /// /// The function to generate options from the key/value pairs. /// The input map. + /// /// The first result. [] val pick: chooser:('Key -> 'T -> 'U option) -> table:Map<'Key,'T> -> 'U /// Folds over the bindings in the map. + /// /// The function to update the state given the input key/value pairs. /// The input map. /// The initial state. + /// /// The final state value. [] val foldBack<'Key,'T,'State> : folder:('Key -> 'T -> 'State -> 'State) -> table:Map<'Key,'T> -> state:'State -> 'State when 'Key : comparison /// Folds over the bindings in the map + /// /// The function to update the state given the input key/value pairs. /// The initial state. /// The input map. + /// /// The final state value. [] val fold<'Key,'T,'State> : folder:('State -> 'Key -> 'T -> 'State) -> state:'State -> table:Map<'Key,'T> -> 'State when 'Key : comparison /// Applies the given function to each binding in the dictionary + /// /// The function to apply to each key/value pair. /// The input map. [] @@ -197,23 +241,29 @@ namespace Microsoft.FSharp.Collections /// Returns true if the given predicate returns true for one of the /// bindings in the map. + /// /// The function to test the input elements. /// The input map. + /// /// True if the predicate returns true for one of the key/value pairs. [] val exists: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> bool /// Builds a new map containing only the bindings for which the given predicate returns 'true'. + /// /// The function to test the key/value pairs. /// The input map. + /// /// The filtered map. [] val filter: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> Map<'Key, 'T> /// Returns true if the given predicate returns true for all of the /// bindings in the map. + /// /// The function to test the input elements. /// The input map. + /// /// True if the predicate evaluates to true for all of the bindings in the map. [] val forall: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> bool @@ -221,56 +271,70 @@ namespace Microsoft.FSharp.Collections /// Builds a new collection whose elements are the results of applying the given function /// to each of the elements of the collection. The key passed to the /// function indicates the key of element being transformed. + /// /// The function to transform the key/value pairs. /// The input map. + /// /// The resulting map of keys and transformed values. [] val map: mapping:('Key -> 'T -> 'U) -> table:Map<'Key,'T> -> Map<'Key,'U> /// Tests if an element is in the domain of the map. + /// /// The input key. /// The input map. + /// /// True if the map contains the key. [] val containsKey: key:'Key -> table:Map<'Key,'T> -> bool /// Builds two new maps, one containing the bindings for which the given predicate returns 'true', /// and the other the remaining bindings. + /// /// The function to test the input elements. /// The input map. + /// /// A pair of maps in which the first contains the elements for which the predicate returned true /// and the second containing the elements for which the predicated returned false. [] val partition: predicate:('Key -> 'T -> bool) -> table:Map<'Key, 'T> -> Map<'Key, 'T> * Map<'Key, 'T> /// Removes an element from the domain of the map. No exception is raised if the element is not present. + /// /// The input key. /// The input map. + /// /// The resulting map. [] val remove: key:'Key -> table:Map<'Key,'T> -> Map<'Key,'T> /// Lookup an element in the map, returning a Some value if the element is in the domain /// of the map and None if not. + /// /// The input key. /// The input map. + /// /// The found Some value or None. [] val tryFind: key:'Key -> table:Map<'Key,'T> -> 'T option /// Evaluates the function on each mapping in the collection. Returns the key for the first mapping /// where the function returns 'true'. Raise KeyNotFoundException if no such element exists. + /// /// The function to test the input elements. /// The input map. - /// Thrown if the key does not exist in the map. + /// Thrown if the key does not exist in the map. + /// /// The first key for which the predicate evaluates true. [] val findKey: predicate:('Key -> 'T -> bool) -> table:Map<'Key,'T> -> 'Key /// Returns the key of the first mapping in the collection that satisfies the given predicate. /// Returns 'None' if no such element exists. + /// /// The function to test the input elements. /// The input map. + /// /// The first key for which the predicate returns true or None if the predicate evaluates to false for each key/value pair. [] val tryFindKey: predicate:('Key -> 'T -> bool) -> table:Map<'Key,'T> -> 'Key option diff --git a/src/fsharp/FSharp.Core/math/z.fsi b/src/fsharp/FSharp.Core/math/z.fsi index e49b1b3d53..463d57f3db 100644 --- a/src/fsharp/FSharp.Core/math/z.fsi +++ b/src/fsharp/FSharp.Core/math/z.fsi @@ -12,10 +12,15 @@ namespace Microsoft.FSharp.Math namespace Microsoft.FSharp.Core + /// An abbreviation for . + /// + /// Basic Types type bigint = System.Numerics.BigInteger [] - /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' + /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' + /// + /// Language Primitives module NumericLiterals = /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' @@ -24,15 +29,21 @@ namespace Microsoft.FSharp.Core /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromZero : value:unit -> 'T + /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromOne : value:unit -> 'T + /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromInt32 : value:int32 -> 'T + /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromInt64 : value:int64 -> 'T + /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromString : text:string -> 'T + /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromInt64Dynamic : value:int64 -> obj + /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' val FromStringDynamic : text:string -> obj diff --git a/src/fsharp/FSharp.Core/nativeptr.fsi b/src/fsharp/FSharp.Core/nativeptr.fsi index b60a9323f5..a90abcdbfb 100644 --- a/src/fsharp/FSharp.Core/nativeptr.fsi +++ b/src/fsharp/FSharp.Core/nativeptr.fsi @@ -9,33 +9,46 @@ namespace Microsoft.FSharp.NativeInterop [] /// Contains operations on native pointers. Use of these operators may /// result in the generation of unverifiable code. + /// + /// + /// Library functionality for native interopability. See + /// also F# External Functions in + /// the F# Language Guide. + /// module NativePtr = [] [] /// Returns a typed native pointer for a given machine address. /// The pointer address. + /// /// A typed pointer. val inline ofNativeInt : address:nativeint -> nativeptr<'T> [] [] /// Returns an untyped native pointer for a given typed pointer. + /// /// The pointer address. + /// /// A typed pointer. val inline toVoidPtr : address:nativeptr<'T> -> voidptr [] [] /// Returns a typed native pointer for a untyped native pointer. + /// /// The untyped pointer. + /// /// A typed pointer. val inline ofVoidPtr : voidptr -> nativeptr<'T> [] [] /// Returns a machine address for a given typed native pointer. + /// /// The input pointer. + /// /// The machine address. val inline toNativeInt : address:nativeptr<'T> -> nativeint @@ -44,8 +57,10 @@ namespace Microsoft.FSharp.NativeInterop [] /// Returns a typed native pointer by adding index * sizeof<'T> to the /// given input pointer. + /// /// The input pointer. /// The index by which to offset the pointer. + /// /// A typed pointer. val inline add : address:nativeptr<'T> -> index:int -> nativeptr<'T> @@ -53,21 +68,26 @@ namespace Microsoft.FSharp.NativeInterop [] /// Dereferences the typed native pointer computed by adding index * sizeof<'T> to the /// given input pointer. + /// /// The input pointer. /// The index by which to offset the pointer. + /// /// The value at the pointer address. val inline get : address:nativeptr<'T> -> index:int -> 'T [] [] /// Dereferences the given typed native pointer. + /// /// The input pointer. + /// /// The value at the pointer address. val inline read : address:nativeptr<'T> -> 'T [] [] /// Assigns the value into the memory location referenced by the given typed native pointer. + /// /// The input pointer. /// The value to assign. val inline write : address:nativeptr<'T> -> value:'T -> unit @@ -76,20 +96,25 @@ namespace Microsoft.FSharp.NativeInterop [] /// Assigns the value into the memory location referenced by the typed native /// pointer computed by adding index * sizeof<'T> to the given input pointer. + /// /// The input pointer. /// The index by which to offset the pointer. /// The value to assign. val inline set : address:nativeptr<'T> -> index:int -> value:'T -> unit /// Allocates a region of memory on the stack. + /// /// The number of objects of type T to allocate. + /// /// A typed pointer to the allocated memory. [] [] val inline stackalloc : count:int -> nativeptr<'T> /// Converts a given typed native pointer to a managed pointer. + /// /// The input pointer. + /// /// The managed pointer. [] [] diff --git a/src/fsharp/FSharp.Core/observable.fsi b/src/fsharp/FSharp.Core/observable.fsi index 36cbee5700..5a8ee380b7 100644 --- a/src/fsharp/FSharp.Core/observable.fsi +++ b/src/fsharp/FSharp.Core/observable.fsi @@ -7,7 +7,9 @@ namespace Microsoft.FSharp.Control [] [] - /// Basic operations on first class event and other observable objects. + /// Contains operations for working with first class event and other observable objects. + /// + /// Events and Observables module Observable = /// Returns an observable for the merged observations from the sources. @@ -19,6 +21,7 @@ namespace Microsoft.FSharp.Control /// be triggered concurrently on different threads. /// The first Observable. /// The second Observable. + /// /// An Observable that propagates information from both sources. [] val merge: source1:IObservable<'T> -> source2:IObservable<'T> -> IObservable<'T> @@ -29,6 +32,7 @@ namespace Microsoft.FSharp.Control /// arising from the source and completes when the source completes. /// The function applied to observations from the source. /// The input Observable. + /// /// An Observable of the type specified by mapping. [] val map: mapping:('T -> 'U) -> source:IObservable<'T> -> IObservable<'U> @@ -38,9 +42,11 @@ namespace Microsoft.FSharp.Control /// for which the predicate returns true. The predicate is executed once for /// each subscribed observer. The returned object also propagates error /// observations arising from the source and completes when the source completes. + /// /// The function to apply to observations to determine if it should /// be kept. /// The input Observable. + /// /// An Observable that filters observations based on filter. [] val filter: predicate:('T -> bool) -> source:IObservable<'T> -> IObservable<'T> @@ -52,9 +58,11 @@ namespace Microsoft.FSharp.Control /// executed once for each subscribed observer. Both also propagate all error /// observations arising from the source and each completes when the source /// completes. + /// /// The function to determine which output Observable will trigger /// a particular observation. /// The input Observable. + /// /// A tuple of Observables. The first triggers when the predicate returns true, and /// the second triggers when the predicate returns false. [] @@ -67,9 +75,11 @@ namespace Microsoft.FSharp.Control /// executed once for each subscribed observer. Both also propagate error /// observations arising from the source and each completes when the source /// completes. + /// /// The function that takes an observation an transforms /// it into one of the two output Choice types. /// The input Observable. + /// /// A tuple of Observables. The first triggers when splitter returns Choice1of2 /// and the second triggers when splitter returns Choice2of2. [] @@ -79,9 +89,11 @@ namespace Microsoft.FSharp.Control /// using the given function. The returned object will trigger observations x /// for which the splitter returns Some x. The returned object also propagates /// all errors arising from the source and completes when the source completes. + /// /// The function that returns Some for observations to be propagated /// and None for observations to ignore. /// The input Observable. + /// /// An Observable that only propagates some of the observations from the source. [] val choose: chooser:('T -> 'U option) -> source:IObservable<'T> -> IObservable<'U> @@ -98,12 +110,14 @@ namespace Microsoft.FSharp.Control /// The function to update the state with each observation. /// The initial state. /// The input Observable. + /// /// An Observable that triggers on the updated state values. [] val scan: collector:('U -> 'T -> 'U) -> state:'U -> source:IObservable<'T> -> IObservable<'U> /// Creates an observer which permanently subscribes to the given observable and which calls /// the given function for each observation. + /// /// The function to be called on each observation. /// The input Observable. [] @@ -111,8 +125,10 @@ namespace Microsoft.FSharp.Control /// Creates an observer which subscribes to the given observable and which calls /// the given function for each observation. + /// /// The function to be called on each observation. /// The input Observable. + /// /// An object that will remove the callback if disposed. [] val subscribe : callback:('T -> unit) -> source:IObservable<'T> -> System.IDisposable @@ -126,6 +142,7 @@ namespace Microsoft.FSharp.Control /// That is, observations arising from the source must not be triggered concurrently /// on different threads. /// The input Observable. + /// /// An Observable that triggers on successive pairs of observations from the input Observable. [] val pairwise: source:IObservable<'T> -> IObservable<'T * 'T> diff --git a/src/fsharp/FSharp.Core/option.fsi b/src/fsharp/FSharp.Core/option.fsi index 96d4ab74bf..cff21e535b 100644 --- a/src/fsharp/FSharp.Core/option.fsi +++ b/src/fsharp/FSharp.Core/option.fsi @@ -8,380 +8,487 @@ open Microsoft.FSharp.Collections [] -/// Basic operations on options. +/// Contains operations for working with options. +/// +/// Options module Option = /// Returns true if the option is not None. /// The input option. + /// /// True if the option is not None. [] val inline isSome: option:'T option -> bool /// Returns true if the option is None. + /// /// The input option. + /// /// True if the option is None. [] val inline isNone: option:'T option -> bool /// Gets the value of the option if the option is Some, otherwise returns the specified default value. + /// /// The specified default value. /// The input option. + /// /// The option if the option is Some, else the default value. /// Identical to the built-in operator, except with the arguments swapped. [] val defaultValue: value:'T -> option:'T option -> 'T /// Gets the value of the option if the option is Some, otherwise evaluates and returns the result. + /// /// A thunk that provides a default value when evaluated. /// The input option. + /// /// The option if the option is Some, else the result of evaluating . /// is not evaluated unless is None. [] val defaultWith: defThunk:(unit -> 'T) -> option:'T option -> 'T /// Returns if it is Some, otherwise returns . + /// /// The value to use if is None. /// The input option. + /// /// The option if the option is Some, else the alternate option. [] val orElse: ifNone:'T option -> option:'T option -> 'T option /// Returns if it is Some, otherwise evaluates and returns the result. + /// /// A thunk that provides an alternate option when evaluated. /// The input option. + /// /// The option if the option is Some, else the result of evaluating . /// is not evaluated unless is None. [] val orElseWith: ifNoneThunk:(unit -> 'T option) -> option:'T option -> 'T option /// Gets the value associated with the option. + /// /// The input option. + /// /// The value within the option. /// Thrown when the option is None. [] val get: option:'T option -> 'T /// count inp evaluates to match inp with None -> 0 | Some _ -> 1. + /// /// The input option. + /// /// A zero if the option is None, a one otherwise. [] val count: option:'T option -> int /// fold f s inp evaluates to match inp with None -> s | Some x -> f s x. + /// /// A function to update the state data when given a value from an option. /// The initial state. /// The input option. + /// /// The original state if the option is None, otherwise it returns the updated state with the folder /// and the option value. [] val fold<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> option:'T option -> 'State /// fold f inp s evaluates to match inp with None -> s | Some x -> f x s. + /// /// A function to update the state data when given a value from an option. /// The input option. /// The initial state. + /// /// The original state if the option is None, otherwise it returns the updated state with the folder /// and the option value. [] val foldBack<'T,'State> : folder:('T -> 'State -> 'State) -> option:'T option -> state:'State -> 'State /// exists p inp evaluates to match inp with None -> false | Some x -> p x. + /// /// A function that evaluates to a boolean when given a value from the option type. /// The input option. + /// /// False if the option is None, otherwise it returns the result of applying the predicate /// to the option value. [] val exists: predicate:('T -> bool) -> option:'T option -> bool /// forall p inp evaluates to match inp with None -> true | Some x -> p x. + /// /// A function that evaluates to a boolean when given a value from the option type. /// The input option. + /// /// True if the option is None, otherwise it returns the result of applying the predicate /// to the option value. [] val forall: predicate:('T -> bool) -> option:'T option -> bool /// Evaluates to true if is Some and its value is equal to . + /// /// The value to test for equality. /// The input option. + /// /// True if the option is Some and contains a value equal to , otherwise false. [] val inline contains: value:'T -> option:'T option -> bool when 'T : equality /// iter f inp executes match inp with None -> () | Some x -> f x. + /// /// A function to apply to the option value. /// The input option. + /// /// Unit if the option is None, otherwise it returns the result of applying the predicate /// to the option value. [] val iter: action:('T -> unit) -> option:'T option -> unit /// map f inp evaluates to match inp with None -> None | Some x -> Some (f x). + /// /// A function to apply to the option value. /// The input option. + /// /// An option of the input value after applying the mapping function, or None if the input is None. [] val map: mapping:('T -> 'U) -> option:'T option -> 'U option /// map f option1 option2 evaluates to match option1, option2 with Some x, Some y -> Some (f x y) | _ -> None. + /// /// A function to apply to the option values. /// The first option. /// The second option. + /// /// An option of the input values after applying the mapping function, or None if either input is None. [] val map2: mapping:('T1 -> 'T2 -> 'U) -> 'T1 option -> 'T2 option -> 'U option /// map f option1 option2 option3 evaluates to match option1, option2, option3 with Some x, Some y, Some z -> Some (f x y z) | _ -> None. + /// /// A function to apply to the option values. /// The first option. /// The second option. /// The third option. + /// /// An option of the input values after applying the mapping function, or None if any input is None. [] val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> 'T1 option -> 'T2 option -> 'T3 option -> 'U option /// bind f inp evaluates to match inp with None -> None | Some x -> f x + /// /// A function that takes the value of type T from an option and transforms it into /// an option containing a value of type U. /// The input option. + /// /// An option of the output type of the binder. [] val bind: binder:('T -> 'U option) -> option:'T option -> 'U option /// flatten inp evaluates to match inp with None -> None | Some x -> x + /// /// The input option. + /// /// An option of the output type of the binder. /// flatten is equivalent to bind id. [] val flatten: option:'T option option -> 'T option /// filter f inp evaluates to match inp with None -> None | Some x -> if f x then Some x else None. + /// /// A function that evaluates whether the value contained in the option should remain, or be filtered out. /// The input option. + /// /// The input if the predicate evaluates to true; otherwise, None. [] val filter: predicate:('T -> bool) -> option:'T option -> 'T option /// Convert the option to an array of length 0 or 1. + /// /// The input option. + /// /// The result array. [] val toArray: option:'T option -> 'T[] /// Convert the option to a list of length 0 or 1. + /// /// The input option. + /// /// The result list. [] val toList: option:'T option -> 'T list /// Convert the option to a Nullable value. + /// /// The input option. + /// /// The result value. [] val toNullable: option:'T option -> Nullable<'T> /// Convert a Nullable value to an option. + /// /// The input nullable value. + /// /// The result option. [] val ofNullable: value:Nullable<'T> -> 'T option /// Convert a potentially null value to an option. + /// /// The input value. + /// /// The result option. [] val ofObj: value: 'T -> 'T option when 'T : null /// Convert an option to a potentially null value. + /// /// The input value. + /// /// The result value, which is null if the input was None. [] val toObj: value: 'T option -> 'T when 'T : null -/// Basic operations on value options. +/// Contains operations for working with value options. +/// +/// Options module ValueOption = /// Returns true if the value option is not ValueNone. + /// /// The input value option. + /// /// True if the value option is not ValueNone. [] val inline isSome: voption:'T voption -> bool /// Returns true if the value option is ValueNone. + /// /// The input value option. + /// /// True if the voption is ValueNone. [] val inline isNone: voption:'T voption -> bool /// Gets the value of the value option if the option is ValueSome, otherwise returns the specified default value. + /// /// The specified default value. /// The input voption. + /// /// The voption if the voption is ValueSome, else the default value. /// Identical to the built-in operator, except with the arguments swapped. [] val defaultValue: value:'T -> voption:'T voption -> 'T /// Gets the value of the voption if the voption is ValueSome, otherwise evaluates and returns the result. + /// /// A thunk that provides a default value when evaluated. /// The input voption. + /// /// The voption if the voption is ValueSome, else the result of evaluating . /// is not evaluated unless is ValueNone. [] val defaultWith: defThunk:(unit -> 'T) -> voption:'T voption -> 'T /// Returns if it is Some, otherwise returns . + /// /// The value to use if is None. /// The input option. + /// /// The option if the option is Some, else the alternate option. [] val orElse: ifNone:'T voption -> voption:'T voption -> 'T voption /// Returns if it is Some, otherwise evaluates and returns the result. + /// /// A thunk that provides an alternate value option when evaluated. /// The input value option. + /// /// The voption if the voption is ValueSome, else the result of evaluating . /// is not evaluated unless is ValueNone. [] val orElseWith: ifNoneThunk:(unit -> 'T voption) -> voption:'T voption -> 'T voption /// Gets the value associated with the option. + /// /// The input value option. + /// /// The value within the option. /// Thrown when the option is ValueNone. [] val get: voption:'T voption -> 'T /// count inp evaluates to match inp with ValueNone -> 0 | ValueSome _ -> 1. + /// /// The input value option. + /// /// A zero if the option is ValueNone, a one otherwise. [] val count: voption:'T voption -> int /// fold f s inp evaluates to match inp with ValueNone -> s | ValueSome x -> f s x. + /// /// A function to update the state data when given a value from a value option. /// The initial state. /// The input value option. + /// /// The original state if the option is ValueNone, otherwise it returns the updated state with the folder /// and the voption value. [] val fold<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> voption:'T voption -> 'State /// fold f inp s evaluates to match inp with ValueNone -> s | ValueSome x -> f x s. + /// /// A function to update the state data when given a value from a value option. /// The input value option. /// The initial state. + /// /// The original state if the option is ValueNone, otherwise it returns the updated state with the folder /// and the voption value. [] val foldBack<'T,'State> : folder:('T -> 'State -> 'State) -> voption:'T voption -> state:'State -> 'State /// exists p inp evaluates to match inp with ValueNone -> false | ValueSome x -> p x. + /// /// A function that evaluates to a boolean when given a value from the option type. /// The input value option. + /// /// False if the option is ValueNone, otherwise it returns the result of applying the predicate /// to the option value. [] val exists: predicate:('T -> bool) -> voption:'T voption -> bool /// forall p inp evaluates to match inp with ValueNone -> true | ValueSome x -> p x. + /// /// A function that evaluates to a boolean when given a value from the value option type. /// The input value option. + /// /// True if the option is None, otherwise it returns the result of applying the predicate /// to the option value. [] val forall: predicate:('T -> bool) -> voption:'T voption -> bool /// Evaluates to true if is ValueSome and its value is equal to . + /// /// The value to test for equality. /// The input value option. + /// /// True if the option is ValueSome and contains a value equal to , otherwise false. [] val inline contains: value:'T -> voption:'T voption -> bool when 'T : equality /// iter f inp executes match inp with ValueNone -> () | ValueSome x -> f x. + /// /// A function to apply to the voption value. /// The input value option. + /// /// Unit if the option is ValueNone, otherwise it returns the result of applying the predicate /// to the voption value. [] val iter: action:('T -> unit) -> voption:'T voption -> unit /// map f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> ValueSome (f x). + /// /// A function to apply to the voption value. /// The input value option. + /// /// A value option of the input value after applying the mapping function, or ValueNone if the input is ValueNone. [] val map: mapping:('T -> 'U) -> voption:'T voption -> 'U voption /// map f voption1 voption2 evaluates to match voption1, voption2 with ValueSome x, ValueSome y -> ValueSome (f x y) | _ -> ValueNone. + /// /// A function to apply to the voption values. /// The first value option. /// The second value option. + /// /// A value option of the input values after applying the mapping function, or ValueNone if either input is ValueNone. [] val map2: mapping:('T1 -> 'T2 -> 'U) -> voption1: 'T1 voption -> voption2: 'T2 voption -> 'U voption /// map f voption1 voption2 voption3 evaluates to match voption1, voption2, voption3 with ValueSome x, ValueSome y, ValueSome z -> ValueSome (f x y z) | _ -> ValueNone. + /// /// A function to apply to the value option values. /// The first value option. /// The second value option. /// The third value option. + /// /// A value option of the input values after applying the mapping function, or ValueNone if any input is ValueNone. [] val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> 'T1 voption -> 'T2 voption -> 'T3 voption -> 'U voption /// bind f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> f x + /// /// A function that takes the value of type T from a value option and transforms it into /// a value option containing a value of type U. /// The input value option. + /// /// An option of the output type of the binder. [] val bind: binder:('T -> 'U voption) -> voption:'T voption -> 'U voption /// flatten inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> x + /// /// The input value option. + /// /// A value option of the output type of the binder. /// flatten is equivalent to bind id. [] val flatten: voption:'T voption voption -> 'T voption /// filter f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> if f x then ValueSome x else ValueNone. + /// /// A function that evaluates whether the value contained in the value option should remain, or be filtered out. /// The input value option. + /// /// The input if the predicate evaluates to true; otherwise, ValueNone. [] val filter: predicate:('T -> bool) -> voption:'T voption -> 'T voption /// Convert the value option to an array of length 0 or 1. + /// /// The input value option. + /// /// The result array. [] val toArray: voption:'T voption -> 'T[] /// Convert the value option to a list of length 0 or 1. + /// /// The input value option. + /// /// The result list. [] val toList: voption:'T voption -> 'T list /// Convert the value option to a Nullable value. + /// /// The input value option. + /// /// The result value. [] val toNullable: voption:'T voption -> Nullable<'T> /// Convert a Nullable value to a value option. + /// /// The input nullable value. + /// /// The result value option. [] val ofNullable: value:Nullable<'T> -> 'T voption /// Convert a potentially null value to a value option. + /// /// The input value. + /// /// The result value option. [] val ofObj: value: 'T -> 'T voption when 'T : null /// Convert an option to a potentially null value. + /// /// The input value. + /// /// The result value, which is null if the input was ValueNone. [] val toObj: value: 'T voption -> 'T when 'T : null diff --git a/src/fsharp/FSharp.Core/prim-types-prelude.fsi b/src/fsharp/FSharp.Core/prim-types-prelude.fsi index 0d8d44d768..3ab796ca91 100644 --- a/src/fsharp/FSharp.Core/prim-types-prelude.fsi +++ b/src/fsharp/FSharp.Core/prim-types-prelude.fsi @@ -9,82 +9,134 @@ namespace Microsoft.FSharp.Core open System - /// An abbreviation for the CLI type System.Object. + /// An abbreviation for the CLI type . + /// + /// Basic Types type obj = System.Object - /// An abbreviation for the CLI type System.Exception. + /// An abbreviation for the CLI type . + /// + /// Basic Types type exn = System.Exception - /// An abbreviation for the CLI type System.IntPtr. + /// An abbreviation for the CLI type . + /// + /// Basic Types type nativeint = System.IntPtr - /// An abbreviation for the CLI type System.UIntPtr. + /// An abbreviation for the CLI type . + /// + /// Basic Types type unativeint = System.UIntPtr - /// An abbreviation for the CLI type System.String. + /// An abbreviation for the CLI type . + /// + /// Basic Types type string = System.String - /// An abbreviation for the CLI type System.Single. + /// An abbreviation for the CLI type . + /// + /// Basic Types type float32 = System.Single - /// An abbreviation for the CLI type System.Double. + /// An abbreviation for the CLI type . + /// + /// Basic Types type float = System.Double - /// An abbreviation for the CLI type System.Single. + /// An abbreviation for the CLI type . Identical to . + /// + /// Basic Types type single = System.Single - /// An abbreviation for the CLI type System.Double. + /// An abbreviation for the CLI type . Identical to . + /// + /// Basic Types type double = System.Double - /// An abbreviation for the CLI type System.SByte. + /// An abbreviation for the CLI type . + /// + /// Basic Types type sbyte = System.SByte - /// An abbreviation for the CLI type System.Byte. + /// An abbreviation for the CLI type . + /// + /// Basic Types type byte = System.Byte - /// An abbreviation for the CLI type System.SByte. + /// An abbreviation for the CLI type . + /// + /// Basic Types type int8 = System.SByte - /// An abbreviation for the CLI type System.Byte. + /// An abbreviation for the CLI type . + /// + /// Basic Types type uint8 = System.Byte - /// An abbreviation for the CLI type System.Int16. + /// An abbreviation for the CLI type . + /// + /// Basic Types type int16 = System.Int16 - /// An abbreviation for the CLI type System.UInt16. + /// An abbreviation for the CLI type . + /// + /// Basic Types type uint16 = System.UInt16 - /// An abbreviation for the CLI type System.Int32. + /// An abbreviation for the CLI type . + /// + /// Basic Types type int32 = System.Int32 - /// An abbreviation for the CLI type System.UInt32. + /// An abbreviation for the CLI type . + /// + /// Basic Types type uint32 = System.UInt32 - /// An abbreviation for the CLI type System.Int64. + /// An abbreviation for the CLI type . + /// + /// Basic Types type int64 = System.Int64 - /// An abbreviation for the CLI type System.UInt64. + /// An abbreviation for the CLI type . + /// + /// Basic Types type uint64 = System.UInt64 - /// An abbreviation for the CLI type System.Char. + /// An abbreviation for the CLI type . + /// + /// Basic Types type char = System.Char - /// An abbreviation for the CLI type System.Boolean. + /// An abbreviation for the CLI type . + /// + /// Basic Types type bool = System.Boolean - /// An abbreviation for the CLI type System.Decimal. + /// An abbreviation for the CLI type . + /// + /// Basic Types type decimal = System.Decimal - /// An abbreviation for the CLI type System.Int32. + /// An abbreviation for the CLI type . + /// + /// Basic Types type int = int32 - /// An abbreviation for the CLI type System.UInt32. + /// An abbreviation for the CLI type . + /// + /// Basic Types type uint = uint32 /// Single dimensional, zero-based arrays, written int[], string[] etc. + /// /// Use the values in the Array module to manipulate values /// of this type, or the notation arr.[x] to get/set array /// values. + /// + /// Basic Types + /// type 'T ``[]`` = (# "!0[]" #) /// Two dimensional arrays, typically zero-based. @@ -94,6 +146,9 @@ namespace Microsoft.FSharp.Core /// values. /// /// Non-zero-based arrays can also be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,]`` = (# "!0[0 ... , 0 ... ]" #) /// Three dimensional arrays, typically zero-based. Non-zero-based arrays @@ -102,6 +157,9 @@ namespace Microsoft.FSharp.Core /// Use the values in the Array3D module /// to manipulate values of this type, or the notation arr.[x1,x2,x3] to get and set array /// values. + /// + /// Basic Types + /// type 'T ``[,,]`` = (# "!0[0 ...,0 ...,0 ...]" #) /// Four dimensional arrays, typically zero-based. Non-zero-based arrays @@ -110,148 +168,237 @@ namespace Microsoft.FSharp.Core /// Use the values in the Array4D module /// to manipulate values of this type, or the notation arr.[x1,x2,x3,x4] to get and set array /// values. + /// + /// Basic Types + /// type 'T ``[,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...]" #) /// Five dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Six dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Seven dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Eight dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Nine dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Ten dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Eleven dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Twelve dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Thirteen dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Fourteen dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Fifteen dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Sixteen dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Seventeen dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Eighteen dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Nineteen dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Twenty dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Twenty-one dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Twenty-two dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Twenty-three dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Twenty-four dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Twenty-five dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Twenty-six dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Twenty-seven dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Twenty-eight dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Twenty-nine dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Thirty dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Thirty-one dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Thirty-two dimensional arrays, typically zero-based. Non-zero-based arrays /// can be created using methods on the System.Array type. + /// + /// Basic Types + /// type 'T ``[,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]`` = (# "!0[0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...,0 ...]" #) /// Single dimensional, zero-based arrays, written int[], string[] etc. /// - /// Use the values in the Array module to manipulate values + /// Use the values in the module to manipulate values /// of this type, or the notation arr.[x] to get/set array /// values. + /// + /// Basic Types type 'T array = 'T[] /// Represents an unmanaged pointer in F# code. @@ -259,8 +406,10 @@ namespace Microsoft.FSharp.Core /// This type should only be used when writing F# code that interoperates /// with native code. Use of this type in F# code may result in /// unverifiable code being generated. Conversions to and from the - /// nativeint type may be required. Values of this type can be generated + /// type may be required. Values of this type can be generated /// by the functions in the NativeInterop.NativePtr module. + /// + /// ByRef and Pointer Types type nativeptr<'T when 'T : unmanaged> = (# "native int" #) /// Represents an untyped unmanaged pointer in F# code. @@ -268,10 +417,14 @@ namespace Microsoft.FSharp.Core /// This type should only be used when writing F# code that interoperates /// with native code. Use of this type in F# code may result in /// unverifiable code being generated. Conversions to and from the - /// nativeint type may be required. Values of this type can be generated + /// type may be required. Values of this type can be generated /// by the functions in the NativeInterop.NativePtr module. + /// + /// ByRef and Pointer Types type voidptr = (# "void*" #) /// This type is for internal use by the F# code generator. + /// + /// ByRef and Pointer Types type ilsigptr<'T> = (# "!0*" #) diff --git a/src/fsharp/FSharp.Core/prim-types.fs b/src/fsharp/FSharp.Core/prim-types.fs index 36567214f1..d912b8f975 100644 --- a/src/fsharp/FSharp.Core/prim-types.fs +++ b/src/fsharp/FSharp.Core/prim-types.fs @@ -251,6 +251,9 @@ namespace Microsoft.FSharp.Core [] let RequiresPreview : string = "Experimental library feature, requires '--langversion:preview'" + [] + let NotSupportedYet : string = "This construct is not supported by your version of the F# compiler" + [] [] type ExperimentalAttribute(message:string) = @@ -4718,7 +4721,7 @@ namespace Microsoft.FSharp.Core [] let inline typeof<'T> = BasicInlinedOperations.typeof<'T> - [] + [] let inline nameof (_: 'T) : string = raise (Exception "may not call directly, should always be optimized away") [] diff --git a/src/fsharp/FSharp.Core/prim-types.fsi b/src/fsharp/FSharp.Core/prim-types.fsi index 3c35192188..398fbd0a0f 100644 --- a/src/fsharp/FSharp.Core/prim-types.fsi +++ b/src/fsharp/FSharp.Core/prim-types.fsi @@ -8,16 +8,27 @@ namespace Microsoft.FSharp.Core open System + /// + /// Basic definitions of operators, options, functions, results, choices, attributes and plain text formatting. + /// + /// /// The type 'unit', which has only one value "()". This value is special and /// always uses the representation 'null'. + /// + /// Basic Types + /// type Unit = interface IComparable /// The type 'unit', which has only one value "()". This value is special and /// always uses the representation 'null'. + /// + /// Basic Types and unit = Unit /// Indicates the relationship between a compiled entity in a CLI binary and an element in F# source code. + /// + /// Attributes type SourceConstructFlags = /// Indicates that the compiled entity has no relationship to an element in F# source code. | None = 0 @@ -57,6 +68,8 @@ namespace Microsoft.FSharp.Core [] /// Indicates one or more adjustments to the compiled representation of an F# type or member. + /// + /// Attributes type CompilationRepresentationFlags = /// No special compilation representation. @@ -79,6 +92,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to class definition makes it sealed, which means it may not /// be extended or implemented. + /// + /// Attributes [] type SealedAttribute = inherit Attribute @@ -87,7 +102,9 @@ namespace Microsoft.FSharp.Core new : unit -> SealedAttribute /// Creates an instance of the attribute + /// /// Indicates whether the class is sealed. + /// /// SealedAttribute new : value:bool -> SealedAttribute @@ -96,6 +113,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to class definition makes it abstract, which means it need not /// implement all its methods. Instances of abstract classes may not be constructed directly. + /// + /// Attributes [] [] type AbstractClassAttribute = @@ -108,6 +127,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to the let-binding for the definition of a top-level /// value makes the quotation expression that implements the value available /// for use at runtime. + /// + /// Attributes [] [] type ReflectedDefinitionAttribute = @@ -118,7 +139,9 @@ namespace Microsoft.FSharp.Core new : unit -> ReflectedDefinitionAttribute /// Creates an instance of the attribute + /// /// Indicates whether to include the evaluated value of the definition as the outer node of the quotation + /// /// ReflectedDefinitionAttribute new : includeValue:bool -> ReflectedDefinitionAttribute @@ -126,14 +149,21 @@ namespace Microsoft.FSharp.Core member IncludeValue: bool /// This attribute is used to indicate a generic container type satisfies the F# 'equality' - /// constraint only if a generic argument also satisfies this constraint. For example, adding + /// constraint only if a generic argument also satisfies this constraint. + /// + /// + /// + /// For example, adding /// this attribute to parameter 'T on a type definition C<'T> means that a type C<X> only supports /// equality if the type X also supports equality and all other conditions for C<X> to support /// equality are also met. The type C<'T> can still be used with other type arguments, but a type such /// as C<(int -> int)> will not support equality because the type (int -> int) is an F# function type - /// and does not support equality. + /// and does not support equality. + /// + /// This attribute will be ignored if it is used on the generic parameters of functions or methods. + /// /// - /// This attribute will be ignored if it is used on the generic parameters of functions or methods. + /// Attributes [] [] type EqualityConditionalOnAttribute = @@ -144,14 +174,19 @@ namespace Microsoft.FSharp.Core new : unit -> EqualityConditionalOnAttribute /// This attribute is used to indicate a generic container type satisfies the F# 'comparison' - /// constraint only if a generic argument also satisfies this constraint. For example, adding + /// constraint only if a generic argument also satisfies this constraint. + /// + /// For example, adding /// this attribute to parameter 'T on a type definition C<'T> means that a type C<X> only supports /// comparison if the type X also supports comparison and all other conditions for C<X> to support /// comparison are also met. The type C<'T> can still be used with other type arguments, but a type such /// as C<(int -> int)> will not support comparison because the type (int -> int) is an F# function type - /// and does not support comparison. + /// and does not support comparison. /// - /// This attribute will be ignored if it is used on the generic parameters of functions or methods. + /// This attribute will be ignored if it is used on the generic parameters of functions or methods. + /// + /// + /// Attributes [] [] type ComparisonConditionalOnAttribute = @@ -162,6 +197,8 @@ namespace Microsoft.FSharp.Core new : unit -> ComparisonConditionalOnAttribute /// Adding this attribute to a type causes it to be represented using a CLI struct. + /// + /// Attributes [] [] type StructAttribute = @@ -173,6 +210,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a type causes it to be interpreted as a unit of measure. /// This may only be used under very limited conditions. + /// + /// Attributes [] [] type MeasureAttribute = @@ -184,6 +223,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a type causes it to be interpreted as a refined type, currently limited to measure-parameterized types. /// This may only be used under very limited conditions. + /// + /// Attributes [] [] type MeasureAnnotatedAbbreviationAttribute = @@ -194,6 +235,8 @@ namespace Microsoft.FSharp.Core new : unit -> MeasureAnnotatedAbbreviationAttribute /// Adding this attribute to a type causes it to be represented using a CLI interface. + /// + /// Attributes [] [] type InterfaceAttribute = @@ -204,6 +247,8 @@ namespace Microsoft.FSharp.Core new : unit -> InterfaceAttribute /// Adding this attribute to a type causes it to be represented using a CLI class. + /// + /// Attributes [] [] type ClassAttribute = @@ -216,6 +261,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a type lets the 'null' literal be used for the type /// within F# code. This attribute may only be added to F#-defined class or /// interface types. + /// + /// Attributes [] [] type AllowNullLiteralAttribute = @@ -233,6 +280,8 @@ namespace Microsoft.FSharp.Core member Value: bool /// Adding this attribute to a value causes it to be compiled as a CLI constant literal. + /// + /// Attributes [] [] type LiteralAttribute = @@ -245,6 +294,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a property with event type causes it to be compiled with as a CLI /// metadata event, through a syntactic translation to a pair of 'add_EventName' and /// 'remove_EventName' methods. + /// + /// Attributes [] [] type CLIEventAttribute = @@ -256,6 +307,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a record type causes it to be compiled to a CLI representation /// with a default constructor with property getters and setters. + /// + /// Attributes [] [] type CLIMutableAttribute = @@ -268,6 +321,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a discriminated union with value false /// turns off the generation of standard helper member tester, constructor /// and accessor members for the generated CLI class for that type. + /// + /// Attributes [] [] type DefaultAugmentationAttribute = @@ -277,13 +332,17 @@ namespace Microsoft.FSharp.Core member Value: bool /// Creates an instance of the attribute + /// /// Indicates whether to generate helper members on the CLI class representing a discriminated /// union. + /// /// DefaultAugmentationAttribute new : value:bool -> DefaultAugmentationAttribute /// Adding this attribute to an F# mutable binding causes the "volatile" /// prefix to be used for all accesses to the field. + /// + /// Attributes [] [] type VolatileFieldAttribute = @@ -296,6 +355,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a function indicates it is the entrypoint for an application. /// If this attribute is not specified for an EXE then the initialization implicit in the /// module bindings in the last file in the compilation sequence are used as the entrypoint. + /// + /// Attributes [] [] type EntryPointAttribute = @@ -308,6 +369,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a record or union type disables the automatic generation /// of overrides for 'System.Object.Equals(obj)', 'System.Object.GetHashCode()' /// and 'System.IComparable' for the type. The type will by default use reference equality. + /// + /// Attributes [] [] type ReferenceEqualityAttribute = @@ -320,6 +383,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a record, union or struct type confirms the automatic /// generation of overrides for 'System.Object.Equals(obj)' and /// 'System.Object.GetHashCode()' for the type. + /// + /// Attributes [] [] type StructuralEqualityAttribute = @@ -331,6 +396,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a record, union, exception, or struct type confirms the /// automatic generation of implementations for 'System.IComparable' for the type. + /// + /// Attributes [] [] type StructuralComparisonAttribute = @@ -342,8 +409,10 @@ namespace Microsoft.FSharp.Core [] [] - /// Indicates that a member on a computation builder type is a custom query operator, - /// and indicates the name of that operator. + /// Indicates that a member on a computation builder type is a custom query operator, + /// and indicates the name of that operator. + /// + /// Attributes type CustomOperationAttribute = inherit Attribute @@ -379,6 +448,8 @@ namespace Microsoft.FSharp.Core [] /// Indicates that, when a custom operator is used in a computation expression, /// a parameter is automatically parameterized by the variable space of the computation expression + /// + /// Attributes type ProjectionParameterAttribute = /// Creates an instance of the attribute @@ -391,6 +462,8 @@ namespace Microsoft.FSharp.Core /// F# type system, this helps ensure that the F# generic equality function is not instantiated directly /// at this type. The attribute and checking does not constrain the use of comparison with base or child /// types of this type. + /// + /// Attributes [] [] type NoEqualityAttribute = @@ -401,6 +474,8 @@ namespace Microsoft.FSharp.Core new : unit -> NoEqualityAttribute /// Adding this attribute to a type indicates it is a type with a user-defined implementation of equality. + /// + /// Attributes [] [] type CustomEqualityAttribute = @@ -411,6 +486,8 @@ namespace Microsoft.FSharp.Core new : unit -> CustomEqualityAttribute /// Adding this attribute to a type indicates it is a type with a user-defined implementation of comparison. + /// + /// Attributes [] [] type CustomComparisonAttribute = @@ -424,7 +501,10 @@ namespace Microsoft.FSharp.Core /// This means that the type does not satisfy the F# 'comparison' constraint. Within the bounds of the /// F# type system, this helps ensure that the F# generic comparison function is not instantiated directly /// at this type. The attribute and checking does not constrain the use of comparison with base or child - /// types of this type. + /// types of this type. + /// + /// + /// Attributes [] [] type NoComparisonAttribute = @@ -436,7 +516,10 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a field declaration means that the field is /// not initialized. During type checking a constraint is asserted that the field type supports 'null'. - /// If the 'check' value is false then the constraint is not asserted. + /// If the 'check' value is false then the constraint is not asserted. + /// + /// + /// Attributes [] [] type DefaultValueAttribute = @@ -450,11 +533,15 @@ namespace Microsoft.FSharp.Core new : unit -> DefaultValueAttribute /// Creates an instance of the attribute + /// /// Indicates whether to assert that the field type supports null. + /// /// DefaultValueAttribute new : check: bool -> DefaultValueAttribute /// This attribute is added automatically for all optional arguments. + /// + /// Attributes [] [] type OptionalArgumentAttribute = @@ -466,6 +553,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a type, value or member requires that /// uses of the construct must explicitly instantiate any generic type parameters. + /// + /// Attributes [] [] type RequiresExplicitTypeArgumentsAttribute = @@ -477,6 +566,8 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a non-function value with generic parameters indicates that /// uses of the construct can give rise to generic code through type inference. + /// + /// Attributes [] [] type GeneralizableValueAttribute = @@ -488,13 +579,17 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a value or function definition in an F# module changes the name used /// for the value in compiled CLI code. + /// + /// Attributes [] [] type CompiledNameAttribute = inherit Attribute /// Creates an instance of the attribute + /// /// The name to use in compiled code. + /// /// CompiledNameAttribute new : compiledName:string -> CompiledNameAttribute @@ -503,13 +598,17 @@ namespace Microsoft.FSharp.Core /// Adding this attribute to a type with value 'false' disables the behaviour where F# makes the /// type Serializable by default. + /// + /// Attributes [] [] type AutoSerializableAttribute = inherit Attribute /// Creates an instance of the attribute + /// /// Indicates whether the type should be serializable by default. + /// /// AutoSerializableAttribute new : value:bool -> AutoSerializableAttribute @@ -519,15 +618,19 @@ namespace Microsoft.FSharp.Core /// This attribute is added to generated assemblies to indicate the /// version of the data schema used to encode additional F# /// specific information in the resource attached to compiled F# libraries. + /// + /// Attributes [] [] type FSharpInterfaceDataVersionAttribute = inherit Attribute /// Creates an instance of the attribute + /// /// The major version number. /// The minor version number. /// The release number. + /// /// FSharpInterfaceDataVersionAttribute new : major:int * minor:int * release:int -> FSharpInterfaceDataVersionAttribute @@ -542,31 +645,43 @@ namespace Microsoft.FSharp.Core /// This attribute is inserted automatically by the F# compiler to tag types /// and methods in the generated CLI code with flags indicating the correspondence - /// with original source constructs. It is used by the functions in the - /// Microsoft.FSharp.Reflection namespace to reverse-map compiled constructs to - /// their original forms. It is not intended for use from user code. + /// with original source constructs. + /// + /// This attribute is used by the functions in the + /// FSharp.Reflection namespace to reverse-map compiled constructs to + /// their original forms. It is not intended for use from user code. + /// + /// Attributes [] [] type CompilationMappingAttribute = inherit Attribute /// Creates an instance of the attribute + /// /// Indicates the type of source construct. + /// /// CompilationMappingAttribute new : sourceConstructFlags:SourceConstructFlags -> CompilationMappingAttribute /// Creates an instance of the attribute + /// /// Indicates the type of source construct. + /// /// CompilationMappingAttribute new : sourceConstructFlags:SourceConstructFlags * sequenceNumber: int -> CompilationMappingAttribute /// Creates an instance of the attribute + /// /// Indicates the type of source construct. + /// /// CompilationMappingAttribute new : sourceConstructFlags:SourceConstructFlags * variantNumber : int * sequenceNumber : int -> CompilationMappingAttribute /// Creates an instance of the attribute + /// /// Indicates the type definitions needed to resolve the source construct. + /// /// CompilationMappingAttribute new : resourceName:string * typeDefinitions:System.Type[] -> CompilationMappingAttribute @@ -585,15 +700,23 @@ namespace Microsoft.FSharp.Core member TypeDefinitions : System.Type[] /// This attribute is inserted automatically by the F# compiler to tag - /// methods which are given the 'CompiledName' attribute. It is not intended - /// for use from user code. + /// methods which are given the 'CompiledName' attribute. + /// + /// This attribute is used by the functions in the + /// FSharp.Reflection namespace to reverse-map compiled constructs to + /// their original forms. It is not intended for use from user code. + /// + /// + /// Attributes [] [] type CompilationSourceNameAttribute = inherit Attribute /// Creates an instance of the attribute + /// /// The name of the method in source. + /// /// CompilationSourceNameAttribute new : sourceName:string -> CompilationSourceNameAttribute @@ -602,34 +725,44 @@ namespace Microsoft.FSharp.Core /// This attribute is used to adjust the runtime representation for a type. /// For example, it may be used to note that the null representation - /// may be used for a type. This affects how some constructs are compiled. + /// may be used for a type. This affects how some constructs are compiled. + /// + /// + /// Attributes [] [] type CompilationRepresentationAttribute = inherit Attribute /// Creates an instance of the attribute + /// /// Indicates adjustments to the compiled representation of the type or member. + /// /// CompilationRepresentationAttribute new : flags:CompilationRepresentationFlags -> CompilationRepresentationAttribute /// Indicates one or more adjustments to the compiled representation of an F# type or member member Flags : CompilationRepresentationFlags - module internal ExperimentalAttributeMessages = begin + module internal ExperimentalAttributeMessages = [] val RequiresPreview : string = "Experimental library feature, requires '--langversion:preview'" - end + [] + val NotSupportedYet : string = "This construct is not supported by your version of the F# compiler" /// This attribute is used to tag values that are part of an experimental library /// feature. + /// + /// Attributes [] [] type ExperimentalAttribute = inherit Attribute /// Creates an instance of the attribute + /// /// The warning message to be emitted when code uses this construct. + /// /// ExperimentalAttribute new : message:string-> ExperimentalAttribute @@ -637,14 +770,19 @@ namespace Microsoft.FSharp.Core member Message: string /// This attribute is generated automatically by the F# compiler to tag functions and members - /// that accept a partial application of some of their arguments and return a residual function + /// that accept a partial application of some of their arguments and return a residual function. + /// + /// + /// Attributes [] [] type CompilationArgumentCountsAttribute = inherit Attribute /// Creates an instance of the attribute + /// /// Indicates the number of arguments in each argument group. + /// /// CompilationArgumentCountsAttribute new : counts:int[] -> CompilationArgumentCountsAttribute @@ -655,13 +793,17 @@ namespace Microsoft.FSharp.Core /// '%A' printf formatting patterns and other two-dimensional text-based display layouts. /// In this version of F# valid values are of the form PreText {PropertyName1} PostText {PropertyName2} ... {PropertyNameX} PostText. /// The property names indicate properties to evaluate and to display instead of the object itself. + /// + /// Attributes [] [] type StructuredFormatDisplayAttribute = inherit Attribute /// Creates an instance of the attribute + /// /// Indicates the text to display when using the '%A' printf formatting. + /// /// StructuredFormatDisplayAttribute new : value:string-> StructuredFormatDisplayAttribute @@ -671,6 +813,8 @@ namespace Microsoft.FSharp.Core member Value: string /// Indicates that a message should be emitted when F# source code uses this construct. + /// + /// Attributes [] [] type CompilerMessageAttribute = @@ -696,6 +840,8 @@ namespace Microsoft.FSharp.Core /// of unverifiable code. These values are inevitably marked 'inline' to ensure that /// the unverifiable constructs are not present in the actual code for the F# library, /// but are rather copied to the source code of the caller. + /// + /// Attributes [] [] type UnverifiableAttribute = @@ -710,6 +856,8 @@ namespace Microsoft.FSharp.Core /// causes the method body emitted for the inlined function to raise an exception if /// dynamically invoked, rather than including the unverifiable code in the generated /// assembly. + /// + /// Attributes [] [] type NoDynamicInvocationAttribute = @@ -723,6 +871,8 @@ namespace Microsoft.FSharp.Core /// This attribute is used to indicate that references to the elements of a module, record or union /// type require explicit qualified access. + /// + /// Attributes [] [] type RequireQualifiedAccessAttribute = @@ -732,13 +882,19 @@ namespace Microsoft.FSharp.Core /// RequireQualifiedAccessAttribute new : unit -> RequireQualifiedAccessAttribute - /// This attribute is used for two purposes. When applied to an assembly, it must be given a string - /// argument, and this argument must indicate a valid module or namespace in that assembly. Source + /// Indicates a construct is automatically opened when brought into scope through + /// an assembly reference or then opening of the containing namespace or module. + /// + /// When applied to an assembly, this attribute must be given a string + /// argument, and this indicates a valid module or namespace in that assembly. Source /// code files compiled with a reference to this assembly are processed in an environment - /// where the given path is automatically opened. + /// where the given path is automatically opened. /// - /// When applied to a module within an assembly, then the attribute must not be given any arguments. - /// When the enclosing namespace is opened in user source code, the module is also implicitly opened. + /// When applied to a type or module within an assembly, then the attribute must not be given any arguments, and + /// the type or module is implicitly opened when its enclosing namespace or module is opened. + /// + /// + /// Attributes [] [] type AutoOpenAttribute = @@ -749,8 +905,10 @@ namespace Microsoft.FSharp.Core new : unit -> AutoOpenAttribute /// Creates an attribute used to mark a namespace or module path to be 'automatically opened' when an assembly is referenced + /// /// The namespace or module to be automatically opened when an assembly is referenced /// or an enclosing module opened. + /// /// AutoOpenAttribute new : path:string-> AutoOpenAttribute @@ -762,49 +920,64 @@ namespace Microsoft.FSharp.Core /// The type of floating point numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.Double. + /// . + /// + /// Basic Types with Units of Measure type float<[] 'Measure> = float [] /// The type of floating point numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.Single. + /// . + /// + /// + /// Basic Types with Units of Measure type float32<[] 'Measure> = float32 [] /// The type of decimal numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.Decimal. + /// . + /// + /// Basic Types with Units of Measure type decimal<[] 'Measure> = decimal [] /// The type of 32-bit signed integer numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.Int32. + /// . + /// + /// Basic Types with Units of Measure type int<[] 'Measure> = int [] /// The type of 8-bit signed integer numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.SByte. + /// . + /// + /// Basic Types with Units of Measure type sbyte<[] 'Measure> = sbyte [] /// The type of 16-bit signed integer numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.Int16. + /// . + /// + /// Basic Types with Units of Measure type int16<[] 'Measure> = int16 [] /// The type of 64-bit signed integer numbers, annotated with a unit of measure. The unit /// of measure is erased in compiled code and when values of this type /// are analyzed using reflection. The type is representationally equivalent to - /// System.Int64. + /// . + /// + /// Basic Types with Units of Measure type int64<[] 'Measure> = int64 /// Represents a managed pointer in F# code. @@ -813,17 +986,20 @@ namespace Microsoft.FSharp.Core #else [] #endif + /// ByRef and Pointer Types type byref<'T, 'Kind> = (# "!0&" #) /// Represents a managed pointer in F# code. For F# 4.5+ this is considered equivalent to byref<'T, ByRefKinds.InOut> + /// ByRef and Pointer Types type byref<'T> = (# "!0&" #) - /// Represents the types of byrefs in F# 4.5+ + /// Represents the types of byrefs in F# 4.5+ #if BUILDING_WITH_LKG || BUILD_FROM_SOURCE [] #else [] #endif + /// ByRef and Pointer Types module ByRefKinds = /// Represents a byref that can be written @@ -851,93 +1027,123 @@ namespace Microsoft.FSharp.Core type InOut /// Represents a in-argument or readonly managed pointer in F# code. This type should only be used with F# 4.5+. + /// ByRef and Pointer Types type inref<'T> = byref<'T, ByRefKinds.In> /// Represents a out-argument managed pointer in F# code. This type should only be used with F# 4.5+. + /// ByRef and Pointer Types type outref<'T> = byref<'T, ByRefKinds.Out> /// Language primitives associated with the F# language + /// + /// Language Primitives module LanguagePrimitives = /// Compare two values for equality using partial equivalence relation semantics ([nan] <> [nan]) + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericEquality : e1:'T -> e2:'T -> bool when 'T : equality /// Compare two values for equality using equivalence relation semantics ([nan] = [nan]) + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericEqualityER : e1:'T -> e2:'T -> bool when 'T : equality /// Compare two values for equality + /// /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericEqualityWithComparer : comp:System.Collections.IEqualityComparer -> e1:'T -> e2:'T -> bool when 'T : equality /// Compare two values + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericComparison : e1:'T -> e2:'T -> int when 'T : comparison /// Compare two values. May be called as a recursive case from an implementation of System.IComparable to /// ensure consistent NaN comparison semantics. + /// /// The function to compare the values. /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericComparisonWithComparer : comp:System.Collections.IComparer -> e1:'T -> e2:'T -> int when 'T : comparison /// Compare two values + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericLessThan : e1:'T -> e2:'T -> bool when 'T : comparison /// Compare two values + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericGreaterThan : e1:'T -> e2:'T -> bool when 'T : comparison /// Compare two values + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericLessOrEqual : e1:'T -> e2:'T -> bool when 'T : comparison /// Compare two values + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline GenericGreaterOrEqual : e1:'T -> e2:'T -> bool when 'T : comparison /// Take the minimum of two values structurally according to the order given by GenericComparison + /// /// The first value. /// The second value. + /// /// The minimum value. val inline GenericMinimum : e1:'T -> e2:'T -> 'T when 'T : comparison /// Take the maximum of two values structurally according to the order given by GenericComparison + /// /// The first value. /// The second value. + /// /// The maximum value. val inline GenericMaximum : e1:'T -> e2:'T -> 'T when 'T : comparison /// Reference/physical equality. /// True if the inputs are reference-equal, false otherwise. + /// /// The first value. /// The second value. + /// /// The result of the comparison. val inline PhysicalEquality : e1:'T -> e2:'T -> bool when 'T : not struct /// The physical hash. Hashes on the object identity, except for value types, /// where we hash on the contents. + /// /// The input object. + /// /// The hashed value. val inline PhysicalHash : obj:'T -> int when 'T : not struct @@ -966,7 +1172,9 @@ namespace Microsoft.FSharp.Core /// Make an F# hash/equality object for the given type using node-limited hashing when hashing F# /// records, lists and union types. + /// /// The input limit on the number of nodes. + /// /// System.Collections.Generic.IEqualityComparer<'T> val inline FastLimitedGenericEqualityComparer<'T> : limit: int -> System.Collections.Generic.IEqualityComparer<'T> when 'T : equality @@ -980,85 +1188,117 @@ namespace Microsoft.FSharp.Core /// Hash a value according to its structure. This hash is not limited by an overall node count when hashing F# /// records, lists and union types. + /// /// The input object. + /// /// The hashed value. val inline GenericHash : obj:'T -> int /// Hash a value according to its structure. Use the given limit to restrict the hash when hashing F# /// records, lists and union types. + /// /// The limit on the number of nodes. /// The input object. + /// /// The hashed value. val inline GenericLimitedHash : limit: int -> obj:'T -> int /// Recursively hash a part of a value according to its structure. + /// /// The comparison function. /// The input object. + /// /// The hashed value. val inline GenericHashWithComparer : comparer : System.Collections.IEqualityComparer -> obj:'T -> int /// Build an enum value from an underlying value + /// /// The input value. + /// /// The value as an enumeration. val inline EnumOfValue : value:'T -> 'Enum when 'Enum : enum<'T> /// Get the underlying value for an enum value + /// /// The input enum. + /// /// The enumeration as a value. val inline EnumToValue : enum:'Enum -> 'T when 'Enum : enum<'T> /// Creates a float value with units-of-measure + /// /// The input float. + /// /// The float with units-of-measure. val inline FloatWithMeasure : float -> float<'Measure> /// Creates a float32 value with units-of-measure + /// /// The input float. + /// /// The float with units-of-measure. val inline Float32WithMeasure : float32 -> float32<'Measure> /// Creates a decimal value with units-of-measure + /// /// The input decimal. + /// /// The decimal with units of measure. val inline DecimalWithMeasure : decimal -> decimal<'Measure> /// Creates an int32 value with units-of-measure + /// /// The input int. + /// /// The int with units of measure. val inline Int32WithMeasure : int -> int<'Measure> /// Creates an int64 value with units-of-measure + /// /// The input int64. + /// /// The int64 with units of measure. val inline Int64WithMeasure : int64 -> int64<'Measure> /// Creates an int16 value with units-of-measure + /// /// The input int16. + /// /// The int16 with units-of-measure. val inline Int16WithMeasure : int16 -> int16<'Measure> /// Creates an sbyte value with units-of-measure + /// /// The input sbyte. + /// /// The sbyte with units-of-measure. val inline SByteWithMeasure : sbyte -> sbyte<'Measure> /// Parse an int32 according to the rules used by the overloaded 'int32' conversion operator when applied to strings + /// /// The input string. + /// /// The parsed value. val ParseInt32 : s:string -> int32 /// Parse an uint32 according to the rules used by the overloaded 'uint32' conversion operator when applied to strings + /// /// The input string. + /// /// The parsed value. val ParseUInt32 : s:string -> uint32 /// Parse an int64 according to the rules used by the overloaded 'int64' conversion operator when applied to strings + /// /// The input string. + /// /// The parsed value. val ParseInt64 : s:string -> int64 /// Parse an uint64 according to the rules used by the overloaded 'uint64' conversion operator when applied to strings + /// /// The input string. + /// /// The parsed value. val ParseUInt64 : s:string -> uint64 @@ -1126,7 +1366,7 @@ namespace Microsoft.FSharp.Core [] val RightShiftDynamic : value:'T1 -> shift:'T2 -> 'U - /// A compiler intrinsic that implements dynamic invocations to the '&&&' operator. + /// A compiler intrinsic that implements dynamic invocations to the '&&&' operator. [] [] val BitwiseAndDynamic : x:'T1 -> y:'T2 -> 'U @@ -1194,8 +1434,10 @@ namespace Microsoft.FSharp.Core val internal anyToStringShowingNull : 'T -> string /// Divides a value by an integer. + /// /// The input value. /// The input int. + /// /// The division result. val inline DivideByInt< ^T > : x:^T -> y:int -> ^T when ^T : (static member DivideByInt : ^T * int -> ^T) @@ -1228,8 +1470,10 @@ namespace Microsoft.FSharp.Core val ( & ) : e1:bool -> e2:bool -> bool /// Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand + /// /// The first value. /// The second value. + /// /// The result of the operation. val ( && ) : e1:bool -> e2:bool -> bool @@ -1239,18 +1483,24 @@ namespace Microsoft.FSharp.Core val ( or ) : e1:bool -> e2:bool -> bool /// Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand + /// /// The first value. /// The second value. + /// /// The result of the operation. val ( || ) : e1:bool -> e2:bool -> bool /// Address-of. Uses of this value may result in the generation of unverifiable code. + /// /// The input object. + /// /// The managed pointer. val inline ( ~& ) : obj:'T -> byref<'T> /// Address-of. Uses of this value may result in the generation of unverifiable code. + /// /// The input object. + /// /// The unmanaged pointer. val inline ( ~&& ) : obj:'T -> nativeptr<'T> @@ -1447,7 +1697,7 @@ namespace Microsoft.FSharp.Core /// Helper types for active patterns with 2 choices. - //[] + /// Choices and Results [] [] type Choice<'T1,'T2> = @@ -1459,6 +1709,7 @@ namespace Microsoft.FSharp.Core | Choice2Of2 of 'T2 /// Helper types for active patterns with 3 choices. + /// Choices and Results [] [] type Choice<'T1,'T2,'T3> = @@ -1473,6 +1724,7 @@ namespace Microsoft.FSharp.Core | Choice3Of3 of 'T3 /// Helper types for active patterns with 4 choices. + /// Choices and Results [] [] type Choice<'T1,'T2,'T3,'T4> = @@ -1490,6 +1742,7 @@ namespace Microsoft.FSharp.Core | Choice4Of4 of 'T4 /// Helper types for active patterns with 5 choices. + /// Choices and Results [] [] type Choice<'T1,'T2,'T3,'T4,'T5> = @@ -1510,6 +1763,7 @@ namespace Microsoft.FSharp.Core | Choice5Of5 of 'T5 /// Helper types for active patterns with 6 choices. + /// Choices and Results [] [] type Choice<'T1,'T2,'T3,'T4,'T5,'T6> = @@ -1533,6 +1787,7 @@ namespace Microsoft.FSharp.Core | Choice6Of6 of 'T6 /// Helper types for active patterns with 7 choices. + /// Choices and Results [] [] type Choice<'T1,'T2,'T3,'T4,'T5,'T6,'T7> = @@ -1559,11 +1814,13 @@ namespace Microsoft.FSharp.Core | Choice7Of7 of 'T7 /// Non-exhaustive match failures will raise the MatchFailureException exception + /// Language Primitives [] exception MatchFailureException of string * int * int /// The CLI type used to represent F# first-class type function values. This type is for use /// by compiled F# code. + /// Language Primitives [] type FSharpTypeFunc = @@ -1577,6 +1834,7 @@ namespace Microsoft.FSharp.Core /// The CLI type used to represent F# function values. This type is not /// typically used directly, though may be used from other CLI languages. + /// Language Primitives [] type FSharpFunc<'T,'U> = @@ -1585,65 +1843,83 @@ namespace Microsoft.FSharp.Core new : unit -> FSharpFunc<'T,'U> /// Invoke an F# first class function value with one argument + /// /// + /// /// 'U abstract member Invoke : func:'T -> 'U - /// Convert an F# first class function value to a value of type System.Converter + /// Convert an F# first class function value to a value of type + /// /// The input function. + /// /// A System.Converter of the function type. static member op_Implicit : func:('T -> 'U) -> System.Converter<'T,'U> - /// Convert an value of type System.Converter to a F# first class function value + /// Convert an value of type to a F# first class function value + /// /// The input System.Converter. + /// /// An F# function of the same type. static member op_Implicit : converter:System.Converter<'T,'U> -> ('T -> 'U) - /// Convert an F# first class function value to a value of type System.Converter + /// Convert an F# first class function value to a value of type + /// /// The input function. + /// /// System.Converter<'T,'U> static member ToConverter : func:('T -> 'U) -> System.Converter<'T,'U> - /// Convert an value of type System.Converter to a F# first class function value + /// Convert an value of type to a F# first class function value + /// /// The input System.Converter. + /// /// An F# function of the same type. static member FromConverter : converter:System.Converter<'T,'U> -> ('T -> 'U) /// Invoke an F# first class function value with five curried arguments. In some cases this /// will result in a more efficient application than applying the arguments successively. + /// /// The input function. /// The first arg. /// The second arg. /// The third arg. /// The fourth arg. /// The fifth arg. + /// /// The function result. static member InvokeFast : func: FSharpFunc<'T,('U -> 'V -> 'W -> 'X -> 'Y)> * arg1:'T * arg2:'U * arg3:'V * arg4:'W * arg5:'X -> 'Y /// Invoke an F# first class function value with four curried arguments. In some cases this /// will result in a more efficient application than applying the arguments successively. + /// /// The input function. /// The first arg. /// The second arg. /// The third arg. /// The fourth arg. + /// /// The function result. static member InvokeFast : func: FSharpFunc<'T,('U -> 'V -> 'W -> 'X)> * arg1:'T * arg2:'U * arg3:'V * arg4:'W -> 'X /// Invoke an F# first class function value with three curried arguments. In some cases this /// will result in a more efficient application than applying the arguments successively. + /// /// The input function. /// The first arg. /// The second arg. /// The third arg. + /// /// The function result. static member InvokeFast : func: FSharpFunc<'T,('U -> 'V -> 'W)> * arg1:'T * arg2:'U * arg3:'V -> 'W /// Invoke an F# first class function value with two curried arguments. In some cases this /// will result in a more efficient application than applying the arguments successively. + /// /// The input function. /// The first arg. /// The second arg. + /// /// The function result. static member InvokeFast : func: FSharpFunc<'T,('U -> 'V)> * arg1:'T * arg2:'U -> 'V @@ -1651,100 +1927,138 @@ namespace Microsoft.FSharp.Core [] /// Helper functions for converting F# first class function values to and from CLI representations /// of functions using delegates. + /// Language Primitives type FuncConvert = /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F# function. static member inline ToFSharpFunc : action:Action<'T> -> ('T -> unit) /// Convert the given Converter delegate object to an F# function value + /// /// The input Converter delegate. + /// /// The F# function. static member inline ToFSharpFunc : converter:Converter<'T,'U> -> ('T -> 'U) /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F# function. static member inline FromAction : action:Action -> (unit -> unit) /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F# function. static member inline FromAction : action:Action<'T> -> ('T -> unit) /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F#funcfunction. static member inline FromAction : action:Action<'T1,'T2> -> ('T1 -> 'T2 -> unit) /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F# function. static member inline FromAction : action:Action<'T1,'T2,'T3> -> ('T1 -> 'T2 -> 'T3 -> unit) /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F# function. static member inline FromAction : action:Action<'T1,'T2,'T3,'T4> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> unit) /// Convert the given Action delegate object to an F# function value + /// /// The input Action delegate. + /// /// The F# function. static member inline FromAction : action:Action<'T1,'T2,'T3,'T4,'T5> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> unit) /// Convert the given Func delegate object to an F# function value + /// /// The input Func delegate. + /// /// The F# function. static member inline FromFunc : func:Func<'T> -> (unit -> 'T) /// Convert the given Func delegate object to an F# function value + /// /// The input Func delegate. + /// /// The F# function. static member inline FromFunc : func:Func<'T,'U> -> ('T -> 'U) /// Convert the given Func delegate object to an F# function value + /// /// The input Func delegate. + /// /// The F#funcfunction. static member inline FromFunc : func:Func<'T1,'T2,'U> -> ('T1 -> 'T2 -> 'U) /// Convert the given Func delegate object to an F# function value + /// /// The input Func delegate. + /// /// The F# function. static member inline FromFunc : func:Func<'T1,'T2,'T3,'U> -> ('T1 -> 'T2 -> 'T3 -> 'U) /// Convert the given Func delegate object to an F# function value + /// /// The input Func delegate. + /// /// The F# function. static member inline FromFunc : func:Func<'T1,'T2,'T3,'T4,'U> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U) /// Convert the given Func delegate object to an F# function value + /// /// The input Func delegate. + /// /// The F# function. static member inline FromFunc : func:Func<'T1,'T2,'T3,'T4,'T5,'U> -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U) /// A utility function to convert function values from tupled to curried form + /// /// The input tupled function. + /// /// The output curried function. static member inline FuncFromTupled : func:('T1 * 'T2 -> 'U) -> ('T1 -> 'T2 -> 'U) /// A utility function to convert function values from tupled to curried form + /// /// The input tupled function. + /// /// The output curried function. static member inline FuncFromTupled : func:('T1 * 'T2 * 'T3 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'U) /// A utility function to convert function values from tupled to curried form + /// /// The input tupled function. + /// /// The output curried function. static member inline FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U) /// A utility function to convert function values from tupled to curried form + /// /// The input tupled function. + /// /// The output curried function. static member inline FuncFromTupled : func:('T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'U) -> ('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U) /// An implementation module used to hold some private implementations of function /// value invocation. + /// Language Primitives module OptimizedClosures = /// The CLI type used to represent F# function values that accept @@ -1755,14 +2069,18 @@ namespace Microsoft.FSharp.Core inherit FSharpFunc<'T1,('T2 -> 'U)> /// Invoke the optimized function value with two curried arguments + /// /// The first arg. /// The second arg. + /// /// The function result. abstract member Invoke : arg1:'T1 * arg2:'T2 -> 'U /// Adapt an F# first class function value to be an optimized function value that can /// accept two curried arguments without intervening execution. + /// /// The input function. + /// /// The adapted function. static member Adapt : func:('T1 -> 'T2 -> 'U) -> FSharpFunc<'T1,'T2,'U> @@ -1781,15 +2099,19 @@ namespace Microsoft.FSharp.Core /// Invoke an F# first class function value that accepts three curried arguments /// without intervening execution + /// /// The first arg. /// The second arg. /// The third arg. + /// /// The function result. abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 -> 'U /// Adapt an F# first class function value to be an optimized function value that can /// accept three curried arguments without intervening execution. + /// /// The input function. + /// /// The adapted function. static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'U) -> FSharpFunc<'T1,'T2,'T3,'U> @@ -1807,16 +2129,20 @@ namespace Microsoft.FSharp.Core /// Invoke an F# first class function value that accepts four curried arguments /// without intervening execution + /// /// The first arg. /// The second arg. /// The third arg. /// The fourth arg. + /// /// The function result. abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 * arg4:'T4 -> 'U /// Adapt an F# first class function value to be an optimized function value that can /// accept four curried arguments without intervening execution. + /// /// The input function. + /// /// The optimized function. static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'T4 -> 'U) -> FSharpFunc<'T1,'T2,'T3,'T4,'U> @@ -1834,17 +2160,21 @@ namespace Microsoft.FSharp.Core /// Invoke an F# first class function value that accepts five curried arguments /// without intervening execution + /// /// The first arg. /// The second arg. /// The third arg. /// The fourth arg. /// The fifth arg. + /// /// The function result. abstract member Invoke : arg1:'T1 * arg2:'T2 * arg3:'T3 * arg4:'T4 * arg5:'T5 -> 'U /// Adapt an F# first class function value to be an optimized function value that can /// accept five curried arguments without intervening execution. + /// /// The input function. + /// /// The optimized function. static member Adapt : func:('T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U) -> FSharpFunc<'T1,'T2,'T3,'T4,'T5,'U> @@ -1855,6 +2185,9 @@ namespace Microsoft.FSharp.Core /// The type of mutable references. Use the functions [!] and [:=] to get and /// set values of this type. + /// + /// Basic Types + /// [] [] type Ref<'T> = @@ -1866,6 +2199,7 @@ namespace Microsoft.FSharp.Core /// The type of mutable references. Use the functions [!] and [:=] to get and /// set values of this type. + /// Basic Types and 'T ref = Ref<'T> /// The type of optional values. When used from other CLI languages the @@ -1878,6 +2212,9 @@ namespace Microsoft.FSharp.Core /// None values will appear as the value null to other CLI languages. /// Instance methods on this type will appear as static methods to other CLI languages /// due to the use of null as a value representation. + /// + /// Options + /// [] [] [] @@ -1888,21 +2225,30 @@ namespace Microsoft.FSharp.Core | None : 'T option /// The representation of "Value of type 'T" + /// /// The input value. + /// /// An option representing the value. | Some : Value:'T -> 'T option /// Create an option value that is a 'None' value. + /// static member None : 'T option /// Create an option value that is a 'Some' value. + /// /// The input value + /// /// An option representing the value. + /// static member Some : value:'T -> 'T option /// Implicitly converts a value into an optional that is a 'Some' value. + /// /// The input value + /// /// An option representing the value. + /// static member op_Implicit : value:'T -> 'T option [] @@ -1925,6 +2271,8 @@ namespace Microsoft.FSharp.Core /// 'None' values will appear as the value null to other CLI languages. /// Instance methods on this type will appear as static methods to other CLI languages /// due to the use of null as a value representation. + /// + /// Options and 'T option = Option<'T> /// The type of optional values, represented as structs. @@ -1932,6 +2280,9 @@ namespace Microsoft.FSharp.Core /// Use the constructors ValueSome and ValueNone to create values of this type. /// Use the values in the ValueOption module to manipulate values of this type, /// or pattern match against the values directly. + /// + /// Options + /// [] [] [] @@ -1940,7 +2291,9 @@ namespace Microsoft.FSharp.Core | ValueNone: 'T voption /// The representation of "Value of type 'T" + /// /// The input value. + /// /// An option representing the value. | ValueSome: 'T -> 'T voption @@ -1948,11 +2301,15 @@ namespace Microsoft.FSharp.Core member Value : 'T /// Create a value option value that is a 'ValueNone' value. + /// static member None : 'T voption /// Create a value option value that is a 'Some' value. + /// /// The input value + /// /// A value option representing the value. + /// static member Some : value:'T -> 'T voption /// Return 'true' if the value option is a 'ValueSome' value. @@ -1962,8 +2319,11 @@ namespace Microsoft.FSharp.Core member IsNone : bool /// Implicitly converts a value into an optional that is a 'ValueSome' value. + /// /// The input value + /// /// A voption representing the value. + /// static member op_Implicit: value: 'T -> 'T voption /// The type of optional values, represented as structs. @@ -1971,9 +2331,13 @@ namespace Microsoft.FSharp.Core /// Use the constructors ValueSome and ValueNone to create values of this type. /// Use the values in the ValueOption module to manipulate values of this type, /// or pattern match against the values directly. + /// + /// Options and 'T voption = ValueOption<'T> /// Helper type for error handling without exceptions. + /// + /// Choices and Results [] [] [] @@ -1996,7 +2360,10 @@ namespace Microsoft.FSharp.Collections /// /// Use the constructors [] and :: (infix) to create values of this type, or /// the notation [1;2;3]. Use the values in the List module to manipulate - /// values of this type, or pattern match against the values directly. + /// values of this type, or pattern match against the values directly. + /// + /// + /// [] [] [] @@ -2022,25 +2389,32 @@ namespace Microsoft.FSharp.Collections /// Gets the element of the list at the given position. /// Lists are represented as linked lists so this is an O(n) operation. /// The index. + /// /// The value at the given index. member Item : index:int -> 'T with get /// Gets a slice of the list, the elements of the list from the given start index to the given end index. + /// /// The start index. /// The end index. + /// /// The sub list specified by the input indices. member GetSlice : startIndex:int option * endIndex:int option -> 'T list /// Get the index for the element offset elements away from the end of the collection. + /// /// The rank of the index. /// The offset from the end. + /// /// The corresponding index from the start. [] member GetReverseIndex: rank: int * offset: int -> int /// Returns a list with head as its first element and tail as its subsequent elements + /// /// A new head value for the list. /// The existing list. + /// /// The list with head appended to the front of tail. static member Cons : head:'T * tail:'T list -> 'T list @@ -2049,17 +2423,28 @@ namespace Microsoft.FSharp.Collections interface IReadOnlyCollection<'T> interface IReadOnlyList<'T> - /// An abbreviation for the type of immutable singly-linked lists. + /// The type of immutable singly-linked lists. /// - /// Use the constructors [] and :: (infix) to create values of this type, or - /// the notation [1;2;3]. Use the values in the List module to manipulate - /// values of this type, or pattern match against the values directly. + /// See the module for further operations related to lists. + /// + /// Use the constructors [] and :: (infix) to create values of this type, or + /// the notation [1; 2; 3]. Use the values in the List module to manipulate + /// values of this type, or pattern match against the values directly. + /// + /// See also F# Language Guide - Lists. + /// and 'T list = List<'T> - /// An abbreviation for the CLI type System.Collections.Generic.List<_> + /// An abbreviation for the CLI type type ResizeArray<'T> = System.Collections.Generic.List<'T> - /// An abbreviation for the CLI type System.Collections.Generic.IEnumerable<_> + /// An abbreviation for the CLI type + /// + /// + /// See the module for further operations related to sequences. + /// + /// See also F# Language Guide - Sequences. + /// type seq<'T> = IEnumerable<'T> namespace Microsoft.FSharp.Core @@ -2070,184 +2455,244 @@ namespace Microsoft.FSharp.Core open Microsoft.FSharp.Collections /// Basic F# Operators. This module is automatically opened in all F# code. + /// + /// Basic Operators [] module Operators = /// Overloaded unary negation. + /// /// The value to negate. + /// /// The result of the operation. val inline ( ~- ) : n:^T -> ^T when ^T : (static member ( ~- ) : ^T -> ^T) and default ^T : int /// Overloaded addition operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline ( + ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( + ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded subtraction operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline ( - ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( - ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded multiplication operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline ( * ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( * ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded division operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline ( / ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( / ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded modulo operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline ( % ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( % ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded bitwise-AND operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline (&&&): x:^T -> y:^T -> ^T when ^T : (static member (&&&) : ^T * ^T -> ^T) and default ^T : int /// Overloaded bitwise-OR operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline (|||) : x:^T -> y:^T -> ^T when ^T : (static member (|||) : ^T * ^T -> ^T) and default ^T : int /// Overloaded bitwise-XOR operator + /// /// The first parameter. /// The second parameter. + /// /// The result of the operation. val inline (^^^) : x:^T -> y:^T -> ^T when ^T : (static member (^^^) : ^T * ^T -> ^T) and default ^T : int /// Overloaded byte-shift left operator by a specified number of bits + /// /// The input value. /// The amount to shift. + /// /// The result of the operation. val inline (<<<) : value:^T -> shift:int32 -> ^T when ^T : (static member (<<<) : ^T * int32 -> ^T) and default ^T : int /// Overloaded byte-shift right operator by a specified number of bits + /// /// The input value. /// The amount to shift. + /// /// The result of the operation. val inline (>>>) : value:^T -> shift:int32 -> ^T when ^T : (static member (>>>) : ^T * int32 -> ^T) and default ^T : int /// Overloaded bitwise-NOT operator + /// /// The input value. + /// /// The result of the operation. val inline (~~~) : value:^T -> ^T when ^T : (static member (~~~) : ^T -> ^T) and default ^T : int /// Overloaded prefix-plus operator + /// /// The input value. + /// /// The result of the operation. val inline (~+) : value:^T -> ^T when ^T : (static member (~+) : ^T -> ^T) and default ^T : int /// Structural less-than comparison + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( < ) : x:'T -> y:'T -> bool when 'T : comparison /// Structural greater-than + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( > ) : x:'T -> y:'T -> bool when 'T : comparison /// Structural greater-than-or-equal + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( >= ) : x:'T -> y:'T -> bool when 'T : comparison /// Structural less-than-or-equal comparison + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( <= ) : x:'T -> y:'T -> bool when 'T : comparison /// Structural equality + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( = ) : x:'T -> y:'T -> bool when 'T : equality /// Structural inequality + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( <> ) : x:'T -> y:'T -> bool when 'T : equality /// Compose two functions, the function on the left being applied first + /// /// The first function to apply. /// The second function to apply. + /// /// The composition of the input functions. val inline (>>): func1:('T1 -> 'T2) -> func2:('T2 -> 'T3) -> ('T1 -> 'T3) /// Compose two functions, the function on the right being applied first + /// /// The second function to apply. /// The first function to apply. + /// /// The composition of the input functions. val inline (<<): func2:('T2 -> 'T3) -> func1:('T1 -> 'T2) -> ('T1 -> 'T3) /// Apply a function to a value, the value being on the left, the function on the right + /// /// The argument. /// The function. + /// /// The function result. val inline (|>): arg:'T1 -> func:('T1 -> 'U) -> 'U /// Apply a function to two values, the values being a pair on the left, the function on the right + /// /// The first argument. /// The second argument. /// The function. + /// /// The function result. val inline (||>): arg1:'T1 * arg2:'T2 -> func:('T1 -> 'T2 -> 'U) -> 'U /// Apply a function to three values, the values being a triple on the left, the function on the right + /// /// The first argument. /// The second argument. /// The third argument. /// The function. + /// /// The function result. val inline (|||>): arg1:'T1 * arg2:'T2 * arg3:'T3 -> func:('T1 -> 'T2 -> 'T3 -> 'U) -> 'U /// Apply a function to a value, the value being on the right, the function on the left + /// /// The function. /// The argument. + /// /// The function result. val inline (<|): func:('T -> 'U) -> arg1:'T -> 'U /// Apply a function to two values, the values being a pair on the right, the function on the left + /// /// The function. /// The first argument. /// The second argument. + /// /// The function result. val inline (<||): func:('T1 -> 'T2 -> 'U) -> arg1:'T1 * arg2:'T2 -> 'U /// Apply a function to three values, the values being a triple on the right, the function on the left + /// /// The function. /// The first argument. /// The second argument. /// The third argument. + /// /// The function result. val inline (<|||): func:('T1 -> 'T2 -> 'T3 -> 'U) -> arg1:'T1 * arg2:'T2 * arg3:'T3 -> 'U /// Used to specify a default value for an optional argument in the implementation of a function + /// /// An option representing the argument. /// The default value of the argument. + /// /// The argument value. If it is None, the defaultValue is returned. [] val defaultArg : arg:'T option -> defaultValue:'T -> 'T /// Used to specify a default value for an optional argument in the implementation of a function + /// /// A value option representing the argument. /// The default value of the argument. + /// /// The argument value. If it is None, the defaultValue is returned. [] val defaultValueArg : arg:'T voption -> defaultValue:'T -> 'T @@ -2257,7 +2702,9 @@ namespace Microsoft.FSharp.Core val (^): s1:string -> s2:string -> string /// Raises an exception + /// /// The exception to raise. + /// /// The result value. [] val inline raise : exn:System.Exception -> 'T @@ -2273,199 +2720,251 @@ namespace Microsoft.FSharp.Core [] val inline reraise : unit -> 'T - /// Builds a System.Exception object. + /// Builds a object. + /// /// The message for the Exception. + /// /// A System.Exception. val Failure : message:string -> exn - /// Matches System.Exception objects whose runtime type is precisely System.Exception + /// Matches objects whose runtime type is precisely + /// /// The input exception. + /// /// A string option. [] val (|Failure|_|) : error:exn -> string option /// Return the first element of a tuple, fst (a,b) = a. + /// /// The input tuple. + /// /// The first value. [] val inline fst : tuple:('T1 * 'T2) -> 'T1 /// Return the second element of a tuple, snd (a,b) = b. + /// /// The input tuple. + /// /// The second value. [] val inline snd : tuple:('T1 * 'T2) -> 'T2 /// Generic comparison. + /// /// The first value. /// The second value. + /// /// The result of the comparison. [] val inline compare: e1:'T -> e2:'T -> int when 'T : comparison /// Maximum based on generic comparison + /// /// The first value. /// The second value. + /// /// The maximum value. [] val inline max : e1:'T -> e2:'T -> 'T when 'T : comparison /// Minimum based on generic comparison + /// /// The first value. /// The second value. + /// /// The minimum value. [] val inline min : e1:'T -> e2:'T -> 'T when 'T : comparison /// Ignore the passed value. This is often used to throw away results of a computation. + /// /// The value to ignore. [] val inline ignore : value:'T -> unit /// Unbox a strongly typed value. + /// /// The boxed value. + /// /// The unboxed result. [] val inline unbox : value:obj -> 'T /// Boxes a strongly typed value. + /// /// The value to box. + /// /// The boxed object. [] val inline box : value:'T -> obj /// Try to unbox a strongly typed value. + /// /// The boxed value. + /// /// The unboxed result as an option. [] val inline tryUnbox : value:obj -> 'T option /// Determines whether the given value is null. + /// /// The value to check. + /// /// True when value is null, false otherwise. [] val inline isNull : value:'T -> bool when 'T : null /// Determines whether the given value is not null. + /// /// The value to check. + /// /// True when value is not null, false otherwise. [] val inline internal isNotNull : value:'T -> bool when 'T : null - /// Throw a System.Exception exception. + /// Throw a exception. + /// /// The exception message. + /// /// The result value. [] val inline failwith : message:string -> 'T - /// Throw a System.ArgumentException exception with + /// Throw a exception with /// the given argument name and message. + /// /// The argument name. /// The exception message. + /// /// The result value. [] val inline invalidArg : argumentName:string -> message:string -> 'T - /// Throw a System.ArgumentNullException exception + /// Throw a exception + /// /// The argument name. + /// /// The result value. [] val inline nullArg : argumentName:string -> 'T - /// Throw a System.InvalidOperationException exception + /// Throw a exception + /// /// The exception message. + /// /// The result value. [] val inline invalidOp : message:string -> 'T /// The identity function + /// /// The input value. + /// /// The same value. [] val id : x:'T -> 'T /// Create a mutable reference cell + /// /// The value to contain in the cell. + /// /// The created reference cell. [] val ref : value:'T -> 'T ref /// Assign to a mutable reference cell + /// /// The cell to mutate. /// The value to set inside the cell. val ( := ) : cell:'T ref -> value:'T -> unit /// Dereference a mutable reference cell + /// /// The cell to dereference. + /// /// The value contained in the cell. val ( ! ) : cell:'T ref -> 'T /// Decrement a mutable reference cell containing an integer + /// /// The reference cell. [] val decr: cell:int ref -> unit /// Increment a mutable reference cell containing an integer + /// /// The reference cell. [] val incr: cell:int ref -> unit /// Concatenate two lists. + /// /// The first list. /// The second list. + /// /// The concatenation of the lists. val (@): list1:'T list -> list2:'T list -> 'T list /// Negate a logical value. Not True equals False and not False equals True + /// /// The value to negate. + /// /// The result of the negation. [] val inline not : value:bool -> bool /// Builds a sequence using sequence expression syntax + /// /// The input sequence. + /// /// The result sequence. [] val seq : sequence:seq<'T> -> seq<'T> /// Exit the current hardware isolated process, if security settings permit, - /// otherwise raise an exception. Calls System.Environment.Exit. + /// otherwise raise an exception. Calls . + /// /// The exit code to use. + /// /// The result value. [] val exit: exitcode:int -> 'T when default 'T : obj - /// Equivalent to System.Double.PositiveInfinity + /// Equivalent to [] val infinity: float - /// Equivalent to System.Double.NaN + /// Equivalent to [] val nan: float - /// Equivalent to System.Single.PositiveInfinity + /// Equivalent to [] val infinityf: float32 - /// Equivalent to System.Single.NaN + /// Equivalent to [] val nanf: float32 - /// Reads the value of the property System.Console.In. + /// Reads the value of the property . [] val stdin<'T> : System.IO.TextReader - /// Reads the value of the property System.Console.Error. + /// Reads the value of the property . [] val stderr<'T> : System.IO.TextWriter - /// Reads the value of the property System.Console.Out. + /// Reads the value of the property . [] val stdout<'T> : System.IO.TextWriter /// The standard overloaded range operator, e.g. [n..m] for lists, seq {n..m} for sequences + /// /// The start value of the range. /// The end value of the range. + /// /// The sequence spanning the range. val inline (..) : start:^T -> finish:^T -> seq< ^T > when ^T : (static member (+) : ^T * ^T -> ^T) @@ -2475,9 +2974,11 @@ namespace Microsoft.FSharp.Core and default ^T : int /// The standard overloaded skip range operator, e.g. [n..skip..m] for lists, seq {n..skip..m} for sequences + /// /// The start value of the range. /// The step value of the range. /// The end value of the range. + /// /// The sequence spanning the range using the specified step size. val inline (.. ..) : start:^T -> step:^Step -> finish:^T -> seq< ^T > when (^T or ^Step) : (static member (+) : ^T * ^Step -> ^T) @@ -2488,8 +2989,10 @@ namespace Microsoft.FSharp.Core and default ^T : int /// Execute the function as a mutual-exclusion region using the input value as a lock. + /// /// The object to be locked. /// The action to perform during the lock. + /// /// The resulting value. [] val inline lock: lockObject:'Lock -> action:(unit -> 'T) -> 'T when 'Lock : not struct @@ -2497,8 +3000,10 @@ namespace Microsoft.FSharp.Core /// Clean up resources associated with the input object after the completion of the given function. /// Cleanup occurs even when an exception is raised by the protected /// code. + /// /// The resource to be disposed after action is called. /// The action that accepts the resource. + /// /// The resulting value. [] val using: resource:('T :> System.IDisposable) -> action:('T -> 'U) -> 'U @@ -2510,7 +3015,7 @@ namespace Microsoft.FSharp.Core val inline typeof<'T> : System.Type /// Returns the name of the given symbol. - [] + [] val inline nameof : 'T -> string /// An internal, library-only compiler intrinsic for compile-time @@ -2539,7 +3044,9 @@ namespace Microsoft.FSharp.Core /// for F# union, record and tuple types, hashing the complete contents of the /// type. The exact behaviour of the function can be adjusted on a /// type-by-type basis by implementing GetHashCode for each type. + /// /// The input object. + /// /// The computed hash. [] val inline hash: obj:'T -> int when 'T : equality @@ -2549,142 +3056,188 @@ namespace Microsoft.FSharp.Core /// types stops when the given limit of nodes is reached. The exact behaviour of /// the function can be adjusted on a type-by-type basis by implementing /// GetHashCode for each type. + /// /// The limit of nodes. /// The input object. + /// /// The computed hash. val inline limitedHash: limit: int -> obj:'T -> int when 'T : equality /// Absolute value of the given number. + /// /// The input value. + /// /// The absolute value of the input. [] val inline abs : value:^T -> ^T when ^T : (static member Abs : ^T -> ^T) and default ^T : int /// Inverse cosine of the given number + /// /// The input value. + /// /// The inverse cosine of the input. [] val inline acos : value:^T -> ^T when ^T : (static member Acos : ^T -> ^T) and default ^T : float /// Inverse sine of the given number + /// /// The input value. + /// /// The inverse sine of the input. [] val inline asin : value:^T -> ^T when ^T : (static member Asin : ^T -> ^T) and default ^T : float /// Inverse tangent of the given number + /// /// The input value. + /// /// The inverse tangent of the input. [] val inline atan : value:^T -> ^T when ^T : (static member Atan : ^T -> ^T) and default ^T : float /// Inverse tangent of x/y where x and y are specified separately + /// /// The y input value. /// The x input value. + /// /// The inverse tangent of the input ratio. [] val inline atan2 : y:^T1 -> x:^T1 -> 'T2 when ^T1 : (static member Atan2 : ^T1 * ^T1 -> 'T2) and default ^T1 : float /// Ceiling of the given number + /// /// The input value. + /// /// The ceiling of the input. [] val inline ceil : value:^T -> ^T when ^T : (static member Ceiling : ^T -> ^T) and default ^T : float /// Exponential of the given number + /// /// The input value. + /// /// The exponential of the input. [] val inline exp : value:^T -> ^T when ^T : (static member Exp : ^T -> ^T) and default ^T : float /// Floor of the given number + /// /// The input value. + /// /// The floor of the input. [] val inline floor : value:^T -> ^T when ^T : (static member Floor : ^T -> ^T) and default ^T : float /// Sign of the given number + /// /// The input value. + /// /// -1, 0, or 1 depending on the sign of the input. [] val inline sign : value:^T -> int when ^T : (member Sign : int) and default ^T : float /// Round the given number + /// /// The input value. + /// /// The nearest integer to the input value. [] val inline round : value:^T -> ^T when ^T : (static member Round : ^T -> ^T) and default ^T : float /// Natural logarithm of the given number + /// /// The input value. + /// /// The natural logarithm of the input. [] val inline log : value:^T -> ^T when ^T : (static member Log : ^T -> ^T) and default ^T : float /// Logarithm to base 10 of the given number + /// /// The input value. + /// /// The logarithm to base 10 of the input. [] val inline log10 : value:^T -> ^T when ^T : (static member Log10 : ^T -> ^T) and default ^T : float /// Square root of the given number + /// /// The input value. + /// /// The square root of the input. [] val inline sqrt : value:^T -> ^U when ^T : (static member Sqrt : ^T -> ^U) and default ^U : ^T and default ^T : ^U and default ^T : float /// Cosine of the given number + /// /// The input value. + /// /// The cosine of the input. [] val inline cos : value:^T -> ^T when ^T : (static member Cos : ^T -> ^T) and default ^T : float /// Hyperbolic cosine of the given number + /// /// The input value. + /// /// The hyperbolic cosine of the input. [] val inline cosh : value:^T -> ^T when ^T : (static member Cosh : ^T -> ^T) and default ^T : float /// Sine of the given number + /// /// The input value. + /// /// The sine of the input. [] val inline sin : value:^T -> ^T when ^T : (static member Sin : ^T -> ^T) and default ^T : float /// Hyperbolic sine of the given number + /// /// The input value. + /// /// The hyperbolic sine of the input. [] val inline sinh : value:^T -> ^T when ^T : (static member Sinh : ^T -> ^T) and default ^T : float /// Tangent of the given number + /// /// The input value. + /// /// The tangent of the input. [] val inline tan : value:^T -> ^T when ^T : (static member Tan : ^T -> ^T) and default ^T : float /// Hyperbolic tangent of the given number + /// /// The input value. + /// /// The hyperbolic tangent of the input. [] val inline tanh : value:^T -> ^T when ^T : (static member Tanh : ^T -> ^T) and default ^T : float /// Overloaded truncate operator. + /// /// The input value. + /// /// The truncated value. [] val inline truncate : value:^T -> ^T when ^T : (static member Truncate : ^T -> ^T) and default ^T : float /// Overloaded power operator. + /// /// The input base. /// The input exponent. + /// /// The base raised to the exponent. val inline ( ** ) : x:^T -> y:^U -> ^T when ^T : (static member Pow : ^T * ^U -> ^T) and default ^U : float and default ^T : float /// Overloaded power operator. If n > 0 then equivalent to x*...*x for n occurrences of x. + /// /// The input base. /// The input exponent. + /// /// The base raised to the exponent. [] val inline pown : x:^T -> n:int -> ^T when ^T : (static member One : ^T) @@ -2696,7 +3249,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Byte.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted byte [] val inline byte : value:^T -> byte when ^T : (static member op_Explicit : ^T -> byte) and default ^T : int @@ -2705,7 +3260,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using SByte.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted sbyte [] val inline sbyte : value:^T -> sbyte when ^T : (static member op_Explicit : ^T -> sbyte) and default ^T : int @@ -2714,7 +3271,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Int16.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int16 [] val inline int16 : value:^T -> int16 when ^T : (static member op_Explicit : ^T -> int16) and default ^T : int @@ -2723,7 +3282,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using UInt16.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint16 [] val inline uint16 : value:^T -> uint16 when ^T : (static member op_Explicit : ^T -> uint16) and default ^T : int @@ -2732,7 +3293,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Int32.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int [] val inline int : value:^T -> int when ^T : (static member op_Explicit : ^T -> int) and default ^T : int @@ -2741,13 +3304,17 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using UInt32.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int [] val inline uint: value:^T -> uint when ^T: (static member op_Explicit: ^T -> uint) and default ^T: uint /// Converts the argument to a particular enum type. + /// /// The input value. + /// /// The converted enum type. [] val inline enum : value:int32 -> ^U when ^U : enum @@ -2756,7 +3323,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Int32.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int32 [] val inline int32 : value:^T -> int32 when ^T : (static member op_Explicit : ^T -> int32) and default ^T : int @@ -2765,7 +3334,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using UInt32.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint32 [] val inline uint32 : value:^T -> uint32 when ^T : (static member op_Explicit : ^T -> uint32) and default ^T : int @@ -2774,7 +3345,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Int64.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int64 [] val inline int64 : value:^T -> int64 when ^T : (static member op_Explicit : ^T -> int64) and default ^T : int @@ -2783,7 +3356,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using UInt64.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint64 [] val inline uint64 : value:^T -> uint64 when ^T : (static member op_Explicit : ^T -> uint64) and default ^T : int @@ -2792,7 +3367,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Single.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted float32 [] val inline float32 : value:^T -> float32 when ^T : (static member op_Explicit : ^T -> float32) and default ^T : int @@ -2801,7 +3378,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using Double.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted float [] val inline float : value:^T -> float when ^T : (static member op_Explicit : ^T -> float) and default ^T : int @@ -2809,7 +3388,9 @@ namespace Microsoft.FSharp.Core /// Converts the argument to signed native integer. This is a direct conversion for all /// primitive numeric types. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted nativeint [] val inline nativeint : value:^T -> nativeint when ^T : (static member op_Explicit : ^T -> nativeint) and default ^T : int @@ -2817,7 +3398,9 @@ namespace Microsoft.FSharp.Core /// Converts the argument to unsigned native integer using a direct conversion for all /// primitive numeric types. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted unativeint [] val inline unativeint : value:^T -> unativeint when ^T : (static member op_Explicit : ^T -> unativeint) and default ^T : int @@ -2827,6 +3410,7 @@ namespace Microsoft.FSharp.Core /// For standard integer and floating point values the ToString conversion /// uses CultureInfo.InvariantCulture. /// The input value. + /// /// The converted string. [] val inline string : value:^T -> string @@ -2835,7 +3419,9 @@ namespace Microsoft.FSharp.Core /// primitive numeric types. For strings, the input is converted using UInt64.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted decimal. [] val inline decimal : value:^T -> decimal when ^T : (static member op_Explicit : ^T -> decimal) and default ^T : int @@ -2843,56 +3429,72 @@ namespace Microsoft.FSharp.Core /// Converts the argument to character. Numeric inputs are converted according to the UTF-16 /// encoding for characters. String inputs must be exactly one character long. For other /// input types the operation requires an appropriate static conversion method on the input type. + /// /// The input value. + /// /// The converted char. [] val inline char : value:^T -> char when ^T : (static member op_Explicit : ^T -> char) and default ^T : int - /// An active pattern to match values of type System.Collections.Generic.KeyValuePair + /// An active pattern to match values of type + /// /// The input key/value pair. + /// /// A tuple containing the key and value. [] val ( |KeyValue| ): keyValuePair:KeyValuePair<'Key,'Value> -> 'Key * 'Value [] [] + /// Contains extension methods to allow the use of F# indexer notation with arrays. + /// This module is automatically opened in all F# code. module ArrayExtensions = type ``[,,,]``<'T> with /// Get the index for the element offset elements away from the end of the collection. + /// /// The rank of the index. This refers to the dimension in the 4d array. /// The offset from the end. + /// /// The corresponding index from the start. [] member GetReverseIndex: rank: int * offset: int -> int type ``[,,]``<'T> with /// Get the index for the element offset elements away from the end of the collection. + /// /// The rank of the index. This refers to the dimension in the 3d array. /// The offset from the end. + /// /// The corresponding index from the start. [] member GetReverseIndex: rank: int * offset: int -> int type ``[,]``<'T> with /// Get the index for the element offset elements away from the end of the collection. + /// /// The rank of the index. This refers to the dimension in the 2d array. /// The offset from the end. + /// /// The corresponding index from the start. [] member GetReverseIndex: rank: int * offset: int -> int type ``[]``<'T> with /// Get the index for the element offset elements away from the end of the collection. + /// /// The rank of the index. /// The offset from the end. + /// /// The corresponding index from the start. [] member GetReverseIndex: rank: int * offset: int -> int type System.String with /// Get the index for the element offset elements away from the end of the collection. + /// /// The rank of the index. /// The offset from the end. + /// /// The corresponding index from the start. [] member GetReverseIndex: rank: int * offset: int -> int @@ -2903,13 +3505,16 @@ namespace Microsoft.FSharp.Core module OperatorIntrinsics = /// Gets a slice of an array + /// /// The input array. /// The start index. /// The end index. + /// /// The sub array from the input indices. val inline GetArraySlice : source:'T[] -> start:int option -> finish:int option -> 'T[] /// Sets a slice of an array + /// /// The target array. /// The start index. /// The end index. @@ -2917,31 +3522,38 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice : target:'T[] -> start:int option -> finish:int option -> source:'T[] -> unit /// Gets a region slice of an array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. + /// /// The two dimensional sub array from the input indices. val inline GetArraySlice2D : source:'T[,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> 'T[,] /// Gets a vector slice of a 2D array. The index of the first dimension is fixed. + /// /// The source array. /// The index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. + /// /// The sub array from the input indices. val inline GetArraySlice2DFixed1 : source:'T[,] -> index1:int -> start2:int option -> finish2:int option -> 'T[] /// Gets a vector slice of a 2D array. The index of the second dimension is fixed. + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The fixed index of the second dimension. + /// /// The sub array from the input indices. val inline GetArraySlice2DFixed2 : source:'T[,] -> start1:int option -> finish1:int option -> index2: int -> 'T[] /// Sets a region slice of an array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -2951,6 +3563,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice2D : target:'T[,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> source:'T[,] -> unit /// Sets a vector slice of a 2D array. The index of the first dimension is fixed. + /// /// The target array. /// The index of the first dimension. /// The start index of the second dimension. @@ -2959,6 +3572,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice2DFixed1 : target:'T[,] -> index1:int -> start2:int option -> finish2:int option -> source:'T[] -> unit /// Sets a vector slice of a 2D array. The index of the second dimension is fixed. + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -2967,6 +3581,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice2DFixed2 : target:'T[,] -> start1:int option -> finish1:int option -> index2:int -> source:'T[] -> unit /// Gets a slice of an array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -2974,73 +3589,87 @@ namespace Microsoft.FSharp.Core /// The end index of the second dimension. /// The start index of the third dimension. /// The end index of the third dimension. + /// /// The three dimensional sub array from the given indices. val inline GetArraySlice3D : source:'T[,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> start3:int option -> finish3:int option -> 'T[,,] /// Gets a 2D slice of a 3D array. + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. /// The start index of the third dimension. /// The end index of the third dimension. + /// /// The two dimensional sub array from the given indices. [] val inline GetArraySlice3DFixedSingle1 : source:'T[,,] -> index1:int -> start2:int option -> finish2:int option -> start3:int option -> finish3:int option -> 'T[,] /// Gets a 2D slice of a 3D array. + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The fixed index of the second dimension. /// The start index of the third dimension. /// The end index of the third dimension. + /// /// The two dimensional sub array from the given indices. [] val inline GetArraySlice3DFixedSingle2 : source:'T[,,] -> start1:int option -> finish1:int option -> index2: int -> start3:int option -> finish3:int option -> 'T[,] /// Gets a 2D slice of a 3D array. + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. /// The fixed index of the third dimension. + /// /// The two dimensional sub array from the given indices. [] val inline GetArraySlice3DFixedSingle3 : source:'T[,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> index3: int -> 'T[,] /// Gets a 1D slice of a 3D array. + /// /// The source array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. /// The start index of the third dimension. /// The end index of the third dimension. + /// /// The one dimensional sub array from the given indices. [] val inline GetArraySlice3DFixedDouble1 : source:'T[,,] -> index1:int -> index2:int -> start3:int option -> finish3:int option -> 'T[] /// Gets a 1D slice of a 3D array. + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. /// The fixed index of the third dimension. + /// /// The one dimensional sub array from the given indices. [] val inline GetArraySlice3DFixedDouble2 : source:'T[,,] -> index1:int -> start2:int option -> finish2:int option -> index3:int -> 'T[] /// Gets a 1D slice of a 3D array. + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The fixed index of the second dimension. /// The fixed index of the third dimension. + /// /// The one dimensional sub array from the given indices. [] val inline GetArraySlice3DFixedDouble3 : source:'T[,,] -> start1:int option -> finish1:int option -> index2:int -> index3:int -> 'T[] /// Sets a slice of an array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3052,6 +3681,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice3D : target:'T[,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> start3:int option -> finish3:int option -> source:'T[,,] -> unit /// Sets a 2D slice of a 3D array + /// /// The target array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3059,11 +3689,13 @@ namespace Microsoft.FSharp.Core /// The start index of the third dimension. /// The end index of the third dimension. /// The source array. + /// /// The two dimensional sub array from the given indices. [] val inline SetArraySlice3DFixedSingle1 : target: 'T[,,] -> index1: int -> start2: int option -> finish2: int option -> start3: int option -> finish3: int option -> source: 'T[,] -> unit /// Sets a 2D slice of a 3D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3071,11 +3703,13 @@ namespace Microsoft.FSharp.Core /// The start index of the third dimension. /// The end index of the third dimension. /// The source array. + /// /// The two dimensional sub array from the given indices. [] val inline SetArraySlice3DFixedSingle2 : target: 'T[,,] -> start1: int option -> finish1: int option -> index2: int -> start3: int option -> finish3: int option -> source: 'T[,] -> unit /// Sets a 2D slice of a 3D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3083,44 +3717,52 @@ namespace Microsoft.FSharp.Core /// The end index of the second dimension. /// The fixed index of the third dimension. /// The source array. + /// /// The two dimensional sub array from the given indices. [] val inline SetArraySlice3DFixedSingle3 : target: 'T[,,] -> start1: int option -> finish1: int option -> start2: int option -> finish2: int option -> index3: int -> source: 'T[,] -> unit /// Sets a 1D slice of a 3D array. + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The fixed index of the second dimension. /// The fixed index of the third dimension. /// The source array. + /// /// The one dimensional sub array from the given indices. [] val inline SetArraySlice3DFixedDouble1 : target: 'T[,,] -> index1: int -> index2: int -> start3: int option -> finish3: int option -> source: 'T[] -> unit /// Sets a 1D slice of a 3D array. + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. /// The fixed index of the third dimension. /// The source array. + /// /// The one dimensional sub array from the given indices. [] val inline SetArraySlice3DFixedDouble2 : target: 'T[,,] -> index1: int -> start2: int option -> finish2: int option -> index3: int -> source: 'T[] -> unit /// Sets a 1D slice of a 3D array. + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The fixed index of the second dimension. /// The fixed index of the third dimension. /// The source array. + /// /// The one dimensional sub array from the given indices. [] val inline SetArraySlice3DFixedDouble3 : target: 'T[,,] -> start1: int option -> finish1: int option -> index2: int -> index3: int -> source: 'T[] -> unit /// Gets a slice of an array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3130,10 +3772,12 @@ namespace Microsoft.FSharp.Core /// The end index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The four dimensional sub array from the given indices. val inline GetArraySlice4D : source:'T[,,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> 'T[,,,] /// Gets a 3D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3142,10 +3786,12 @@ namespace Microsoft.FSharp.Core /// The end index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The three dimensional sub array from the given indices. val inline GetArraySlice4DFixedSingle1 : source:'T[,,,] -> index1:int -> start2: int option -> finish2:int option -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> 'T[,,] /// Gets a 3D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3154,10 +3800,12 @@ namespace Microsoft.FSharp.Core /// The end index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The three dimensional sub array from the given indices. val inline GetArraySlice4DFixedSingle2 : source:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> 'T[,,] /// Gets a 3D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3166,10 +3814,12 @@ namespace Microsoft.FSharp.Core /// The fixed index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The three dimensional sub array from the given indices. val inline GetArraySlice4DFixedSingle3 : source:'T[,,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> index3:int -> start4:int option -> finish4:int option -> 'T[,,] /// Gets a 3D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3178,10 +3828,12 @@ namespace Microsoft.FSharp.Core /// The start index of the third dimension. /// The end index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The three dimensional sub array from the given indices. val inline GetArraySlice4DFixedSingle4 : source:'T[,,,] -> start1:int option -> finish1:int option -> start2: int option -> finish2:int option -> start3:int option -> finish3:int option -> index4:int -> 'T[,,] /// Gets a 2D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. @@ -3189,10 +3841,12 @@ namespace Microsoft.FSharp.Core /// The end index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The two dimensional sub array from the given indices. val inline GetArraySlice4DFixedDouble1 : source:'T[,,,] -> index1: int -> index2:int -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> 'T[,] /// Gets a 2D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3200,10 +3854,12 @@ namespace Microsoft.FSharp.Core /// The fixed index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The two dimensional sub array from the given indices. val inline GetArraySlice4DFixedDouble2 : source:'T[,,,] -> index1: int -> start2: int option -> finish2:int option -> index3:int -> start4:int option -> finish4:int option -> 'T[,] /// Gets a 2D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3211,10 +3867,12 @@ namespace Microsoft.FSharp.Core /// The start index of the third dimension. /// The end index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The two dimensional sub array from the given indices. val inline GetArraySlice4DFixedDouble3 : source:'T[,,,] -> index1:int -> start2: int option -> finish2:int option -> start3:int option -> finish3:int option -> index4:int -> 'T[,] /// Gets a 2D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3222,10 +3880,12 @@ namespace Microsoft.FSharp.Core /// The fixed index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The two dimensional sub array from the given indices. val inline GetArraySlice4DFixedDouble4 : source:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> index3:int -> start4:int option -> finish4:int option -> 'T[,] /// Gets a 2D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3233,10 +3893,12 @@ namespace Microsoft.FSharp.Core /// The start index of the third dimension. /// The end index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The two dimensional sub array from the given indices. val inline GetArraySlice4DFixedDouble5 : source:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> start3:int option -> finish3:int option -> index4:int -> 'T[,] /// Gets a 2D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3244,50 +3906,60 @@ namespace Microsoft.FSharp.Core /// The end index of the second dimension. /// The fixed index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The two dimensional sub array from the given indices. val inline GetArraySlice4DFixedDouble6 : source:'T[,,,] -> start1:int option -> finish1:int option -> start2: int option -> finish2:int option -> index3:int -> index4:int -> 'T[,] /// Gets a 1D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. /// The fixed index of the third dimension. /// The start index of the fourth dimension. /// The end index of the fourth dimension. + /// /// The one dimensional sub array from the given indices. val inline GetArraySlice4DFixedTriple4 : source:'T[,,,] -> index1:int -> index2:int -> index3:int -> start4:int option -> finish4:int option -> 'T[] /// Gets a 1D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. /// The start index of the third dimension. /// The end index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The one dimensional sub array from the given indices. val inline GetArraySlice4DFixedTriple3 : source:'T[,,,] -> index1:int -> index2:int -> start3:int option -> finish3:int option -> index4:int -> 'T[] /// Gets a 1D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. /// The end index of the second dimension. /// The fixed index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The one dimensional sub array from the given indices. val inline GetArraySlice4DFixedTriple2 : source:'T[,,,] -> index1:int -> start2: int option -> finish2:int option -> index3:int -> index4:int -> 'T[] /// Gets a 1D slice of a 4D array + /// /// The source array. /// The start index of the first dimension. /// The end index of the first dimension. /// The fixed index of the second dimension. /// The fixed index of the third dimension. /// The fixed index of the fourth dimension. + /// /// The one dimensional sub array from the given indices. val inline GetArraySlice4DFixedTriple1 : source:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> index3:int -> index4:int -> 'T[] /// Gets a 3D slice of a 4D array + /// /// The source array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3300,6 +3972,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedSingle1 : target:'T[,,,] -> index1:int -> start2: int option -> finish2:int option -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> source: 'T[,,] -> unit /// Sets a 3D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3312,6 +3985,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedSingle2 : target:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> source: 'T[,,] -> unit /// Sets a 3D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3324,6 +3998,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedSingle3 : target:'T[,,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> index3:int -> start4:int option -> finish4:int option -> source: 'T[,,] -> unit /// Sets a 3D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3336,6 +4011,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedSingle4 : target:'T[,,,] -> start1:int option -> finish1:int option -> start2: int option -> finish2:int option -> start3:int option -> finish3:int option -> index4:int -> source: 'T[,,] -> unit /// Sets a 2D slice of a 4D array + /// /// The target array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. @@ -3347,6 +4023,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedDouble1 : target:'T[,,,] -> index1: int -> index2:int -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> source: 'T[,] -> unit /// Sets a 2D slice of a 4D array + /// /// The target array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3358,6 +4035,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedDouble2 : target:'T[,,,] -> index1: int -> start2: int option -> finish2:int option -> index3:int -> start4:int option -> finish4:int option -> source: 'T[,] -> unit /// Sets a 2D slice of a 4D array + /// /// The target array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3369,6 +4047,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedDouble3 : target:'T[,,,] -> index1:int -> start2: int option -> finish2:int option -> start3:int option -> finish3:int option -> index4:int -> source: 'T[,] -> unit /// Sets a 2D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3380,6 +4059,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedDouble4 : target:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> index3:int -> start4:int option -> finish4:int option -> source: 'T[,] -> unit /// Sets a 2D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3391,6 +4071,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedDouble5 : target:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> start3:int option -> finish3:int option -> index4:int -> source: 'T[,] -> unit /// Sets a 2D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3402,6 +4083,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedDouble6 : target:'T[,,,] -> start1:int option -> finish1:int option -> start2: int option -> finish2:int option -> index3:int -> index4:int -> source: 'T[,] -> unit /// Sets a 1D slice of a 4D array + /// /// The target array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. @@ -3412,6 +4094,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedTriple4 : target:'T[,,,] -> index1:int -> index2:int -> index3:int -> start4:int option -> finish4:int option -> source: 'T[] -> unit /// Sets a 1D slice of a 4D array + /// /// The target array. /// The fixed index of the first dimension. /// The fixed index of the second dimension. @@ -3422,6 +4105,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedTriple3 : target:'T[,,,] -> index1:int -> index2:int -> start3:int option -> finish3:int option -> index4:int -> source: 'T[] -> unit /// Sets a 1D slice of a 4D array + /// /// The target array. /// The fixed index of the first dimension. /// The start index of the second dimension. @@ -3432,6 +4116,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedTriple2 : target:'T[,,,] -> index1:int -> start2: int option -> finish2:int option -> index3:int -> index4:int -> source: 'T[] -> unit /// Sets a 1D slice of a 4D array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3442,6 +4127,7 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4DFixedTriple1 : target:'T[,,,] -> start1:int option -> finish1:int option -> index2:int -> index3:int -> index4:int -> source: 'T[] -> unit /// Sets a slice of an array + /// /// The target array. /// The start index of the first dimension. /// The end index of the first dimension. @@ -3455,9 +4141,11 @@ namespace Microsoft.FSharp.Core val inline SetArraySlice4D : target:'T[,,,] -> start1:int option -> finish1:int option -> start2:int option -> finish2:int option -> start3:int option -> finish3:int option -> start4:int option -> finish4:int option -> source:'T[,,,] -> unit /// Gets a slice from a string + /// /// The source string. /// The index of the first character of the slice. /// The index of the last character of the slice. + /// /// The substring from the given indices. val inline GetStringSlice : source:string -> start:int option -> finish:int option -> string @@ -3665,7 +4353,9 @@ namespace Microsoft.FSharp.Core module Unchecked = /// Unboxes a strongly typed value. This is the inverse of box, unbox<t>(box<t> a) equals a. + /// /// The boxed value. + /// /// The unboxed result. [] val inline unbox<'T> : obj -> 'T @@ -3700,64 +4390,84 @@ namespace Microsoft.FSharp.Core module NonStructuralComparison = /// Compares the two values for less-than + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( < ) : x:^T -> y:^U -> bool when (^T or ^U) : (static member ( < ) : ^T * ^U -> bool) /// Compares the two values for greater-than + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( > ) : x:^T -> y:^U -> bool when (^T or ^U) : (static member ( > ) : ^T * ^U -> bool) /// Compares the two values for greater-than-or-equal + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( >= ) : x:^T -> y:^U -> bool when (^T or ^U) : (static member ( >= ) : ^T * ^U -> bool) /// Compares the two values for less-than-or-equal + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( <= ) : x:^T -> y:^U -> bool when (^T or ^U) : (static member ( <= ) : ^T * ^U -> bool) /// Compares the two values for equality + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( = ) : x:^T -> y:^T -> bool when ^T : (static member ( = ) : ^T * ^T -> bool) /// Compares the two values for inequality + /// /// The first parameter. /// The second parameter. + /// /// The result of the comparison. val inline ( <> ) : x:^T -> y:^T -> bool when ^T : (static member ( <> ) : ^T * ^T -> bool) /// Compares the two values + /// /// The first value. /// The second value. + /// /// The result of the comparison. [] val inline compare: e1:'T -> e2:^T -> int when ^T : (static member ( < ) : ^T * ^T -> bool) and ^T : (static member ( > ) : ^T * ^T -> bool) /// Maximum of the two values + /// /// The first value. /// The second value. + /// /// The maximum value. [] val inline max : e1:^T -> e2:^T -> ^T when ^T : (static member ( < ) : ^T * ^T -> bool) /// Minimum of the two values + /// /// The first value. /// The second value. + /// /// The minimum value. [] val inline min : e1:^T -> e2:^T -> ^T when ^T : (static member ( < ) : ^T * ^T -> bool) /// Calls GetHashCode() on the value + /// /// The value. + /// /// The hash code. [] val inline hash :value:'T -> int when 'T : equality @@ -3765,113 +4475,141 @@ namespace Microsoft.FSharp.Core /// This module contains the basic arithmetic operations with overflow checks. module Checked = /// Overloaded unary negation (checks for overflow) + /// /// The input value. + /// /// The negated value. val inline ( ~- ) : value:^T -> ^T when ^T : (static member ( ~- ) : ^T -> ^T) and default ^T : int /// Overloaded subtraction operator (checks for overflow) + /// /// The first value. /// The second value. + /// /// The first value minus the second value. val inline ( - ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( - ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded addition operator (checks for overflow) + /// /// The first value. /// The second value. + /// /// The sum of the two input values. val inline ( + ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( + ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Overloaded multiplication operator (checks for overflow) + /// /// The first value. /// The second value. + /// /// The product of the two input values. val inline ( * ) : x:^T1 -> y:^T2 -> ^T3 when (^T1 or ^T2) : (static member ( * ) : ^T1 * ^T2 -> ^T3) and default ^T2 : ^T3 and default ^T3 : ^T1 and default ^T3 : ^T2 and default ^T1 : ^T3 and default ^T1 : ^T2 and default ^T1 : int /// Converts the argument to byte. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.Byte.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted byte [] val inline byte : value:^T -> byte when ^T : (static member op_Explicit : ^T -> byte) and default ^T : int /// Converts the argument to sbyte. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.SByte.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted sbyte [] val inline sbyte : value:^T -> sbyte when ^T : (static member op_Explicit : ^T -> sbyte) and default ^T : int /// Converts the argument to int16. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.Int16.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int16 [] val inline int16 : value:^T -> int16 when ^T : (static member op_Explicit : ^T -> int16) and default ^T : int /// Converts the argument to uint16. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.UInt16.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint16 [] val inline uint16 : value:^T -> uint16 when ^T : (static member op_Explicit : ^T -> uint16) and default ^T : int /// Converts the argument to int. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.Int32.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int [] val inline int : value:^T -> int when ^T : (static member op_Explicit : ^T -> int) and default ^T : int /// Converts the argument to int32. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.Int32.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int32 [] val inline int32 : value:^T -> int32 when ^T : (static member op_Explicit : ^T -> int32) and default ^T : int /// Converts the argument to uint32. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.UInt32.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint32 [] val inline uint32 : value:^T -> uint32 when ^T : (static member op_Explicit : ^T -> uint32) and default ^T : int /// Converts the argument to int64. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.Int64.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted int64 [] val inline int64 : value:^T -> int64 when ^T : (static member op_Explicit : ^T -> int64) and default ^T : int /// Converts the argument to uint64. This is a direct, checked conversion for all - /// primitive numeric types. For strings, the input is converted using System.UInt64.Parse() + /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted uint64 [] val inline uint64 : value:^T -> uint64 when ^T : (static member op_Explicit : ^T -> uint64) and default ^T : int - /// Converts the argument to nativeint. This is a direct, checked conversion for all + /// Converts the argument to . This is a direct, checked conversion for all /// primitive numeric types. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted nativeint [] val inline nativeint : value:^T -> nativeint when ^T : (static member op_Explicit : ^T -> nativeint) and default ^T : int @@ -3879,7 +4617,9 @@ namespace Microsoft.FSharp.Core /// Converts the argument to unativeint. This is a direct, checked conversion for all /// primitive numeric types. Otherwise the operation requires an appropriate /// static conversion method on the input type. + /// /// The input value. + /// /// The converted unativeint [] val inline unativeint : value:^T -> unativeint when ^T : (static member op_Explicit : ^T -> unativeint) and default ^T : int @@ -3888,7 +4628,9 @@ namespace Microsoft.FSharp.Core /// conversion according to the UTF-16 encoding for characters. String inputs must /// be exactly one character long. For other input types the operation requires an /// appropriate static conversion method on the input type. + /// /// The input value. + /// /// The converted char [] val inline char : value:^T -> char when ^T : (static member op_Explicit : ^T -> char) and default ^T : int @@ -3899,19 +4641,25 @@ namespace Microsoft.FSharp.Control open Microsoft.FSharp.Core /// Extensions related to Lazy values. + /// + /// Lazy Computation [] module LazyExtensions = type System.Lazy<'T> with /// Creates a lazy computation that evaluates to the result of the given function when forced. + /// /// The function to provide the value when needed. + /// /// The created Lazy object. [] // give the extension member a 'nice', unmangled compiled name, unique within this module static member Create : creator:(unit -> 'T) -> System.Lazy<'T> /// Creates a lazy computation that evaluates to the given value when forced. + /// /// The input value. + /// /// The created Lazy object. [] // give the extension member a 'nice', unmangled compiled name, unique within this module static member CreateFromValue : value:'T -> System.Lazy<'T> @@ -3926,7 +4674,9 @@ namespace Microsoft.FSharp.Control /// /// Use the values in the Lazy module to manipulate /// values of this type, and the notation lazy expr to create values - /// of type . + /// of type . + /// + /// Lazy Computation type Lazy<'T> = System.Lazy<'T> and [] @@ -3942,30 +4692,41 @@ namespace Microsoft.FSharp.Control /// F# gives special status to member properties compatible with type IDelegateEvent and /// tagged with the CLIEventAttribute. In this case the F# compiler generates appropriate /// CLI metadata to make the member appear to other CLI languages as a CLI event. + /// + /// Events and Observables type IDelegateEvent<'Delegate when 'Delegate :> System.Delegate > = /// Connect a handler delegate object to the event. A handler can /// be later removed using RemoveHandler. The listener will /// be invoked when the event is fired. + /// /// A delegate to be invoked when the event is fired. abstract AddHandler: handler:'Delegate -> unit /// Remove a listener delegate from an event listener store. + /// /// The delegate to be removed from the event listener store. abstract RemoveHandler: handler:'Delegate -> unit /// First class event values for CLI events conforming to CLI Framework standards. + /// + /// Events and Observables [] type IEvent<'Delegate,'Args when 'Delegate : delegate<'Args,unit> and 'Delegate :> System.Delegate > = inherit IDelegateEvent<'Delegate> inherit IObservable<'Args> /// A delegate type associated with the F# event type IEvent<_> + /// /// The object that fired the event. /// The event arguments. + /// + /// Events and Observables [] type Handler<'T> = delegate of sender:obj * args:'T -> unit /// First-class listening points (i.e. objects that permit you to register a callback /// activated when the event is triggered). + /// + /// Events and Observables type IEvent<'T> = IEvent, 'T> diff --git a/src/fsharp/FSharp.Core/printf.fs b/src/fsharp/FSharp.Core/printf.fs index d751ba1317..05ffcce3ea 100644 --- a/src/fsharp/FSharp.Core/printf.fs +++ b/src/fsharp/FSharp.Core/printf.fs @@ -2,17 +2,43 @@ namespace Microsoft.FSharp.Core -type PrintfFormat<'Printer,'State,'Residue,'Result>(value:string) = - member x.Value = value +open System +open System.IO +open System.Text - override __.ToString() = value +open System.Collections.Concurrent +open System.Globalization +open System.Reflection + +open Microsoft.FSharp.Core +open Microsoft.FSharp.Core.Operators +open Microsoft.FSharp.Collections + +open LanguagePrimitives.IntrinsicOperators + +type PrintfFormat<'Printer, 'State, 'Residue, 'Result>(value:string, captures: obj[], captureTys: Type[]) = + + new (value) = new PrintfFormat<'Printer, 'State, 'Residue, 'Result>(value, null, null) + + member _.Value = value + + member _.Captures = captures + + member _.CaptureTypes = captureTys + + override _.ToString() = value -type PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple>(value:string) = - inherit PrintfFormat<'Printer,'State,'Residue,'Result>(value) +type PrintfFormat<'Printer, 'State, 'Residue, 'Result, 'Tuple>(value:string, captures, captureTys: Type[]) = + + inherit PrintfFormat<'Printer, 'State, 'Residue, 'Result>(value, captures, captureTys) + + new (value) = new PrintfFormat<'Printer, 'State, 'Residue, 'Result, 'Tuple>(value, null, null) -type Format<'Printer,'State,'Residue,'Result> = PrintfFormat<'Printer,'State,'Residue,'Result> -type Format<'Printer,'State,'Residue,'Result,'Tuple> = PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> +type Format<'Printer, 'State, 'Residue, 'Result> = PrintfFormat<'Printer, 'State, 'Residue, 'Result> +type Format<'Printer, 'State, 'Residue, 'Result, 'Tuple> = PrintfFormat<'Printer, 'State, 'Residue, 'Result, 'Tuple> + +[] module internal PrintfImpl = /// Basic idea of implementation: @@ -36,18 +62,6 @@ module internal PrintfImpl = /// with just one reflection call /// 2. we can make combinable parts independent from particular printf implementation. Thus final result can be cached and shared. /// i.e when first call to printf "%s %s" will trigger creation of the specialization. Subsequent calls will pick existing specialization - open System - open System.IO - open System.Text - - open System.Collections.Generic - open System.Reflection - open Microsoft.FSharp.Core - open Microsoft.FSharp.Core.Operators - open Microsoft.FSharp.Collections - open LanguagePrimitives.IntrinsicOperators - - open System.IO [] type FormatFlags = @@ -78,677 +92,442 @@ module internal PrintfImpl = Precision: int Width: int Flags: FormatFlags + InteropHoleDotNetFormat: string voption } - member this.IsStarPrecision = this.Precision = StarValue - member this.IsPrecisionSpecified = this.Precision <> NotSpecifiedValue - member this.IsStarWidth = this.Width = StarValue - member this.IsWidthSpecified = this.Width <> NotSpecifiedValue + member spec.IsStarPrecision = (spec.Precision = StarValue) + + member spec.IsPrecisionSpecified = (spec.Precision <> NotSpecifiedValue) + + member spec.IsStarWidth = (spec.Width = StarValue) + + member spec.IsWidthSpecified = (spec.Width <> NotSpecifiedValue) + + member spec.ArgCount = + let n = + if spec.TypeChar = 'a' then 2 + elif spec.IsStarWidth || spec.IsStarPrecision then + if spec.IsStarWidth = spec.IsStarPrecision then 3 + else 2 + else 1 - override this.ToString() = + let n = if spec.TypeChar = '%' then n - 1 else n + + assert (n <> 0) + + n + + override spec.ToString() = let valueOf n = match n with StarValue -> "*" | NotSpecifiedValue -> "-" | n -> n.ToString() System.String.Format ( "'{0}', Precision={1}, Width={2}, Flags={3}", - this.TypeChar, - (valueOf this.Precision), - (valueOf this.Width), - this.Flags + spec.TypeChar, + (valueOf spec.Precision), + (valueOf spec.Width), + spec.Flags ) + + member spec.IsDecimalFormat = + spec.TypeChar = 'M' + + member spec.GetPadAndPrefix allowZeroPadding = + let padChar = if allowZeroPadding && isPadWithZeros spec.Flags then '0' else ' '; + let prefix = + if isPlusForPositives spec.Flags then "+" + elif isSpaceForPositives spec.Flags then " " + else "" + padChar, prefix + + member spec.IsGFormat = + spec.IsDecimalFormat || System.Char.ToLower(spec.TypeChar) = 'g' + /// Set of helpers to parse format string module private FormatString = - let intFromString (s: string) pos = - let rec go acc i = - if Char.IsDigit s.[i] then - let n = int s.[i] - int '0' - go (acc * 10 + n) (i + 1) - else acc, i - go 0 pos - - let parseFlags (s: string) i = - let rec go flags i = + let intFromString (s: string) (i: byref) = + let mutable res = 0 + while (Char.IsDigit s.[i]) do + let n = int s.[i] - int '0' + res <- res * 10 + n + i <- i + 1 + res + + let parseFlags (s: string) (i: byref) = + let mutable flags = FormatFlags.None + let mutable fin = false + while not fin do match s.[i] with - | '0' -> go (flags ||| FormatFlags.PadWithZeros) (i + 1) - | '+' -> go (flags ||| FormatFlags.PlusForPositives) (i + 1) - | ' ' -> go (flags ||| FormatFlags.SpaceForPositives) (i + 1) - | '-' -> go (flags ||| FormatFlags.LeftJustify) (i + 1) - | _ -> flags, i - go FormatFlags.None i - - let parseWidth (s: string) i = - if s.[i] = '*' then StarValue, (i + 1) - elif Char.IsDigit s.[i] then intFromString s i - else NotSpecifiedValue, i - - let parsePrecision (s: string) i = + | '0' -> + flags <- flags ||| FormatFlags.PadWithZeros + i <- i + 1 + | '+' -> + flags <- flags ||| FormatFlags.PlusForPositives + i <- i + 1 + | ' ' -> + flags <- flags ||| FormatFlags.SpaceForPositives + i <- i + 1 + | '-' -> + flags <- flags ||| FormatFlags.LeftJustify + i <- i + 1 + | _ -> + fin <- true + flags + + let parseWidth (s: string) (i: byref) = + if s.[i] = '*' then + i <- i + 1 + StarValue + elif Char.IsDigit s.[i] then + intFromString s (&i) + else + NotSpecifiedValue + + let parsePrecision (s: string) (i: byref) = if s.[i] = '.' then - if s.[i + 1] = '*' then StarValue, i + 2 - elif Char.IsDigit s.[i + 1] then intFromString s (i + 1) + if s.[i + 1] = '*' then + i <- i + 2 + StarValue + elif Char.IsDigit s.[i + 1] then + i <- i + 1 + intFromString s (&i) else raise (ArgumentException("invalid precision value")) - else NotSpecifiedValue, i + else + NotSpecifiedValue - let parseTypeChar (s: string) i = - s.[i], (i + 1) + let parseTypeChar (s: string) (i: byref) = + let res = s.[i] + i <- i + 1 + res + + let parseInterpolatedHoleDotNetFormat typeChar (s: string) (i: byref) = + if typeChar = 'P' then + if i < s.Length && s.[i] = '(' then + let i2 = s.IndexOf(")", i) + if i2 = -1 then + ValueNone + else + let res = s.[i+1..i2-1] + i <- i2+1 + ValueSome res + else + ValueNone + else + ValueNone + + // Skip %P() added for hole in "...%d{x}..." + let skipInterpolationHole typeChar (fmt: string) (i: byref) = + if typeChar <> 'P' then + if i+1 < fmt.Length && fmt.[i] = '%' && fmt.[i+1] = 'P' then + i <- i + 2 + if i+1 < fmt.Length && fmt.[i] = '(' && fmt.[i+1] = ')' then + i <- i+2 - let findNextFormatSpecifier (s: string) i = - let rec go i (buf: Text.StringBuilder) = + let findNextFormatSpecifier (s: string) (i: byref) = + let buf = StringBuilder() + let mutable fin = false + while not fin do if i >= s.Length then - s.Length, buf.ToString() + fin <- true else let c = s.[i] if c = '%' then if i + 1 < s.Length then - let _, i1 = parseFlags s (i + 1) - let w, i2 = parseWidth s i1 - let p, i3 = parsePrecision s i2 - let typeChar, i4 = parseTypeChar s i3 + let mutable i2 = i+1 + let _ = parseFlags s &i2 + let w = parseWidth s &i2 + let p = parsePrecision s &i2 + let typeChar = parseTypeChar s &i2 + // shortcut for the simpliest case // if typeChar is not % or it has star as width\precision - resort to long path if typeChar = '%' && not (w = StarValue || p = StarValue) then buf.Append('%') |> ignore - go i4 buf + i <- i2 else - i, buf.ToString() + fin <- true else raise (ArgumentException("Missing format specifier")) else buf.Append c |> ignore - go (i + 1) buf - go i (Text.StringBuilder()) + i <- i + 1 + buf.ToString() + + [] + /// Represents one step in the execution of a format string + type Step = + | StepWithArg of prefix: string * conv: (obj -> string) + | StepWithTypedArg of prefix: string * conv: (obj -> Type -> string) + | StepString of prefix: string + | StepLittleT of prefix: string + | StepLittleA of prefix: string + | StepStar1 of prefix: string * conv: (obj -> int -> string) + | StepPercentStar1 of prefix: string + | StepStar2 of prefix: string * conv: (obj -> int -> int -> string) + | StepPercentStar2 of prefix: string + + // Count the number of string fragments in a sequence of steps + static member BlockCount(steps: Step[]) = + let mutable count = 0 + for step in steps do + match step with + | StepWithArg (prefix, _conv) -> + if not (String.IsNullOrEmpty prefix) then count <- count + 1 + count <- count + 1 + | StepWithTypedArg (prefix, _conv) -> + if not (String.IsNullOrEmpty prefix) then count <- count + 1 + count <- count + 1 + | StepString prefix -> + if not (String.IsNullOrEmpty prefix) then count <- count + 1 + | StepLittleT(prefix) -> + if not (String.IsNullOrEmpty prefix) then count <- count + 1 + count <- count + 1 + | StepLittleA(prefix) -> + if not (String.IsNullOrEmpty prefix) then count <- count + 1 + count <- count + 1 + | StepStar1(prefix, _conv) -> + if not (String.IsNullOrEmpty prefix) then count <- count + 1 + count <- count + 1 + | StepPercentStar1(prefix) -> + if not (String.IsNullOrEmpty prefix) then count <- count + 1 + count <- count + 1 + | StepStar2(prefix, _conv) -> + if not (String.IsNullOrEmpty prefix) then count <- count + 1 + count <- count + 1 + | StepPercentStar2(prefix) -> + if not (String.IsNullOrEmpty prefix) then count <- count + 1 + count <- count + 1 + count /// Abstracts generated printer from the details of particular environment: how to write text, how to produce results etc... [] - type PrintfEnv<'State, 'Residue, 'Result> = - val State: 'State - new(s: 'State) = { State = s } + type PrintfEnv<'State, 'Residue, 'Result>(state: 'State) = + member _.State = state + abstract Finish: unit -> 'Result + abstract Write: string -> unit + + /// Write the result of a '%t' format. If this is a string it is written. If it is a 'unit' value + /// the side effect has already happened abstract WriteT: 'Residue -> unit + + member env.WriteSkipEmpty(s: string) = + if not (String.IsNullOrEmpty s) then + env.Write s - type Utils = - static member inline Write (env: PrintfEnv<_, _, _>, a, b) = - env.Write a - env.Write b - static member inline Write (env: PrintfEnv<_, _, _>, a, b, c) = - Utils.Write(env, a, b) - env.Write c - static member inline Write (env: PrintfEnv<_, _, _>, a, b, c, d) = - Utils.Write(env, a, b) - Utils.Write(env, c, d) - static member inline Write (env: PrintfEnv<_, _, _>, a, b, c, d, e) = - Utils.Write(env, a, b, c) - Utils.Write(env, d, e) - static member inline Write (env: PrintfEnv<_, _, _>, a, b, c, d, e, f) = - Utils.Write(env, a, b, c, d) - Utils.Write(env, e, f) - static member inline Write (env: PrintfEnv<_, _, _>, a, b, c, d, e, f, g) = - Utils.Write(env, a, b, c, d, e) - Utils.Write(env, f, g) - static member inline Write (env: PrintfEnv<_, _, _>, a, b, c, d, e, f, g, h) = - Utils.Write(env, a, b, c, d, e, f) - Utils.Write(env, g, h) - static member inline Write (env: PrintfEnv<_, _, _>, a, b, c, d, e, f, g, h, i) = - Utils.Write(env, a, b, c, d, e, f, g) - Utils.Write(env, h, i) - static member inline Write (env: PrintfEnv<_, _, _>, a, b, c, d, e, f, g, h, i, j) = - Utils.Write(env, a, b, c, d, e, f, g, h) - Utils.Write(env, i, j) - static member inline Write (env: PrintfEnv<_, _, _>, a, b, c, d, e, f, g, h, i, j, k) = - Utils.Write(env, a, b, c, d, e, f, g, h, i) - Utils.Write(env, j, k) - static member inline Write (env: PrintfEnv<_, _, _>, a, b, c, d, e, f, g, h, i, j, k, l, m) = - Utils.Write(env, a, b, c, d, e, f, g, h, i, j, k) - Utils.Write(env, l, m) + member env.RunSteps (args: obj[], argTys: Type[], steps: Step[]) = + let mutable argIndex = 0 + let mutable tyIndex = 0 + + for step in steps do + match step with + | StepWithArg (prefix, conv) -> + env.WriteSkipEmpty prefix + let arg = args.[argIndex] + argIndex <- argIndex + 1 + env.Write(conv arg) + + | StepWithTypedArg (prefix, conv) -> + env.WriteSkipEmpty prefix + let arg = args.[argIndex] + let argTy = argTys.[tyIndex] + argIndex <- argIndex + 1 + tyIndex <- tyIndex + 1 + env.Write(conv arg argTy) + + | StepString prefix -> + env.WriteSkipEmpty prefix + + | StepLittleT(prefix) -> + env.WriteSkipEmpty prefix + let farg = args.[argIndex] + argIndex <- argIndex + 1 + let f = farg :?> ('State -> 'Residue) + env.WriteT(f env.State) + + | StepLittleA(prefix) -> + env.WriteSkipEmpty prefix + let farg = args.[argIndex] + argIndex <- argIndex + 1 + let arg = args.[argIndex] + argIndex <- argIndex + 1 + let f = farg :?> ('State -> obj -> 'Residue) + env.WriteT(f env.State arg) + + | StepStar1(prefix, conv) -> + env.WriteSkipEmpty prefix + let star1 = args.[argIndex] :?> int + argIndex <- argIndex + 1 + let arg1 = args.[argIndex] + argIndex <- argIndex + 1 + env.Write (conv arg1 star1) + + | StepPercentStar1(prefix) -> + argIndex <- argIndex + 1 + env.WriteSkipEmpty prefix + env.Write("%") + + | StepStar2(prefix, conv) -> + env.WriteSkipEmpty prefix + let star1 = args.[argIndex] :?> int + argIndex <- argIndex + 1 + let star2 = args.[argIndex] :?> int + argIndex <- argIndex + 1 + let arg1 = args.[argIndex] + argIndex <- argIndex + 1 + env.Write (conv arg1 star1 star2) + + | StepPercentStar2(prefix) -> + env.WriteSkipEmpty prefix + argIndex <- argIndex + 2 + env.Write("%") - /// Type of results produced by specialization - /// This is function that accepts thunk to create PrintfEnv on demand and returns concrete instance of Printer (curried function) - /// After all arguments is collected, specialization obtains concrete PrintfEnv from the thunk and use it to output collected data. - type PrintfFactory<'State, 'Residue, 'Result, 'Printer> = (unit -> PrintfEnv<'State, 'Residue, 'Result>) -> 'Printer + env.Finish() + + /// Type of results produced by specialization. + /// + /// This is a function that accepts a thunk to create PrintfEnv on demand (at the very last + /// appliction of an argument) and returns a concrete instance of an appriate curried printer. + /// + /// After all arguments are collected, specialization obtains concrete PrintfEnv from the thunk + /// and uses it to output collected data. + /// + /// Note the arguments must be captured in an *immutable* collection. For example consider + /// let f1 = printf "%d%d%d" 3 // activation captures '3' (args --> [3]) + /// let f2 = f1 4 // same activation captures 4 (args --> [3;4]) + /// let f3 = f1 5 // same activation captures 5 (args --> [3;5]) + /// f2 7 // same activation captures 7 (args --> [3;4;7]) + /// f3 8 // same activation captures 8 (args --> [3;5;8]) + /// + /// If we captured into an mutable array then these would interfere + type PrintfInitial<'State, 'Residue, 'Result> = (unit -> PrintfEnv<'State, 'Residue, 'Result>) + type PrintfFuncFactory<'Printer, 'State, 'Residue, 'Result> = + delegate of obj list * PrintfInitial<'State, 'Residue, 'Result> -> 'Printer [] - let MaxArgumentsInSpecialization = 5 - - /// Specializations are created via factory methods. These methods accepts 2 kinds of arguments - /// - parts of format string that corresponds to raw text - /// - functions that can transform collected values to strings - /// basic shape of the signature of specialization - /// + + + ... + - type Specializations<'State, 'Residue, 'Result> private ()= + let MaxArgumentsInSpecialization = 3 + + let revToArray extra (args: 'T list) = + // We've reached the end, now fill in the array, reversing steps, avoiding reallocating + let n = args.Length + let res = Array.zeroCreate (n+extra) + let mutable j = 0 + for arg in args do + res.[n-j-1] <- arg + j <- j + 1 + res + + type Specializations<'State, 'Residue, 'Result>() = - static member Final1<'A> - ( - s0, conv1, s1 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) -> - let env = env() - Utils.Write(env, s0, (conv1 a), s1) - env.Finish() - ) - ) - - static member FinalFastEnd1<'A> - ( - s0, conv1 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) -> - let env = env() - Utils.Write(env, s0, (conv1 a)) - env.Finish() - ) - ) - - static member FinalFastStart1<'A> - ( - conv1, s1 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) -> - let env = env() - Utils.Write(env, (conv1 a), s1) - env.Finish() - ) - ) - - static member FinalFast1<'A> - ( - conv1 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) -> - let env = env() - env.Write (conv1 a) - env.Finish() - ) - ) - - static member Final2<'A, 'B> - ( - s0, conv1, s1, conv2, s2 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) -> - let env = env() - Utils.Write(env, s0, (conv1 a), s1, (conv2 b), s2) - env.Finish() - ) - ) - - static member FinalFastEnd2<'A, 'B> - ( - s0, conv1, s1, conv2 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) -> - let env = env() - Utils.Write(env, s0, (conv1 a), s1, (conv2 b)) - env.Finish() - ) - ) - - static member FinalFastStart2<'A, 'B> - ( - conv1, s1, conv2, s2 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) -> - let env = env() - Utils.Write(env, (conv1 a), s1, (conv2 b), s2) - env.Finish() - ) - ) - - static member FinalFast2<'A, 'B> - ( - conv1, s1, conv2 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) -> - let env = env() - Utils.Write(env, (conv1 a), s1, (conv2 b)) - env.Finish() - ) - ) - - static member Final3<'A, 'B, 'C> - ( - s0, conv1, s1, conv2, s2, conv3, s3 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) -> - let env = env() - Utils.Write(env, s0, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3) - env.Finish() - ) - ) - - static member FinalFastEnd3<'A, 'B, 'C> - ( - s0, conv1, s1, conv2, s2, conv3 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) -> - let env = env() - Utils.Write(env, s0, (conv1 a), s1, (conv2 b), s2, (conv3 c)) - env.Finish() - ) - ) - - static member FinalFastStart3<'A, 'B, 'C> - ( - conv1, s1, conv2, s2, conv3, s3 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) -> - let env = env() - Utils.Write(env, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3) - env.Finish() - ) - ) - - static member FinalFast3<'A, 'B, 'C> - ( - conv1, s1, conv2, s2, conv3 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) -> - let env = env() - Utils.Write(env, (conv1 a), s1, (conv2 b), s2, (conv3 c)) - env.Finish() - ) - ) - - static member Final4<'A, 'B, 'C, 'D> - ( - s0, conv1, s1, conv2, s2, conv3, s3, conv4, s4 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) (d: 'D)-> - let env = env() - Utils.Write(env, s0, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3, (conv4 d), s4) - env.Finish() - ) - ) - - static member FinalFastEnd4<'A, 'B, 'C, 'D> - ( - s0, conv1, s1, conv2, s2, conv3, s3, conv4 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) (d: 'D)-> - let env = env() - Utils.Write(env, s0, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3, (conv4 d)) - env.Finish() - ) - ) - - static member FinalFastStart4<'A, 'B, 'C, 'D> - ( - conv1, s1, conv2, s2, conv3, s3, conv4, s4 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) (d: 'D)-> - let env = env() - Utils.Write(env, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3, (conv4 d), s4) - env.Finish() - ) - ) - - static member FinalFast4<'A, 'B, 'C, 'D> - ( - conv1, s1, conv2, s2, conv3, s3, conv4 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) (d: 'D)-> - let env = env() - Utils.Write(env, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3, (conv4 d)) - env.Finish() - ) - ) - - static member Final5<'A, 'B, 'C, 'D, 'E> - ( - s0, conv1, s1, conv2, s2, conv3, s3, conv4, s4, conv5, s5 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) (d: 'D) (e: 'E)-> - let env = env() - Utils.Write(env, s0, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3, (conv4 d), s4, (conv5 e), s5) - env.Finish() - ) - ) - - static member FinalFastEnd5<'A, 'B, 'C, 'D, 'E> - ( - s0, conv1, s1, conv2, s2, conv3, s3, conv4, s4, conv5 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) (d: 'D) (e: 'E)-> - let env = env() - Utils.Write(env, s0, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3, (conv4 d), s4, (conv5 e)) - env.Finish() - ) + static member Final0(allSteps) = + PrintfFuncFactory<_, 'State, 'Residue, 'Result>(fun args initial -> + let env = initial() + env.RunSteps(revToArray 0 args, null, allSteps) ) - static member FinalFastStart5<'A, 'B, 'C, 'D, 'E> - ( - conv1, s1, conv2, s2, conv3, s3, conv4, s4, conv5, s5 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) (d: 'D) (e: 'E)-> - let env = env() - Utils.Write(env, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3, (conv4 d), s4, (conv5 e), s5) - env.Finish() - ) - ) - - static member FinalFast5<'A, 'B, 'C, 'D, 'E> - ( - conv1, s1, conv2, s2, conv3, s3, conv4, s4, conv5 - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) (d: 'D) (e: 'E)-> - let env = env() - Utils.Write(env, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3, (conv4 d), s4, (conv5 e)) - env.Finish() + static member CaptureFinal1<'A>(allSteps) = + PrintfFuncFactory<_, 'State, 'Residue, 'Result>(fun args initial -> + (fun (arg1: 'A) -> + let env = initial() + let argArray = revToArray 1 args + argArray.[argArray.Length-1] <- box arg1 + env.RunSteps(argArray, null, allSteps) ) ) - static member Chained1<'A, 'Tail> - ( - s0, conv1, - next - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) -> - let env() = - let env = env() - Utils.Write(env, s0, (conv1 a)) - env - next env : 'Tail + static member CaptureFinal2<'A, 'B>(allSteps) = + PrintfFuncFactory<_, 'State, 'Residue, 'Result>(fun args initial -> + (fun (arg1: 'A) (arg2: 'B) -> + let env = initial() + let argArray = revToArray 2 args + argArray.[argArray.Length-1] <- box arg2 + argArray.[argArray.Length-2] <- box arg1 + env.RunSteps(argArray, null, allSteps) ) ) - static member ChainedFastStart1<'A, 'Tail> - ( - conv1, - next - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) -> - let env() = - let env = env() - env.Write(conv1 a) - env - next env : 'Tail + static member CaptureFinal3<'A, 'B, 'C>(allSteps) = + PrintfFuncFactory<_, 'State, 'Residue, 'Result>(fun args initial -> + (fun (arg1: 'A) (arg2: 'B) (arg3: 'C) -> + let env = initial() + let argArray = revToArray 3 args + argArray.[argArray.Length-1] <- box arg3 + argArray.[argArray.Length-2] <- box arg2 + argArray.[argArray.Length-3] <- box arg1 + env.RunSteps(argArray, null, allSteps) ) ) - static member Chained2<'A, 'B, 'Tail> - ( - s0, conv1, s1, conv2, - next - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) -> - let env() = - let env = env() - Utils.Write(env, s0, (conv1 a), s1, (conv2 b)) - env - next env : 'Tail + static member Capture1<'A, 'Tail>(next: PrintfFuncFactory<_, 'State, 'Residue, 'Result>) = + PrintfFuncFactory<_, 'State, 'Residue, 'Result>(fun args initial -> + (fun (arg1: 'A) -> + let args = (box arg1 :: args) + next.Invoke(args, initial) : 'Tail ) ) - static member ChainedFastStart2<'A, 'B, 'Tail> - ( - conv1, s1, conv2, - next - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) -> - let env() = - let env = env() - Utils.Write(env, (conv1 a), s1, (conv2 b)) - env - next env : 'Tail + static member CaptureLittleA<'A, 'Tail>(next: PrintfFuncFactory<_, 'State, 'Residue, 'Result>) = + PrintfFuncFactory<_, 'State, 'Residue, 'Result>(fun args initial -> + (fun (f: 'State -> 'A -> 'Residue) (arg1: 'A) -> + let args = box arg1 :: box (fun s (arg:obj) -> f s (unbox arg)) :: args + next.Invoke(args, initial) : 'Tail ) ) - static member Chained3<'A, 'B, 'C, 'Tail> - ( - s0, conv1, s1, conv2, s2, conv3, - next - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) -> - let env() = - let env = env() - Utils.Write(env, s0, (conv1 a), s1, (conv2 b), s2, (conv3 c)) - env - next env : 'Tail - ) - ) - - static member ChainedFastStart3<'A, 'B, 'C, 'Tail> - ( - conv1, s1, conv2, s2, conv3, - next - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) -> - let env() = - let env = env() - Utils.Write(env, (conv1 a), s1, (conv2 b), s2, (conv3 c)) - env - next env : 'Tail - ) - ) - - static member Chained4<'A, 'B, 'C, 'D, 'Tail> - ( - s0, conv1, s1, conv2, s2, conv3, s3, conv4, - next - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) (d: 'D)-> - let env() = - let env = env() - Utils.Write(env, s0, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3, (conv4 d)) - env - next env : 'Tail - ) - ) - - static member ChainedFastStart4<'A, 'B, 'C, 'D, 'Tail> - ( - conv1, s1, conv2, s2, conv3, s3, conv4, - next - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) (d: 'D)-> - let env() = - let env = env() - Utils.Write(env, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3, (conv4 d)) - env - next env : 'Tail - ) - ) - - static member Chained5<'A, 'B, 'C, 'D, 'E, 'Tail> - ( - s0, conv1, s1, conv2, s2, conv3, s3, conv4, s4, conv5, - next - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) (d: 'D) (e: 'E)-> - let env() = - let env = env() - Utils.Write(env, s0, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3, (conv4 d), s4, (conv5 e)) - env - next env : 'Tail - ) - ) - - static member ChainedFastStart5<'A, 'B, 'C, 'D, 'E, 'Tail> - ( - conv1, s1, conv2, s2, conv3, s3, conv4, s4, conv5, - next - ) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (a: 'A) (b: 'B) (c: 'C) (d: 'D) (e: 'E)-> - let env() = - let env = env() - Utils.Write(env, (conv1 a), s1, (conv2 b), s2, (conv3 c), s3, (conv4 d), s4, (conv5 e)) - env - next env : 'Tail - ) - ) - - static member TFinal(s1: string, s2: string) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (f: 'State -> 'Residue) -> - let env = env() - env.Write s1 - env.WriteT(f env.State) - env.Write s2 - env.Finish() - ) - ) - static member TChained<'Tail>(s1: string, next: PrintfFactory<'State, 'Residue, 'Result,'Tail>) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (f: 'State -> 'Residue) -> - let env() = - let env = env() - env.Write s1 - env.WriteT(f env.State) - env - next env: 'Tail - ) - ) - - static member LittleAFinal<'A>(s1: string, s2: string) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (f: 'State -> 'A ->'Residue) (a: 'A) -> - let env = env() - env.Write s1 - env.WriteT(f env.State a) - env.Write s2 - env.Finish() - ) - ) - static member LittleAChained<'A, 'Tail>(s1: string, next: PrintfFactory<'State, 'Residue, 'Result,'Tail>) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (f: 'State -> 'A ->'Residue) (a: 'A) -> - let env() = - let env = env() - env.Write s1 - env.WriteT(f env.State a) - env - next env: 'Tail - ) - ) - - static member StarFinal1<'A>(s1: string, conv, s2: string) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (star1: int) (a: 'A) -> - let env = env() - env.Write s1 - env.Write (conv a star1: string) - env.Write s2 - env.Finish() - ) - ) - - static member PercentStarFinal1(s1: string, s2: string) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (_star1 : int) -> - let env = env() - env.Write s1 - env.Write("%") - env.Write s2 - env.Finish() + static member Capture2<'A, 'B, 'Tail>(next: PrintfFuncFactory<_, 'State, 'Residue, 'Result>) = + PrintfFuncFactory<_, 'State, 'Residue, 'Result>(fun args initial -> + (fun (arg1: 'A) (arg2: 'B) -> + let args = box arg2 :: box arg1 :: args + next.Invoke(args, initial) : 'Tail ) ) - static member StarFinal2<'A>(s1: string, conv, s2: string) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (star1: int) (star2: int) (a: 'A) -> - let env = env() - env.Write s1 - env.Write (conv a star1 star2: string) - env.Write s2 - env.Finish() + static member Capture3<'A, 'B, 'C, 'Tail>(next: PrintfFuncFactory<_, 'State, 'Residue, 'Result>) = + PrintfFuncFactory<_, 'State, 'Residue, 'Result>(fun args initial -> + (fun (arg1: 'A) (arg2: 'B) (arg3: 'C) -> + let args = box arg3 :: box arg2 :: box arg1 :: args + next.Invoke(args, initial) : 'Tail ) ) - /// Handles case when '%*.*%' is used at the end of string - static member PercentStarFinal2(s1: string, s2: string) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (_star1 : int) (_star2 : int) -> - let env = env() - env.Write s1 - env.Write("%") - env.Write s2 - env.Finish() - ) + // Special case for format strings containing just one '%d' etc, i.e. StepWithArg then StepString. + // This avoids allocating an argument array, and unfolds the single iteration of RunSteps. + static member OneStepWithArg<'A>(prefix1, conv1, prefix2) = + PrintfFuncFactory<_, 'State, 'Residue, 'Result>(fun _args initial -> + // Note this is the actual computed/stored closure for + // sprintf "prefix1 %d prefix2" + // for any simple format specifiers, where conv1 and conv2 will depend on the format specifiers etc. + (fun (arg1: 'A) -> + let env = initial() + env.WriteSkipEmpty prefix1 + env.Write(conv1 (box arg1)) + env.WriteSkipEmpty prefix2 + env.Finish()) ) - static member StarChained1<'A, 'Tail>(s1: string, conv, next: PrintfFactory<'State, 'Residue, 'Result,'Tail>) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (star1: int) (a: 'A) -> - let env() = - let env = env() - env.Write s1 - env.Write(conv a star1 : string) - env - next env : 'Tail - ) - ) - - /// Handles case when '%*%' is used in the middle of the string so it needs to be chained to another printing block - static member PercentStarChained1<'Tail>(s1: string, next: PrintfFactory<'State, 'Residue, 'Result,'Tail>) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (_star1 : int) -> - let env() = - let env = env() - env.Write s1 - env.Write("%") - env - next env: 'Tail - ) + // Special case for format strings containing two simple formats like '%d %s' etc, i.e. + ///StepWithArg then StepWithArg then StepString. This avoids allocating an argument array, + // and unfolds the two iteration of RunSteps. + static member TwoStepWithArg<'A, 'B>(prefix1, conv1, prefix2, conv2, prefix3) = + PrintfFuncFactory<_, 'State, 'Residue, 'Result>(fun _args initial -> + // Note this is the actual computed/stored closure for + // sprintf "prefix1 %d prefix2 %s prefix3" + // for any simple format specifiers, where conv1 and conv2 will depend on the format specifiers etc. + (fun (arg1: 'A) (arg2: 'B) -> + let env = initial() + env.WriteSkipEmpty prefix1 + env.Write(conv1 (box arg1)) + env.WriteSkipEmpty prefix2 + env.Write(conv2 (box arg2)) + env.WriteSkipEmpty prefix3 + env.Finish()) ) - static member StarChained2<'A, 'Tail>(s1: string, conv, next: PrintfFactory<'State, 'Residue, 'Result,'Tail>) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (star1: int) (star2: int) (a: 'A) -> - let env() = - let env = env() - env.Write s1 - env.Write(conv a star1 star2 : string) - env - next env : 'Tail - ) - ) - - /// Handles case when '%*.*%' is used in the middle of the string so it needs to be chained to another printing block - static member PercentStarChained2<'Tail>(s1: string, next: PrintfFactory<'State, 'Residue, 'Result,'Tail>) = - (fun (env: unit -> PrintfEnv<'State, 'Residue, 'Result>) -> - (fun (_star1 : int) (_star2 : int) -> - let env() = - let env = env() - env.Write s1 - env.Write("%") - env - next env : 'Tail - ) - ) - let inline (===) a b = Object.ReferenceEquals(a, b) - let invariantCulture = System.Globalization.CultureInfo.InvariantCulture let inline boolToString v = if v then "true" else "false" + let inline stringToSafeString v = match v with | null -> "" @@ -757,7 +536,18 @@ module internal PrintfImpl = [] let DefaultPrecision = 6 + /// A wrapper struct used to slightly strengthen the types of "ValueConverter" objects produced during composition of + /// the dynamic implementation. These are always functions but sometimes they take one argument, sometimes two. + [] + type ValueConverter private (f: obj) = + member x.FuncObj = f + + static member inline Make (f: obj -> string) = ValueConverter(box f) + static member inline Make (f: obj -> int -> string) = ValueConverter(box f) + static member inline Make (f: obj -> int-> int -> string) = ValueConverter(box f) + let getFormatForFloat (ch: char) (prec: int) = ch.ToString() + prec.ToString() + let normalizePrecision prec = min (max prec 0) 99 /// Contains helpers to convert printer functions to functions that prints value with respect to specified justification @@ -768,32 +558,33 @@ module internal PrintfImpl = /// - withPadding - adapts first category /// - withPaddingFormatted - adapts second category module Padding = + /// pad here is function that converts T to string with respect of justification /// basic - function that converts T to string without applying justification rules /// adaptPaddedFormatted returns boxed function that has various number of arguments depending on if width\precision flags has '*' value - let inline adaptPaddedFormatted (spec: FormatSpecifier) getFormat (basic: string -> 'T -> string) (pad: string -> int -> 'T -> string) = + let adaptPaddedFormatted (spec: FormatSpecifier) getFormat (basic: string -> obj -> string) (pad: string -> int -> obj -> string) : ValueConverter = if spec.IsStarWidth then if spec.IsStarPrecision then // width=*, prec=* - box(fun v width prec -> + ValueConverter.Make (fun v width prec -> let fmt = getFormat (normalizePrecision prec) pad fmt width v) else // width=*, prec=? let prec = if spec.IsPrecisionSpecified then normalizePrecision spec.Precision else DefaultPrecision let fmt = getFormat prec - box(fun v width -> + ValueConverter.Make (fun v width -> pad fmt width v) elif spec.IsStarPrecision then if spec.IsWidthSpecified then // width=val, prec=* - box(fun v prec -> + ValueConverter.Make (fun v prec -> let fmt = getFormat prec pad fmt spec.Width v) else // width=X, prec=* - box(fun v prec -> + ValueConverter.Make (fun v prec -> let fmt = getFormat prec basic fmt v) else @@ -801,75 +592,88 @@ module internal PrintfImpl = let fmt = getFormat prec if spec.IsWidthSpecified then // width=val, prec=* - box(fun v -> + ValueConverter.Make (fun v -> pad fmt spec.Width v) else // width=X, prec=* - box(fun v -> + ValueConverter.Make (fun v -> basic fmt v) /// pad here is function that converts T to string with respect of justification /// basic - function that converts T to string without applying justification rules /// adaptPadded returns boxed function that has various number of arguments depending on if width flags has '*' value - let inline adaptPadded (spec: FormatSpecifier) (basic: 'T -> string) (pad: int -> 'T -> string) = + let adaptPadded (spec: FormatSpecifier) (basic: obj -> string) (pad: int -> obj -> string) : ValueConverter = if spec.IsStarWidth then - // width=*, prec=? - box(fun v width -> - pad width v) + // width=*, prec=? + ValueConverter.Make (fun v width -> + pad width v) else if spec.IsWidthSpecified then // width=val, prec=* - box(fun v -> + ValueConverter.Make (fun v -> pad spec.Width v) else // width=X, prec=* - box(fun v -> + ValueConverter.Make (fun v -> basic v) - let inline withPaddingFormatted (spec: FormatSpecifier) getFormat (defaultFormat: string) (f: string -> 'T -> string) left right = + let withPaddingFormatted (spec: FormatSpecifier) getFormat (defaultFormat: string) (f: string -> obj -> string) left right : ValueConverter = if not (spec.IsWidthSpecified || spec.IsPrecisionSpecified) then - box (f defaultFormat) + ValueConverter.Make (f defaultFormat) else if isLeftJustify spec.Flags then adaptPaddedFormatted spec getFormat f left else adaptPaddedFormatted spec getFormat f right - let inline withPadding (spec: FormatSpecifier) (f: 'T -> string) left right = + let withPadding (spec: FormatSpecifier) (f: obj -> string) left right : ValueConverter = if not spec.IsWidthSpecified then - box f + ValueConverter.Make f else if isLeftJustify spec.Flags then adaptPadded spec f left else adaptPadded spec f right - let inline isNumber (x: ^T) = - not (^T: (static member IsPositiveInfinity: 'T -> bool) x) && not (^T: (static member IsNegativeInfinity: 'T -> bool) x) && not (^T: (static member IsNaN: 'T -> bool) x) - - let inline isInteger n = - n % LanguagePrimitives.GenericOne = LanguagePrimitives.GenericZero - - let inline isPositive n = - n >= LanguagePrimitives.GenericZero - - /// contains functions to handle left\right justifications for non-numeric types (strings\bools) + /// Contains functions to handle left/right justifications for non-numeric types (strings/bools) module Basic = - let inline leftJustify (f: 'T -> string) padChar = + let leftJustify (f: obj -> string) padChar = fun (w: int) v -> (f v).PadRight(w, padChar) - let inline rightJustify (f: 'T -> string) padChar = + let rightJustify (f: obj -> string) padChar = fun (w: int) v -> (f v).PadLeft(w, padChar) - /// contains functions to handle left\right and no justification case for numbers + let withPadding (spec: FormatSpecifier) f = + let padChar, _ = spec.GetPadAndPrefix false + Padding.withPadding spec f (leftJustify f padChar) (rightJustify f padChar) + + /// Contains functions to handle left/right and no justification case for numbers module GenericNumber = + + let isPositive (n: obj) = + match n with + | :? int8 as n -> n >= 0y + | :? uint8 -> true + | :? int16 as n -> n >= 0s + | :? uint16 -> true + | :? int32 as n -> n >= 0 + | :? uint32 -> true + | :? int64 as n -> n >= 0L + | :? uint64 -> true + | :? nativeint as n -> n >= 0n + | :? unativeint -> true + | :? single as n -> n >= 0.0f + | :? double as n -> n >= 0.0 + | :? decimal as n -> n >= 0.0M + | _ -> failwith "isPositive: unreachable" + /// handles right justification when pad char = '0' /// this case can be tricky: /// - negative numbers, -7 should be printed as '-007', not '00-7' /// - positive numbers when prefix for positives is set: 7 should be '+007', not '00+7' - let inline rightJustifyWithZeroAsPadChar (str: string) isNumber isPositive w (prefixForPositives: string) = + let rightJustifyWithZeroAsPadChar (str: string) isNumber isPositive w (prefixForPositives: string) = System.Diagnostics.Debug.Assert(prefixForPositives.Length = 0 || prefixForPositives.Length = 1) if isNumber then if isPositive then @@ -884,12 +688,12 @@ module internal PrintfImpl = str.PadLeft(w, ' ') /// handler right justification when pad char = ' ' - let inline rightJustifyWithSpaceAsPadChar (str: string) isNumber isPositive w (prefixForPositives: string) = + let rightJustifyWithSpaceAsPadChar (str: string) isNumber isPositive w (prefixForPositives: string) = System.Diagnostics.Debug.Assert(prefixForPositives.Length = 0 || prefixForPositives.Length = 1) (if isNumber && isPositive then prefixForPositives + str else str).PadLeft(w, ' ') /// handles left justification with formatting with 'G'\'g' - either for decimals or with 'g'\'G' is explicitly set - let inline leftJustifyWithGFormat (str: string) isNumber isInteger isPositive w (prefixForPositives: string) padChar = + let leftJustifyWithGFormat (str: string) isNumber isInteger isPositive w (prefixForPositives: string) padChar = if isNumber then let str = if isPositive then prefixForPositives + str else str // NOTE: difference - for 'g' format we use isInt check to detect situations when '5.0' is printed as '5' @@ -901,7 +705,7 @@ module internal PrintfImpl = else str.PadRight(w, ' ') // pad NaNs with ' ' - let inline leftJustifyWithNonGFormat (str: string) isNumber isPositive w (prefixForPositives: string) padChar = + let leftJustifyWithNonGFormat (str: string) isNumber isPositive w (prefixForPositives: string) padChar = if isNumber then let str = if isPositive then prefixForPositives + str else str str.PadRight(w, padChar) @@ -909,163 +713,217 @@ module internal PrintfImpl = str.PadRight(w, ' ') // pad NaNs with ' ' /// processes given string based depending on values isNumber\isPositive - let inline noJustificationCore (str: string) isNumber isPositive prefixForPositives = + let noJustificationCore (str: string) isNumber isPositive prefixForPositives = if isNumber && isPositive then prefixForPositives + str else str /// noJustification handler for f: 'T -> string - basic integer types - let inline noJustification f (prefix: string) isUnsigned = + let noJustification (f: obj -> string) (prefix: string) isUnsigned = if isUnsigned then - fun v -> noJustificationCore (f v) true true prefix + fun (v: obj) -> noJustificationCore (f v) true true prefix else - fun v -> noJustificationCore (f v) true (isPositive v) prefix + fun (v: obj) -> noJustificationCore (f v) true (isPositive v) prefix - /// noJustification handler for f: string -> 'T -> string - floating point types - let inline noJustificationWithFormat f (prefix: string) = - fun (fmt: string) v -> noJustificationCore (f fmt v) true (isPositive v) prefix - - /// leftJustify handler for f: 'T -> string - basic integer types - let inline leftJustify isGFormat f (prefix: string) padChar isUnsigned = + /// contains functions to handle left\right and no justification case for numbers + module Integer = + + let eliminateNative (v: obj) = + match v with + | :? nativeint as n -> + if IntPtr.Size = 4 then box (n.ToInt32()) + else box (n.ToInt64()) + | :? unativeint as n -> + if IntPtr.Size = 4 then box (uint32 (n.ToUInt32())) + else box (uint64 (n.ToUInt64())) + | _ -> v + + let rec toString (v: obj) = + match v with + | :? int32 as n -> n.ToString(CultureInfo.InvariantCulture) + | :? int64 as n -> n.ToString(CultureInfo.InvariantCulture) + | :? sbyte as n -> n.ToString(CultureInfo.InvariantCulture) + | :? byte as n -> n.ToString(CultureInfo.InvariantCulture) + | :? int16 as n -> n.ToString(CultureInfo.InvariantCulture) + | :? uint16 as n -> n.ToString(CultureInfo.InvariantCulture) + | :? uint32 as n -> n.ToString(CultureInfo.InvariantCulture) + | :? uint64 as n -> n.ToString(CultureInfo.InvariantCulture) + | :? nativeint | :? unativeint -> toString (eliminateNative v) + | _ -> failwith "toString: unreachable" + + let rec toFormattedString fmt (v: obj) = + match v with + | :? int32 as n -> n.ToString(fmt, CultureInfo.InvariantCulture) + | :? int64 as n -> n.ToString(fmt, CultureInfo.InvariantCulture) + | :? sbyte as n -> n.ToString(fmt, CultureInfo.InvariantCulture) + | :? byte as n -> n.ToString(fmt, CultureInfo.InvariantCulture) + | :? int16 as n -> n.ToString(fmt, CultureInfo.InvariantCulture) + | :? uint16 as n -> n.ToString(fmt, CultureInfo.InvariantCulture) + | :? uint32 as n -> n.ToString(fmt, CultureInfo.InvariantCulture) + | :? uint64 as n -> n.ToString(fmt, CultureInfo.InvariantCulture) + | :? nativeint | :? unativeint -> toFormattedString fmt (eliminateNative v) + | _ -> failwith "toFormattedString: unreachable" + + let rec toUnsigned (v: obj) = + match v with + | :? int32 as n -> box (uint32 n) + | :? int64 as n -> box (uint64 n) + | :? sbyte as n -> box (byte n) + | :? int16 as n -> box (uint16 n) + | :? nativeint | :? unativeint -> toUnsigned (eliminateNative v) + | _ -> v + + /// Left justification handler for f: 'T -> string - basic integer types + let leftJustify isGFormat (f: obj -> string) (prefix: string) padChar isUnsigned = if isUnsigned then if isGFormat then - fun (w: int) v -> - leftJustifyWithGFormat (f v) true (isInteger v) true w prefix padChar + fun (w: int) (v: obj) -> + GenericNumber.leftJustifyWithGFormat (f v) true true true w prefix padChar else - fun (w: int) v -> - leftJustifyWithNonGFormat (f v) true true w prefix padChar + fun (w: int) (v: obj) -> + GenericNumber.leftJustifyWithNonGFormat (f v) true true w prefix padChar else if isGFormat then - fun (w: int) v -> - leftJustifyWithGFormat (f v) true (isInteger v) (isPositive v) w prefix padChar + fun (w: int) (v: obj) -> + GenericNumber.leftJustifyWithGFormat (f v) true true (GenericNumber.isPositive v) w prefix padChar else - fun (w: int) v -> - leftJustifyWithNonGFormat (f v) true (isPositive v) w prefix padChar + fun (w: int) (v: obj) -> + GenericNumber.leftJustifyWithNonGFormat (f v) true (GenericNumber.isPositive v) w prefix padChar - /// leftJustify handler for f: string -> 'T -> string - floating point types - let inline leftJustifyWithFormat isGFormat f (prefix: string) padChar = - if isGFormat then - fun (fmt: string) (w: int) v -> - leftJustifyWithGFormat (f fmt v) true (isInteger v) (isPositive v) w prefix padChar - else - fun (fmt: string) (w: int) v -> - leftJustifyWithNonGFormat (f fmt v) true (isPositive v) w prefix padChar - - /// rightJustify handler for f: 'T -> string - basic integer types - let inline rightJustify f (prefixForPositives: string) padChar isUnsigned = + /// Right justification handler for f: 'T -> string - basic integer types + let rightJustify f (prefixForPositives: string) padChar isUnsigned = if isUnsigned then if padChar = '0' then - fun (w: int) v -> - rightJustifyWithZeroAsPadChar (f v) true true w prefixForPositives + fun (w: int) (v: obj) -> + GenericNumber.rightJustifyWithZeroAsPadChar (f v) true true w prefixForPositives else System.Diagnostics.Debug.Assert((padChar = ' ')) - fun (w: int) v -> - rightJustifyWithSpaceAsPadChar (f v) true true w prefixForPositives + fun (w: int) (v: obj) -> + GenericNumber.rightJustifyWithSpaceAsPadChar (f v) true true w prefixForPositives else if padChar = '0' then - fun (w: int) v -> - rightJustifyWithZeroAsPadChar (f v) true (isPositive v) w prefixForPositives + fun (w: int) (v: obj) -> + GenericNumber.rightJustifyWithZeroAsPadChar (f v) true (GenericNumber.isPositive v) w prefixForPositives else System.Diagnostics.Debug.Assert((padChar = ' ')) fun (w: int) v -> - rightJustifyWithSpaceAsPadChar (f v) true (isPositive v) w prefixForPositives - - /// rightJustify handler for f: string -> 'T -> string - floating point types - let inline rightJustifyWithFormat f (prefixForPositives: string) padChar = - if padChar = '0' then - fun (fmt: string) (w: int) v -> - rightJustifyWithZeroAsPadChar (f fmt v) true (isPositive v) w prefixForPositives - - else - System.Diagnostics.Debug.Assert((padChar = ' ')) - fun (fmt: string) (w: int) v -> - rightJustifyWithSpaceAsPadChar (f fmt v) true (isPositive v) w prefixForPositives - module Float = - let inline noJustification f (prefixForPositives: string) = - fun (fmt: string) v -> - GenericNumber.noJustificationCore (f fmt v) (isNumber v) (isPositive v) prefixForPositives + GenericNumber.rightJustifyWithSpaceAsPadChar (f v) true (GenericNumber.isPositive v) w prefixForPositives + + /// Computes a new function from 'f' that wraps the basic conversion given + /// by 'f' with padding for 0, spacing and justification, if the flags specify + /// it. If they don't, f is made into a value converter + let withPadding (spec: FormatSpecifier) isUnsigned (f: obj -> string) = + let allowZeroPadding = not (isLeftJustify spec.Flags) || spec.IsDecimalFormat + let padChar, prefix = spec.GetPadAndPrefix allowZeroPadding + Padding.withPadding spec + (GenericNumber.noJustification f prefix isUnsigned) + (leftJustify spec.IsGFormat f prefix padChar isUnsigned) + (rightJustify f prefix padChar isUnsigned) + + let getValueConverter (spec: FormatSpecifier) : ValueConverter = + let c = spec.TypeChar + if c = 'd' || c = 'i' then + withPadding spec false toString + elif c = 'u' then + withPadding spec true (toUnsigned >> toString) + elif c = 'x' then + withPadding spec true (toFormattedString "x") + elif c = 'X' then + withPadding spec true (toFormattedString "X") + elif c = 'o' then + withPadding spec true (fun (v: obj) -> + match toUnsigned v with + | :? uint64 as u -> Convert.ToString(int64 u, 8) + | u -> Convert.ToString(Convert.ToInt64 u, 8)) + else raise (ArgumentException()) + + module FloatAndDecimal = + + let rec toFormattedString fmt (v: obj) = + match v with + | :? single as n -> n.ToString(fmt, CultureInfo.InvariantCulture) + | :? double as n -> n.ToString(fmt, CultureInfo.InvariantCulture) + | :? decimal as n -> n.ToString(fmt, CultureInfo.InvariantCulture) + | _ -> failwith "toFormattedString: unreachable" + + let isNumber (x: obj) = + match x with + | :? single as x -> + not (Single.IsPositiveInfinity(x)) && + not (Single.IsNegativeInfinity(x)) && + not (Single.IsNaN(x)) + | :? double as x -> + not (Double.IsPositiveInfinity(x)) && + not (Double.IsNegativeInfinity(x)) && + not (Double.IsNaN(x)) + | :? decimal -> true + | _ -> failwith "isNumber: unreachable" + + let isInteger (n: obj) = + match n with + | :? single as n -> n % 1.0f = 0.0f + | :? double as n -> n % 1. = 0. + | :? decimal as n -> n % 1.0M = 0.0M + | _ -> failwith "isInteger: unreachable" + + let noJustification (prefixForPositives: string) = + fun (fmt: string) (v: obj) -> + GenericNumber.noJustificationCore (toFormattedString fmt v) (isNumber v) (GenericNumber.isPositive v) prefixForPositives - let inline leftJustify isGFormat f (prefix: string) padChar = + let leftJustify isGFormat (prefix: string) padChar = if isGFormat then - fun (fmt: string) (w: int) v -> - GenericNumber.leftJustifyWithGFormat (f fmt v) (isNumber v) (isInteger v) (isPositive v) w prefix padChar + fun (fmt: string) (w: int) (v: obj) -> + GenericNumber.leftJustifyWithGFormat (toFormattedString fmt v) (isNumber v) (isInteger v) (GenericNumber.isPositive v) w prefix padChar else - fun (fmt: string) (w: int) v -> - GenericNumber.leftJustifyWithNonGFormat (f fmt v) (isNumber v) (isPositive v) w prefix padChar + fun (fmt: string) (w: int) (v: obj) -> + GenericNumber.leftJustifyWithNonGFormat (toFormattedString fmt v) (isNumber v) (GenericNumber.isPositive v) w prefix padChar - let inline rightJustify f (prefixForPositives: string) padChar = + let rightJustify (prefixForPositives: string) padChar = if padChar = '0' then - fun (fmt: string) (w: int) v -> - GenericNumber.rightJustifyWithZeroAsPadChar (f fmt v) (isNumber v) (isPositive v) w prefixForPositives + fun (fmt: string) (w: int) (v: obj) -> + GenericNumber.rightJustifyWithZeroAsPadChar (toFormattedString fmt v) (isNumber v) (GenericNumber.isPositive v) w prefixForPositives else System.Diagnostics.Debug.Assert((padChar = ' ')) - fun (fmt: string) (w: int) v -> - GenericNumber.rightJustifyWithSpaceAsPadChar (f fmt v) (isNumber v) (isPositive v) w prefixForPositives - - let isDecimalFormatSpecifier (spec: FormatSpecifier) = - spec.TypeChar = 'M' - - let getPadAndPrefix allowZeroPadding (spec: FormatSpecifier) = - let padChar = if allowZeroPadding && isPadWithZeros spec.Flags then '0' else ' '; - let prefix = - if isPlusForPositives spec.Flags then "+" - elif isSpaceForPositives spec.Flags then " " - else "" - padChar, prefix - - let isGFormat(spec: FormatSpecifier) = - isDecimalFormatSpecifier spec || System.Char.ToLower(spec.TypeChar) = 'g' - - let inline basicWithPadding (spec: FormatSpecifier) f = - let padChar, _ = getPadAndPrefix false spec - Padding.withPadding spec f (Basic.leftJustify f padChar) (Basic.rightJustify f padChar) - - let inline numWithPadding (spec: FormatSpecifier) isUnsigned f = - let allowZeroPadding = not (isLeftJustify spec.Flags) || isDecimalFormatSpecifier spec - let padChar, prefix = getPadAndPrefix allowZeroPadding spec - let isGFormat = isGFormat spec - Padding.withPadding spec (GenericNumber.noJustification f prefix isUnsigned) (GenericNumber.leftJustify isGFormat f prefix padChar isUnsigned) (GenericNumber.rightJustify f prefix padChar isUnsigned) - - let inline decimalWithPadding (spec: FormatSpecifier) getFormat defaultFormat f = - let padChar, prefix = getPadAndPrefix true spec - let isGFormat = isGFormat spec - Padding.withPaddingFormatted spec getFormat defaultFormat (GenericNumber.noJustificationWithFormat f prefix) (GenericNumber.leftJustifyWithFormat isGFormat f prefix padChar) (GenericNumber.rightJustifyWithFormat f prefix padChar) - - let inline floatWithPadding (spec: FormatSpecifier) getFormat defaultFormat f = - let padChar, prefix = getPadAndPrefix true spec - let isGFormat = isGFormat spec - Padding.withPaddingFormatted spec getFormat defaultFormat (Float.noJustification f prefix) (Float.leftJustify isGFormat f prefix padChar) (Float.rightJustify f prefix padChar) - - let inline identity v = v - let inline toString v = (^T : (member ToString: IFormatProvider -> string)(v, invariantCulture)) - let inline toFormattedString fmt = fun (v: ^T) -> (^T: (member ToString: string * IFormatProvider -> string)(v, fmt, invariantCulture)) - - let inline numberToString c spec alt unsignedConv = - if c = 'd' || c = 'i' then - numWithPadding spec false (alt >> toString: ^T -> string) - elif c = 'u' then - numWithPadding spec true (alt >> unsignedConv >> toString: ^T -> string) - elif c = 'x' then - numWithPadding spec true (alt >> toFormattedString "x": ^T -> string) - elif c = 'X' then - numWithPadding spec true (alt >> toFormattedString "X": ^T -> string ) - elif c = 'o' then - numWithPadding spec true (fun (v: ^T) -> Convert.ToString(int64(unsignedConv (alt v)), 8)) - else raise (ArgumentException()) - + fun (fmt: string) (w: int) (v: obj) -> + GenericNumber.rightJustifyWithSpaceAsPadChar (toFormattedString fmt v) (isNumber v) (GenericNumber.isPositive v) w prefixForPositives + + let withPadding (spec: FormatSpecifier) getFormat defaultFormat = + let padChar, prefix = spec.GetPadAndPrefix true + Padding.withPaddingFormatted spec getFormat defaultFormat + (noJustification prefix) + (leftJustify spec.IsGFormat prefix padChar) + (rightJustify prefix padChar) + type ObjectPrinter = - static member ObjectToString<'T>(spec: FormatSpecifier) = - basicWithPadding spec (fun (v: 'T) -> match box v with null -> "" | x -> x.ToString()) + + static member ObjectToString(spec: FormatSpecifier) : ValueConverter = + Basic.withPadding spec (fun (v: obj) -> + match v with + | null -> "" + | x -> x.ToString()) + + /// Convert an interpoland to a string + static member InterpolandToString(spec: FormatSpecifier) : ValueConverter = + let fmt = + match spec.InteropHoleDotNetFormat with + | ValueNone -> null + | ValueSome fmt -> "{0:" + fmt + "}" + Basic.withPadding spec (fun (vobj: obj) -> + match vobj with + | null -> "" + | x -> + match fmt with + | null -> x.ToString() + | fmt -> String.Format(fmt, x)) static member GenericToStringCore(v: 'T, opts: Microsoft.FSharp.Text.StructuredPrintfImpl.FormatOptions, bindingFlags) = - // printfn %0A is considered to mean 'print width zero' - match box v with - | null -> - Microsoft.FSharp.Text.StructuredPrintfImpl.Display.anyToStringForPrintf opts bindingFlags (v, typeof<'T>) - | _ -> - Microsoft.FSharp.Text.StructuredPrintfImpl.Display.anyToStringForPrintf opts bindingFlags (v, v.GetType()) - - static member GenericToString<'T>(spec: FormatSpecifier) = + let vty = + match box v with + | null -> typeof<'T> + | _ -> v.GetType() + Microsoft.FSharp.Text.StructuredPrintfImpl.Display.anyToStringForPrintf opts bindingFlags (v, vty) + + static member GenericToString<'T>(spec: FormatSpecifier) : ValueConverter = let bindingFlags = if isPlusForPositives spec.Flags then BindingFlags.Public ||| BindingFlags.NonPublic else BindingFlags.Public @@ -1079,100 +937,70 @@ module internal PrintfImpl = else o if spec.IsPrecisionSpecified then { o with PrintSize = spec.Precision} else o + match spec.IsStarWidth, spec.IsStarPrecision with | true, true -> - box (fun (v: 'T) (width: int) (prec: int) -> + ValueConverter.Make (fun (vobj: obj) (width: int) (prec: int) -> + let v = unbox<'T> vobj let opts = { opts with PrintSize = prec } let opts = if not useZeroWidth then { opts with PrintWidth = width} else opts ObjectPrinter.GenericToStringCore(v, opts, bindingFlags) ) + | true, false -> - box (fun (v: 'T) (width: int) -> + ValueConverter.Make (fun (vobj: obj) (width: int) -> + let v = unbox<'T> vobj let opts = if not useZeroWidth then { opts with PrintWidth = width} else opts - ObjectPrinter.GenericToStringCore(v, opts, bindingFlags) - ) + ObjectPrinter.GenericToStringCore(v, opts, bindingFlags)) + | false, true -> - box (fun (v: 'T) (prec: int) -> + ValueConverter.Make (fun (vobj: obj) (prec: int) -> + let v = unbox<'T> vobj let opts = { opts with PrintSize = prec } - ObjectPrinter.GenericToStringCore(v, opts, bindingFlags) - ) - | false, false -> - box (fun (v: 'T) -> - ObjectPrinter.GenericToStringCore(v, opts, bindingFlags) - ) - - let basicNumberToString (ty: Type) (spec: FormatSpecifier) = - System.Diagnostics.Debug.Assert(not spec.IsPrecisionSpecified, "not spec.IsPrecisionSpecified") - - let ch = spec.TypeChar - - match Type.GetTypeCode ty with - | TypeCode.Int32 -> numberToString ch spec identity (uint32: int -> uint32) - | TypeCode.Int64 -> numberToString ch spec identity (uint64: int64 -> uint64) - | TypeCode.Byte -> numberToString ch spec identity (byte: byte -> byte) - | TypeCode.SByte -> numberToString ch spec identity (byte: sbyte -> byte) - | TypeCode.Int16 -> numberToString ch spec identity (uint16: int16 -> uint16) - | TypeCode.UInt16 -> numberToString ch spec identity (uint16: uint16 -> uint16) - | TypeCode.UInt32 -> numberToString ch spec identity (uint32: uint32 -> uint32) - | TypeCode.UInt64 -> numberToString ch spec identity (uint64: uint64 -> uint64) - | _ -> - if ty === typeof then - if IntPtr.Size = 4 then - numberToString ch spec (fun (v: IntPtr) -> v.ToInt32()) uint32 - else - numberToString ch spec (fun (v: IntPtr) -> v.ToInt64()) uint64 - elif ty === typeof then - if IntPtr.Size = 4 then - numberToString ch spec (fun (v: UIntPtr) -> v.ToUInt32()) uint32 - else - numberToString ch spec (fun (v: UIntPtr) -> v.ToUInt64()) uint64 - - else raise (ArgumentException(ty.Name + " not a basic integer type")) + ObjectPrinter.GenericToStringCore(v, opts, bindingFlags) ) - let basicFloatToString ty spec = + | false, false -> + ValueConverter.Make (fun (vobj: obj) -> + let v = unbox<'T> vobj + ObjectPrinter.GenericToStringCore(v, opts, bindingFlags)) + + let basicFloatToString spec = let defaultFormat = getFormatForFloat spec.TypeChar DefaultPrecision - match Type.GetTypeCode ty with - | TypeCode.Single -> floatWithPadding spec (getFormatForFloat spec.TypeChar) defaultFormat (fun fmt (v: float32) -> toFormattedString fmt v) - | TypeCode.Double -> floatWithPadding spec (getFormatForFloat spec.TypeChar) defaultFormat (fun fmt (v: float) -> toFormattedString fmt v) - | TypeCode.Decimal -> decimalWithPadding spec (getFormatForFloat spec.TypeChar) defaultFormat (fun fmt (v: decimal) -> toFormattedString fmt v) - | _ -> raise (ArgumentException(ty.Name + " not a basic floating point type")) + FloatAndDecimal.withPadding spec (getFormatForFloat spec.TypeChar) defaultFormat let private NonPublicStatics = BindingFlags.NonPublic ||| BindingFlags.Static - let private getValueConverter (ty: Type) (spec: FormatSpecifier) : obj = + let mi_GenericToString = typeof.GetMethod("GenericToString", NonPublicStatics) + + let private getValueConverter (ty: Type) (spec: FormatSpecifier) : ValueConverter = match spec.TypeChar with | 'b' -> - System.Diagnostics.Debug.Assert(ty === typeof, "ty === typeof") - basicWithPadding spec boolToString + Basic.withPadding spec (unbox >> boolToString) | 's' -> - System.Diagnostics.Debug.Assert(ty === typeof, "ty === typeof") - basicWithPadding spec stringToSafeString + Basic.withPadding spec (unbox >> stringToSafeString) | 'c' -> - System.Diagnostics.Debug.Assert(ty === typeof, "ty === typeof") - basicWithPadding spec (fun (c: char) -> c.ToString()) + Basic.withPadding spec (fun (c: obj) -> (unbox c).ToString()) | 'M' -> - System.Diagnostics.Debug.Assert(ty === typeof, "ty === typeof") - decimalWithPadding spec (fun _ -> "G") "G" (fun fmt (v: decimal) -> toFormattedString fmt v) // %M ignores precision + FloatAndDecimal.withPadding spec (fun _ -> "G") "G" // %M ignores precision | 'd' | 'i' | 'x' | 'X' | 'u' | 'o'-> - basicNumberToString ty spec + Integer.getValueConverter spec | 'e' | 'E' | 'f' | 'F' | 'g' | 'G' -> - basicFloatToString ty spec + basicFloatToString spec | 'A' -> - let mi = typeof.GetMethod("GenericToString", NonPublicStatics) - let mi = mi.MakeGenericMethod ty - mi.Invoke(null, [| box spec |]) + let mi = mi_GenericToString.MakeGenericMethod ty + mi.Invoke(null, [| box spec |]) |> unbox | 'O' -> - let mi = typeof.GetMethod("ObjectToString", NonPublicStatics) - let mi = mi.MakeGenericMethod ty - mi.Invoke(null, [| box spec |]) + ObjectPrinter.ObjectToString(spec) + | 'P' -> + ObjectPrinter.InterpolandToString(spec) | _ -> raise (ArgumentException(SR.GetString(SR.printfBadFormatSpecifier))) let extractCurriedArguments (ty: Type) n = System.Diagnostics.Debug.Assert(n = 1 || n = 2 || n = 3, "n = 1 || n = 2 || n = 3") - let buf = Array.zeroCreate (n + 1) + let buf = Array.zeroCreate n let rec go (ty: Type) i = if i < n then match ty.GetGenericArguments() with @@ -1182,470 +1010,440 @@ module internal PrintfImpl = | _ -> failwith (String.Format("Expected function with {0} arguments", n)) else System.Diagnostics.Debug.Assert((i = n), "i = n") - buf.[i] <- ty - buf + (buf, ty) go ty 0 - - type private PrintfBuilderStack() = - let args = Stack 10 - let types = Stack 5 - - let stackToArray size start count (s: Stack<_>) = - let arr = Array.zeroCreate size - for i = 0 to count - 1 do - arr.[start + i] <- s.Pop() - arr - - member __.GetArgumentAndTypesAsArrays - ( - argsArraySize, argsArrayStartPos, argsArrayTotalCount, - typesArraySize, typesArrayStartPos, typesArrayTotalCount - ) = - let argsArray = stackToArray argsArraySize argsArrayStartPos argsArrayTotalCount args - let typesArray = stackToArray typesArraySize typesArrayStartPos typesArrayTotalCount types - argsArray, typesArray - - member __.PopContinuationWithType() = - System.Diagnostics.Debug.Assert(args.Count = 1, "args.Count = 1") - System.Diagnostics.Debug.Assert(types.Count = 1, "types.Count = 1") - - let cont = args.Pop() - let contTy = types.Pop() - - cont, contTy - member __.PopValueUnsafe() = args.Pop() - member this.PushContinuationWithType (cont: obj, contTy: Type) = - System.Diagnostics.Debug.Assert(this.IsEmpty, "this.IsEmpty") - System.Diagnostics.Debug.Assert( - ( - let _arg, retTy = Microsoft.FSharp.Reflection.FSharpType.GetFunctionElements(cont.GetType()) - contTy.IsAssignableFrom retTy - ), - "incorrect type" - ) - - this.PushArgumentWithType(cont, contTy) + type LargeStringPrintfEnv<'Result>(continuation, blockSize) = + inherit PrintfEnv(()) + let buf: string[] = Array.zeroCreate blockSize + let mutable ptr = 0 - member __.PushArgument(value: obj) = - args.Push value + override _.Finish() : 'Result = continuation (String.Concat buf) - member __.PushArgumentWithType(value: obj, ty) = - args.Push value - types.Push ty + override _.Write(s: string) = + buf.[ptr] <- s + ptr <- ptr + 1 - member __.HasContinuationOnStack expectedNumberOfArguments = - types.Count = expectedNumberOfArguments + 1 + override x.WriteT s = x.Write(s) - member __.IsEmpty = - System.Diagnostics.Debug.Assert(args.Count = types.Count, "args.Count = types.Count") - args.Count = 0 + type SmallStringPrintfEnv2() = + inherit PrintfEnv(()) + let mutable c = null - /// Parses format string and creates result printer function. - /// First it recursively consumes format string up to the end, then during unwinding builds printer using PrintfBuilderStack as storage for arguments. - /// idea of implementation is very simple: every step can either push argument to the stack (if current block of 5 format specifiers is not yet filled) - // or grab the content of stack, build intermediate printer and push it back to stack (so it can later be consumed by as argument) - type private PrintfBuilder<'S, 'Re, 'Res>() = + override _.Finish() : string = if isNull c then "" else c + override _.Write(s: string) = if isNull c then c <- s else c <- c + s + override x.WriteT s = x.Write(s) + + type SmallStringPrintfEnv4() = + inherit PrintfEnv(()) + let mutable s1 : string = null + let mutable s2 : string = null + let mutable s3 : string = null + let mutable s4 : string = null + + override _.Finish() : string = String.Concat(s1, s2, s3, s4) + override _.Write(s: string) = + if isNull s1 then s1 <- s + elif isNull s2 then s2 <- s + elif isNull s3 then s3 <- s + else s4 <- s + override x.WriteT s = x.Write(s) + + let StringPrintfEnv blockSize = + if blockSize <= 2 then + SmallStringPrintfEnv2() :> PrintfEnv<_,_,_> + elif blockSize <= 4 then + SmallStringPrintfEnv4() :> PrintfEnv<_,_,_> + else + LargeStringPrintfEnv(id, blockSize) :> PrintfEnv<_,_,_> + + let StringBuilderPrintfEnv<'Result>(k, buf) = + { new PrintfEnv(buf) with + override _.Finish() : 'Result = k () + override _.Write(s: string) = ignore(buf.Append s) + override _.WriteT(()) = () } + + let TextWriterPrintfEnv<'Result>(k, tw: IO.TextWriter) = + { new PrintfEnv(tw) with + override _.Finish() : 'Result = k() + override _.Write(s: string) = tw.Write s + override _.WriteT(()) = () } + + let MAX_CAPTURE = 3 + + /// Parses format string and creates resulting step list and printer factory function. + [] + type FormatParser<'Printer, 'State, 'Residue, 'Result>(fmt: string) = - let mutable count = 0 - let mutable optimizedArgCount = 0 -#if DEBUG - let verifyMethodInfoWasTaken (mi: System.Reflection.MemberInfo) = - if isNull mi then - ignore (System.Diagnostics.Debugger.Launch()) -#endif - - let buildSpecialChained(spec: FormatSpecifier, argTys: Type[], prefix: string, tail: obj, retTy) = + let buildCaptureFunc (spec: FormatSpecifier, allSteps, argTys: Type[], retTy, nextInfo) = + let (next:obj, nextCanCombine: bool, nextArgTys: Type[], nextRetTy, nextNextOpt) = nextInfo + assert (argTys.Length > 0) + + // See if we can compress a capture to a multi-capture + // CaptureN + Final --> CaptureFinalN + // Capture1 + Capture1 --> Capture2 + // Capture1 + Capture2 --> Capture3 + // Capture2 + Capture1 --> Capture3 + match argTys.Length, nextArgTys.Length with + | _ when spec.TypeChar = 'a' -> + // %a has an existential type which must be converted to obj + assert (argTys.Length = 2) + let captureMethName = "CaptureLittleA" + let mi = typeof>.GetMethod(captureMethName, NonPublicStatics) + let mi = mi.MakeGenericMethod([| argTys.[1]; retTy |]) + let factoryObj = mi.Invoke(null, [| next |]) + factoryObj, false, argTys, retTy, None + + | n1, n2 when nextCanCombine && n1 + n2 <= MAX_CAPTURE -> + // 'next' is thrown away on this path and replaced by a combined Capture + let captureCount = n1 + n2 + let combinedArgTys = Array.append argTys nextArgTys + match nextNextOpt with + | None -> + let captureMethName = "CaptureFinal" + string captureCount + let mi = typeof>.GetMethod(captureMethName, NonPublicStatics) + let mi = mi.MakeGenericMethod(combinedArgTys) + let factoryObj = mi.Invoke(null, [| allSteps |]) + factoryObj, true, combinedArgTys, nextRetTy, None + | Some nextNext -> + let captureMethName = "Capture" + string captureCount + let mi = typeof>.GetMethod(captureMethName, NonPublicStatics) + let mi = mi.MakeGenericMethod(Array.append combinedArgTys [| nextRetTy |]) + let factoryObj = mi.Invoke(null, [| nextNext |]) + factoryObj, true, combinedArgTys, nextRetTy, nextNextOpt + + | captureCount, _ -> + let captureMethName = "Capture" + string captureCount + let mi = typeof>.GetMethod(captureMethName, NonPublicStatics) + let mi = mi.MakeGenericMethod(Array.append argTys [| retTy |]) + let factoryObj = mi.Invoke(null, [| next |]) + factoryObj, true, argTys, retTy, Some next + + let buildStep (spec: FormatSpecifier) (argTys: Type[]) prefix = if spec.TypeChar = 'a' then - let mi = typeof>.GetMethod("LittleAChained", NonPublicStatics) -#if DEBUG - verifyMethodInfoWasTaken mi -#endif - - let mi = mi.MakeGenericMethod([| argTys.[1]; retTy |]) - let args = [| box prefix; tail |] - mi.Invoke(null, args) + StepLittleA prefix elif spec.TypeChar = 't' then - let mi = typeof>.GetMethod("TChained", NonPublicStatics) -#if DEBUG - verifyMethodInfoWasTaken mi -#endif - let mi = mi.MakeGenericMethod([| retTy |]) - let args = [| box prefix; tail |] - mi.Invoke(null, args) - else - System.Diagnostics.Debug.Assert(spec.IsStarPrecision || spec.IsStarWidth, "spec.IsStarPrecision || spec.IsStarWidth ") - - let mi = - let n = if spec.IsStarWidth = spec.IsStarPrecision then 2 else 1 - let prefix = if spec.TypeChar = '%' then "PercentStarChained" else "StarChained" - let name = prefix + (string n) - typeof>.GetMethod(name, NonPublicStatics) -#if DEBUG - verifyMethodInfoWasTaken mi -#endif - let argTypes, args = - if spec.TypeChar = '%' then - [| retTy |], [| box prefix; tail |] + StepLittleT prefix + elif spec.IsStarPrecision || spec.IsStarWidth then + let isTwoStar = (spec.IsStarWidth = spec.IsStarPrecision) + match isTwoStar, spec.TypeChar with + | false, '%' -> StepPercentStar1 prefix + | true, '%' -> StepPercentStar2 prefix + | _ -> + // For curried interpolated string format processing, the static types of the '%A' arguments + // are provided via the argument typed extracted from the curried function. They are known on first phase. + let argTy = match argTys with null -> typeof | _ -> argTys.[argTys.Length - 1] + let conv = getValueConverter argTy spec + if isTwoStar then + let convFunc = conv.FuncObj :?> (obj -> int -> int -> string) + StepStar2 (prefix, convFunc) else - let argTy = argTys.[argTys.Length - 2] - let conv = getValueConverter argTy spec - [| argTy; retTy |], [| box prefix; box conv; tail |] - - let mi = mi.MakeGenericMethod argTypes - mi.Invoke(null, args) - - let buildSpecialFinal(spec: FormatSpecifier, argTys: Type[], prefix: string, suffix: string) = - if spec.TypeChar = 'a' then - let mi = typeof>.GetMethod("LittleAFinal", NonPublicStatics) -#if DEBUG - verifyMethodInfoWasTaken mi -#endif - let mi = mi.MakeGenericMethod(argTys.[1] : Type) - let args = [| box prefix; box suffix |] - mi.Invoke(null, args) - elif spec.TypeChar = 't' then - let mi = typeof>.GetMethod("TFinal", NonPublicStatics) -#if DEBUG - verifyMethodInfoWasTaken mi -#endif - let args = [| box prefix; box suffix |] - mi.Invoke(null, args) + let convFunc = conv.FuncObj :?> (obj -> int -> string) + StepStar1 (prefix, convFunc) else - System.Diagnostics.Debug.Assert(spec.IsStarPrecision || spec.IsStarWidth, "spec.IsStarPrecision || spec.IsStarWidth ") - - let mi = - let n = if spec.IsStarWidth = spec.IsStarPrecision then 2 else 1 - let prefix = if spec.TypeChar = '%' then "PercentStarFinal" else "StarFinal" - let name = prefix + (string n) - typeof>.GetMethod(name, NonPublicStatics) -#if DEBUG - verifyMethodInfoWasTaken mi -#endif - - let mi, args = - if spec.TypeChar = '%' then - mi, [| box prefix; box suffix |] - else - let argTy = argTys.[argTys.Length - 2] - let mi = mi.MakeGenericMethod argTy - let conv = getValueConverter argTy spec - mi, [| box prefix; box conv; box suffix |] - - mi.Invoke(null, args) - - let buildPlainFinal(args: obj[], argTypes: Type[]) = - let argsCount = args.Length - let methodName,args = - if argsCount > 0 && args.[0].ToString() = "" then - if argsCount > 1 && args.[argsCount - 1].ToString() = "" then - let args = Array.sub args 1 (argsCount - 2) - optimizedArgCount <- optimizedArgCount + 2 - "FinalFast", args - else - optimizedArgCount <- optimizedArgCount + 1 - "FinalFastStart", args |> Array.skip 1 - elif argsCount > 0 && args.[argsCount - 1].ToString() = "" then - let args = Array.sub args 0 (argsCount - 1) - optimizedArgCount <- optimizedArgCount + 1 - "FinalFastEnd", args - else - "Final",args - - let mi = typeof>.GetMethod(methodName + argTypes.Length.ToString(), NonPublicStatics) -#if DEBUG - verifyMethodInfoWasTaken mi -#endif - let mi = mi.MakeGenericMethod argTypes - mi.Invoke(null, args) - - let buildPlainChained(args: obj[], argTypes: Type[]) = - let argsCount = args.Length - let methodName,args = - if argsCount > 0 && args.[0].ToString() = "" then - optimizedArgCount <- optimizedArgCount + 1 - "ChainedFastStart", args |> Array.skip 1 - else - "Chained", args - - let mi = typeof>.GetMethod(methodName + (argTypes.Length - 1).ToString(), NonPublicStatics) -#if DEBUG - verifyMethodInfoWasTaken mi -#endif - let mi = mi.MakeGenericMethod argTypes - mi.Invoke(null, args) - - let builderStack = PrintfBuilderStack() - - let ContinuationOnStack = -1 - - let buildPlain numberOfArgs prefix = - let n = numberOfArgs * 2 - let hasCont = builderStack.HasContinuationOnStack numberOfArgs - - let extra = if hasCont then 1 else 0 - let plainArgs, plainTypes = - builderStack.GetArgumentAndTypesAsArrays(n + 1, 1, n, (numberOfArgs + extra), 0, numberOfArgs) - - plainArgs.[0] <- box prefix - - if hasCont then - let cont, contTy = builderStack.PopContinuationWithType() - plainArgs.[plainArgs.Length - 1] <- cont - plainTypes.[plainTypes.Length - 1] <- contTy - - buildPlainChained(plainArgs, plainTypes) + // For interpolated string format processing, the static types of the '%A' arguments + // are provided via CaptureTypes and are only known on second phase. + match argTys with + | null when spec.TypeChar = 'A' -> + let convFunc arg argTy = + let mi = mi_GenericToString.MakeGenericMethod [| argTy |] + let f = mi.Invoke(null, [| box spec |]) :?> ValueConverter + let f2 = f.FuncObj :?> (obj -> string) + f2 arg + + StepWithTypedArg (prefix, convFunc) + + | _ -> + // For curried interpolated string format processing, the static types of the '%A' arguments + // are provided via the argument typed extracted from the curried function. They are known on first phase. + let argTy = match argTys with null -> typeof | _ -> argTys.[0] + let conv = getValueConverter argTy spec + let convFunc = conv.FuncObj :?> (obj -> string) + StepWithArg (prefix, convFunc) + + let parseSpec (i: byref) = + i <- i + 1 + let flags = FormatString.parseFlags fmt &i + let width = FormatString.parseWidth fmt &i + let precision = FormatString.parsePrecision fmt &i + let typeChar = FormatString.parseTypeChar fmt &i + let interpHoleDotnetFormat = FormatString.parseInterpolatedHoleDotNetFormat typeChar fmt &i + + // Skip %P insertion points added after %d{...} etc. in interpolated strings + FormatString.skipInterpolationHole typeChar fmt &i + + let spec = + { TypeChar = typeChar + Precision = precision + Flags = flags + Width = width + InteropHoleDotNetFormat = interpHoleDotnetFormat } + spec + + // The steps, populated on-demand. This is for the case where the string is being used + // with interpolands captured in the Format object, including the %A capture types. + // + // We may initialize this twice, but the assignment is atomic and the computation will give functionally + // identical results each time, so it is ok. + let mutable stepsForCapturedFormat = Unchecked.defaultof<_> + + // The function factory, populated on-demand, for the case where the string is being used to make a curried function for printf. + // + // We may initialize this twice, but the assignment is atomic and the computation will give functionally + // identical results each time, so it is ok. + let mutable factory = Unchecked.defaultof> + let mutable printer = Unchecked.defaultof<'Printer> + + // The function factory, populated on-demand. + // + // We may initialize this twice, but the assignment is atomic and the computation will give functionally + // identical results each time, so it is ok. + let mutable stringCount = 0 + + // A simplified parser. For the case where the string is being used with interpolands captured in the Format object. + let rec parseAndCreateStepsForCapturedFormatAux steps (prefix: string) (i: byref) = + if i >= fmt.Length then + let step = StepString(prefix) + let allSteps = revToArray 1 steps + allSteps.[allSteps.Length-1] <- step + stringCount <- Step.BlockCount allSteps + stepsForCapturedFormat <- allSteps else - buildPlainFinal(plainArgs, plainTypes) - - let rec parseFromFormatSpecifier (prefix: string) (s: string) (funcTy: Type) i: int = + let spec = parseSpec &i + let suffix = FormatString.findNextFormatSpecifier fmt &i + let step = buildStep spec null prefix + parseAndCreateStepsForCapturedFormatAux (step::steps) suffix &i + + let parseAndCreateStepsForCapturedFormat () = + let mutable i = 0 + let prefix = FormatString.findNextFormatSpecifier fmt &i + parseAndCreateStepsForCapturedFormatAux [] prefix &i + + /// The more advanced parser which both builds the steps (with %A types extracted from the funcTy), + /// and produces a curried function value of the right type guided by funcTy + let rec parseAndCreateFuncFactoryAux steps (prefix: string) (funcTy: Type) (i: byref) = - if i >= s.Length then 0 + if i >= fmt.Length then + let step = StepString(prefix) + let allSteps = revToArray 1 steps + allSteps.[allSteps.Length-1] <- step + let last = Specializations<'State, 'Residue, 'Result>.Final0(allSteps) + stringCount <- Step.BlockCount allSteps + let nextInfo = (box last, true, [| |], funcTy, None) + (allSteps, nextInfo) else + assert (fmt.[i] = '%') + let spec = parseSpec &i + let suffix = FormatString.findNextFormatSpecifier fmt &i + let n = spec.ArgCount + let (argTys, retTy) = extractCurriedArguments funcTy n + let step = buildStep spec argTys prefix + let (allSteps, nextInfo) = parseAndCreateFuncFactoryAux (step::steps) suffix retTy &i + let nextInfoNew = buildCaptureFunc (spec, allSteps, argTys, retTy, nextInfo) + (allSteps, nextInfoNew) + + let parseAndCreateFunctionFactory () = + let funcTy = typeof<'Printer> + + // Find the first format specifier + let mutable i = 0 + let prefix = FormatString.findNextFormatSpecifier fmt &i - System.Diagnostics.Debug.Assert(s.[i] = '%', "s.[i] = '%'") - count <- count + 1 - - let flags, i = FormatString.parseFlags s (i + 1) - let width, i = FormatString.parseWidth s i - let precision, i = FormatString.parsePrecision s i - let typeChar, i = FormatString.parseTypeChar s i - let spec = { TypeChar = typeChar; Precision = precision; Flags = flags; Width = width} + let (allSteps, (factoryObj, _, combinedArgTys, _, _)) = parseAndCreateFuncFactoryAux [] prefix funcTy &i - let next, suffix = FormatString.findNextFormatSpecifier s i - - let argTys = - let n = - if spec.TypeChar = 'a' then 2 - elif spec.IsStarWidth || spec.IsStarPrecision then - if spec.IsStarWidth = spec.IsStarPrecision then 3 - else 2 - else 1 - - let n = if spec.TypeChar = '%' then n - 1 else n - - System.Diagnostics.Debug.Assert(n <> 0, "n <> 0") - - extractCurriedArguments funcTy n - - let retTy = argTys.[argTys.Length - 1] - - let numberOfArgs = parseFromFormatSpecifier suffix s retTy next - - if spec.TypeChar = 'a' || spec.TypeChar = 't' || spec.IsStarWidth || spec.IsStarPrecision then - if numberOfArgs = ContinuationOnStack then - - let cont, contTy = builderStack.PopContinuationWithType() - let currentCont = buildSpecialChained(spec, argTys, prefix, cont, contTy) - builderStack.PushContinuationWithType(currentCont, funcTy) - - ContinuationOnStack - else - if numberOfArgs = 0 then - System.Diagnostics.Debug.Assert(builderStack.IsEmpty, "builderStack.IsEmpty") - - let currentCont = buildSpecialFinal(spec, argTys, prefix, suffix) - builderStack.PushContinuationWithType(currentCont, funcTy) - ContinuationOnStack - else - let hasCont = builderStack.HasContinuationOnStack numberOfArgs - - let expectedNumberOfItemsOnStack = numberOfArgs * 2 - let sizeOfTypesArray = - if hasCont then numberOfArgs + 1 - else numberOfArgs - - let plainArgs, plainTypes = - builderStack.GetArgumentAndTypesAsArrays(expectedNumberOfItemsOnStack + 1, 1, expectedNumberOfItemsOnStack, sizeOfTypesArray, 0, numberOfArgs ) - - plainArgs.[0] <- box suffix - - let next = - if hasCont then - let nextCont, nextContTy = builderStack.PopContinuationWithType() - plainArgs.[plainArgs.Length - 1] <- nextCont - plainTypes.[plainTypes.Length - 1] <- nextContTy - buildPlainChained(plainArgs, plainTypes) - else - buildPlainFinal(plainArgs, plainTypes) - - let next = buildSpecialChained(spec, argTys, prefix, next, retTy) - builderStack.PushContinuationWithType(next, funcTy) - - ContinuationOnStack - else - if numberOfArgs = ContinuationOnStack then - let idx = argTys.Length - 2 - builderStack.PushArgument suffix - builderStack.PushArgumentWithType((getValueConverter argTys.[idx] spec), argTys.[idx]) - 1 - else - builderStack.PushArgument suffix - builderStack.PushArgumentWithType((getValueConverter argTys.[0] spec), argTys.[0]) - - if numberOfArgs = MaxArgumentsInSpecialization - 1 then - let cont = buildPlain (numberOfArgs + 1) prefix - builderStack.PushContinuationWithType(cont, funcTy) - ContinuationOnStack - else - numberOfArgs + 1 - - let parseFormatString (s: string) (funcTy: System.Type) : obj = - optimizedArgCount <- 0 - let prefixPos, prefix = FormatString.findNextFormatSpecifier s 0 - if prefixPos = s.Length then - box (fun (env: unit -> PrintfEnv<'S, 'Re, 'Res>) -> - let env = env() - env.Write prefix + // If there are no format specifiers then take a simple path + match allSteps with + | [| StepString prefix |] -> + PrintfFuncFactory<_, 'State, 'Residue, 'Result>(fun _args initial -> + let env = initial() + env.WriteSkipEmpty prefix env.Finish() - ) - else - let n = parseFromFormatSpecifier prefix s funcTy prefixPos - - if n = ContinuationOnStack || n = 0 then - builderStack.PopValueUnsafe() - else - buildPlain n prefix - - member __.Build<'T>(s: string) : PrintfFactory<'S, 'Re, 'Res, 'T> * int = - parseFormatString s typeof<'T> :?> _, (2 * count + 1) - optimizedArgCount // second component is used in SprintfEnv as value for internal buffer - - /// Type of element that is stored in cache - /// Pair: factory for the printer + number of text blocks that printer will produce (used to preallocate buffers) - type CachedItem<'T, 'State, 'Residue, 'Result> = PrintfFactory<'State, 'Residue, 'Result, 'T> * int - - /// 2-level cache. - /// 1st-level stores last value that was consumed by the current thread in thread-static field thus providing shortcuts for scenarios when - /// printf is called in tight loop - /// 2nd level is global dictionary that maps format string to the corresponding PrintfFactory - type Cache<'T, 'State, 'Residue, 'Result>() = - static let generate fmt = PrintfBuilder<'State, 'Residue, 'Result>().Build<'T>(fmt) - static let mutable map = System.Collections.Concurrent.ConcurrentDictionary>() - static let getOrAddFunc = Func<_, _>(generate) - static let get (key: string) = map.GetOrAdd(key, getOrAddFunc) - - [] - [] - static val mutable private last: string * CachedItem<'T, 'State, 'Residue, 'Result> + ) |> box + + // If there is one simple format specifier then we can create an even better factory function + | [| StepWithArg (prefix1, conv1); StepString prefix2 |] -> + let captureMethName = "OneStepWithArg" + let mi = typeof>.GetMethod(captureMethName, NonPublicStatics) + let mi = mi.MakeGenericMethod(combinedArgTys) + let factoryObj = mi.Invoke(null, [| box prefix1; box conv1; box prefix2 |]) + factoryObj + + // If there are two simple format specifiers then we can create an even better factory function + | [| StepWithArg (prefix1, conv1); StepWithArg (prefix2, conv2); StepString prefix3 |] -> + let captureMethName = "TwoStepWithArg" + let mi = typeof>.GetMethod(captureMethName, NonPublicStatics) + let mi = mi.MakeGenericMethod(combinedArgTys) + let factoryObj = mi.Invoke(null, [| box prefix1; box conv1; box prefix2; box conv2; box prefix3 |]) + factoryObj + + | _ -> + factoryObj + + /// The format string, used to help identify the cache entry (the cache index types are taken + /// into account as well). + member _.FormatString = fmt + + /// The steps involved in executing the format string when interpolands are captured + /// + /// If %A patterns are involved these steps are only accurate when the %A capture types + /// are given in the format string through interpolation capture. + member _.GetStepsForCapturedFormat() = + match stepsForCapturedFormat with + | null -> parseAndCreateStepsForCapturedFormat () + | _ -> () + stepsForCapturedFormat + + /// The number of strings produced for a sprintf + member _.BlockCount = stringCount + + /// The factory function used to generate the result or the resulting function. + member _.GetCurriedPrinterFactory() = + match box factory with + | null -> + let factoryObj = parseAndCreateFunctionFactory () + let p = (factoryObj :?> PrintfFuncFactory<'Printer, 'State, 'Residue, 'Result>) + // We may initialize this twice, but the assignment is atomic and the computation will give functionally + // identical results each time it is ok + factory <- p + p + | _ -> factory + + /// This avoids reallocation and application of 'initial' for sprintf printers + member this.GetCurriedStringPrinter() = + match box printer with + | null -> + let f = this.GetCurriedPrinterFactory() + let initial() = (StringPrintfEnv stringCount |> box :?> PrintfEnv<'State, 'Residue, 'Result>) + let p = f.Invoke([], initial) + // We may initialize this twice, but the assignment is atomic and the computation will give functionally + // identical results each time it is ok + printer <- p + p + | _ -> printer + + + /// 2-level cache, keyed by format string and index types + type Cache<'Printer, 'State, 'Residue, 'Result>() = + + /// 1st level cache (type-indexed). Stores last value that was consumed by the current thread in + /// thread-static field thus providing shortcuts for scenarios when printf is called in tight loop. + [] + static val mutable private mostRecent: FormatParser<'Printer, 'State, 'Residue, 'Result> - static member Get(key: Format<'T, 'State, 'Residue, 'Result>) = - if not (Cache<'T, 'State, 'Residue, 'Result>.last === null) - && key.Value.Equals (fst Cache<'T, 'State, 'Residue, 'Result>.last) then - snd Cache<'T, 'State, 'Residue, 'Result>.last + // 2nd level cache (type-indexed). Dictionary that maps format string to the corresponding cache entry + static let mutable dict : ConcurrentDictionary> = null + + static member GetParser(format: Format<'Printer, 'State, 'Residue, 'Result>) = + let recent = Cache<'Printer, 'State, 'Residue, 'Result>.mostRecent + let fmt = format.Value + if isNull recent then + let parser = FormatParser(fmt) + Cache<'Printer, 'State, 'Residue, 'Result>.mostRecent <- parser + parser + elif fmt.Equals recent.FormatString then + recent else - let v = get key.Value - Cache<'T, 'State, 'Residue, 'Result>.last <- (key.Value, v) - v - - type StringPrintfEnv<'Result>(k, n) = - inherit PrintfEnv(()) - - let buf: string[] = Array.zeroCreate n - let mutable ptr = 0 - - override __.Finish() : 'Result = k (String.Concat buf) - override __.Write(s: string) = - buf.[ptr] <- s - ptr <- ptr + 1 - override __.WriteT s = - buf.[ptr] <- s - ptr <- ptr + 1 - - type SmallStringPrintfEnv<'Result>(k) = - inherit PrintfEnv(()) - - let mutable c = null - - override __.Finish() : 'Result = k c - override __.Write(s: string) = if isNull c then c <- s else c <- c + s - override __.WriteT s = if isNull c then c <- s else c <- c + s - - type StringBuilderPrintfEnv<'Result>(k, buf) = - inherit PrintfEnv(buf) - override __.Finish() : 'Result = k () - override __.Write(s: string) = ignore(buf.Append s) - override __.WriteT(()) = () - - type TextWriterPrintfEnv<'Result>(k, tw: IO.TextWriter) = - inherit PrintfEnv(tw) - override __.Finish() : 'Result = k() - override __.Write(s: string) = tw.Write s - override __.WriteT(()) = () - - let inline doPrintf fmt f = - let formatter, n = Cache<_, _, _, _>.Get fmt - let env() = f n - formatter env + // Initialize the 2nd level cache if necessary. Note there's a race condition but it doesn't + // matter if we initialize these values twice (and lose one entry) + if isNull dict then + dict <- ConcurrentDictionary<_,_>() + + let parser = + match dict.TryGetValue(fmt) with + | true, res -> res + | _ -> + let parser = FormatParser(fmt) + // There's a race condition - but the computation is functional and it doesn't matter if we do it twice + dict.TryAdd(fmt, parser) |> ignore + parser + Cache<'Printer, 'State, 'Residue, 'Result>.mostRecent <- parser + parser [] module Printf = - open System - open System.IO - open System.Text - open PrintfImpl - - type BuilderFormat<'T,'Result> = Format<'T, StringBuilder, unit, 'Result> - type StringFormat<'T,'Result> = Format<'T, unit, string, 'Result> - type TextWriterFormat<'T,'Result> = Format<'T, TextWriter, unit, 'Result> - type BuilderFormat<'T> = BuilderFormat<'T,unit> - type StringFormat<'T> = StringFormat<'T,string> + type BuilderFormat<'T, 'Result> = Format<'T, StringBuilder, unit, 'Result> + type StringFormat<'T, 'Result> = Format<'T, unit, string, 'Result> + type TextWriterFormat<'T, 'Result> = Format<'T, TextWriter, unit, 'Result> + type BuilderFormat<'T> = BuilderFormat<'T,unit> + type StringFormat<'T> = StringFormat<'T,string> type TextWriterFormat<'T> = TextWriterFormat<'T,unit> + let gprintf envf (format: Format<'Printer, 'State, 'Residue, 'Result>) = + let cacheItem = Cache.GetParser format + match format.Captures with + | null -> + // The ksprintf "...%d ...." arg path, producing a function + let factory = cacheItem.GetCurriedPrinterFactory() + let initial() = (envf cacheItem.BlockCount :> PrintfEnv<_,_,_>) + factory.Invoke([], initial) + | captures -> + // The ksprintf $"...%d{3}...." path, running the steps straight away to produce a string + let steps = cacheItem.GetStepsForCapturedFormat() + let env = envf cacheItem.BlockCount :> PrintfEnv<_,_,_> + let res = env.RunSteps(captures, format.CaptureTypes, steps) + unbox res // prove 'T = 'Result + //continuation res + [] let ksprintf continuation (format: StringFormat<'T, 'Result>) : 'T = - doPrintf format (fun n -> - if n <= 2 then - SmallStringPrintfEnv continuation :> PrintfEnv<_, _, _> - else - StringPrintfEnv(continuation, n) :> PrintfEnv<_, _, _> - ) + gprintf (fun stringCount -> LargeStringPrintfEnv(continuation, stringCount)) format [] let sprintf (format: StringFormat<'T>) = - doPrintf format (fun n -> - if n <= 2 then - SmallStringPrintfEnv id :> PrintfEnv<_, _, _> - else - StringPrintfEnv(id, n) :> PrintfEnv<_, _, _> - ) + // We inline gprintf by hand here to be sure to remove a few allocations + let cacheItem = Cache.GetParser format + match format.Captures with + | null -> + // The sprintf "...%d ...." arg path, producing a function + cacheItem.GetCurriedStringPrinter() + | captures -> + // The sprintf $"...%d{3}...." path, running the steps straight away to produce a string + let steps = cacheItem.GetStepsForCapturedFormat() + let env = StringPrintfEnv cacheItem.BlockCount + let res = env.RunSteps(captures, format.CaptureTypes, steps) + unbox res // proves 'T = string [] let kprintf continuation format = ksprintf continuation format [] - let kbprintf continuation (builder: StringBuilder) format = - doPrintf format (fun _ -> - StringBuilderPrintfEnv(continuation, builder) :> PrintfEnv<_, _, _> - ) + let kbprintf continuation (builder: StringBuilder) (format: BuilderFormat<'T, 'Result>) : 'T = + gprintf (fun _stringCount -> StringBuilderPrintfEnv(continuation, builder)) format [] - let kfprintf continuation textWriter format = - doPrintf format (fun _ -> - TextWriterPrintfEnv(continuation, textWriter) :> PrintfEnv<_, _, _> - ) + let kfprintf continuation textWriter (format: TextWriterFormat<'T, 'Result>) = + gprintf (fun _stringCount -> TextWriterPrintfEnv(continuation, textWriter)) format [] - let bprintf builder format = kbprintf ignore builder format + let bprintf builder format = + kbprintf ignore builder format [] - let fprintf (textWriter: TextWriter) format = kfprintf ignore textWriter format + let fprintf (textWriter: TextWriter) format = + kfprintf ignore textWriter format [] - let fprintfn (textWriter: TextWriter) format = kfprintf (fun _ -> textWriter.WriteLine()) textWriter format + let fprintfn (textWriter: TextWriter) format = + kfprintf (fun _ -> textWriter.WriteLine()) textWriter format [] - let failwithf format = ksprintf failwith format + let failwithf format = + ksprintf failwith format [] - let printf format = fprintf Console.Out format + let printf format = + fprintf Console.Out format [] - let eprintf format = fprintf Console.Error format + let eprintf format = + fprintf Console.Error format [] - let printfn format = fprintfn Console.Out format + let printfn format = + fprintfn Console.Out format [] - let eprintfn format = fprintfn Console.Error format + let eprintfn format = + fprintfn Console.Error format diff --git a/src/fsharp/FSharp.Core/printf.fsi b/src/fsharp/FSharp.Core/printf.fsi index 10e17ec68d..46177c6d1a 100644 --- a/src/fsharp/FSharp.Core/printf.fsi +++ b/src/fsharp/FSharp.Core/printf.fsi @@ -10,40 +10,73 @@ open System.IO open System.Text /// Type of a formatting expression. +/// /// Function type generated by printf. /// Type argument passed to %a formatters /// Value generated by the overall printf action (e.g. sprint generates a string) /// Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) +/// +/// Language Primitives type PrintfFormat<'Printer,'State,'Residue,'Result> = /// Construct a format string /// The input string. + /// /// The PrintfFormat containing the formatted result. new : value:string -> PrintfFormat<'Printer,'State,'Residue,'Result> + /// Construct a format string + /// The input string. + /// The captured expressions in an interpolated string. + /// The types of expressions for %A holes in interpolated string. + /// The PrintfFormat containing the formatted result. + [] + new : value:string * captures: obj[] * captureTys: Type[] -> PrintfFormat<'Printer,'State,'Residue,'Result> + /// The raw text of the format string. member Value : string + + [] + member Captures: obj[] + + [] + member CaptureTypes: System.Type[] /// Type of a formatting expression. +/// /// Function type generated by printf. /// Type argument passed to %a formatters /// Value generated by the overall printf action (e.g. sprint generates a string) /// Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) /// Tuple of values generated by scan or match. +/// +/// Language Primitives type PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> = inherit PrintfFormat<'Printer,'State,'Residue,'Result> /// Construct a format string + /// /// The input string. + /// /// The created format string. new: value:string -> PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> + /// Construct a format string + /// The input string. + /// The captured expressions in an interpolated string. + /// The types of expressions for %A holes in interpolated string. + /// The created format string. + [] + new: value:string * captures: obj[] * captureTys: Type[] -> PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> + /// Type of a formatting expression. /// Function type generated by printf. /// Type argument passed to %a formatters /// Value generated by the overall printf action (e.g. sprint generates a string) /// Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) +/// +/// Language Primitives type Format<'Printer,'State,'Residue,'Result> = PrintfFormat<'Printer,'State,'Residue,'Result> /// Type of a formatting expression. @@ -52,206 +85,159 @@ type Format<'Printer,'State,'Residue,'Result> = PrintfFormat<'Printer,'State,'Re /// Value generated by the overall printf action (e.g. sprint generates a string) /// Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) /// Tuple of values generated by scan or match. +/// +/// Language Primitives type Format<'Printer,'State,'Residue,'Result,'Tuple> = PrintfFormat<'Printer,'State,'Residue,'Result,'Tuple> /// Extensible printf-style formatting for numbers and other datatypes /// /// Format specifications are strings with "%" markers indicating format -/// placeholders. Format placeholders consist of: -/// -/// %[flags][width][.precision][type] -/// -/// where the type is interpreted as follows: -/// -/// %b: bool, formatted as "true" or "false" -/// %s: string, formatted as its unescaped contents -/// %c: character literal -/// %d, %i: any basic integer type formatted as a decimal integer, signed if the basic integer type is signed. -/// %u: any basic integer type formatted as an unsigned decimal integer -/// %x, %X, %o: any basic integer type formatted as an unsigned hexadecimal -/// (a-f)/Hexadecimal (A-F)/Octal integer -/// -/// %e, %E, %f, %F, %g, %G: -/// any basic floating point type (float,float32) formatted -/// using a C-style floating point format specifications, i.e -/// -/// %e, %E: Signed value having the form [-]d.dddde[sign]ddd where -/// d is a single decimal digit, dddd is one or more decimal -/// digits, ddd is exactly three decimal digits, and sign -/// is + or - -/// -/// %f: Signed value having the form [-]dddd.dddd, where dddd is one -/// or more decimal digits. The number of digits before the -/// decimal point depends on the magnitude of the number, and -/// the number of digits after the decimal point depends on -/// the requested precision. -/// -/// %g, %G: Signed value printed in f or e format, whichever is -/// more compact for the given value and precision. -/// -/// -/// %M: System.Decimal value -/// -/// %O: Any value, printed by boxing the object and using it's ToString method(s) -/// -/// %A: Any value, printed with the default layout settings -/// -/// %a: A general format specifier, requires two arguments: -/// (1) a function which accepts two arguments: -/// (a) a context parameter of the appropriate type for the -/// given formatting function (e.g. an #System.IO.TextWriter) -/// (b) a value to print -/// and which either outputs or returns appropriate text. -/// -/// (2) the particular value to print -/// -/// -/// %t: A general format specifier, requires one argument: -/// (1) a function which accepts a context parameter of the -/// appropriate type for the given formatting function (e.g. -/// an System.IO.TextWriter)and which either outputs or returns -/// appropriate text. +/// placeholders. Format placeholders consist of %[flags][width][.precision][type]. /// -/// Basic integer types are: -/// byte,sbyte,int16,uint16,int32,uint32,int64,uint64,nativeint,unativeint -/// Basic floating point types are: -/// float, float32 -/// -/// The optional width is an integer indicating the minimal width of the -/// result. For instance, %6d prints an integer, prefixing it with spaces -/// to fill at least 6 characters. If width is '*', then an extra integer -/// argument is taken to specify the corresponding width. -/// -/// any number -/// '*': -/// -/// Valid flags are: -/// -/// 0: add zeros instead of spaces to make up the required width -/// '-': left justify the result within the width specified -/// '+': add a '+' character if the number is positive (to match a '-' sign -/// for negatives) -/// ' ': add an extra space if the number is positive (to match a '-' -/// sign for negatives) -/// -/// The printf '#' flag is invalid and a compile-time error will be reported if it is used. +/// Strings and Text [] module Printf = - /// Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The first type parameter indicates the + /// Represents a statically-analyzed format associated with writing to a . The first type parameter indicates the /// arguments of the format operation and the last the overall return type. - type BuilderFormat<'T,'Result> = Format<'T, StringBuilder, unit, 'Result> + type BuilderFormat<'T,'Result> = Format<'T, StringBuilder, unit, 'Result> /// Represents a statically-analyzed format when formatting builds a string. The first type parameter indicates the /// arguments of the format operation and the last the overall return type. - type StringFormat<'T,'Result> = Format<'T, unit, string, 'Result> + type StringFormat<'T,'Result> = Format<'T, unit, string, 'Result> - /// Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The first type parameter indicates the + /// Represents a statically-analyzed format associated with writing to a . The first type parameter indicates the /// arguments of the format operation and the last the overall return type. type TextWriterFormat<'T,'Result> = Format<'T, TextWriter, unit, 'Result> - /// Represents a statically-analyzed format associated with writing to a System.Text.StringBuilder. The type parameter indicates the + /// Represents a statically-analyzed format associated with writing to a . The type parameter indicates the /// arguments and return type of the format operation. - type BuilderFormat<'T> = BuilderFormat<'T,unit> + type BuilderFormat<'T> = BuilderFormat<'T, unit> /// Represents a statically-analyzed format when formatting builds a string. The type parameter indicates the /// arguments and return type of the format operation. - type StringFormat<'T> = StringFormat<'T,string> + type StringFormat<'T> = StringFormat<'T,string> - /// Represents a statically-analyzed format associated with writing to a System.IO.TextWriter. The type parameter indicates the + /// Represents a statically-analyzed format associated with writing to a . The type parameter indicates the /// arguments and return type of the format operation. - type TextWriterFormat<'T> = TextWriterFormat<'T,unit> + type TextWriterFormat<'T> = TextWriterFormat<'T,unit> - /// Print to a System.Text.StringBuilder + /// Print to a + /// /// The StringBuilder to print to. /// The input formatter. + /// /// The return type and arguments of the formatter. [] - val bprintf : builder:StringBuilder -> format:BuilderFormat<'T> -> 'T + val bprintf: builder:StringBuilder -> format:BuilderFormat<'T> -> 'T /// Print to a text writer. + /// /// The TextWriter to print to. /// The input formatter. + /// /// The return type and arguments of the formatter. [] - val fprintf : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T + val fprintf: textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T /// Print to a text writer, adding a newline + /// /// The TextWriter to print to. /// The input formatter. + /// /// The return type and arguments of the formatter. [] - val fprintfn : textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T + val fprintfn: textWriter:TextWriter -> format:TextWriterFormat<'T> -> 'T /// Formatted printing to stderr + /// /// The input formatter. + /// /// The return type and arguments of the formatter. [] - val eprintf : format:TextWriterFormat<'T> -> 'T + val eprintf: format:TextWriterFormat<'T> -> 'T /// Formatted printing to stderr, adding a newline + /// /// The input formatter. + /// /// The return type and arguments of the formatter. [] - val eprintfn : format:TextWriterFormat<'T> -> 'T + val eprintfn: format:TextWriterFormat<'T> -> 'T /// Formatted printing to stdout + /// /// The input formatter. + /// /// The return type and arguments of the formatter. [] - val printf : format:TextWriterFormat<'T> -> 'T + val printf: format:TextWriterFormat<'T> -> 'T /// Formatted printing to stdout, adding a newline. + /// /// The input formatter. + /// /// The return type and arguments of the formatter. [] - val printfn : format:TextWriterFormat<'T> -> 'T + val printfn: format:TextWriterFormat<'T> -> 'T /// Print to a string via an internal string buffer and return /// the result as a string. Helper printers must return strings. + /// /// The input formatter. + /// /// The formatted string. [] - val sprintf : format:StringFormat<'T> -> 'T + val sprintf: format:StringFormat<'T> -> 'T /// bprintf, but call the given 'final' function to generate the result. /// See kprintf. + /// /// The function called after formatting to generate the format result. /// The input StringBuilder. /// The input formatter. + /// /// The arguments of the formatter. [] - val kbprintf : continuation:(unit -> 'Result) -> builder:StringBuilder -> format:BuilderFormat<'T,'Result> -> 'T + val kbprintf: continuation:(unit -> 'Result) -> builder:StringBuilder -> format:BuilderFormat<'T,'Result> -> 'T /// fprintf, but call the given 'final' function to generate the result. /// See kprintf. + /// /// The function called after formatting to generate the format result. /// The input TextWriter. /// The input formatter. + /// /// The arguments of the formatter. [] - val kfprintf : continuation:(unit -> 'Result) -> textWriter:TextWriter -> format:TextWriterFormat<'T,'Result> -> 'T + val kfprintf: continuation:(unit -> 'Result) -> textWriter:TextWriter -> format:TextWriterFormat<'T,'Result> -> 'T /// printf, but call the given 'final' function to generate the result. /// For example, these let the printing force a flush after all output has /// been entered onto the channel, but not before. + /// /// The function called after formatting to generate the format result. /// The input formatter. + /// /// The arguments of the formatter. [] - val kprintf : continuation:(string -> 'Result) -> format:StringFormat<'T,'Result> -> 'T + val kprintf: continuation:(string -> 'Result) -> format:StringFormat<'T,'Result> -> 'T /// sprintf, but call the given 'final' function to generate the result. /// See kprintf. + /// /// The function called to generate a result from the formatted string. /// The input formatter. + /// /// The arguments of the formatter. [] - val ksprintf : continuation:(string -> 'Result) -> format:StringFormat<'T,'Result> -> 'T + val ksprintf: continuation:(string -> 'Result) -> format:StringFormat<'T,'Result> -> 'T /// Print to a string buffer and raise an exception with the given /// result. Helper printers must return strings. + /// /// The input formatter. + /// /// The arguments of the formatter. [] val failwithf: format:StringFormat<'T,'Result> -> 'T diff --git a/src/fsharp/FSharp.Core/quotations.fsi b/src/fsharp/FSharp.Core/quotations.fsi index e51ed2bd74..37679515a5 100644 --- a/src/fsharp/FSharp.Core/quotations.fsi +++ b/src/fsharp/FSharp.Core/quotations.fsi @@ -10,6 +10,11 @@ open System open System.Reflection /// Information at the binding site of a variable +/// +/// +/// Library functionality for F# quotations. +/// See also F# Code Quotations in the F# Language Guide. +/// [] [] type Var = @@ -23,16 +28,20 @@ type Var = member IsMutable: bool /// Creates a new variable with the given name, type and mutability + /// /// The declared name of the variable. /// The type associated with the variable. /// Indicates if the variable represents a mutable storage location. Default is false. + /// /// The created variable. new : name:string * typ:Type * ?isMutable : bool -> Var /// Fetches or create a new variable with the given name and type from a global pool of shared variables /// indexed by name and type + /// /// The name of the variable. /// The type associated with the variable. + /// /// The retrieved or created variable. static member Global : name:string * typ:Type -> Var @@ -47,7 +56,9 @@ type Expr = /// to map variables to new values. The functions must give consistent results /// at each application. Variable renaming may occur on the target expression /// if variable capture occurs. + /// /// The function to map variables into expressions. + /// /// The expression with the given substitutions. member Substitute : substitution:(Var -> Expr option) -> Expr @@ -64,309 +75,405 @@ type Expr = override Equals : obj:obj -> bool /// Builds an expression that represents getting the address of a value. + /// /// The target expression. + /// /// The resulting expression. static member AddressOf : target:Expr -> Expr /// Builds an expression that represents setting the value held at a particular address. + /// /// The target expression. /// The value to set at the address. + /// /// The resulting expression. static member AddressSet : target:Expr * value:Expr -> Expr /// Builds an expression that represents the application of a first class function value to a single argument. + /// /// The function to apply. /// The argument to the function. + /// /// The resulting expression. static member Application: functionExpr:Expr * argument:Expr -> Expr /// Builds an expression that represents the application of a first class function value to multiple arguments + /// /// The function to apply. /// The list of lists of arguments to the function. + /// /// The resulting expression. static member Applications: functionExpr:Expr * arguments:list> -> Expr /// Builds an expression that represents a call to an static method or module-bound function + /// /// The MethodInfo describing the method to call. /// The list of arguments to the method. + /// /// The resulting expression. static member Call : methodInfo:MethodInfo * arguments:list -> Expr /// Builds an expression that represents a call to an instance method associated with an object + /// /// The input object. /// The description of the method to call. /// The list of arguments to the method. + /// /// The resulting expression. static member Call : obj:Expr * methodInfo:MethodInfo * arguments:list -> Expr /// Builds an expression that represents a call to an static method or module-bound function + /// /// The MethodInfo describing the method to call. /// The additional MethodInfo describing the method to call, accepting witnesses. /// The list of witnesses to the method. /// The list of arguments to the method. + /// /// The resulting expression. [] static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr /// Builds an expression that represents a call to an instance method associated with an object + /// /// The input object. /// The description of the method to call. /// The additional MethodInfo describing the method to call, accepting witnesses. /// The list of witnesses to the method. /// The list of arguments to the method. + /// /// The resulting expression. [] static member CallWithWitnesses: obj:Expr * methodInfo:MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments:Expr list -> Expr /// Builds an expression that represents the coercion of an expression to a type + /// /// The expression to coerce. /// The target type. + /// /// The resulting expression. static member Coerce : source:Expr * target:Type -> Expr /// Builds 'if ... then ... else' expressions. + /// /// The condition expression. /// The then sub-expression. /// The else sub-expression. + /// /// The resulting expression. static member IfThenElse : guard:Expr * thenExpr:Expr * elseExpr:Expr -> Expr /// Builds a 'for i = ... to ... do ...' expression that represent loops over integer ranges + /// /// The sub-expression declaring the loop variable. /// The sub-expression setting the initial value of the loop variable. /// The sub-expression declaring the final value of the loop variable. /// The sub-expression representing the body of the loop. + /// /// The resulting expression. static member ForIntegerRangeLoop: loopVariable:Var * start:Expr * endExpr:Expr * body:Expr -> Expr /// Builds an expression that represents the access of a static field + /// /// The description of the field to access. + /// /// The resulting expression. static member FieldGet: fieldInfo:FieldInfo -> Expr /// Builds an expression that represents the access of a field of an object + /// /// The input object. /// The description of the field to access. + /// /// The resulting expression. static member FieldGet: obj:Expr * fieldInfo:FieldInfo -> Expr /// Builds an expression that represents writing to a static field + /// /// The description of the field to write to. /// The value to the set to the field. + /// /// The resulting expression. static member FieldSet: fieldInfo:FieldInfo * value:Expr -> Expr /// Builds an expression that represents writing to a field of an object + /// /// The input object. /// The description of the field to write to. /// The value to set to the field. + /// /// The resulting expression. static member FieldSet: obj:Expr * fieldInfo:FieldInfo * value:Expr -> Expr /// Builds an expression that represents the construction of an F# function value + /// /// The parameter to the function. /// The body of the function. + /// /// The resulting expression. static member Lambda : parameter:Var * body:Expr -> Expr /// Builds expressions associated with 'let' constructs + /// /// The variable in the let expression. /// The expression bound to the variable. /// The sub-expression where the binding is in scope. + /// /// The resulting expression. static member Let : letVariable:Var * letExpr:Expr * body:Expr -> Expr /// Builds recursive expressions associated with 'let rec' constructs + /// /// The list of bindings for the let expression. /// The sub-expression where the bindings are in scope. + /// /// The resulting expression. static member LetRecursive : bindings:(Var * Expr) list * body:Expr -> Expr /// Builds an expression that represents the invocation of an object constructor + /// /// The description of the constructor. /// The list of arguments to the constructor. + /// /// The resulting expression. static member NewObject: constructorInfo:ConstructorInfo * arguments:Expr list -> Expr /// Builds an expression that represents the invocation of a default object constructor + /// /// The type on which the constructor is invoked. + /// /// The resulting expression. static member DefaultValue: expressionType:Type -> Expr /// Builds an expression that represents the creation of an F# tuple value + /// /// The list of elements of the tuple. + /// /// The resulting expression. static member NewTuple: elements:Expr list -> Expr /// Builds an expression that represents the creation of an F# tuple value + /// /// Runtime assembly containing System.ValueTuple definitions. /// The list of elements of the tuple. + /// /// The resulting expression. static member NewStructTuple: asm:Assembly * elements:Expr list -> Expr /// Builds record-construction expressions + /// /// The type of record. /// The list of elements of the record. + /// /// The resulting expression. static member NewRecord: recordType:Type * elements:Expr list -> Expr /// Builds an expression that represents the creation of an array value initialized with the given elements + /// /// The type for the elements of the array. /// The list of elements of the array. + /// /// The resulting expression. static member NewArray: elementType:Type * elements:Expr list -> Expr /// Builds an expression that represents the creation of a delegate value for the given type + /// /// The type of delegate. /// The parameters for the delegate. /// The body of the function. + /// /// The resulting expression. static member NewDelegate: delegateType:Type * parameters:Var list * body:Expr -> Expr /// Builds an expression that represents the creation of a union case value + /// /// The description of the union case. /// The list of arguments for the case. + /// /// The resulting expression. static member NewUnionCase: unionCase:UnionCaseInfo * arguments:Expr list -> Expr /// Builds an expression that represents reading a property of an object + /// /// The input object. /// The description of the property. /// List of indices for the property if it is an indexed property. + /// /// The resulting expression. static member PropertyGet: obj:Expr * property:PropertyInfo * ?indexerArgs: Expr list -> Expr /// Builds an expression that represents reading a static property + /// /// The description of the property. /// List of indices for the property if it is an indexed property. + /// /// The resulting expression. static member PropertyGet: property:PropertyInfo * ?indexerArgs: Expr list -> Expr /// Builds an expression that represents writing to a property of an object + /// /// The input object. /// The description of the property. /// The value to set. /// List of indices for the property if it is an indexed property. + /// /// The resulting expression. static member PropertySet: obj:Expr * property:PropertyInfo * value:Expr * ?indexerArgs: Expr list -> Expr /// Builds an expression that represents writing to a static property + /// /// The description of the property. /// The value to set. /// List of indices for the property if it is an indexed property. + /// /// The resulting expression. static member PropertySet: property:PropertyInfo * value:Expr * ?indexerArgs: Expr list -> Expr /// Builds an expression that represents a nested typed or raw quotation literal + /// /// The expression being quoted. + /// /// The resulting expression. [] static member Quote: inner:Expr -> Expr /// Builds an expression that represents a nested raw quotation literal + /// /// The expression being quoted. + /// /// The resulting expression. static member QuoteRaw: inner:Expr -> Expr /// Builds an expression that represents a nested typed quotation literal + /// /// The expression being quoted. + /// /// The resulting expression. static member QuoteTyped: inner:Expr -> Expr /// Builds an expression that represents the sequential execution of one expression followed by another + /// /// The first expression. /// The second expression. + /// /// The resulting expression. static member Sequential: first:Expr * second:Expr -> Expr /// Builds an expression that represents a try/with construct for exception filtering and catching. + /// /// The body of the try expression. /// /// /// The variable to bind to a caught exception. /// The expression evaluated when an exception is caught. + /// /// The resulting expression. static member TryWith: body:Expr * filterVar:Var * filterBody:Expr * catchVar:Var * catchBody:Expr -> Expr /// Builds an expression that represents a try/finally construct + /// /// The body of the try expression. /// The final part of the expression to be evaluated. + /// /// The resulting expression. static member TryFinally: body:Expr * compensation:Expr -> Expr /// Builds an expression that represents getting a field of a tuple + /// /// The input tuple. /// The index of the tuple element to get. + /// /// The resulting expression. static member TupleGet: tuple:Expr * index:int -> Expr /// Builds an expression that represents a type test. + /// /// The expression to test. /// The target type. + /// /// The resulting expression. static member TypeTest: source:Expr * target:Type -> Expr /// Builds an expression that represents a test of a value is of a particular union case + /// /// The expression to test. /// The description of the union case. + /// /// The resulting expression. static member UnionCaseTest: source:Expr * unionCase:UnionCaseInfo -> Expr /// Builds an expression that represents a constant value of a particular type + /// /// The untyped object. /// The type of the object. + /// /// The resulting expression. static member Value : value:obj * expressionType:Type -> Expr /// Builds an expression that represents a constant value + /// /// The typed value. + /// /// The resulting expression. static member Value : value:'T -> Expr /// Builds an expression that represents a constant value, arising from a variable of the given name + /// /// The typed value. /// The name of the variable. + /// /// The resulting expression. static member ValueWithName : value:'T * name: string -> Expr /// Builds an expression that represents a constant value of a particular type, arising from a variable of the given name + /// /// The untyped object. /// The type of the object. /// The name of the variable. + /// /// The resulting expression. static member ValueWithName : value:obj * expressionType:Type * name: string -> Expr /// Builds an expression that represents a value and its associated reflected definition as a quotation + /// /// The value being quoted. /// The definition of the value being quoted. + /// /// The resulting expression. static member WithValue: value: 'T * definition: Expr<'T> -> Expr<'T> /// Builds an expression that represents a value and its associated reflected definition as a quotation + /// /// The untyped object. /// The type of the object. /// The definition of the value being quoted. + /// /// The resulting expression. static member WithValue: value: obj * expressionType:Type * definition: Expr -> Expr /// Builds an expression that represents a variable + /// /// The input variable. + /// /// The resulting expression. static member Var : variable:Var -> Expr /// Builds an expression that represents setting a mutable variable + /// /// The input variable. /// The value to set. + /// /// The resulting expression. static member VarSet : variable:Var * value:Expr -> Expr /// Builds an expression that represents a while loop + /// /// The predicate to control the loop iteration. /// The body of the while loop. + /// /// The resulting expression. static member WhileLoop : guard:Expr * body:Expr -> Expr @@ -376,38 +483,47 @@ type Expr = /// Returns a new typed expression given an underlying runtime-typed expression. /// A type annotation is usually required to use this function, and /// using an incorrect type annotation may result in a later runtime exception. + /// /// The expression to cast. + /// /// The resulting typed expression. static member Cast : source:Expr -> Expr<'T> /// Try and find a stored reflection definition for the given method. Stored reflection /// definitions are added to an F# assembly through the use of the [<ReflectedDefinition>] attribute. + /// /// The description of the method to find. + /// /// The reflection definition or None if a match could not be found. static member TryGetReflectedDefinition : methodBase:MethodBase -> Expr option /// This function is called automatically when quotation syntax (<@ @>) and other sources of /// quotations are used. + /// /// A type in the assembly where the quotation occurs. /// The spliced types, to replace references to type variables. /// The spliced expressions to replace references to spliced expressions. /// The serialized form of the quoted expression. + /// /// The resulting expression. static member Deserialize : qualifyingType:System.Type * spliceTypes:list * spliceExprs:list * bytes:byte[] -> Expr /// This function is called automatically when quotation syntax (<@ @>) and other sources of /// quotations are used. + /// /// A type in the assembly where the quotation occurs. /// The type definitions referenced. /// The spliced types, to replace references to type variables. /// The spliced expressions to replace references to spliced expressions. /// The serialized form of the quoted expression. + /// /// The resulting expression. static member Deserialize40 : qualifyingType:Type * referencedTypes:Type[] * spliceTypes:Type[] * spliceExprs:Expr[] * bytes:byte[] -> Expr /// Permits interactive environments such as F# Interactive /// to explicitly register new pickled resources that represent persisted /// top level definitions. + /// /// The assembly associated with the resource. /// The unique name for the resources being added. /// The serialized resource to register with the environment. @@ -416,6 +532,7 @@ type Expr = /// Permits interactive environments such as F# Interactive /// to explicitly register new pickled resources that represent persisted /// top level definitions. + /// /// The assembly associated with the resource. /// The unique name for the resources being added. /// The type definitions referenced. @@ -424,12 +541,16 @@ type Expr = /// Fetches or creates a new variable with the given name and type from a global pool of shared variables /// indexed by name and type. The type is given by the explicit or inferred type parameter + /// /// The variable name. + /// /// The created of fetched typed global variable. static member GlobalVar<'T> : name:string -> Expr<'T> /// Format the expression as a string + /// /// Indicates if method, property, constructor and type objects should be printed in detail. If false, these are abbreviated to their name. + /// /// The formatted string. member ToString : full: bool -> string @@ -449,232 +570,308 @@ and [] module Patterns = /// An active pattern to recognize expressions that represent getting the address of a value + /// /// The input expression to match against. - /// Expr option + /// + /// When successful, the pattern binds the sub-expression of the input AddressOf expression [] val (|AddressOf|_|) : input:Expr -> Expr option /// An active pattern to recognize expressions that represent setting the value held at an address + /// /// The input expression to match against. - /// (Expr * Expr) option + /// + /// When successful, the pattern binds the target and value expressions of the input expression [] val (|AddressSet|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize expressions that represent applications of first class function values + /// /// The input expression to match against. - /// (Expr * Expr) option + /// + /// When successful, the pattern binds the function and argument of the input expression [] val (|Application|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules + /// /// The input expression to match against. - /// (Expr option * MethodInfo * Expr list) option + /// + /// When successful, the pattern binds the object, method and argument sub-expressions of the input expression [] val (|Call|_|) : input:Expr -> (Expr option * MethodInfo * Expr list) option /// An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules, including witness arguments + /// /// The input expression to match against. - /// (Expr option * MethodInfo * MethodInfo * Expr list) option + /// + /// When successful, the pattern binds the object, method, witness-argument and argument sub-expressions of the input expression [] [] val (|CallWithWitnesses|_|) : input:Expr -> (Expr option * MethodInfo * MethodInfo * Expr list * Expr list) option /// An active pattern to recognize expressions that represent coercions from one type to another + /// /// The input expression to match against. - /// (Expr * Type) option + /// + /// When successful, the pattern binds the source expression and target type of the input expression [] val (|Coerce|_|) : input:Expr -> (Expr * Type) option /// An active pattern to recognize expressions that represent getting a static or instance field + /// /// The input expression to match against. - /// (Expr option * FieldInfo) option + /// + /// When successful, the pattern binds the object and field of the input expression [] val (|FieldGet|_|) : input:Expr -> (Expr option * FieldInfo) option /// An active pattern to recognize expressions that represent setting a static or instance field + /// /// The input expression to match against. - /// (Expr option * FieldInfo * Expr) option + /// + /// When successful, the pattern binds the object, field and value of the input expression [] val (|FieldSet|_|) : input:Expr -> (Expr option * FieldInfo * Expr) option /// An active pattern to recognize expressions that represent loops over integer ranges + /// /// The input expression to match against. - /// (Var * Expr * Expr * Expr) option + /// + /// When successful, the pattern binds the value, start, finish and body of the input expression [] val (|ForIntegerRangeLoop|_|) : input:Expr -> (Var * Expr * Expr * Expr) option /// An active pattern to recognize expressions that represent while loops + /// /// The input expression to match against. - /// (Expr * Expr) option + /// + /// When successful, the pattern binds the guard and body of the input expression [] val (|WhileLoop|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize expressions that represent conditionals + /// /// The input expression to match against. - /// (Expr * Expr * Expr) option + /// + /// When successful, the pattern binds the condition, then-branch and else-branch of the input expression [] val (|IfThenElse|_|) : input:Expr -> (Expr * Expr * Expr) option /// An active pattern to recognize expressions that represent first class function values + /// /// The input expression to match against. - /// (Var * Expr) option + /// + /// When successful, the pattern binds the variable and body of the input expression [] val (|Lambda|_|) : input:Expr -> (Var * Expr) option /// An active pattern to recognize expressions that represent let bindings + /// /// The input expression to match against. - /// (Var * Expr * Expr) option + /// + /// When successful, the pattern binds the variable, binding expression and body of the input expression [] val (|Let|_|) : input:Expr -> (Var * Expr * Expr) option /// An active pattern to recognize expressions that represent recursive let bindings of one or more variables + /// /// The input expression to match against. - /// ((Var * Expr) list * Expr) option + /// + /// When successful, the pattern binds the bindings and body of the input expression [] val (|LetRecursive|_|) : input:Expr -> ((Var * Expr) list * Expr) option /// An active pattern to recognize expressions that represent the construction of arrays + /// /// The input expression to match against. - /// (Type * Expr list) option + /// + /// When successful, the pattern binds the element type and values of the input expression [] val (|NewArray|_|) : input:Expr -> (Type * Expr list) option /// An active pattern to recognize expressions that represent invocations of a default constructor of a struct + /// /// The input expression to match against. - /// Type option + /// + /// When successful, the pattern binds the relevant type of the input expression [] val (|DefaultValue|_|) : input:Expr -> Type option /// An active pattern to recognize expressions that represent construction of delegate values + /// /// The input expression to match against. - /// (Type * Var list * Expr) option + /// + /// When successful, the pattern binds the delegate type, argument parameters and body of the input expression [] val (|NewDelegate|_|) : input:Expr -> (Type * Var list * Expr) option /// An active pattern to recognize expressions that represent invocation of object constructors + /// /// The input expression to match against. - /// (ConstructorInfo * Expr list) option + /// + /// When successful, the pattern binds the constructor and arguments of the input expression [] val (|NewObject|_|) : input:Expr -> (ConstructorInfo * Expr list) option /// An active pattern to recognize expressions that represent construction of record values + /// /// The input expression to match against. - /// (Type * Expr list) option + /// + /// When successful, the pattern binds the record type and field values of the input expression [] val (|NewRecord|_|) : input:Expr -> (Type * Expr list) option /// An active pattern to recognize expressions that represent construction of particular union case values + /// /// The input expression to match against. - /// (UnionCaseInfo * Expr list) option + /// + /// When successful, the pattern binds the union case and field values of the input expression [] val (|NewUnionCase|_|) : input:Expr -> (UnionCaseInfo * Expr list) option /// An active pattern to recognize expressions that represent construction of tuple values + /// /// The input expression to match against. - /// (Expr list) option + /// + /// When successful, the pattern binds the element expressions of the input expression [] val (|NewTuple|_|) : input:Expr -> (Expr list) option /// An active pattern to recognize expressions that represent construction of struct tuple values + /// /// The input expression to match against. - /// (Expr list) option + /// + /// When successful, the pattern binds the element expressions of the input expression [] val (|NewStructTuple|_|) : input:Expr -> (Expr list) option /// An active pattern to recognize expressions that represent the read of a static or instance property, or a non-function value declared in a module + /// /// The input expression to match against. - /// (Expr option * PropertyInfo * Expr list) option + /// + /// When successful, the pattern binds the object, property and indexer arguments of the input expression [] val (|PropertyGet|_|) : input:Expr -> (Expr option * PropertyInfo * Expr list) option /// An active pattern to recognize expressions that represent setting a static or instance property, or a non-function value declared in a module + /// /// The input expression to match against. - /// (Expr option * PropertyInfo * Expr list * Expr) option + /// + /// When successful, the pattern binds the object, property, indexer arguments and setter value of the input expression [] val (|PropertySet|_|) : input:Expr -> (Expr option * PropertyInfo * Expr list * Expr) option /// An active pattern to recognize expressions that represent a nested quotation literal + /// /// The input expression to match against. - /// Expr option + /// + /// When successful, the pattern binds the nested quotation expression of the input expression [] [] val (|Quote|_|) : input:Expr -> Expr option /// An active pattern to recognize expressions that represent a nested raw quotation literal + /// /// The input expression to match against. - /// Expr option + /// + /// When successful, the pattern binds the nested quotation expression of the input expression [] val (|QuoteRaw|_|) : input:Expr -> Expr option /// An active pattern to recognize expressions that represent a nested typed quotation literal + /// /// The input expression to match against. - /// Expr option + /// + /// When successful, the pattern binds the nested quotation expression of the input expression [] val (|QuoteTyped|_|) : input:Expr -> Expr option /// An active pattern to recognize expressions that represent sequential execution of one expression followed by another + /// /// The input expression to match against. - /// (Expr * Expr) option + /// + /// When successful, the pattern binds the two sub-expressions of the input expression [] val (|Sequential|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize expressions that represent a try/with construct for exception filtering and catching + /// /// The input expression to match against. - /// (Expr * Var * Expr * Var * Expr) option + /// + /// When successful, the pattern binds the body, exception variable, filter expression and catch expression of the input expression [] val (|TryWith|_|) : input:Expr -> (Expr * Var * Expr * Var * Expr) option /// An active pattern to recognize expressions that represent a try/finally construct + /// /// The input expression to match against. - /// The body and handler parts of the try/finally expression + /// + /// When successful, the pattern binds the body and handler parts of the try/finally expression [] val (|TryFinally|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize expressions that represent getting a tuple field + /// /// The input expression to match against. - /// The expression and tuple field being accessed + /// + /// When successful, the pattern binds the expression and tuple field being accessed [] val (|TupleGet|_|) : input:Expr -> (Expr * int) option /// An active pattern to recognize expressions that represent a dynamic type test + /// /// The input expression to match against. - /// The expression and type being tested + /// + /// When successful, the pattern binds the expression and type being tested [] val (|TypeTest|_|) : input:Expr -> (Expr * Type) option /// An active pattern to recognize expressions that represent a test if a value is of a particular union case + /// /// The input expression to match against. - /// The expression and union case being tested + /// + /// When successful, the pattern binds the expression and union case being tested [] val (|UnionCaseTest|_|) : input:Expr -> (Expr * UnionCaseInfo) option /// An active pattern to recognize expressions that represent a constant value. This also matches expressions matched by ValueWithName. + /// /// The input expression to match against. - /// The boxed value and its static type + /// + /// When successful, the pattern binds the boxed value and its static type [] val (|Value|_|) : input:Expr -> (obj * Type) option /// An active pattern to recognize expressions that represent a constant value + /// /// The input expression to match against. - /// The boxed value, its static type and its name + /// + /// When successful, the pattern binds the boxed value, its static type and its name [] val (|ValueWithName|_|) : input:Expr -> (obj * Type * string) option /// An active pattern to recognize expressions that are a value with an associated definition + /// /// The input expression to match against. - /// The boxed value, its static type and its definition + /// + /// When successful, the pattern binds the boxed value, its static type and its definition [] val (|WithValue|_|) : input:Expr -> (obj * Type * Expr) option /// An active pattern to recognize expressions that represent a variable + /// /// The input expression to match against. - /// Var option + /// + /// When successful, the pattern binds the variable of the input expression [] val (|Var|_|) : input:Expr -> Var option /// An active pattern to recognize expressions that represent setting a mutable variable + /// /// The input expression to match against. - /// (Var * Expr) option + /// + /// When successful, the pattern binds the variable and value expression of the input expression [] val (|VarSet|_|) : input:Expr -> (Var * Expr) option @@ -683,116 +880,154 @@ module Patterns = module DerivedPatterns = /// An active pattern to recognize expressions that represent a (possibly curried or tupled) first class function value + /// /// The input expression to match against. - /// (Var list list * Expr) option + /// + /// When successful, the pattern binds the curried variables and body of the input expression [] val (|Lambdas|_|) : input:Expr -> (Var list list * Expr) option /// An active pattern to recognize expressions that represent the application of a (possibly curried or tupled) first class function value + /// /// The input expression to match against. - /// (Expr * Expr list list) option + /// + /// When successful, the pattern binds the function and curried arguments of the input expression [] val (|Applications|_|) : input:Expr -> (Expr * Expr list list) option /// An active pattern to recognize expressions of the form a && b + /// /// The input expression to match against. - /// (Expr * Expr) option + /// + /// When successful, the pattern binds the left and right parts of the input expression [] val (|AndAlso|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize expressions of the form a || b + /// /// The input expression to match against. - /// (Expr * Expr) option + /// + /// When successful, the pattern binds the left and right parts of the input expression [] val (|OrElse|_|) : input:Expr -> (Expr * Expr) option /// An active pattern to recognize () constant expressions + /// /// The input expression to match against. - /// unit option + /// + /// When successful, the pattern does not bind any results [] val (|Unit|_|) : input:Expr -> unit option /// An active pattern to recognize constant boolean expressions + /// /// The input expression to match against. - /// bool option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|Bool|_|) : input:Expr -> bool option /// An active pattern to recognize constant string expressions + /// /// The input expression to match against. - /// string option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|String|_|) : input:Expr -> string option /// An active pattern to recognize constant 32-bit floating point number expressions + /// /// The input expression to match against. - /// float32 option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|Single|_|) : input:Expr -> float32 option /// An active pattern to recognize constant 64-bit floating point number expressions + /// /// The input expression to match against. - /// float option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|Double|_|) : input:Expr -> float option /// An active pattern to recognize constant unicode character expressions + /// /// The input expression to match against. - /// char option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|Char|_|) : input:Expr -> char option /// An active pattern to recognize constant signed byte expressions + /// /// The input expression to match against. - /// sbyte option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|SByte|_|) : input:Expr -> sbyte option /// An active pattern to recognize constant byte expressions + /// /// The input expression to match against. - /// byte option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|Byte|_|) : input:Expr -> byte option /// An active pattern to recognize constant int16 expressions + /// /// The input expression to match against. - /// int16 option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|Int16|_|) : input:Expr -> int16 option /// An active pattern to recognize constant unsigned int16 expressions + /// /// The input expression to match against. - /// uint16 option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|UInt16|_|) : input:Expr -> uint16 option /// An active pattern to recognize constant int32 expressions + /// /// The input expression to match against. - /// int32 option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|Int32|_|) : input:Expr -> int32 option /// An active pattern to recognize constant unsigned int32 expressions + /// /// The input expression to match against. - /// uint32 option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|UInt32|_|) : input:Expr -> uint32 option /// An active pattern to recognize constant int64 expressions + /// /// The input expression to match against. - /// int64 option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|Int64|_|) : input:Expr -> int64 option /// An active pattern to recognize constant unsigned int64 expressions + /// /// The input expression to match against. - /// uint64 option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|UInt64|_|) : input:Expr -> uint64 option /// An active pattern to recognize constant decimal expressions + /// /// The input expression to match against. - /// decimal option + /// + /// When successful, the pattern binds the constant value from the input expression [] val (|Decimal|_|) : input:Expr -> decimal option @@ -800,7 +1035,9 @@ module DerivedPatterns = /// The returned elements are the optional target object (present if the target is an /// instance method), the generic type instantiation (non-empty if the target is a generic /// instantiation), and the arguments to the function or method. + /// /// The input template expression to specify the method to call. + /// /// The optional target object (present if the target is an /// instance method), the generic type instantiation (non-empty if the target is a generic /// instantiation), and the arguments to the function or method. @@ -808,19 +1045,25 @@ module DerivedPatterns = val (|SpecificCall|_|) : templateParameter:Expr -> (Expr -> (Expr option * list * list) option) /// An active pattern to recognize methods that have an associated ReflectedDefinition + /// /// The description of the method. + /// /// The expression of the method definition if found, or None. [] val (|MethodWithReflectedDefinition|_|) : methodBase:MethodBase -> Expr option /// An active pattern to recognize property getters or values in modules that have an associated ReflectedDefinition + /// /// The description of the property. + /// /// The expression of the method definition if found, or None. [] val (|PropertyGetterWithReflectedDefinition|_|) : propertyInfo:PropertyInfo -> Expr option /// An active pattern to recognize property setters that have an associated ReflectedDefinition + /// /// The description of the property. + /// /// The expression of the method definition if found, or None. [] val (|PropertySetterWithReflectedDefinition|_|) : propertyInfo:PropertyInfo -> Expr option @@ -830,7 +1073,9 @@ module DerivedPatterns = module ExprShape = /// An active pattern that performs a complete decomposition viewing the expression tree as a binding structure + /// /// The input expression. + /// /// The decomposed Var, Lambda, or ConstApp. [] val (|ShapeVar|ShapeLambda|ShapeCombination|) : @@ -840,7 +1085,9 @@ module ExprShape = /// Re-build combination expressions. The first parameter should be an object /// returned by the ShapeCombination case of the active pattern in this module. + /// /// The input shape. /// The list of arguments. + /// /// The rebuilt expression. val RebuildShapeCombination : shape:obj * arguments:list -> Expr diff --git a/src/fsharp/FSharp.Core/reflect.fsi b/src/fsharp/FSharp.Core/reflect.fsi index 465529677a..948e778aac 100644 --- a/src/fsharp/FSharp.Core/reflect.fsi +++ b/src/fsharp/FSharp.Core/reflect.fsi @@ -10,10 +10,12 @@ open Microsoft.FSharp.Core open Microsoft.FSharp.Primitives.Basics open Microsoft.FSharp.Collections -//--------------------------------------------------------------------- -// F# reified type inspection. - /// Represents a case of a discriminated union type +/// +/// +/// Library functionality for accessing additional information about F# types and F# values at +/// runtime, augmenting that available through System.Reflection. +/// [] type UnionCaseInfo = /// The name of the case. @@ -26,6 +28,7 @@ type UnionCaseInfo = member GetCustomAttributes: unit -> obj[] /// Returns the custom attributes associated with the case matching the given attribute type. /// The type of attributes to return. + /// /// An array of custom attributes. member GetCustomAttributes: attributeType:System.Type -> obj[] @@ -48,41 +51,51 @@ type FSharpValue = /// Reads a field from a record value. /// - /// Assumes the given input is a record value. If not, ArgumentException is raised. + /// Assumes the given input is a record value. If not, is raised. + /// /// The record object. /// The PropertyInfo describing the field to read. - /// Thrown when the input type is not a record type. + /// + /// Thrown when the input is not a record value. /// The field from the record. static member GetRecordField: record:obj * info:PropertyInfo -> obj /// Precompute a function for reading a particular field from a record. /// Assumes the given type is a RecordType with a field of the given name. - /// If not, ArgumentException is raised during pre-computation. + /// If not, is raised during pre-computation. /// /// Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo /// because the path executed by the computed function is optimized given the knowledge that it will be /// used to read values of the given type. + /// /// The PropertyInfo of the field to read. - /// Thrown when the input type is not a record type. + /// + /// Thrown when the input type is not a record type. + /// /// A function to read the specified field from the record. static member PreComputeRecordFieldReader : info:PropertyInfo -> (obj -> obj) /// Creates an instance of a record type. /// /// Assumes the given input is a record type. + /// /// The type of record to make. /// The array of values to initialize the record. /// Optional binding flags for the record. - /// Thrown when the input type is not a record type. + /// + /// Thrown when the input type is not a record type. + /// /// The created record. static member MakeRecord: recordType:Type * values:obj [] * ?bindingFlags:BindingFlags -> obj /// Reads all the fields from a record value. /// - /// Assumes the given input is a record value. If not, ArgumentException is raised. + /// Assumes the given input is a record value. If not, is raised. /// The record object. /// Optional binding flags for the record. - /// Thrown when the input type is not a record type. + /// + /// Thrown when the input type is not a record type. + /// /// The array of fields from the record. static member GetRecordFields: record:obj * ?bindingFlags:BindingFlags -> obj[] @@ -91,42 +104,53 @@ type FSharpValue = /// this type. /// /// Assumes the given type is a RecordType. - /// If not, ArgumentException is raised during pre-computation. + /// If not, is raised during pre-computation. /// /// Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo /// because the path executed by the computed function is optimized given the knowledge that it will be /// used to read values of the given type. + /// /// The type of record to read. /// Optional binding flags. - /// Thrown when the input type is not a record type. + /// + /// Thrown when the input type is not a record type. + /// /// An optimized reader for the given record type. static member PreComputeRecordReader : recordType:Type * ?bindingFlags:BindingFlags -> (obj -> obj[]) + /// Precompute a function for constructing a record value. /// /// Assumes the given type is a RecordType. - /// If not, ArgumentException is raised during pre-computation. + /// If not, is raised during pre-computation. + /// /// The type of record to construct. /// Optional binding flags. - /// Thrown when the input type is not a record type. + /// + /// Thrown when the input type is not a record type. + /// /// A function to construct records of the given type. static member PreComputeRecordConstructor : recordType:Type * ?bindingFlags:BindingFlags -> (obj[] -> obj) /// Get a ConstructorInfo for a record type + /// /// The record type. /// Optional binding flags. + /// /// A ConstructorInfo for the given record type. static member PreComputeRecordConstructorInfo: recordType:Type * ?bindingFlags:BindingFlags -> ConstructorInfo /// Create a union case value. + /// /// The description of the union case to create. /// The array of arguments to construct the given case. /// Optional binding flags. + /// /// The constructed union case. static member MakeUnion: unionCase:UnionCaseInfo * args:obj [] * ?bindingFlags:BindingFlags -> obj /// Identify the union case and its fields for an object /// - /// Assumes the given input is a union case value. If not, ArgumentException is raised. + /// Assumes the given input is a union case value. If not, is raised. /// /// If the type is not given, then the runtime type of the input object is used to identify the /// relevant union type. The type should always be given if the input object may be null. For example, @@ -134,102 +158,133 @@ type FSharpValue = /// The input union case. /// The union type containing the value. /// Optional binding flags. - /// Thrown when the input type is not a union case value. + /// + /// Thrown when the input type is not a union case value. + /// /// The description of the union case and its fields. static member GetUnionFields: value:obj * unionType:Type * ?bindingFlags:BindingFlags -> UnionCaseInfo * obj [] /// Assumes the given type is a union type. - /// If not, ArgumentException is raised during pre-computation. + /// If not, is raised during pre-computation. /// /// Using the computed function is more efficient than calling GetUnionCase /// because the path executed by the computed function is optimized given the knowledge that it will be /// used to read values of the given type. + /// /// The type of union to optimize reading. /// Optional binding flags. + /// /// An optimized function to read the tags of the given union type. static member PreComputeUnionTagReader : unionType:Type * ?bindingFlags:BindingFlags -> (obj -> int) /// Precompute a property or static method for reading an integer representing the case tag of a union type. + /// /// The type of union to read. /// Optional binding flags. + /// /// The description of the union case reader. static member PreComputeUnionTagMemberInfo : unionType:Type * ?bindingFlags:BindingFlags -> MemberInfo /// Precompute a function for reading all the fields for a particular discriminator case of a union type /// /// Using the computed function will typically be faster than executing a corresponding call to GetFields + /// /// The description of the union case to read. /// Optional binding flags. + /// /// A function to for reading the fields of the given union case. static member PreComputeUnionReader : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> (obj -> obj[]) /// Precompute a function for constructing a discriminated union value for a particular union case. + /// /// The description of the union case. /// Optional binding flags. + /// /// A function for constructing values of the given union case. static member PreComputeUnionConstructor : unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> (obj[] -> obj) /// A method that constructs objects of the given case + /// /// The description of the union case. /// Optional binding flags. + /// /// The description of the constructor of the given union case. static member PreComputeUnionConstructorInfo: unionCase:UnionCaseInfo * ?bindingFlags:BindingFlags -> MethodInfo /// Reads all the fields from a value built using an instance of an F# exception declaration /// - /// Assumes the given input is an F# exception value. If not, ArgumentException is raised. + /// Assumes the given input is an F# exception value. If not, is raised. + /// /// The exception instance. /// Optional binding flags. - /// Thrown when the input type is not an F# exception. + /// + /// Thrown when the input type is not an F# exception. + /// /// The fields from the given exception. static member GetExceptionFields: exn:obj * ?bindingFlags:BindingFlags -> obj[] /// Creates an instance of a tuple type /// - /// Assumes at least one element is given. If not, ArgumentException is raised. + /// Assumes at least one element is given. If not, is raised. + /// /// The array of tuple fields. /// The tuple type to create. - /// Thrown if no elements are given. + /// + /// Thrown if no elements are given. + /// /// An instance of the tuple type with the given elements. static member MakeTuple: tupleElements:obj[] * tupleType:Type -> obj /// Reads a field from a tuple value. /// - /// Assumes the given input is a tuple value. If not, ArgumentException is raised. + /// Assumes the given input is a tuple value. If not, is raised. + /// /// The input tuple. /// The index of the field to read. + /// /// The value of the field. static member GetTupleField: tuple:obj * index:int -> obj /// Reads all fields from a tuple. /// - /// Assumes the given input is a tuple value. If not, ArgumentException is raised. + /// Assumes the given input is a tuple value. If not, is raised. + /// /// The input tuple. - /// Thrown when the input is not a tuple value. + /// + /// Thrown when the input is not a tuple value. + /// /// An array of the fields from the given tuple. static member GetTupleFields: tuple:obj -> obj [] /// Precompute a function for reading the values of a particular tuple type /// /// Assumes the given type is a TupleType. - /// If not, ArgumentException is raised during pre-computation. + /// If not, is raised during pre-computation. + /// /// The tuple type to read. - /// Thrown when the given type is not a tuple type. + /// + /// Thrown when the given type is not a tuple type. + /// /// A function to read values of the given tuple type. static member PreComputeTupleReader : tupleType:Type -> (obj -> obj[]) /// Gets information that indicates how to read a field of a tuple + /// /// The input tuple type. /// The index of the tuple element to describe. + /// /// The description of the tuple element and an optional type and index if the tuple is big. static member PreComputeTuplePropertyInfo: tupleType:Type * index:int -> PropertyInfo * (Type * int) option /// Precompute a function for reading the values of a particular tuple type /// /// Assumes the given type is a TupleType. - /// If not, ArgumentException is raised during pre-computation. + /// If not, is raised during pre-computation. + /// /// The type of tuple to read. - /// Thrown when the given type is not a tuple type. + /// + /// Thrown when the given type is not a tuple type. + /// /// A function to read a particular tuple type. static member PreComputeTupleConstructor : tupleType:Type -> (obj[] -> obj) @@ -242,14 +297,18 @@ type FSharpValue = /// object of this type must be created and passed as the last argument /// to the ConstructorInfo. A recursive call to PreComputeTupleConstructorInfo /// can be used to determine the constructor for that the suffix type. + /// /// The input tuple type. + /// /// The description of the tuple type constructor and an optional extra type /// for large tuples. static member PreComputeTupleConstructorInfo: tupleType:Type -> ConstructorInfo * Type option /// Builds a typed function from object from a dynamic function implementation + /// /// The function type of the implementation. /// The untyped lambda of the function implementation. + /// /// A typed function from the given dynamic implementation. static member MakeFunction : functionType:Type * implementation:(obj -> obj) -> obj @@ -259,116 +318,155 @@ type FSharpType = /// Reads all the fields from a record value, in declaration order /// - /// Assumes the given input is a record value. If not, ArgumentException is raised. + /// Assumes the given input is a record value. If not, is raised. + /// /// The input record type. /// Optional binding flags. + /// /// An array of descriptions of the properties of the record type. static member GetRecordFields: recordType:Type * ?bindingFlags:BindingFlags -> PropertyInfo[] /// Gets the cases of a union type. /// - /// Assumes the given type is a union type. If not, ArgumentException is raised during pre-computation. + /// Assumes the given type is a union type. If not, is raised during pre-computation. + /// /// The input union type. /// Optional binding flags. - /// Thrown when the input type is not a union type. + /// + /// Thrown when the input type is not a union type. + /// /// An array of descriptions of the cases of the given union type. static member GetUnionCases: unionType:Type * ?bindingFlags:BindingFlags -> UnionCaseInfo[] /// Return true if the typ is a representation of an F# record type + /// /// The type to check. /// Optional binding flags. + /// /// True if the type check succeeds. static member IsRecord: typ:Type * ?bindingFlags:BindingFlags -> bool /// Returns true if the typ is a representation of an F# union type or the runtime type of a value of that type + /// /// The type to check. /// Optional binding flags. + /// /// True if the type check succeeds. static member IsUnion: typ:Type * ?bindingFlags:BindingFlags -> bool /// Reads all the fields from an F# exception declaration, in declaration order /// - /// Assumes exceptionType is an exception representation type. If not, ArgumentException is raised. + /// Assumes exceptionType is an exception representation type. If not, is raised. + /// /// The exception type to read. /// Optional binding flags. - /// Thrown if the given type is not an exception. + /// + /// Thrown if the given type is not an exception. + /// /// An array containing the PropertyInfo of each field in the exception. static member GetExceptionFields: exceptionType:Type * ?bindingFlags:BindingFlags -> PropertyInfo[] /// Returns true if the typ is a representation of an F# exception declaration + /// /// The type to check. /// Optional binding flags. + /// /// True if the type check is an F# exception. static member IsExceptionRepresentation: exceptionType:Type * ?bindingFlags:BindingFlags -> bool - /// Returns a System.Type representing the F# function type with the given domain and range + /// Returns a representing the F# function type with the given domain and range + /// /// The input type of the function. /// The output type of the function. + /// /// The function type with the given domain and range. static member MakeFunctionType: domain:Type * range:Type -> Type - /// Returns a System.Type representing an F# tuple type with the given element types + /// Returns a representing an F# tuple type with the given element types + /// /// An array of types for the tuple elements. + /// /// The type representing the tuple containing the input elements. static member MakeTupleType: types:Type[] -> Type - /// Returns a System.Type representing an F# tuple type with the given element types + /// Returns a representing an F# tuple type with the given element types + /// /// Runtime assembly containing System.Tuple definitions. /// An array of types for the tuple elements. + /// /// The type representing the tuple containing the input elements. static member MakeTupleType: asm:Assembly * types:Type[] -> Type - /// Returns a System.Type representing an F# struct tuple type with the given element types + /// Returns a representing an F# struct tuple type with the given element types + /// /// Runtime assembly containing System.ValueTuple definitions. /// An array of types for the tuple elements. + /// /// The type representing the struct tuple containing the input elements. static member MakeStructTupleType: asm:Assembly * types:Type[] -> Type /// Return true if the typ is a representation of an F# tuple type + /// /// The type to check. + /// /// True if the type check succeeds. static member IsTuple : typ:Type -> bool /// Return true if the typ is a representation of an F# function type or the runtime type of a closure implementing an F# function type + /// /// The type to check. + /// /// True if the type check succeeds. static member IsFunction : typ:Type -> bool - /// Return true if the typ is a System.Type value corresponding to the compiled form of an F# module + /// Return true if the typ is a value corresponding to the compiled form of an F# module + /// /// The type to check. + /// /// True if the type check succeeds. static member IsModule: typ:Type -> bool /// Gets the tuple elements from the representation of an F# tuple type. + /// /// The input tuple type. + /// /// An array of the types contained in the given tuple type. static member GetTupleElements : tupleType:Type -> Type[] /// Gets the domain and range types from an F# function type or from the runtime type of a closure implementing an F# type + /// /// The input function type. + /// /// A tuple of the domain and range types of the input function. static member GetFunctionElements : functionType:Type -> Type * Type [] +/// Defines further accessing additional information about F# types and F# values at runtime. module FSharpReflectionExtensions = type FSharpValue with /// Creates an instance of a record type. /// /// Assumes the given input is a record type. + /// /// The type of record to make. /// The array of values to initialize the record. /// Optional flags that denotes accessibility of the private representation. - /// Thrown when the input type is not a record type. + /// + /// Thrown when the input type is not a record type. + /// /// The created record. static member MakeRecord: recordType:Type * values:obj [] * ?allowAccessToPrivateRepresentation : bool -> obj /// Reads all the fields from a record value. /// - /// Assumes the given input is a record value. If not, ArgumentException is raised. + /// Assumes the given input is a record value. If not, is raised. + /// /// The record object. /// Optional flag that denotes accessibility of the private representation. - /// Thrown when the input type is not a record type. + /// + /// Thrown when the input type is not a record type. + /// /// The array of fields from the record. static member GetRecordFields: record:obj * ?allowAccessToPrivateRepresentation : bool -> obj[] @@ -377,142 +475,182 @@ module FSharpReflectionExtensions = /// this type. /// /// Assumes the given type is a RecordType. - /// If not, ArgumentException is raised during pre-computation. + /// If not, is raised during pre-computation. /// /// Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo /// because the path executed by the computed function is optimized given the knowledge that it will be /// used to read values of the given type. + /// /// The type of record to read. /// Optional flag that denotes accessibility of the private representation. - /// Thrown when the input type is not a record type. + /// + /// Thrown when the input type is not a record type. + /// /// An optimized reader for the given record type. static member PreComputeRecordReader : recordType:Type * ?allowAccessToPrivateRepresentation : bool -> (obj -> obj[]) /// Precompute a function for constructing a record value. /// /// Assumes the given type is a RecordType. - /// If not, ArgumentException is raised during pre-computation. + /// If not, is raised during pre-computation. + /// /// The type of record to construct. /// Optional flag that denotes accessibility of the private representation. - /// Thrown when the input type is not a record type. + /// + /// Thrown when the input type is not a record type. + /// /// A function to construct records of the given type. static member PreComputeRecordConstructor : recordType:Type * ?allowAccessToPrivateRepresentation : bool -> (obj[] -> obj) /// Get a ConstructorInfo for a record type + /// /// The record type. /// Optional flag that denotes accessibility of the private representation. + /// /// A ConstructorInfo for the given record type. static member PreComputeRecordConstructorInfo: recordType:Type * ?allowAccessToPrivateRepresentation : bool-> ConstructorInfo /// Create a union case value. + /// /// The description of the union case to create. /// The array of arguments to construct the given case. /// Optional flag that denotes accessibility of the private representation. + /// /// The constructed union case. static member MakeUnion: unionCase:UnionCaseInfo * args:obj [] * ?allowAccessToPrivateRepresentation : bool-> obj /// Identify the union case and its fields for an object /// - /// Assumes the given input is a union case value. If not, ArgumentException is raised. + /// Assumes the given input is a union case value. If not, is raised. /// /// If the type is not given, then the runtime type of the input object is used to identify the /// relevant union type. The type should always be given if the input object may be null. For example, /// option values may be represented using the 'null'. + /// /// The input union case. /// The union type containing the value. /// Optional flag that denotes accessibility of the private representation. - /// Thrown when the input type is not a union case value. + /// + /// Thrown when the input type is not a union case value. + /// /// The description of the union case and its fields. static member GetUnionFields: value:obj * unionType:Type * ?allowAccessToPrivateRepresentation : bool -> UnionCaseInfo * obj [] /// Assumes the given type is a union type. - /// If not, ArgumentException is raised during pre-computation. + /// If not, is raised during pre-computation. /// /// Using the computed function is more efficient than calling GetUnionCase /// because the path executed by the computed function is optimized given the knowledge that it will be /// used to read values of the given type. + /// /// The type of union to optimize reading. /// Optional flag that denotes accessibility of the private representation. + /// /// An optimized function to read the tags of the given union type. static member PreComputeUnionTagReader : unionType:Type * ?allowAccessToPrivateRepresentation : bool -> (obj -> int) /// Precompute a property or static method for reading an integer representing the case tag of a union type. + /// /// The type of union to read. /// Optional flag that denotes accessibility of the private representation. + /// /// The description of the union case reader. static member PreComputeUnionTagMemberInfo : unionType:Type * ?allowAccessToPrivateRepresentation : bool -> MemberInfo /// Precompute a function for reading all the fields for a particular discriminator case of a union type /// /// Using the computed function will typically be faster than executing a corresponding call to GetFields + /// /// The description of the union case to read. /// Optional flag that denotes accessibility of the private representation. + /// /// A function to for reading the fields of the given union case. static member PreComputeUnionReader : unionCase:UnionCaseInfo * ?allowAccessToPrivateRepresentation : bool -> (obj -> obj[]) /// Precompute a function for constructing a discriminated union value for a particular union case. + /// /// The description of the union case. /// Optional flag that denotes accessibility of the private representation. + /// /// A function for constructing values of the given union case. static member PreComputeUnionConstructor : unionCase:UnionCaseInfo * ?allowAccessToPrivateRepresentation : bool -> (obj[] -> obj) /// A method that constructs objects of the given case + /// /// The description of the union case. /// Optional flag that denotes accessibility of the private representation. + /// /// The description of the constructor of the given union case. static member PreComputeUnionConstructorInfo: unionCase:UnionCaseInfo * ?allowAccessToPrivateRepresentation : bool -> MethodInfo /// Reads all the fields from a value built using an instance of an F# exception declaration /// - /// Assumes the given input is an F# exception value. If not, ArgumentException is raised. + /// Assumes the given input is an F# exception value. If not, is raised. + /// /// The exception instance. /// Optional flag that denotes accessibility of the private representation. - /// Thrown when the input type is not an F# exception. + /// + /// Thrown when the input type is not an F# exception. + /// /// The fields from the given exception. static member GetExceptionFields: exn:obj * ?allowAccessToPrivateRepresentation : bool -> obj[] type FSharpType with /// Reads all the fields from a record value, in declaration order /// - /// Assumes the given input is a record value. If not, ArgumentException is raised. + /// Assumes the given input is a record value. If not, is raised. + /// /// The input record type. /// Optional flag that denotes accessibility of the private representation. + /// /// An array of descriptions of the properties of the record type. static member GetRecordFields: recordType:Type * ?allowAccessToPrivateRepresentation : bool -> PropertyInfo[] /// Gets the cases of a union type. /// - /// Assumes the given type is a union type. If not, ArgumentException is raised during pre-computation. + /// Assumes the given type is a union type. If not, is raised during pre-computation. + /// /// The input union type. /// Optional flag that denotes accessibility of the private representation. - /// Thrown when the input type is not a union type. + /// + /// Thrown when the input type is not a union type. + /// /// An array of descriptions of the cases of the given union type. static member GetUnionCases: unionType:Type * ?allowAccessToPrivateRepresentation : bool -> UnionCaseInfo[] /// Return true if the typ is a representation of an F# record type + /// /// The type to check. /// Optional flag that denotes accessibility of the private representation. + /// /// True if the type check succeeds. static member IsRecord: typ:Type * ?allowAccessToPrivateRepresentation : bool -> bool /// Returns true if the typ is a representation of an F# union type or the runtime type of a value of that type + /// /// The type to check. /// Optional flag that denotes accessibility of the private representation. + /// /// True if the type check succeeds. static member IsUnion: typ:Type * ?allowAccessToPrivateRepresentation : bool -> bool /// Reads all the fields from an F# exception declaration, in declaration order /// - /// Assumes exceptionType is an exception representation type. If not, ArgumentException is raised. + /// Assumes exceptionType is an exception representation type. If not, is raised. + /// /// The exception type to read. /// Optional flag that denotes accessibility of the private representation. - /// Thrown if the given type is not an exception. + /// + /// Thrown if the given type is not an exception. + /// /// An array containing the PropertyInfo of each field in the exception. static member GetExceptionFields: exceptionType:Type * ?allowAccessToPrivateRepresentation : bool -> PropertyInfo[] - /// Returns true if the typ is a representation of an F# exception declaration + /// Returns true if the exceptionType is a representation of an F# exception declaration + /// /// The type to check. /// Optional flag that denotes accessibility of the private representation. + /// /// True if the type check is an F# exception. static member IsExceptionRepresentation: exceptionType:Type * ?allowAccessToPrivateRepresentation : bool -> bool diff --git a/src/fsharp/FSharp.Core/result.fsi b/src/fsharp/FSharp.Core/result.fsi index 77e289bd17..52e23db5d1 100644 --- a/src/fsharp/FSharp.Core/result.fsi +++ b/src/fsharp/FSharp.Core/result.fsi @@ -5,26 +5,34 @@ namespace Microsoft.FSharp.Core open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators [] + /// Contains operations for working with values of type . + /// + /// Choices and Results module Result = /// map f inp evaluates to match inp with Error e -> Error e | Ok x -> Ok (f x). /// A function to apply to the OK result value. /// The input result. + /// /// A result of the input value after applying the mapping function, or Error if the input is Error. [] val map : mapping:('T -> 'U) -> result:Result<'T, 'TError> -> Result<'U, 'TError> /// map f inp evaluates to match inp with Error x -> Error (f x) | Ok v -> Ok v. + /// /// A function to apply to the Error result value. /// The input result. + /// /// A result of the error value after applying the mapping function, or Ok if the input is Ok. [] val mapError: mapping:('TError -> 'U) -> result:Result<'T, 'TError> -> Result<'T, 'U> /// bind f inp evaluates to match inp with Error e -> Error e | Ok x -> f x + /// /// A function that takes the value of type T from a result and transforms it into /// a result containing a value of type U. /// The input result. + /// /// A result of the output type of the binder. [] val bind: binder:('T -> Result<'U, 'TError>) -> result:Result<'T, 'TError> -> Result<'U, 'TError> diff --git a/src/fsharp/FSharp.Core/seq.fsi b/src/fsharp/FSharp.Core/seq.fsi index 9ed5bed096..d8f983de4b 100644 --- a/src/fsharp/FSharp.Core/seq.fsi +++ b/src/fsharp/FSharp.Core/seq.fsi @@ -9,16 +9,19 @@ namespace Microsoft.FSharp.Collections open Microsoft.FSharp.Collections - /// Basic operations on IEnumerables. + /// Contains operations for working with values of type . [] [] module Seq = /// Returns a new sequence that contains all pairings of elements from the first and second sequences. + /// /// The first sequence. /// The second sequence. + /// /// The result sequence. - /// Thrown when either of the input sequences is null. + /// + /// Thrown when either of the input sequences is null. [] val allPairs: source1:seq<'T1> -> source2:seq<'T2> -> seq<'T1 * 'T2> @@ -34,7 +37,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when either of the two provided sequences is + /// Thrown when either of the two provided sequences is /// null. [] val append: source1:seq<'T> -> source2:seq<'T> -> seq<'T> @@ -48,8 +51,8 @@ namespace Microsoft.FSharp.Collections /// /// The average. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence has zero elements. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence has zero elements. [] val inline average : source:seq<(^T)> -> ^T when ^T : (static member ( + ) : ^T * ^T -> ^T) @@ -67,16 +70,18 @@ namespace Microsoft.FSharp.Collections /// /// The average. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence has zero elements. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence has zero elements. [] val inline averageBy : projection:('T -> ^U) -> source:seq<'T> -> ^U when ^U : (static member ( + ) : ^U * ^U -> ^U) and ^U : (static member DivideByInt : ^U * int -> ^U) and ^U : (static member Zero : ^U) - /// Returns a sequence that corresponds to a cached version of the input sequence. - /// This result sequence will have the same elements as the input sequence. The result + /// Returns a sequence that corresponds to a cached version of the input sequence. + /// + /// + /// The result sequence will have the same elements as the input sequence. The result /// can be enumerated multiple times. The input sequence will be enumerated at most /// once and only as far as is necessary. Caching a sequence is typically useful when repeatedly /// evaluating items in the original sequence is computationally expensive or if @@ -86,9 +91,9 @@ namespace Microsoft.FSharp.Collections /// Enumeration of the result sequence is thread safe in the sense that multiple independent IEnumerator /// values may be used simultaneously from different threads (accesses to /// the internal lookaside table are thread safe). Each individual IEnumerator - /// is not typically thread safe and should not be accessed concurrently. + /// is not typically thread safe and should not be accessed concurrently. /// - /// Once enumeration of the input sequence has started, + /// Once enumeration of the input sequence has started, /// it's enumerator will be kept live by this object until the enumeration has completed. /// At that point, the enumerator will be disposed. /// @@ -101,7 +106,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val cache: source:seq<'T> -> seq<'T> @@ -116,7 +121,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val cast: source:IEnumerable -> seq<'T> @@ -133,16 +138,18 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val choose: chooser:('T -> 'U option) -> source:seq<'T> -> seq<'U> /// Divides the input sequence into chunks of size at most chunkSize. + /// /// The maximum size of each chunk. /// The input sequence. + /// /// The sequence divided into chunks. - /// Thrown when the input sequence is null. - /// Thrown when chunkSize is not positive. + /// Thrown when the input sequence is null. + /// Thrown when chunkSize is not positive. [] val chunkBySize: chunkSize:int -> source:seq<'T> -> seq<'T[]> @@ -157,7 +164,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val collect: mapping:('T -> 'Collection) -> source:seq<'T> -> seq<'U> when 'Collection :> seq<'U> @@ -172,7 +179,7 @@ namespace Microsoft.FSharp.Collections /// is reached it returns a -1 if the first sequence is shorter and a 1 if the second sequence /// is shorter. /// - /// Thrown when either of the input sequences + /// Thrown when either of the input sequences /// is null. [] val compareWith: comparer:('T -> 'T -> int) -> source1:seq<'T> -> source2:seq<'T> -> int @@ -187,15 +194,17 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val concat: sources:seq<'Collection> -> seq<'T> when 'Collection :> seq<'T> /// Tests if the sequence contains the specified element. + /// /// The value to locate in the input sequence. /// The input sequence. + /// /// True if the input sequence contains the specified element; false otherwise. - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val inline contains: value:'T -> source:seq<'T> -> bool when 'T : equality @@ -213,7 +222,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val countBy : projection:('T -> 'Key) -> source:seq<'T> -> seq<'Key * int> when 'Key : equality @@ -235,7 +244,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val distinct: source:seq<'T> -> seq<'T> when 'T : equality @@ -248,7 +257,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val distinctBy: projection:('T -> 'Key) -> source:seq<'T> -> seq<'T> when 'Key : equality @@ -257,9 +266,10 @@ namespace Microsoft.FSharp.Collections /// sequence is iterated. As a result this function should not be used with large or infinite sequences. /// The maximum number of chunks. /// The input sequence. + /// /// The sequence split into chunks. - /// Thrown when the input sequence is null. - /// Thrown when count is not positive. + /// Thrown when the input sequence is null. + /// Thrown when count is not positive. /// This function consumes the whole input sequence before yielding the first element of the result sequence. [] val splitInto: count:int -> source:seq<'T> -> seq<'T[]> @@ -285,7 +295,7 @@ namespace Microsoft.FSharp.Collections /// /// A sequence that contains the set difference of the elements of two sequences. /// - /// Thrown when either of the two input sequences is null. + /// Thrown when either of the two input sequences is null. [] val except: itemsToExclude:seq<'T> -> source:seq<'T> -> seq<'T> when 'T : equality @@ -300,7 +310,7 @@ namespace Microsoft.FSharp.Collections /// /// True if any result from the predicate is true; false otherwise. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val exists: predicate:('T -> bool) -> source:seq<'T> -> bool @@ -317,7 +327,7 @@ namespace Microsoft.FSharp.Collections /// /// True if any result from the predicate is true; false otherwise. /// - /// Thrown when either of the two input sequences is null. + /// Thrown when either of the two input sequences is null. [] val exists2: predicate:('T1 -> 'T2 -> bool) -> source1:seq<'T1> -> source2:seq<'T2> -> bool @@ -334,7 +344,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val filter: predicate:('T -> bool) -> source:seq<'T> -> seq<'T> @@ -353,7 +363,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val where: predicate:('T -> bool) -> source:seq<'T> -> seq<'T> @@ -364,21 +374,23 @@ namespace Microsoft.FSharp.Collections /// /// The first element for which the predicate returns True. /// - /// Thrown if no element returns true when + /// Thrown if no element returns true when /// evaluated by the predicate - /// Thrown when the input sequence is null + /// Thrown when the input sequence is null [] val find: predicate:('T -> bool) -> source:seq<'T> -> 'T /// Returns the last element for which the given function returns True. + /// /// This function digests the whole initial sequence as soon as it is called. As a /// result this function should not be used with large or infinite sequences. /// A function to test whether an item in the sequence should be returned. /// The input sequence. + /// /// The last element for which the predicate returns True. - /// Thrown if no element returns true when + /// Thrown if no element returns true when /// evaluated by the predicate - /// Thrown when the input sequence is null + /// Thrown when the input sequence is null /// This function consumes the whole input sequence before returning the result. [] val findBack: predicate:('T -> bool) -> source:seq<'T> -> 'T @@ -390,22 +402,25 @@ namespace Microsoft.FSharp.Collections /// /// The index of the first element for which the predicate returns True. /// - /// Thrown if no element returns true when + /// Thrown if no element returns true when /// evaluated by the predicate - /// Thrown when the input sequence is null + /// Thrown when the input sequence is null [] val findIndex: predicate:('T -> bool) -> source:seq<'T> -> int /// Returns the index of the last element for which the given function returns True. + /// /// This function digests the whole initial sequence as soon as it is called. As a /// result this function should not be used with large or infinite sequences. + /// /// A function to test whether the index of a particular element should be returned. /// The input sequence. + /// /// The index of the last element for which the predicate returns True. - /// Thrown if no element returns true when + /// + /// Thrown if no element returns true when /// evaluated by the predicate - /// Thrown when the input sequence is null - /// This function consumes the whole input sequence before returning the result. + /// Thrown when the input sequence is null [] val findIndexBack: predicate:('T -> bool) -> source:seq<'T> -> int @@ -419,32 +434,39 @@ namespace Microsoft.FSharp.Collections /// /// The state object after the folding function is applied to each element of the sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val fold<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> source:seq<'T> -> 'State /// Applies a function to corresponding elements of two collections, threading an accumulator argument - /// through the computation. The two sequences need not have equal lengths: + /// through the computation. + /// + /// The two sequences need not have equal lengths: /// when one sequence is exhausted any remaining elements in the other sequence are ignored. /// If the input function is f and the elements are i0...iN and j0...jN - /// then computes f (... (f s i0 j0)...) iN jN. + /// then computes f (... (f s i0 j0)...) iN jN. + /// /// The function to update the state given the input elements. /// The initial state. /// The first input sequence. /// The second input sequence. + /// /// The final state value. - /// Thrown when the either of the input sequences is null. + /// Thrown when the either of the input sequences is null. [] val fold2<'T1,'T2,'State> : folder:('State -> 'T1 -> 'T2 -> 'State) -> state:'State -> source1:seq<'T1> -> source2:seq<'T2> -> 'State /// Applies a function to each element of the collection, starting from the end, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN /// then computes f i0 (... (f iN s)...) + /// /// The function to update the state given the input elements. /// The input sequence. /// The initial state. + /// /// The state object after the folding function is applied to each element of the sequence. - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. + /// /// This function consumes the whole input sequence before returning the result. [] val foldBack<'T,'State> : folder:('T -> 'State -> 'State) -> source:seq<'T> -> state:'State -> 'State @@ -453,12 +475,15 @@ namespace Microsoft.FSharp.Collections /// threading an accumulator argument through the computation. The two sequences need not have equal lengths. /// If the input function is f and the elements are i0...iN and j0...jM, N < M /// then computes f i0 j0 (... (f iN jN s)...). + /// /// The function to update the state given the input elements. /// The first input sequence. /// The second input sequence. /// The initial state. + /// /// The final state value. - /// Thrown when the either of the input sequences is null. + /// + /// Thrown when the either of the input sequences is null. [] val foldBack2<'T1,'T2,'State> : folder:('T1 -> 'T2 -> 'State -> 'State) -> source1:seq<'T1> -> source2:seq<'T2> -> state:'State -> 'State @@ -473,7 +498,7 @@ namespace Microsoft.FSharp.Collections /// /// True if every element of the sequence satisfies the predicate; false otherwise. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val forall: predicate:('T -> bool) -> source:seq<'T> -> bool @@ -487,7 +512,7 @@ namespace Microsoft.FSharp.Collections /// /// True if all pairs satisfy the predicate; false otherwise. /// - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input sequences is null. [] val forall2: predicate:('T1 -> 'T2 -> bool) -> source1:seq<'T1> -> source2:seq<'T2> -> bool @@ -513,8 +538,8 @@ namespace Microsoft.FSharp.Collections /// /// The first element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input does not have any elements. + /// Thrown when the input sequence is null. + /// Thrown when the input does not have any elements. [] val head: source:seq<'T> -> 'T @@ -524,15 +549,18 @@ namespace Microsoft.FSharp.Collections /// /// The first element of the sequence or None. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryHead: source:seq<'T> -> 'T option /// Returns the last element of the sequence. + /// /// The input sequence. + /// /// The last element of the sequence. - /// Thrown when the input sequence is null. - /// Thrown when the input does not have any elements. + /// + /// Thrown when the input sequence is null. + /// Thrown when the input does not have any elements. [] val last: source:seq<'T> -> 'T @@ -543,7 +571,7 @@ namespace Microsoft.FSharp.Collections /// /// The last element of the sequence or None. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryLast: source:seq<'T> -> 'T option @@ -553,8 +581,8 @@ namespace Microsoft.FSharp.Collections /// /// The only element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input does not have precisely one element. + /// Thrown when the input sequence is null. + /// Thrown when the input does not have precisely one element. [] val exactlyOne: source:seq<'T> -> 'T @@ -564,7 +592,7 @@ namespace Microsoft.FSharp.Collections /// /// The only element of the sequence or None. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryExactlyOne: source:seq<'T> -> 'T option @@ -574,15 +602,17 @@ namespace Microsoft.FSharp.Collections /// /// True if the sequence is empty; false otherwise. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val isEmpty: source:seq<'T> -> bool /// Builds a new collection whose elements are the corresponding elements of the input collection /// paired with the integer index (from 0) of each element. + /// /// The input sequence. + /// /// The result sequence. - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val indexed: source:seq<'T> -> seq @@ -599,7 +629,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when count is negative. + /// Thrown when count is negative. [] val init: count:int -> initializer:(int -> 'T) -> seq<'T> @@ -620,11 +650,14 @@ namespace Microsoft.FSharp.Collections val initInfinite: initializer:(int -> 'T) -> seq<'T> /// Computes the element at the specified index in the collection. + /// /// The index of the element to retrieve. /// The input sequence. + /// /// The element at the specified index of the sequence. - /// Thrown when the input sequence is null. - /// Thrown when the index is negative or the input sequence does not contain enough elements. + /// + /// Thrown when the input sequence is null. + /// Thrown when the index is negative or the input sequence does not contain enough elements. [] val item: index:int -> source:seq<'T> -> 'T @@ -633,7 +666,7 @@ namespace Microsoft.FSharp.Collections /// A function to apply to each element of the sequence. /// The input sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val iter: action:('T -> unit) -> source:seq<'T> -> unit @@ -643,7 +676,7 @@ namespace Microsoft.FSharp.Collections /// A function to apply to each element of the sequence that can also access the current index. /// The input sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val iteri: action:(int -> 'T -> unit) -> source:seq<'T> -> unit @@ -654,7 +687,7 @@ namespace Microsoft.FSharp.Collections /// The first input sequence. /// The second input sequence. /// - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input sequences is null. [] val iter2: action:('T1 -> 'T2 -> unit) -> source1:seq<'T1> -> source2:seq<'T2> -> unit @@ -666,7 +699,7 @@ namespace Microsoft.FSharp.Collections /// The first input sequence. /// The second input sequence. /// - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input sequences is null. [] val iteri2: action:(int -> 'T1 -> 'T2 -> unit) -> source1:seq<'T1> -> source2:seq<'T2> -> unit @@ -676,7 +709,7 @@ namespace Microsoft.FSharp.Collections /// /// The length of the sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val length: source:seq<'T> -> int @@ -693,7 +726,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val map : mapping:('T -> 'U) -> source:seq<'T> -> seq<'U> @@ -707,33 +740,39 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input sequences is null. [] val map2: mapping:('T1 -> 'T2 -> 'U) -> source1:seq<'T1> -> source2:seq<'T2> -> seq<'U> /// Combines map and fold. Builds a new collection whose elements are the results of applying the given function /// to each of the elements of the collection. The function is also used to accumulate a final value. + /// /// This function digests the whole initial sequence as soon as it is called. As a result this function should /// not be used with large or infinite sequences. + /// /// The function to transform elements from the input collection and accumulate the final value. /// The initial state. /// The input collection. - /// Thrown when the input collection is null. + /// + /// Thrown when the input collection is null. + /// /// The collection of transformed elements, and the final accumulated value. - /// This function consumes the whole input sequence before yielding the first element of the result sequence. [] val mapFold<'T,'State,'Result> : mapping:('State -> 'T -> 'Result * 'State) -> state:'State -> source:seq<'T> -> seq<'Result> * 'State /// Combines map and foldBack. Builds a new collection whose elements are the results of applying the given function /// to each of the elements of the collection. The function is also used to accumulate a final value. + /// /// This function digests the whole initial sequence as soon as it is called. As a result this function should /// 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 initial state. - /// Thrown when the input collection is null. + /// + /// Thrown when the input collection is null. + /// /// The collection of transformed elements, and the final accumulated value. - /// This function consumes the whole input sequence before yielding the first element of the result sequence. [] val mapFoldBack<'T,'State,'Result> : mapping:('T -> 'State -> 'Result * 'State) -> source:seq<'T> -> state:'State -> seq<'Result> * 'State @@ -748,7 +787,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when any of the input sequences is null. + /// Thrown when any of the input sequences is null. [] val map3: mapping:('T1 -> 'T2 -> 'T3 -> 'U) -> source1:seq<'T1> -> source2:seq<'T2> -> source3:seq<'T3> -> seq<'U> @@ -761,7 +800,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val mapi: mapping:(int -> 'T -> 'U) -> source:seq<'T> -> seq<'U> @@ -776,7 +815,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input sequences is null. [] val mapi2: mapping:(int -> 'T1 -> 'T2 -> 'U) -> source1:seq<'T1> -> source2:seq<'T2> -> seq<'U> @@ -784,8 +823,8 @@ namespace Microsoft.FSharp.Collections /// /// The input sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. /// /// The largest element of the sequence. [] @@ -798,33 +837,19 @@ namespace Microsoft.FSharp.Collections /// /// The largest element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. [] val inline maxBy : projection:('T -> 'U) -> source:seq<'T> -> 'T when 'U : comparison -(* - /// Returns the greatest function result from the elements of the sequence, compared via Operators.max. - /// - /// A function to transform items from the input sequence into comparable keys. - /// The input sequence. - /// - /// The largest element of the sequence. - /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. - [] - val inline maxValBy : projection:('T -> 'U) -> source:seq<'T> -> 'U when 'U : comparison -*) - /// Returns the lowest of all elements of the sequence, compared via Operators.min. /// /// The input sequence. /// /// The smallest element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. [] val inline min : source:seq<'T> -> 'T when 'T : comparison @@ -835,25 +860,11 @@ namespace Microsoft.FSharp.Collections /// /// The smallest element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. [] val inline minBy : projection:('T -> 'U) -> source:seq<'T> -> 'T when 'U : comparison -(* - /// Returns the lowest function result from the elements of the sequence, compared via Operators.max. - /// - /// A function to transform items from the input sequence into comparable keys. - /// The input sequence. - /// - /// The smallest element of the sequence. - /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. - [] - val inline minValBy : projection:('T -> 'U) -> source:seq<'T> -> 'U when 'U : comparison -*) - /// Computes the nth element in the collection. /// /// The index of element to retrieve. @@ -861,13 +872,12 @@ namespace Microsoft.FSharp.Collections /// /// The nth element of the sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the index is negative or the input sequence does not contain enough elements. + /// Thrown when the input sequence is null. + /// Thrown when the index is negative or the input sequence does not contain enough elements. [] [] val nth: index:int -> source:seq<'T> -> 'T - [] /// Views the given array as a sequence. /// @@ -875,7 +885,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. val ofArray: source:'T[] -> seq<'T> [] @@ -893,25 +903,22 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val pairwise: source:seq<'T> -> seq<'T * 'T> /// Returns a sequence with all elements permuted according to the /// specified permutation. /// - /// Note that this function returns a sequence that digests the whole initial sequence as soon as - /// that sequence is iterated. As a result this function should not be used with - /// large or infinite sequences. + /// This function consumes the whole input sequence before yielding the first element of the result sequence. /// /// The function that maps input indices to output indices. /// The input sequence. /// /// The result sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when indexMap does not produce a valid permutation. - /// This function consumes the whole input sequence before yielding the first element of the result sequence. + /// Thrown when the input sequence is null. + /// Thrown when indexMap does not produce a valid permutation. [] val permute: indexMap:(int -> int) -> source:seq<'T> -> seq<'T> @@ -923,8 +930,8 @@ namespace Microsoft.FSharp.Collections /// /// The selected element. /// - /// Thrown when the input sequence is null. - /// Thrown when every item of the sequence + /// Thrown when the input sequence is null. + /// Thrown when every item of the sequence /// evaluates to None when the given function is applied. [] val pick: chooser:('T -> 'U option) -> source:seq<'T> -> 'U @@ -938,7 +945,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val readonly : source:seq<'T> -> seq<'T> @@ -953,14 +960,16 @@ namespace Microsoft.FSharp.Collections /// /// The final result of the reduction function. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. [] val reduce: reduction:('T -> 'T -> 'T) -> source:seq<'T> -> 'T /// Creates a sequence by replicating the given initial value. + /// /// The number of elements to replicate. /// The value to replicate + /// /// The generated sequence. [] val replicate: count:int -> initial:'T -> seq<'T> @@ -968,20 +977,28 @@ namespace Microsoft.FSharp.Collections /// Applies a function to each element of the sequence, starting from the end, threading an accumulator argument /// through the computation. If the input function is f and the elements are i0...iN /// then computes f i0 (...(f iN-1 iN)). + /// /// A function that takes in the next-to-last element of the sequence and the /// current accumulated result to produce the next accumulated result. /// The input sequence. + /// /// The final result of the reductions. - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. + /// /// This function consumes the whole input sequence before returning the result. [] val reduceBack: reduction:('T -> 'T -> 'T) -> source:seq<'T> -> 'T /// Returns a new sequence with the elements in reverse order. + /// /// The input sequence. + /// /// The reversed sequence. - /// Thrown when the input sequence is null. + /// + /// Thrown when the input sequence is null. + /// /// This function consumes the whole input sequence before yielding the first element of the reversed sequence. [] val rev: source:seq<'T> -> seq<'T> @@ -994,20 +1011,23 @@ namespace Microsoft.FSharp.Collections /// /// The resulting sequence of computed states. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val scan<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> source:seq<'T> -> seq<'State> /// Like foldBack, but returns the sequence of intermediary and final results. + /// /// This function returns a sequence that digests the whole initial sequence as soon as that /// sequence is iterated. As a result this function should not be used with large or infinite sequences. /// + /// /// A function that updates the state with each element from the sequence. /// The input sequence. /// The initial state. + /// /// The resulting sequence of computed states. - /// Thrown when the input sequence is null. - /// This function consumes the whole input sequence before yielding the first element of the result sequence. + /// + /// Thrown when the input sequence is null. [] val scanBack<'T,'State> : folder:('T -> 'State -> 'State) -> source:seq<'T> -> state:'State -> seq<'State> @@ -1027,8 +1047,8 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when count exceeds the number of elements + /// Thrown when the input sequence is null. + /// Thrown when count exceeds the number of elements /// in the sequence. [] val skip: count:int -> source:seq<'T> -> seq<'T> @@ -1041,7 +1061,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val skipWhile: predicate:('T -> bool) -> source:seq<'T> -> seq<'T> @@ -1049,50 +1069,51 @@ namespace Microsoft.FSharp.Collections /// /// This function returns a sequence that digests the whole initial sequence as soon as /// that sequence is iterated. As a result this function should not be used with - /// large or infinite sequences. The function makes no assumption on the ordering of the original - /// sequence. + /// large or infinite sequences. /// - /// This is a stable sort, that is the original order of equal elements is preserved. + /// The function makes no assumption on the ordering of the original + /// sequence and uses a stable sort, that is the original order of equal elements is preserved. /// /// The input sequence. /// /// The result sequence. /// - /// Thrown when the input sequence is null. - /// This function consumes the whole input sequence before yielding the first element of the result sequence. + /// Thrown when the input sequence is null. [] val sort : source:seq<'T> -> seq<'T> when 'T : comparison /// Yields a sequence ordered using the given comparison function. + /// /// This function returns a sequence that digests the whole initial sequence as soon as /// that sequence is iterated. As a result this function should not be used with - /// large or infinite sequences. The function makes no assumption on the ordering of the original - /// sequence. + /// large or infinite sequences. + /// + /// The function makes no assumption on the ordering of the original + /// sequence and uses a stable sort, that is the original order of equal elements is preserved. /// - /// This is a stable sort, that is the original order of equal elements is preserved. /// The function to compare the collection elements. /// The input sequence. + /// /// The result sequence. - /// This function consumes the whole input sequence before yielding the first element of the result sequence. [] val sortWith : comparer:('T -> 'T -> int) -> source:seq<'T> -> seq<'T> /// Applies a key-generating function to each element of a sequence and yield a sequence ordered - /// by keys. The keys are compared using generic comparison as implemented by Operators.compare. + /// by keys. The keys are compared using generic comparison as implemented by . /// /// This function returns a sequence that digests the whole initial sequence as soon as /// that sequence is iterated. As a result this function should not be used with - /// large or infinite sequences. The function makes no assumption on the ordering of the original - /// sequence. + /// large or infinite sequences. /// - /// This is a stable sort, that is the original order of equal elements is preserved. + /// The function makes no assumption on the ordering of the original + /// sequence and uses a stable sort, that is the original order of equal elements is preserved. /// /// A function to transform items of the input sequence into comparable keys. /// The input sequence. /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val sortBy : projection:('T -> 'Key) -> source:seq<'T> -> seq<'T> when 'Key : comparison @@ -1109,12 +1130,12 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val inline sortDescending : source:seq<'T> -> seq<'T> when 'T : comparison /// Applies a key-generating function to each element of a sequence and yield a sequence ordered - /// descending by keys. The keys are compared using generic comparison as implemented by Operators.compare. + /// descending by keys. The keys are compared using generic comparison as implemented by . /// /// This function returns a sequence that digests the whole initial sequence as soon as /// that sequence is iterated. As a result this function should not be used with @@ -1128,7 +1149,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val inline sortByDescending : projection:('T -> 'Key) -> source:seq<'T> -> seq<'T> when 'Key : comparison @@ -1145,6 +1166,7 @@ namespace Microsoft.FSharp.Collections and ^T : (static member Zero : ^T) /// Returns the sum of the results generated by applying the function to each element of the sequence. + /// /// The generated elements are summed using the + operator and Zero property associated with the generated type. /// /// A function to transform items from the input sequence into the type that will be summed. @@ -1163,12 +1185,13 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. [] val tail: source:seq<'T> -> seq<'T> /// Returns the first N elements of the sequence. + /// /// Throws InvalidOperationException /// if the count exceeds the number of elements in the sequence. Seq.truncate /// returns as many items as the sequence contains instead of throwing an exception. @@ -1178,9 +1201,9 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. - /// Thrown when the input sequence is empty. - /// Thrown when count exceeds the number of elements + /// Thrown when the input sequence is null. + /// Thrown when the input sequence is empty. + /// Thrown when count exceeds the number of elements /// in the sequence. [] val take: count:int -> source:seq<'T> -> seq<'T> @@ -1193,7 +1216,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val takeWhile: predicate:('T -> bool) -> source:seq<'T> -> seq<'T> @@ -1203,7 +1226,7 @@ namespace Microsoft.FSharp.Collections /// /// The result array. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val toArray: source:seq<'T> -> 'T[] @@ -1213,7 +1236,7 @@ namespace Microsoft.FSharp.Collections /// /// The result list. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val toList: source:seq<'T> -> 'T list @@ -1225,19 +1248,22 @@ namespace Microsoft.FSharp.Collections /// /// The found element or None. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryFind: predicate:('T -> bool) -> source:seq<'T> -> 'T option /// Returns the last element for which the given function returns True. /// Return None if no such element exists. + /// /// This function digests the whole initial sequence as soon as it is called. As a /// result this function should not be used with large or infinite sequences. + /// /// A function that evaluates to a Boolean when given an item in the sequence. /// The input sequence. + /// /// The found element or None. - /// Thrown when the input sequence is null. - /// This function consumes the whole input sequence before returning the result. + /// + /// Thrown when the input sequence is null. [] val tryFindBack: predicate:('T -> bool) -> source:seq<'T> -> 'T option @@ -1249,28 +1275,33 @@ namespace Microsoft.FSharp.Collections /// /// The found index or None. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryFindIndex : predicate:('T -> bool) -> source:seq<'T> -> int option /// Tries to find the nth element in the sequence. /// Returns None if index is negative or the input sequence does not contain enough elements. + /// /// The index of element to retrieve. /// The input sequence. + /// /// The nth element of the sequence or None. - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryItem: index:int -> source:seq<'T> -> 'T option /// Returns the index of the last element in the sequence /// that satisfies the given predicate. Return None if no such element exists. + /// /// This function digests the whole initial sequence as soon as it is called. As a /// result this function should not be used with large or infinite sequences. + /// /// A function that evaluates to a Boolean when given an item in the sequence. /// The input sequence. + /// /// The found index or None. - /// Thrown when the input sequence is null. - /// This function consumes the whole input sequence before returning the result. + /// + /// Thrown when the input sequence is null. [] val tryFindIndexBack : predicate:('T -> bool) -> source:seq<'T> -> int option @@ -1282,17 +1313,21 @@ namespace Microsoft.FSharp.Collections /// /// The chosen element or None. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val tryPick: chooser:('T -> 'U option) -> source:seq<'T> -> 'U option /// Returns the transpose of the given sequence of sequences. + /// /// This function returns a sequence that digests the whole initial sequence as soon as /// that sequence is iterated. As a result this function should not be used with /// large or infinite sequences. + /// /// The input sequence. + /// /// The transposed sequence. - /// Thrown when the input sequence is null. + /// + /// Thrown when the input sequence is null. [] val transpose: source:seq<'Collection> -> seq> when 'Collection :> seq<'T> @@ -1303,7 +1338,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when the input sequence is null. + /// Thrown when the input sequence is null. [] val truncate: count:int -> source:seq<'T> -> seq<'T> @@ -1313,10 +1348,7 @@ namespace Microsoft.FSharp.Collections /// generator, until a None value is returned by the element generator. Each call to the element /// generator returns a new residual state. /// - /// The stream will be recomputed each time an IEnumerator is requested and iterated for the Seq. - /// - /// The returned sequence may be passed between threads safely. However, - /// individual IEnumerator values generated from the returned sequence should not be accessed concurrently. + /// The stream will be recomputed each time an IEnumerator is requested and iterated for the Seq. /// /// A function that takes in the current state and returns an option tuple of the next /// element of the sequence and the next state value. @@ -1328,11 +1360,13 @@ namespace Microsoft.FSharp.Collections /// Returns a sequence that yields sliding windows containing elements drawn from the input /// sequence. Each window is returned as a fresh array. + /// /// The number of elements in each window. /// The input sequence. + /// /// The result sequence. - /// Thrown when the input sequence is null. - /// Thrown when windowSize is not positive. + /// Thrown when the input sequence is null. + /// Thrown when windowSize is not positive. [] val windowed: windowSize:int -> source:seq<'T> -> seq<'T[]> @@ -1345,7 +1379,7 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input sequences is null. [] val zip: source1:seq<'T1> -> source2:seq<'T2> -> seq<'T1 * 'T2> @@ -1359,6 +1393,6 @@ namespace Microsoft.FSharp.Collections /// /// The result sequence. /// - /// Thrown when any of the input sequences is null. + /// Thrown when any of the input sequences is null. [] val zip3: source1:seq<'T1> -> source2:seq<'T2> -> source3:seq<'T3> -> seq<'T1 * 'T2 * 'T3> diff --git a/src/fsharp/FSharp.Core/set.fsi b/src/fsharp/FSharp.Core/set.fsi index 9293a52331..53f1d725ab 100644 --- a/src/fsharp/FSharp.Core/set.fsi +++ b/src/fsharp/FSharp.Core/set.fsi @@ -7,11 +7,10 @@ namespace Microsoft.FSharp.Collections open Microsoft.FSharp.Core open Microsoft.FSharp.Collections - /// Immutable sets based on binary trees, where comparison is the - /// F# structural comparison function, potentially using implementations - /// of the IComparable interface on key values. + /// Immutable sets based on binary trees, where elements are ordered by F# generic comparison. By default + /// comparison is the F# structural comparison function or uses implementations of the IComparable interface on element values. /// - /// See the Set module for further operations on sets. + /// See the module for further operations on sets. /// /// All members of this class are thread-safe and may be used concurrently from multiple threads. [] @@ -20,20 +19,25 @@ namespace Microsoft.FSharp.Collections /// Create a set containing elements drawn from the given sequence. /// The input sequence. + /// /// The result set. new : elements:seq<'T> -> Set<'T> /// A useful shortcut for Set.add. Note this operation produces a new set /// and does not mutate the original set. The new set will share many storage /// nodes with the original. See the Set module for further operations on sets. + /// /// The value to add to the set. + /// /// The result set. member Add : value:'T -> Set<'T> /// A useful shortcut for Set.remove. Note this operation produces a new set /// and does not mutate the original set. The new set will share many storage /// nodes with the original. See the Set module for further operations on sets. + /// /// The value to remove from the set. + /// /// The result set. member Remove : value:'T -> Set<'T> @@ -41,7 +45,9 @@ namespace Microsoft.FSharp.Collections member Count : int /// A useful shortcut for Set.contains. See the Set module for further operations on sets. + /// /// The value to check. + /// /// True if the set contains value. member Contains : value:'T -> bool @@ -49,37 +55,49 @@ namespace Microsoft.FSharp.Collections member IsEmpty : bool /// Returns a new set with the elements of the second set removed from the first. + /// /// The first input set. /// The second input set. + /// /// A set containing elements of the first set that are not contained in the second set. static member (-) : set1:Set<'T> * set2:Set<'T> -> Set<'T> /// Compute the union of the two sets. + /// /// The first input set. /// The second input set. + /// /// The union of the two input sets. static member (+) : set1:Set<'T> * set2:Set<'T> -> Set<'T> /// Evaluates to "true" if all elements of the first set are in the second. + /// /// The set to test against. + /// /// True if this set is a subset of otherSet. member IsSubsetOf: otherSet:Set<'T> -> bool /// Evaluates to "true" if all elements of the first set are in the second, and at least /// one element of the second is not in the first. + /// /// The set to test against. + /// /// True if this set is a proper subset of otherSet. member IsProperSubsetOf: otherSet:Set<'T> -> bool /// Evaluates to "true" if all elements of the second set are in the first. + /// /// The set to test against. + /// /// True if this set is a superset of otherSet. member IsSupersetOf: otherSet:Set<'T> -> bool /// Evaluates to "true" if all elements of the second set are in the first, and at least /// one element of the first is not in the second. + /// /// The set to test against. + /// /// True if this set is a proper superset of otherSet. member IsProperSupersetOf: otherSet:Set<'T> -> bool @@ -108,7 +126,7 @@ namespace Microsoft.FSharp.Collections [] [] - /// Functional programming operators related to the Set<_> type. + /// Contains operations for working with values of type . module Set = /// The empty set for the type 'T. @@ -117,59 +135,75 @@ namespace Microsoft.FSharp.Collections val empty<'T> : Set<'T> when 'T : comparison /// The set containing the given element. + /// /// The value for the set to contain. + /// /// The set containing value. [] val singleton: value:'T -> Set<'T> /// Returns a new set with an element added to the set. No exception is raised if /// the set already contains the given element. + /// /// The value to add. /// The input set. + /// /// A new set containing value. [] val add: value:'T -> set:Set<'T> -> Set<'T> /// Evaluates to "true" if the given element is in the given set. + /// /// The element to test. /// The input set. + /// /// True if element is in set. [] val contains: element:'T -> set:Set<'T> -> bool /// Evaluates to "true" if all elements of the first set are in the second + /// /// The potential subset. /// The set to test against. + /// /// True if set1 is a subset of set2. [] val isSubset: set1: Set<'T> -> set2:Set<'T> -> bool /// Evaluates to "true" if all elements of the first set are in the second, and at least /// one element of the second is not in the first. + /// /// The potential subset. /// The set to test against. + /// /// True if set1 is a proper subset of set2. [] val isProperSubset: set1: Set<'T> -> set2:Set<'T> -> bool /// Evaluates to "true" if all elements of the second set are in the first. + /// /// The potential superset. /// The set to test against. + /// /// True if set1 is a superset of set2. [] val isSuperset: set1: Set<'T> -> set2:Set<'T> -> bool /// Evaluates to "true" if all elements of the second set are in the first, and at least /// one element of the first is not in the second. + /// /// The potential superset. /// The set to test against. + /// /// True if set1 is a proper superset of set2. [] val isProperSuperset: set1: Set<'T> -> set2:Set<'T> -> bool /// Returns the number of elements in the set. Same as size. + /// /// The input set. + /// /// The number of elements in the set. [] val count: set:Set<'T> -> int @@ -177,40 +211,50 @@ namespace Microsoft.FSharp.Collections /// Tests if any element of the collection satisfies the given predicate. /// If the input function is predicate and the elements are i0...iN /// then computes p i0 or ... or p iN. + /// /// The function to test set elements. /// The input set. + /// /// True if any element of set satisfies predicate. [] val exists: predicate:('T -> bool) -> set:Set<'T> -> bool /// Returns a new collection containing only the elements of the collection /// for which the given predicate returns True. + /// /// The function to test set elements. /// The input set. + /// /// The set containing only the elements for which predicate returns true. [] val filter: predicate:('T -> bool) -> set:Set<'T> -> Set<'T> /// Returns a new collection containing the results of applying the /// given function to each element of the input set. + /// /// The function to transform elements of the input set. /// The input set. + /// /// A set containing the transformed elements. [] val map: mapping:('T -> 'U) -> set:Set<'T> -> Set<'U> /// Applies the given accumulating function to all the elements of the set + /// /// The accumulating function. /// The initial state. /// The input set. + /// /// The final state. [] val fold<'T,'State> : folder:('State -> 'T -> 'State) -> state:'State -> set:Set<'T> -> 'State when 'T : comparison /// Applies the given accumulating function to all the elements of the set. + /// /// The accumulating function. /// The input set. /// The initial state. + /// /// The final state. [] val foldBack<'T,'State> : folder:('T -> 'State -> 'State) -> set:Set<'T> -> state:'State -> 'State when 'T : comparison @@ -218,46 +262,59 @@ namespace Microsoft.FSharp.Collections /// Tests if all elements of the collection satisfy the given predicate. /// If the input function is f and the elements are i0...iN and "j0...jN" /// then computes p i0 && ... && p iN. + /// /// The function to test set elements. /// The input set. + /// /// True if all elements of set satisfy predicate. [] val forall: predicate:('T -> bool) -> set:Set<'T> -> bool /// Computes the intersection of the two sets. + /// /// The first input set. /// The second input set. + /// /// The intersection of set1 and set2. [] val intersect: set1:Set<'T> -> set2:Set<'T> -> Set<'T> /// Computes the intersection of a sequence of sets. The sequence must be non-empty. + /// /// The sequence of sets to intersect. + /// /// The intersection of the input sets. [] val intersectMany: sets:seq> -> Set<'T> /// Computes the union of the two sets. + /// /// The first input set. /// The second input set. + /// /// The union of set1 and set2. [] val union: set1:Set<'T> -> set2:Set<'T> -> Set<'T> /// Computes the union of a sequence of sets. + /// /// The sequence of sets to union. + /// /// The union of the input sets. [] val unionMany: sets:seq> -> Set<'T> /// Returns "true" if the set is empty. + /// /// The input set. + /// /// True if set is empty. [] val isEmpty: set:Set<'T> -> bool /// Applies the given function to each element of the set, in order according /// to the comparison function. + /// /// The function to apply to each element. /// The input set. [] @@ -265,8 +322,10 @@ namespace Microsoft.FSharp.Collections /// Splits the set into two sets containing the elements for which the given predicate /// returns true and false respectively. + /// /// The function to test set elements. /// The input set. + /// /// A pair of sets with the first containing the elements for which predicate returns /// true and the second containing the elements for which predicate returns false. [] @@ -274,63 +333,83 @@ namespace Microsoft.FSharp.Collections /// Returns a new set with the given element removed. No exception is raised if /// the set doesn't contain the given element. + /// /// The element to remove. /// The input set. + /// /// The input set with value removed. [] val remove: value: 'T -> set:Set<'T> -> Set<'T> /// Returns the lowest element in the set according to the ordering being used for the set. + /// /// The input set. + /// /// The min value from the set. [] val minElement: set:Set<'T> -> 'T /// Returns the highest element in the set according to the ordering being used for the set. + /// /// The input set. + /// /// The max value from the set. [] val maxElement: set:Set<'T> -> 'T /// Builds a set that contains the same elements as the given list. + /// /// The input list. + /// /// A set containing the elements form the input list. [] val ofList: elements:'T list -> Set<'T> /// Builds a list that contains the elements of the set in order. + /// /// The input set. + /// /// An ordered list of the elements of set. [] val toList: set:Set<'T> -> 'T list /// Builds a set that contains the same elements as the given array. + /// /// The input array. + /// /// A set containing the elements of array. [] val ofArray: array:'T[] -> Set<'T> /// Builds an array that contains the elements of the set in order. + /// /// The input set. + /// /// An ordered array of the elements of set. [] val toArray: set:Set<'T> -> 'T[] /// Returns an ordered view of the collection as an enumerable object. + /// /// The input set. + /// /// An ordered sequence of the elements of set. [] val toSeq: set:Set<'T> -> seq<'T> /// Builds a new collection from the given enumerable object. + /// /// The input sequence. + /// /// The set containing elements. [] val ofSeq: elements:seq<'T> -> Set<'T> /// Returns a new set with the elements of the second set removed from the first. + /// /// The first input set. /// The set whose elements will be removed from set1. + /// /// The set with the elements of set2 removed from set1. [] val difference: set1:Set<'T> -> set2:Set<'T> -> Set<'T> diff --git a/src/fsharp/FSharp.Core/string.fsi b/src/fsharp/FSharp.Core/string.fsi index 59217506a6..cca1054f58 100644 --- a/src/fsharp/FSharp.Core/string.fsi +++ b/src/fsharp/FSharp.Core/string.fsi @@ -10,7 +10,10 @@ namespace Microsoft.FSharp.Core /// Functional programming operators for string processing. Further string operations /// are available via the member functions on strings and other functionality in /// System.String - /// and System.Text.RegularExpressions types. + /// and System.Text.RegularExpressions types. + /// + /// + /// Strings and Text [] [] module String = @@ -20,13 +23,15 @@ namespace Microsoft.FSharp.Core /// The separator string to be inserted between the strings /// of the input sequence. /// The sequence of strings to be concatenated. + /// /// A new string consisting of the concatenated strings separated by /// the separation string. - /// Thrown when strings is null. + /// Thrown when strings is null. [] val concat: sep:string -> strings: seq -> string /// Applies the function action to each character in the string. + /// /// The function to be applied to each character of the string. /// The input string. [] @@ -34,6 +39,7 @@ namespace Microsoft.FSharp.Core /// Applies the function action to the index of each character in the string and the /// character itself. + /// /// The function to apply to each character and index of the string. /// The input string. [] @@ -41,16 +47,20 @@ namespace Microsoft.FSharp.Core /// Builds a new string whose characters are the results of applying the function mapping /// to each of the characters of the input string. + /// /// The function to apply to the characters of the string. /// The input string. + /// /// The resulting string. [] val map: mapping:(char -> char) -> str:string -> string /// Builds a new string whose characters are the results of applying the function mapping /// to each character and index of the input string. + /// /// The function to apply to each character and index of the string. /// The input string. + /// /// The resulting string. [] val mapi: mapping:(int -> char -> char) -> str:string -> string @@ -58,8 +68,10 @@ namespace Microsoft.FSharp.Core /// Builds a new string whose characters are the results of applying the function mapping /// to each of the characters of the input string and concatenating the resulting /// strings. + /// /// The function to produce a string from each character of the input string. /// The input string. + /// /// The concatenated string. [] val collect: mapping:(char -> string) -> str:string -> string @@ -71,6 +83,7 @@ namespace Microsoft.FSharp.Core /// /// A function to test whether each character in the input sequence should be included in the output string. /// The input string. + /// /// The resulting string. [] val filter: predicate:(char -> bool) -> str:string -> string @@ -78,38 +91,48 @@ namespace Microsoft.FSharp.Core /// Builds a new string whose characters are the results of applying the function mapping /// to each index from 0 to count-1 and concatenating the resulting /// strings. + /// /// The number of strings to initialize. /// The function to take an index and produce a string to /// be concatenated with the others. + /// /// The constructed string. - /// Thrown when count is negative. + /// Thrown when count is negative. [] val init: count:int -> initializer:(int -> string) -> string /// Tests if all characters in the string satisfy the given predicate. + /// /// The function to test each character of the string. /// The input string. + /// /// True if all characters return true for the predicate and false otherwise. [] val forall: predicate:(char -> bool) -> str:string -> bool /// Tests if any character of the string satisfies the given predicate. + /// /// The function to test each character of the string. /// The input string. + /// /// True if any character returns true for the predicate and false otherwise. [] val exists: predicate:(char -> bool) -> str:string -> bool /// Returns a string by concatenating count instances of str. + /// /// The number of copies of the input string will be copied. /// The input string. + /// /// The concatenated string. - /// Thrown when count is negative. + /// Thrown when count is negative. [] val replicate: count:int -> str: string -> string /// Returns the length of the string. + /// /// The input string. + /// /// The number of characters in the string. [] val length: str:string -> int diff --git a/src/fsharp/LanguageFeatures.fs b/src/fsharp/LanguageFeatures.fs index ad0d8c0185..8c8330ea4d 100644 --- a/src/fsharp/LanguageFeatures.fs +++ b/src/fsharp/LanguageFeatures.fs @@ -33,6 +33,7 @@ type LanguageFeature = | DefaultInterfaceMemberConsumption | WitnessPassing | InterfacesWithMultipleGenericInstantiation + | StringInterpolation /// LanguageVersion management type LanguageVersion (specifiedVersionAsString) = @@ -71,6 +72,7 @@ type LanguageVersion (specifiedVersionAsString) = LanguageFeature.WitnessPassing, previewVersion LanguageFeature.InterfacesWithMultipleGenericInstantiation, previewVersion LanguageFeature.NameOf, previewVersion + LanguageFeature.StringInterpolation, previewVersion ] let specified = @@ -141,6 +143,7 @@ type LanguageVersion (specifiedVersionAsString) = | LanguageFeature.DefaultInterfaceMemberConsumption -> FSComp.SR.featureDefaultInterfaceMemberConsumption() | LanguageFeature.WitnessPassing -> FSComp.SR.featureWitnessPassing() | LanguageFeature.InterfacesWithMultipleGenericInstantiation -> FSComp.SR.featureInterfacesWithMultipleGenericInstantiation() + | LanguageFeature.StringInterpolation -> FSComp.SR.featureStringInterpolation() /// Get a version string associated with the given feature. member _.GetFeatureVersionString feature = diff --git a/src/fsharp/LanguageFeatures.fsi b/src/fsharp/LanguageFeatures.fsi index e616a3a9c3..95ad370a5e 100644 --- a/src/fsharp/LanguageFeatures.fsi +++ b/src/fsharp/LanguageFeatures.fsi @@ -21,6 +21,7 @@ type LanguageFeature = | DefaultInterfaceMemberConsumption | WitnessPassing | InterfacesWithMultipleGenericInstantiation + | StringInterpolation /// LanguageVersion management type LanguageVersion = diff --git a/src/fsharp/LexFilter.fs b/src/fsharp/LexFilter.fs index c7ed393917..d72a3dae66 100644 --- a/src/fsharp/LexFilter.fs +++ b/src/fsharp/LexFilter.fs @@ -86,7 +86,7 @@ type Context = | CtxtDo _ -> "do" | CtxtInterfaceHead _ -> "interface-decl" | CtxtTypeDefns _ -> "type" - | CtxtParen _ -> "paren" + | CtxtParen(_, p) -> sprintf "paren(%s)" (stringOfPos p) | CtxtMemberHead _ -> "member-head" | CtxtMemberBody _ -> "body" | CtxtSeqBlock (b, p, _addBlockEnd) -> sprintf "seqblock(%s, %s)" (match b with FirstInSeqBlock -> "first" | NotFirstInSeqBlock -> "subsequent") (stringOfPos p) @@ -271,7 +271,7 @@ let rec isTypeContinuator token = // end with <--- 'end' HERE // static member M() = 1 // end - | RBRACE | WITH | BAR | AND | END -> true + | RBRACE _ | WITH | BAR | AND | END -> true // The following arise during reprocessing of the inserted tokens when we hit a DONE | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true @@ -340,7 +340,7 @@ let rec isSeqBlockElementContinuator token = // ... // ), <------- NOTE RPAREN HERE // Shortcut.CtrlO) - | END | AND | WITH | THEN | RPAREN | RBRACE | BAR_RBRACE | RBRACK | BAR_RBRACK | RQUOTE _ -> true + | END | AND | WITH | THEN | RPAREN | RBRACE _ | BAR_RBRACE | RBRACK | BAR_RBRACK | RQUOTE _ -> true // The following arise during reprocessing of the inserted tokens when we hit a DONE | ORIGHT_BLOCK_END | OBLOCKEND | ODECLEND -> true @@ -368,7 +368,7 @@ let isAtomicExprEndToken token = | UINT8 _ | UINT16 _ | UINT32 _ | UINT64 _ | UNATIVEINT _ | DECIMAL _ | BIGNUM _ | STRING _ | BYTEARRAY _ | CHAR _ | IEEE32 _ | IEEE64 _ - | RPAREN | RBRACK | RBRACE | BAR_RBRACE | BAR_RBRACK | END + | RPAREN | RBRACK | RBRACE _ | BAR_RBRACE | BAR_RBRACK | END | NULL | FALSE | TRUE | UNDERSCORE -> true | _ -> false @@ -378,13 +378,17 @@ let isAtomicExprEndToken token = let parenTokensBalance t1 t2 = match t1, t2 with | (LPAREN, RPAREN) - | (LBRACE, RBRACE) + | (LBRACE _, RBRACE _) | (LBRACE_BAR, BAR_RBRACE) | (LBRACK, RBRACK) | (INTERFACE, END) | (CLASS, END) | (SIG, END) | (STRUCT, END) + | (INTERP_STRING_BEGIN_PART _, INTERP_STRING_END _) + | (INTERP_STRING_BEGIN_PART _, INTERP_STRING_PART _) + | (INTERP_STRING_PART _, INTERP_STRING_PART _) + | (INTERP_STRING_PART _, INTERP_STRING_END _) | (LBRACK_BAR, BAR_RBRACK) | (LESS true, GREATER true) | (BEGIN, END) -> true @@ -524,7 +528,7 @@ type PositionWithColumn = //---------------------------------------------------------------------------- // build a LexFilter //--------------------------------------------------------------------------*) -type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, lexbuf: UnicodeLexing.Lexbuf) = +type LexFilterImpl (lightStatus: LightSyntaxStatus, compilingFsLib, lexer, lexbuf: UnicodeLexing.Lexbuf) = //---------------------------------------------------------------------------- // Part I. Building a new lex stream from an old @@ -651,7 +655,7 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, let detectJoinInCtxt stack = let rec check s = match s with - | CtxtParen(LBRACE, _) :: _ -> true + | CtxtParen(LBRACE _, _) :: _ -> true | (CtxtSeqBlock _ | CtxtDo _ | CtxtFor _) :: rest -> check rest | _ -> false match stack with @@ -707,9 +711,9 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, // 'f ...{' places no limit until we hit a CtxtLetDecl etc... // 'f ...[' places no limit until we hit a CtxtLetDecl etc... // 'f ...[|' places no limit until we hit a CtxtLetDecl etc... - | _, (CtxtParen ((LBRACE | LBRACK | LBRACK_BAR), _) :: CtxtSeqBlock _ :: rest) - | _, (CtxtParen ((LBRACE | LBRACK | LBRACK_BAR), _) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) - | _, (CtxtSeqBlock _ :: CtxtParen((LBRACE | LBRACK | LBRACK_BAR), _) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) + | _, (CtxtParen ((LBRACE _ | LBRACK | LBRACK_BAR), _) :: CtxtSeqBlock _ :: rest) + | _, (CtxtParen ((LBRACE _ | LBRACK | LBRACK_BAR), _) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) + | _, (CtxtSeqBlock _ :: CtxtParen((LBRACE _ | LBRACK | LBRACK_BAR), _) :: CtxtVanilla _ :: CtxtSeqBlock _ :: rest) -> undentationLimit false rest // MAJOR PERMITTED UNDENTATION This is allowing: @@ -787,8 +791,8 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, // 'if ... else [' limited by 'if' // 'if ... else [|' limited by 'if' | _, (CtxtParen ((SIG | STRUCT | BEGIN), _) :: CtxtSeqBlock _ :: (CtxtModuleBody (_, false) as limitCtxt) :: _) - | _, (CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE | LBRACE_BAR | LBRACK_BAR), _) :: CtxtSeqBlock _ :: CtxtThen _ :: (CtxtIf _ as limitCtxt) :: _) - | _, (CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE | LBRACE_BAR | LBRACK_BAR | LBRACK_LESS), _) :: CtxtSeqBlock _ :: CtxtElse _ :: (CtxtIf _ as limitCtxt) :: _) + | _, (CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE _ | LBRACE_BAR | LBRACK_BAR), _) :: CtxtSeqBlock _ :: CtxtThen _ :: (CtxtIf _ as limitCtxt) :: _) + | _, (CtxtParen ((BEGIN | LPAREN | LBRACK | LBRACE _ | LBRACE_BAR | LBRACK_BAR | LBRACK_LESS), _) :: CtxtSeqBlock _ :: CtxtElse _ :: (CtxtIf _ as limitCtxt) :: _) // 'f ... (' in seqblock limited by 'f' // 'f ... {' in seqblock limited by 'f' NOTE: this is covered by the more generous case above @@ -814,7 +818,7 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, // REVIEW: document these | _, (CtxtSeqBlock _ :: CtxtParen((BEGIN | LPAREN | LBRACK | LBRACK_BAR), _) :: CtxtVanilla _ :: (CtxtSeqBlock _ as limitCtxt) :: _) - | (CtxtSeqBlock _), (CtxtParen ((BEGIN | LPAREN | LBRACE | LBRACE_BAR | LBRACK | LBRACK_BAR), _) :: CtxtSeqBlock _ :: ((CtxtTypeDefns _ | CtxtLetDecl _ | CtxtMemberBody _ | CtxtWithAsLet _) as limitCtxt) :: _) + | (CtxtSeqBlock _), (CtxtParen ((BEGIN | LPAREN | LBRACE _ | LBRACE_BAR | LBRACK | LBRACK_BAR), _) :: CtxtSeqBlock _ :: ((CtxtTypeDefns _ | CtxtLetDecl _ | CtxtMemberBody _ | CtxtWithAsLet _) as limitCtxt) :: _) -> PositionWithColumn(limitCtxt.StartPos, limitCtxt.StartCol + 1) // Permitted inner-construct (e.g. "then" block and "else" block in overall @@ -845,7 +849,9 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, match newCtxt with // Don't bother to check pushes of Vanilla blocks since we've // always already pushed a SeqBlock at this position. - | CtxtVanilla _ -> () + | CtxtVanilla _ + // String interpolation inner expressions are not limited (e.g. multiline strings) + | CtxtParen((INTERP_STRING_BEGIN_PART _ | INTERP_STRING_PART _),_) -> () | _ -> let p1 = undentationLimit true offsideStack let c2 = newCtxt.StartCol @@ -1053,7 +1059,7 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, // WITH balances except in the following contexts.... Phew - an overused keyword! | WITH, ( ((CtxtMatch _ | CtxtException _ | CtxtMemberHead _ | CtxtInterfaceHead _ | CtxtTry _ | CtxtTypeDefns _ | CtxtMemberBody _) :: _) // This is the nasty record/object-expression case - | (CtxtSeqBlock _ :: CtxtParen((LBRACE | LBRACE_BAR), _) :: _) ) + | (CtxtSeqBlock _ :: CtxtParen((LBRACE _ | LBRACE_BAR), _) :: _) ) | FINALLY, (CtxtTry _ :: _) -> true @@ -1177,7 +1183,7 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, false // no member currently on the stack, nothing to pop else // there is a member context - if List.exists (function CtxtParen(LBRACE, _) -> true | _ -> false) ctxtStack then + if List.exists (function CtxtParen(LBRACE _, _) -> true | _ -> false) ctxtStack then false // an LBRACE could mean an object expression, and object expressions can have 'member' tokens in them, so do not pop, to be safe elif List.count (function CtxtParen(LPAREN, _) -> true | _ -> false) ctxtStack >= 2 then false // static member constraints always are embedded in at least two LPARENS, so do not pop, to be safe @@ -1223,12 +1229,14 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, | IN | RPAREN | GREATER true - | RBRACE + | RBRACE _ | BAR_RBRACE | RBRACK | BAR_RBRACK | WITH | FINALLY + | INTERP_STRING_PART _ + | INTERP_STRING_END _ | RQUOTE _ -> not (tokenBalancesHeadContext token stack) && // Only close the context if some context is going to match at some point in the stack. @@ -1263,7 +1271,7 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, while not offsideStack.IsEmpty && (not(nextOuterMostInterestingContextIsNamespaceOrModule offsideStack)) && (match offsideStack.Head with // open-parens of sorts - | CtxtParen((LPAREN|LBRACK|LBRACE|LBRACE_BAR|LBRACK_BAR), _) -> true + | CtxtParen((LPAREN|LBRACK|LBRACE _ |LBRACE_BAR|LBRACK_BAR), _) -> true // seq blocks | CtxtSeqBlock _ -> true // vanillas @@ -1314,7 +1322,7 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, | _ when tokenForcesHeadContextClosure token offsideStack -> let ctxt = offsideStack.Head - if debug then dprintf "IN/ELSE/ELIF/DONE/RPAREN/RBRACE/END at %a terminates context at position %a\n" outputPos tokenStartPos outputPos ctxt.StartPos + if debug then dprintf "IN/ELSE/ELIF/DONE/RPAREN/RBRACE/END/INTERP at %a terminates context at position %a\n" outputPos tokenStartPos outputPos ctxt.StartPos popCtxt() match endTokenForACtxt ctxt with | Some tok -> @@ -1362,12 +1370,20 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, hwTokenFetch useBlockRule // Balancing rule. Encountering a ')' or '}' balances with a '(' or '{', even if not offside - | ((END | RPAREN | RBRACE | BAR_RBRACE | RBRACK | BAR_RBRACK | RQUOTE _ | GREATER true) as t2), (CtxtParen (t1, _) :: _) + | ((END | RPAREN | RBRACE _ | BAR_RBRACE | RBRACK | BAR_RBRACK | RQUOTE _ | GREATER true | INTERP_STRING_END _ | INTERP_STRING_PART _) as t2), (CtxtParen (t1, _) :: _) when parenTokensBalance t1 t2 -> if debug then dprintf "RPAREN/RBRACE/BAR_RBRACE/RBRACK/BAR_RBRACK/RQUOTE/END at %a terminates CtxtParen()\n" outputPos tokenStartPos popCtxt() - // Queue a dummy token at this position to check if any closing rules apply - delayToken(pool.UseLocation(tokenTup, ODUMMY token)) + match t2 with + // $".... { ... } ... { ....} " pushes a block context at second { + // ~~~~~~~~ + // ^---------INTERP_STRING_PART + | INTERP_STRING_PART _ -> + pushCtxt tokenTup (CtxtParen (token, tokenTup.LexbufState.EndPos)) + pushCtxtSeqBlock(false, NoAddBlockEnd) + | _ -> + // Queue a dummy token at this position to check if any closing rules apply + delayToken(pool.UseLocation(tokenTup, ODUMMY token)) returnToken tokenLexbufState token // Balancing rule. Encountering a 'end' can balance with a 'with' but only when not offside @@ -1852,6 +1868,7 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, else returnToken tokenLexbufState token + // 'with id = ' ~~~> CtxtSeqBlock // 'with M.id = ' ~~~> CtxtSeqBlock // 'with id1 = 1 @@ -1865,7 +1882,7 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, // '{ id1 = 1 // M.id2 = ... ' ~~~> CtxtSeqBlock | EQUALS, ((CtxtWithAsLet _) :: _) // This detects 'with = '. - | EQUALS, ((CtxtVanilla (_, true)) :: (CtxtSeqBlock _) :: (CtxtWithAsLet _ | CtxtParen((LBRACE | LBRACE_BAR), _)) :: _) -> + | EQUALS, ((CtxtVanilla (_, true)) :: (CtxtSeqBlock _) :: (CtxtWithAsLet _ | CtxtParen((LBRACE _ | LBRACE_BAR), _)) :: _) -> if debug then dprintf "CtxtLetDecl/CtxtWithAsLet: EQUALS, pushing CtxtSeqBlock\n" // We don't insert begin/end block tokens for single-line bindings since we can't properly distinguish single-line *) // record update expressions such as "{ t with gbuckets=Array.copy t.gbuckets; gcount=t.gcount }" *) @@ -1889,9 +1906,15 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, returnToken tokenLexbufState token // '(' tokens are balanced with ')' tokens and also introduce a CtxtSeqBlock - | (BEGIN | LPAREN | SIG | LBRACE | LBRACE_BAR | LBRACK | LBRACK_BAR | LQUOTE _ | LESS true), _ -> + // $".... { ... } ... { ....} " pushes a block context at first { + // ~~~~~~~~ + // ^---------INTERP_STRING_BEGIN_PART + | (BEGIN | LPAREN | SIG | LBRACE _ | LBRACE_BAR | LBRACK | LBRACK_BAR | LQUOTE _ | LESS true | INTERP_STRING_BEGIN_PART _), _ -> if debug then dprintf "LPAREN etc., pushes CtxtParen, pushing CtxtSeqBlock, tokenStartPos = %a\n" outputPos tokenStartPos - pushCtxt tokenTup (CtxtParen (token, tokenStartPos)) + let pos = match token with + | INTERP_STRING_BEGIN_PART _ -> tokenTup.LexbufState.EndPos + | _ -> tokenStartPos + pushCtxt tokenTup (CtxtParen (token, pos)) pushCtxtSeqBlock(false, NoAddBlockEnd) returnToken tokenLexbufState token @@ -1915,7 +1938,7 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, // comprehension/match | (CtxtWhile _ | CtxtFor _ | CtxtWhen _ | CtxtMatchClauses _ | CtxtFun _) :: _ -> true // comprehension - | (CtxtSeqBlock _ :: CtxtParen ((LBRACK | LBRACE | LBRACE_BAR | LBRACK_BAR), _) :: _) -> true + | (CtxtSeqBlock _ :: CtxtParen ((LBRACK | LBRACE _ | LBRACE_BAR | LBRACK_BAR), _) :: _) -> true // comprehension | (CtxtSeqBlock _ :: (CtxtDo _ | CtxtWhile _ | CtxtFor _ | CtxtWhen _ | CtxtMatchClauses _ | CtxtTry _ | CtxtThen _ | CtxtElse _) :: _) -> true | _ -> false) -> @@ -1966,11 +1989,11 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, returnToken tokenLexbufState token | WITH, (((CtxtException _ | CtxtTypeDefns _ | CtxtMemberHead _ | CtxtInterfaceHead _ | CtxtMemberBody _) as limCtxt) :: _) - | WITH, ((CtxtSeqBlock _) as limCtxt :: CtxtParen((LBRACE | LBRACE_BAR), _) :: _) -> + | WITH, ((CtxtSeqBlock _) as limCtxt :: CtxtParen((LBRACE _ | LBRACE_BAR), _) :: _) -> let lookaheadTokenTup = peekNextTokenTup() let lookaheadTokenStartPos = startPosOfTokenTup lookaheadTokenTup match lookaheadTokenTup.Token with - | RBRACE + | RBRACE _ | IDENT _ // The next clause detects the access annotations after the 'with' in: // member x.PublicGetSetProperty @@ -2192,6 +2215,13 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, and rulesForBothSoftWhiteAndHardWhite(tokenTup: TokenTup) = match tokenTup.Token with + | HASH_IDENT (ident) -> + let hashPos = new LexbufState(tokenTup.StartPos, tokenTup.StartPos.ShiftColumnBy(1), false) + let identPos = new LexbufState(tokenTup.StartPos.ShiftColumnBy(1), tokenTup.EndPos, false) + delayToken(new TokenTup(IDENT(ident), identPos, tokenTup.LastTokenPos)) + delayToken(new TokenTup(HASH, hashPos, tokenTup.LastTokenPos)) + true + // Insert HIGH_PRECEDENCE_PAREN_APP if needed | IDENT _ when (nextTokenIsAdjacentLParenOrLBrack tokenTup).IsSome -> let dotTokenTup = peekNextTokenTup() @@ -2291,7 +2321,7 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, | INT32(v, bad) -> delayMergedToken(INT32((if plus then v else -v), (plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not | INT32_DOT_DOT(v, bad) -> delayMergedToken(INT32_DOT_DOT((if plus then v else -v), (plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not | INT64(v, bad) -> delayMergedToken(INT64((if plus then v else -v), (plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not - | NATIVEINT v -> delayMergedToken(NATIVEINT(if plus then v else -v)) + | NATIVEINT(v, bad) -> delayMergedToken(NATIVEINT((if plus then v else -v), (plus && bad))) // note: '-' makes a 'bad' max int 'good'. '+' does not | IEEE32 v -> delayMergedToken(IEEE32(if plus then v else -v)) | IEEE64 v -> delayMergedToken(IEEE64(if plus then v else -v)) | DECIMAL v -> delayMergedToken(DECIMAL(if plus then v else System.Decimal.op_UnaryNegation v)) @@ -2331,7 +2361,7 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, let _firstTokenTup = peekInitial() () - if lightSyntaxStatus.Status + if lightStatus.Status then hwTokenFetch true else swTokenFetch() @@ -2339,8 +2369,8 @@ type LexFilterImpl (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, // LexFilterImpl does the majority of the work for offsides rules and other magic. // LexFilter just wraps it with light post-processing that introduces a few more 'coming soon' symbols, to // make it easier for the parser to 'look ahead' and safely shift tokens in a number of recovery scenarios. -type LexFilter (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, lexbuf: UnicodeLexing.Lexbuf) = - let inner = new LexFilterImpl (lightSyntaxStatus, compilingFsLib, lexer, lexbuf) +type LexFilter (lightStatus: LightSyntaxStatus, compilingFsLib, lexer, lexbuf: UnicodeLexing.Lexbuf) = + let inner = new LexFilterImpl (lightStatus, compilingFsLib, lexer, lexbuf) // We don't interact with lexbuf state at all, any inserted tokens have same state/location as the real one read, so // we don't have to do any of the wrapped lexbuf magic that you see in LexFilterImpl. @@ -2365,7 +2395,7 @@ type LexFilter (lightSyntaxStatus: LightSyntaxStatus, compilingFsLib, lexer, lex let rec loop() = let token = popNextToken() match token with - | RBRACE -> + | RBRACE _ -> insertComingSoonTokens RBRACE_COMING_SOON RBRACE_IS_HERE loop() | RPAREN -> diff --git a/src/fsharp/MethodCalls.fs b/src/fsharp/MethodCalls.fs index 61ce01d1af..441c999d75 100644 --- a/src/fsharp/MethodCalls.fs +++ b/src/fsharp/MethodCalls.fs @@ -853,7 +853,8 @@ let TryImportProvidedMethodBaseAsLibraryIntrinsic (amap: Import.ImportMap, m: ra match tryTcrefOfAppTy amap.g declaringType with | ValueSome declaringEntity -> if not declaringEntity.IsLocalRef && ccuEq declaringEntity.nlr.Ccu amap.g.fslibCcu then - match amap.g.knownIntrinsics.TryGetValue ((declaringEntity.LogicalName, methodName)) with + let n = mbase.PUntaint((fun x -> x.GetParameters().Length), m) + match amap.g.knownIntrinsics.TryGetValue ((declaringEntity.LogicalName, None, methodName, n)) with | true, vref -> Some vref | _ -> match amap.g.knownFSharpCoreModules.TryGetValue declaringEntity.LogicalName with diff --git a/src/fsharp/Microsoft.DotNet.DependencyManager/Microsoft.DotNet.DependencyManager.fsproj b/src/fsharp/Microsoft.DotNet.DependencyManager/Microsoft.DotNet.DependencyManager.fsproj index f593b99642..13e50e1967 100644 --- a/src/fsharp/Microsoft.DotNet.DependencyManager/Microsoft.DotNet.DependencyManager.fsproj +++ b/src/fsharp/Microsoft.DotNet.DependencyManager/Microsoft.DotNet.DependencyManager.fsproj @@ -22,10 +22,10 @@ - + + - diff --git a/src/fsharp/NameResolution.fs b/src/fsharp/NameResolution.fs index 43d7d1e6f1..aeea755617 100644 --- a/src/fsharp/NameResolution.fs +++ b/src/fsharp/NameResolution.fs @@ -2579,7 +2579,7 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified if first && id.idText = MangledGlobalName then match rest with | [] -> - error (Error(FSComp.SR.nrGlobalUsedOnlyAsFirstName(), id.idRange)) + raze (Error(FSComp.SR.nrGlobalUsedOnlyAsFirstName(), id.idRange)) | [next] -> ResolveExprLongIdentPrim sink ncenv false fullyQualified m ad nenv typeNameResInfo next [] isOpenDecl | id2 :: rest2 -> @@ -2603,11 +2603,12 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified let search = ChooseTyconRefInExpr (ncenv, m, ad, nenv, id, typeNameResInfo, resInfo, tcrefs) match AtMostOneResult m search with - | Result _ as res -> - let resInfo, item, rest = ForceRaise res + | Result (resInfo, item, rest) -> ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.Use, ad, resInfo, ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) Some(item, rest) - | Exception e -> typeError <- Some e; None + | Exception e -> + typeError <- Some e + None | true, res -> let fresh = FreshenUnqualifiedItem ncenv m res @@ -2624,7 +2625,7 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified None match envSearch with - | Some res -> res + | Some res -> success res | None -> let innerSearch = // Check if it's a type name, e.g. a constructor call or a type instantiation @@ -2640,9 +2641,9 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified ctorSearch +++ implicitOpSearch - let resInfo, item, rest = + let res = match AtMostOneResult m innerSearch with - | Result _ as res -> ForceRaise res + | Result _ as res -> res | _ -> let failingCase = match typeError with @@ -2671,11 +2672,12 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified addToBuffer (e.Value.DisplayName + "." + id.idText) raze (UndefinedName(0, FSComp.SR.undefinedNameValueOfConstructor, id, suggestNamesAndTypes)) - ForceRaise failingCase - + failingCase + match res with + | Exception e -> raze e + | Result (resInfo, item, rest) -> ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.Use, ad, resInfo, ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) - item, rest - + success (item, rest) // A compound identifier. // It still might be a value in the environment, or something in an F# module, namespace, type, or nested type @@ -2693,13 +2695,13 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified | _ -> false if ValIsInEnv id.idText then - nenv.eUnqualifiedItems.[id.idText], rest + success (nenv.eUnqualifiedItems.[id.idText], rest) else // Otherwise modules are searched first. REVIEW: modules and types should be searched together. // For each module referenced by 'id', search the module as if it were an F# module and/or a .NET namespace. let moduleSearch ad () = - ResolveLongIndentAsModuleOrNamespaceThen sink ResultCollectionSettings.AtMostOneResult ncenv.amap m fullyQualified nenv ad id rest isOpenDecl - (ResolveExprLongIdentInModuleOrNamespace ncenv nenv typeNameResInfo ad) + ResolveLongIndentAsModuleOrNamespaceThen sink ResultCollectionSettings.AtMostOneResult ncenv.amap m fullyQualified nenv ad id rest isOpenDecl + (ResolveExprLongIdentInModuleOrNamespace ncenv nenv typeNameResInfo ad) // REVIEW: somewhat surprisingly, this shows up on performance traces, with tcrefs non-nil. // This seems strange since we would expect in the vast majority of cases tcrefs is empty here. @@ -2717,59 +2719,59 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified NoResultsOrUsefulErrors let search = - let envSearch () = - match fullyQualified with - | FullyQualified -> - NoResultsOrUsefulErrors - | OpenQualified -> - match nenv.eUnqualifiedItems.TryGetValue id.idText with - | true, Item.UnqualifiedType _ - | false, _ -> NoResultsOrUsefulErrors - | true, res -> OneSuccess (resInfo, FreshenUnqualifiedItem ncenv m res, rest) - - moduleSearch ad () +++ tyconSearch ad +++ envSearch - - let resInfo, item, rest = + let envSearch () = + match fullyQualified with + | FullyQualified -> + NoResultsOrUsefulErrors + | OpenQualified -> + match nenv.eUnqualifiedItems.TryGetValue id.idText with + | true, Item.UnqualifiedType _ + | false, _ -> NoResultsOrUsefulErrors + | true, res -> OneSuccess (resInfo, FreshenUnqualifiedItem ncenv m res, rest) + + moduleSearch ad () +++ tyconSearch ad +++ envSearch + + let res = match AtMostOneResult m search with - | Result _ as res -> ForceRaise res + | Result _ as res -> res | _ -> let innerSearch = search +++ (moduleSearch AccessibleFromSomeFSharpCode) +++ (tyconSearch AccessibleFromSomeFSharpCode) let suggestEverythingInScope (addToBuffer: string -> unit) = - for kv in nenv.ModulesAndNamespaces fullyQualified do - for modref in kv.Value do - if IsEntityAccessible ncenv.amap m ad modref then - addToBuffer modref.DisplayName - addToBuffer modref.DemangledModuleOrNamespaceName + for kv in nenv.ModulesAndNamespaces fullyQualified do + for modref in kv.Value do + if IsEntityAccessible ncenv.amap m ad modref then + addToBuffer modref.DisplayName + addToBuffer modref.DemangledModuleOrNamespaceName - for e in nenv.TyconsByDemangledNameAndArity fullyQualified do - if IsEntityAccessible ncenv.amap m ad e.Value then - addToBuffer e.Value.DisplayName + for e in nenv.TyconsByDemangledNameAndArity fullyQualified do + if IsEntityAccessible ncenv.amap m ad e.Value then + addToBuffer e.Value.DisplayName - for e in nenv.eUnqualifiedItems do - if canSuggestThisItem e.Value then - addToBuffer e.Value.DisplayName + for e in nenv.eUnqualifiedItems do + if canSuggestThisItem e.Value then + addToBuffer e.Value.DisplayName match innerSearch with | Exception (UndefinedName(0, _, id1, suggestionsF)) when Range.equals id.idRange id1.idRange -> - let mergeSuggestions addToBuffer = - suggestionsF addToBuffer - suggestEverythingInScope addToBuffer - - let failingCase = raze (UndefinedName(0, FSComp.SR.undefinedNameValueNamespaceTypeOrModule, id, mergeSuggestions)) - ForceRaise failingCase - | Exception err -> ForceRaise(Exception err) - | Result (res :: _) -> ForceRaise(Result res) + let mergeSuggestions addToBuffer = + suggestionsF addToBuffer + suggestEverythingInScope addToBuffer + raze (UndefinedName(0, FSComp.SR.undefinedNameValueNamespaceTypeOrModule, id, mergeSuggestions)) + | Exception err -> raze err + | Result (res :: _) -> success res | Result [] -> - let failingCase = raze (UndefinedName(0, FSComp.SR.undefinedNameValueNamespaceTypeOrModule, id, suggestEverythingInScope)) - ForceRaise failingCase + raze (UndefinedName(0, FSComp.SR.undefinedNameValueNamespaceTypeOrModule, id, suggestEverythingInScope)) - ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.Use, ad, resInfo, ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) - item, rest + match res with + | Exception e -> raze e + | Result (resInfo, item, rest) -> + ResolutionInfo.SendEntityPathToSink(sink, ncenv, nenv, ItemOccurence.Use, ad, resInfo, ResultTyparChecker(fun () -> CheckAllTyparsInferrable ncenv.amap m item)) + success (item, rest) let ResolveExprLongIdent sink (ncenv: NameResolver) m ad nenv typeNameResInfo lid = match lid with - | [] -> error (Error(FSComp.SR.nrInvalidExpression(textOfLid lid), m)) + | [] -> raze (Error(FSComp.SR.nrInvalidExpression(textOfLid lid), m)) | id :: rest -> ResolveExprLongIdentPrim sink ncenv true OpenQualified m ad nenv typeNameResInfo id rest false //------------------------------------------------------------------------- @@ -3414,15 +3416,17 @@ type AfterResolution = /// /// Called for 'TypeName.Bar' - for VS IntelliSense, we can filter out instance members from method groups let ResolveLongIdentAsExprAndComputeRange (sink: TcResultsSink) (ncenv: NameResolver) wholem ad nenv typeNameResInfo lid = - let item1, rest = ResolveExprLongIdent sink ncenv wholem ad nenv typeNameResInfo lid + match ResolveExprLongIdent sink ncenv wholem ad nenv typeNameResInfo lid with + | Exception e -> Exception e + | Result (item1, rest) -> let itemRange = ComputeItemRange wholem lid rest let item = FilterMethodGroups ncenv itemRange item1 true match item1, item with | Item.MethodGroup(name, minfos1, _), Item.MethodGroup(_, [], _) when not (isNil minfos1) -> - error(Error(FSComp.SR.methodIsNotStatic name, wholem)) - | _ -> () + raze(Error(FSComp.SR.methodIsNotStatic name, wholem)) + | _ -> // Fake idents e.g. 'Microsoft.FSharp.Core.None' have identical ranges for each part let isFakeIdents = @@ -3462,7 +3466,7 @@ let ResolveLongIdentAsExprAndComputeRange (sink: TcResultsSink) (ncenv: NameReso callSink (item, emptyTyparInst) AfterResolution.DoNothing - item, itemRange, rest, afterResolution + success (item, itemRange, rest, afterResolution) let (|NonOverridable|_|) namedItem = match namedItem with @@ -3470,8 +3474,6 @@ let (|NonOverridable|_|) namedItem = | Item.Property(_, pinfos) when pinfos |> List.exists(fun pinfo -> pinfo.IsVirtualProperty) -> None | _ -> Some () - - /// Called for 'expression.Bar' - for VS IntelliSense, we can filter out static members from method groups /// Also called for 'GenericType.Bar' - for VS IntelliSense, we can filter out non-static members from method groups let ResolveExprDotLongIdentAndComputeRange (sink: TcResultsSink) (ncenv: NameResolver) wholem ad nenv ty lid findFlag thisIsActuallyATyAppNotAnExpr = @@ -3571,7 +3573,9 @@ let IsUnionCaseUnseen ad g amap m (ucref: UnionCaseRef) = let ItemIsUnseen ad g amap m item = match item with - | Item.Value x -> IsValUnseen ad g m x + | Item.Value x -> + let isUnseenNameOfOperator = valRefEq g g.nameof_vref x && not (g.langVersion.SupportsFeature LanguageFeature.NameOf) + isUnseenNameOfOperator || IsValUnseen ad g m x | Item.UnionCase(x, _) -> IsUnionCaseUnseen ad g amap m x.UnionCaseRef | Item.ExnCase x -> IsTyconUnseen ad g amap m x | _ -> false diff --git a/src/fsharp/NameResolution.fsi b/src/fsharp/NameResolution.fsi index 685871c056..7caa8321a0 100755 --- a/src/fsharp/NameResolution.fsi +++ b/src/fsharp/NameResolution.fsi @@ -545,7 +545,7 @@ val internal ResolveTypeLongIdent : TcResultsSink -> NameResol val internal ResolveField : TcResultsSink -> NameResolver -> NameResolutionEnv -> AccessorDomain -> TType -> Ident list * Ident -> Ident list -> FieldResolution list /// Resolve a long identifier occurring in an expression position -val internal ResolveExprLongIdent : TcResultsSink -> NameResolver -> range -> AccessorDomain -> NameResolutionEnv -> TypeNameResolutionInfo -> Ident list -> Item * Ident list +val internal ResolveExprLongIdent : TcResultsSink -> NameResolver -> range -> AccessorDomain -> NameResolutionEnv -> TypeNameResolutionInfo -> Ident list -> ResultOrException /// Resolve a (possibly incomplete) long identifier to a loist of possible class or record fields val internal ResolvePartialLongIdentToClassOrRecdFields : NameResolver -> NameResolutionEnv -> range -> AccessorDomain -> string list -> bool -> Item list @@ -571,7 +571,7 @@ type AfterResolution = | RecordResolution of Item option * (TyparInst -> unit) * (MethInfo * PropInfo option * TyparInst -> unit) * (unit -> unit) /// Resolve a long identifier occurring in an expression position. -val internal ResolveLongIdentAsExprAndComputeRange : TcResultsSink -> NameResolver -> range -> AccessorDomain -> NameResolutionEnv -> TypeNameResolutionInfo -> Ident list -> Item * range * Ident list * AfterResolution +val internal ResolveLongIdentAsExprAndComputeRange : TcResultsSink -> NameResolver -> range -> AccessorDomain -> NameResolutionEnv -> TypeNameResolutionInfo -> Ident list -> ResultOrException /// Resolve a long identifier occurring in an expression position, qualified by a type. val internal ResolveExprDotLongIdentAndComputeRange : TcResultsSink -> NameResolver -> range -> AccessorDomain -> NameResolutionEnv -> TType -> Ident list -> FindMemberFlag -> bool -> Item * range * Ident list * AfterResolution diff --git a/src/fsharp/ParseHelpers.fs b/src/fsharp/ParseHelpers.fs index 0024246643..33e7872b18 100644 --- a/src/fsharp/ParseHelpers.fs +++ b/src/fsharp/ParseHelpers.fs @@ -116,6 +116,7 @@ type LexerIfdefStackEntry = | IfDefIf | IfDefElse +/// Represents the active #if/#else blocks type LexerIfdefStackEntries = (LexerIfdefStackEntry * range) list type LexerIfdefStack = LexerIfdefStackEntries @@ -124,12 +125,8 @@ type LexerIfdefStack = LexerIfdefStackEntries /// it reaches end of line or eof. The options are to continue with 'token' function /// or to continue with 'skip' function. type LexerEndlineContinuation = - | Token of LexerIfdefStackEntries - | Skip of LexerIfdefStackEntries * int * range: range - member x.LexerIfdefStack = - match x with - | LexerEndlineContinuation.Token ifd - | LexerEndlineContinuation.Skip(ifd, _, _) -> ifd + | Token + | Skip of int * range: range type LexerIfdefExpression = | IfdefAnd of LexerIfdefExpression*LexerIfdefExpression @@ -147,42 +144,67 @@ let rec LexerIfdefEval (lookup: string -> bool) = function // Parsing: continuations for whitespace tokens //------------------------------------------------------------------------ +[] +type LexerStringStyle = + | Verbatim + | TripleQuote + | SingleQuote + +[] +type LexerStringKind = + { IsByteString: bool + IsInterpolated: bool + IsInterpolatedFirst: bool } + static member String = { IsByteString = false; IsInterpolated = false; IsInterpolatedFirst=false } + static member ByteString = { IsByteString = true; IsInterpolated = false; IsInterpolatedFirst=false } + static member InterpolatedStringFirst = { IsByteString = false; IsInterpolated = true; IsInterpolatedFirst=true } + static member InterpolatedStringPart = { IsByteString = false; IsInterpolated = true; IsInterpolatedFirst=false } + +/// Represents the degree of nesting of '{..}' and the style of the string to continue afterwards, in an interpolation fill. +/// Nesting counters and styles of outer interpolating strings are pushed on this stack. +type LexerInterpolatedStringNesting = (int * LexerStringStyle * range) list + /// The parser defines a number of tokens for whitespace and /// comments eliminated by the lexer. These carry a specification of /// a continuation for the lexer for continued processing after we've dealt with /// the whitespace. [] [] -type LexerWhitespaceContinuation = - | Token of ifdef: LexerIfdefStackEntries - | IfDefSkip of ifdef: LexerIfdefStackEntries * int * range: range - | String of ifdef: LexerIfdefStackEntries * range: range - | VerbatimString of ifdef: LexerIfdefStackEntries * range: range - | TripleQuoteString of ifdef: LexerIfdefStackEntries * range: range - | Comment of ifdef: LexerIfdefStackEntries * int * range: range - | SingleLineComment of ifdef: LexerIfdefStackEntries * int * range: range - | StringInComment of ifdef: LexerIfdefStackEntries * int * range: range - | VerbatimStringInComment of ifdef: LexerIfdefStackEntries * int * range: range - | TripleQuoteStringInComment of ifdef: LexerIfdefStackEntries * int * range: range - | MLOnly of ifdef: LexerIfdefStackEntries * range: range - | EndLine of LexerEndlineContinuation +type LexerContinuation = + | Token of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting + | IfDefSkip of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * int * range: range + | String of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * style: LexerStringStyle * kind: LexerStringKind * range: range + | Comment of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * int * range: range + | SingleLineComment of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * int * range: range + | StringInComment of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * style: LexerStringStyle * int * range: range + | MLOnly of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * range: range + | EndLine of ifdef: LexerIfdefStackEntries * nesting: LexerInterpolatedStringNesting * LexerEndlineContinuation + + static member Default = LexCont.Token([],[]) member x.LexerIfdefStack = match x with | LexCont.Token (ifdef=ifd) | LexCont.IfDefSkip (ifdef=ifd) | LexCont.String (ifdef=ifd) - | LexCont.VerbatimString (ifdef=ifd) | LexCont.Comment (ifdef=ifd) | LexCont.SingleLineComment (ifdef=ifd) - | LexCont.TripleQuoteString (ifdef=ifd) | LexCont.StringInComment (ifdef=ifd) - | LexCont.VerbatimStringInComment (ifdef=ifd) - | LexCont.TripleQuoteStringInComment (ifdef=ifd) + | LexCont.EndLine (ifdef=ifd) | LexCont.MLOnly (ifdef=ifd) -> ifd - | LexCont.EndLine endl -> endl.LexerIfdefStack -and LexCont = LexerWhitespaceContinuation + member x.LexerInterpStringNesting = + match x with + | LexCont.Token (nesting=nesting) + | LexCont.IfDefSkip (nesting=nesting) + | LexCont.String (nesting=nesting) + | LexCont.Comment (nesting=nesting) + | LexCont.SingleLineComment (nesting=nesting) + | LexCont.StringInComment (nesting=nesting) + | LexCont.EndLine (nesting=nesting) + | LexCont.MLOnly (nesting=nesting) -> nesting + +and LexCont = LexerContinuation //------------------------------------------------------------------------ // Parse IL assembly code diff --git a/src/fsharp/PostInferenceChecks.fs b/src/fsharp/PostInferenceChecks.fs index dda6f889e8..1bd7e324df 100644 --- a/src/fsharp/PostInferenceChecks.fs +++ b/src/fsharp/PostInferenceChecks.fs @@ -842,7 +842,7 @@ and CheckForOverAppliedExceptionRaisingPrimitive (cenv: cenv) expr = | OptionalCoerce(Expr.Val (failwithfFunc, _, funcRange)) when valRefEq g failwithfFunc g.failwithf_vref -> match argsl with | Expr.App (Expr.Val (newFormat, _, _), _, [_; typB; typC; _; _], [Expr.Const (Const.String formatString, formatRange, _)], _) :: xs when valRefEq g newFormat g.new_format_vref -> - match CheckFormatStrings.TryCountFormatStringArguments formatRange g formatString typB typC with + match CheckFormatStrings.TryCountFormatStringArguments formatRange g false formatString typB typC with | Some n -> let expected = n + 1 let actual = List.length xs + 1 diff --git a/src/fsharp/SimulatedMSBuildReferenceResolver.fs b/src/fsharp/SimulatedMSBuildReferenceResolver.fs index a5ecbddf70..051197c62d 100644 --- a/src/fsharp/SimulatedMSBuildReferenceResolver.fs +++ b/src/fsharp/SimulatedMSBuildReferenceResolver.fs @@ -10,26 +10,90 @@ open System open System.IO open System.Reflection open Microsoft.Win32 +open Microsoft.Build.Utilities open FSharp.Compiler.ReferenceResolver open FSharp.Compiler.AbstractIL.Internal.Library +// ATTENTION!: the following code needs to be updated every time we are switching to the new MSBuild version because new .NET framework version was released +// 1. List of frameworks +// 2. DeriveTargetFrameworkDirectoriesFor45Plus +// 3. HighestInstalledRefAssembliesOrDotNETFramework +// 4. GetPathToDotNetFrameworkImlpementationAssemblies +[] +let private Net45 = "v4.5" + +[] +let private Net451 = "v4.5.1" + +[] +let private Net452 = "v4.5.2" // not available in Dev15 MSBuild version + +[] +let private Net46 = "v4.6" + +[] +let private Net461 = "v4.6.1" + +[] +let private Net462 = "v4.6.2" + +[] +let private Net47 = "v4.7" + +[] +let private Net471 = "v4.7.1" + +[] +let private Net472 = "v4.7.2" + +[] +let private Net48 = "v4.8" + +let SupportedDesktopFrameworkVersions = [ Net48; Net472; Net471; Net47; Net462; Net461; Net46; Net452; Net451; Net45 ] + let private SimulatedMSBuildResolver = - let supportedFrameworks = [| - "v4.7.2" - "v4.7.1" - "v4.7" - "v4.6.2" - "v4.6.1" - "v4.6" - "v4.5.1" - "v4.5" - "v4.0" - |] + + /// Get the path to the .NET Framework implementation assemblies by using ToolLocationHelper.GetPathToDotNetFramework + /// This is only used to specify the "last resort" path for assembly resolution. + let GetPathToDotNetFrameworkImlpementationAssemblies(v) = + let v = + match v with + | Net45 -> Some TargetDotNetFrameworkVersion.Version45 + | Net451 -> Some TargetDotNetFrameworkVersion.Version451 +#if MSBUILD_AT_LEAST_15 + | Net452 -> Some TargetDotNetFrameworkVersion.Version452 + | Net46 -> Some TargetDotNetFrameworkVersion.Version46 + | Net461 -> Some TargetDotNetFrameworkVersion.Version461 + | Net462 -> Some TargetDotNetFrameworkVersion.Version462 + | Net47 -> Some TargetDotNetFrameworkVersion.Version47 + | Net471 -> Some TargetDotNetFrameworkVersion.Version471 + | Net472 -> Some TargetDotNetFrameworkVersion.Version472 + | Net48 -> Some TargetDotNetFrameworkVersion.Version48 +#endif + | _ -> assert false; None + match v with + | Some v -> + match ToolLocationHelper.GetPathToDotNetFramework v with + | null -> [] + | x -> [x] + | _ -> [] + + let GetPathToDotNetFrameworkReferenceAssemblies(version) = +#if NETSTANDARD + ignore version + let r : string list = [] + r +#else + match Microsoft.Build.Utilities.ToolLocationHelper.GetPathToStandardLibraries(".NETFramework",version,"") with + | null | "" -> [] + | x -> [x] +#endif + { new Resolver with member x.HighestInstalledNetFrameworkVersion() = let root = x.DotNetFrameworkReferenceAssembliesRootDirectory - let fwOpt = supportedFrameworks |> Seq.tryFind(fun fw -> Directory.Exists(Path.Combine(root, fw) )) + let fwOpt = SupportedDesktopFrameworkVersions |> Seq.tryFind(fun fw -> Directory.Exists(Path.Combine(root, fw) )) match fwOpt with | Some fw -> fw | None -> "v4.5" @@ -86,6 +150,8 @@ let private SimulatedMSBuildResolver = if System.Environment.OSVersion.Platform = System.PlatformID.Win32NT then yield! registrySearchPaths() #endif + yield! GetPathToDotNetFrameworkReferenceAssemblies targetFrameworkVersion + yield! GetPathToDotNetFrameworkImlpementationAssemblies targetFrameworkVersion ] for (r, baggage) in references do diff --git a/src/fsharp/SyntaxTree.fs b/src/fsharp/SyntaxTree.fs index 94fd921eaf..74f2be21d6 100644 --- a/src/fsharp/SyntaxTree.fs +++ b/src/fsharp/SyntaxTree.fs @@ -1008,6 +1008,12 @@ type SynExpr = expr: SynExpr * range: range + /// F# syntax: interpolated string, e.g. "abc{x}" or "abc{x,3}" or "abc{x:N4}" + /// Note the string ranges include the quotes, verbatim markers, dollar sign and braces + | InterpolatedString of + contents: SynInterpolatedStringPart list * + range: range + /// Gets the syntax range of this construct member e.Range = match e with @@ -1074,7 +1080,8 @@ type SynExpr = | SynExpr.LetOrUseBang (range=m) | SynExpr.MatchBang (range=m) | SynExpr.DoBang (range=m) - | SynExpr.Fixed (range=m) -> m + | SynExpr.Fixed (range=m) + | SynExpr.InterpolatedString (range=m) -> m | SynExpr.Ident id -> id.idRange /// Get the Range ignoring any (parse error) extra trailing dots @@ -1111,6 +1118,11 @@ type SynExpr = | SynExpr.ArbitraryAfterError _ -> true | _ -> false +[] +type SynInterpolatedStringPart = + | String of string * range + | FillExpr of SynExpr * Ident option + /// Represents a syntax tree for an F# indexer expression argument [] type SynIndexerArg = diff --git a/src/fsharp/SyntaxTreeOps.fs b/src/fsharp/SyntaxTreeOps.fs index 7615bf8e75..a2b1949a3e 100644 --- a/src/fsharp/SyntaxTreeOps.fs +++ b/src/fsharp/SyntaxTreeOps.fs @@ -731,4 +731,10 @@ let rec synExprContainsError inpExpr = | SynExpr.LetOrUseBang (rhs=e1;body=e2;andBangs=es) -> walkExpr e1 || walkExprs [ for (_,_,_,_,e,_) in es do yield e ] || walkExpr e2 + | SynExpr.InterpolatedString (parts, _m) -> + walkExprs + (parts |> List.choose (function + | SynInterpolatedStringPart.String _ -> None + | SynInterpolatedStringPart.FillExpr (x, _) -> Some x)) + walkExpr inpExpr diff --git a/src/fsharp/TcGlobals.fs b/src/fsharp/TcGlobals.fs index 0c335fdfff..fe67f07ade 100755 --- a/src/fsharp/TcGlobals.fs +++ b/src/fsharp/TcGlobals.fs @@ -139,7 +139,7 @@ let tname_Exception = "System.Exception" [] let tname_Missing = "System.Reflection.Missing" [] -let tname_Activator = "System.Activator" +let tname_FormattableString = "System.FormattableString" [] let tname_SerializationInfo = "System.Runtime.Serialization.SerializationInfo" [] @@ -334,6 +334,12 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let v_bool_ty = mkNonGenericTy v_bool_tcr let v_char_ty = mkNonGenericTy v_char_tcr let v_obj_ty = mkNonGenericTy v_obj_tcr + let v_IFormattable_tcref = findSysTyconRef sys "IFormattable" + let v_FormattableString_tcref = findSysTyconRef sys "FormattableString" + let v_IFormattable_ty = mkNonGenericTy v_IFormattable_tcref + let v_FormattableString_ty = mkNonGenericTy v_FormattableString_tcref + let v_FormattableStringFactory_tcref = findSysTyconRef sysCompilerServices "FormattableStringFactory" + let v_FormattableStringFactory_ty = mkNonGenericTy v_FormattableStringFactory_tcref let v_string_ty = mkNonGenericTy v_string_tcr let v_decimal_ty = mkSysNonGenericTy sys "Decimal" let v_unit_ty = mkNonGenericTy v_unit_tcr_nice @@ -354,7 +360,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let mkForallTyIfNeeded d r = match d with [] -> r | tps -> TType_forall(tps, r) // A table of all intrinsics that the compiler cares about - let v_knownIntrinsics = Dictionary<(string*string), ValRef>(HashIdentity.Structural) + let v_knownIntrinsics = Dictionary<(string * string option * string * int), ValRef>(HashIdentity.Structural) let makeIntrinsicValRefGeneral isKnown (enclosingEntity, logicalName, memberParentName, compiledNameOpt, typars, (argtys, rty)) = let ty = mkForallTyIfNeeded typars (mkIteratedFunTy (List.map mkSmallRefTupledTy argtys) rty) @@ -364,8 +370,11 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let key = ValLinkageFullKey({ MemberParentMangledName=memberParentName; MemberIsOverride=false; LogicalName=logicalName; TotalArgCount= argCount }, linkageType) let vref = IntrinsicValRef(enclosingEntity, logicalName, isMember, ty, key) let compiledName = defaultArg compiledNameOpt logicalName - if isKnown then - v_knownIntrinsics.Add((enclosingEntity.LastItemMangledName, compiledName), ValRefForIntrinsic vref) + + let key = (enclosingEntity.LastItemMangledName, memberParentName, compiledName, argCount) + assert not (v_knownIntrinsics.ContainsKey(key)) + if isKnown && not (v_knownIntrinsics.ContainsKey(key)) then + v_knownIntrinsics.Add(key, ValRefForIntrinsic vref) vref let makeIntrinsicValRef info = makeIntrinsicValRefGeneral true info @@ -431,6 +440,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let fslib_MFQueryRunExtensionsLowPriority_nleref = mkNestedNonLocalEntityRef fslib_MFQueryRunExtensions_nleref "LowPriority" let fslib_MFQueryRunExtensionsHighPriority_nleref = mkNestedNonLocalEntityRef fslib_MFQueryRunExtensions_nleref "HighPriority" + let fslib_MFPrintfModule_nleref = mkNestedNonLocalEntityRef fslib_MFCore_nleref "PrintfModule" let fslib_MFSeqModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "SeqModule" let fslib_MFListModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "ListModule" let fslib_MFArrayModule_nleref = mkNestedNonLocalEntityRef fslib_MFCollections_nleref "ArrayModule" @@ -495,6 +505,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d fslib_MFQueryRunExtensionsLowPriority_nleref fslib_MFQueryRunExtensionsHighPriority_nleref + fslib_MFPrintfModule_nleref fslib_MFSeqModule_nleref fslib_MFListModule_nleref fslib_MFArrayModule_nleref @@ -1014,6 +1025,12 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member __.bool_ty = v_bool_ty member __.int_ty = v_int_ty member __.string_ty = v_string_ty + member __.system_IFormattable_tcref = v_IFormattable_tcref + member __.system_FormattableString_tcref = v_FormattableString_tcref + member __.system_FormattableStringFactory_tcref = v_FormattableStringFactory_tcref + member __.system_IFormattable_ty = v_IFormattable_ty + member __.system_FormattableString_ty = v_FormattableString_ty + member __.system_FormattableStringFactory_ty = v_FormattableStringFactory_ty member __.unit_ty = v_unit_ty member __.obj_ty = v_obj_ty member __.char_ty = v_char_ty @@ -1394,15 +1411,16 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member __.seq_append_info = v_seq_append_info member __.seq_generated_info = v_seq_generated_info member __.seq_finally_info = v_seq_finally_info - member __.seq_of_functions_info = v_seq_of_functions_info + member __.seq_of_functions_info = v_seq_of_functions_info member __.seq_map_info = v_seq_map_info member __.seq_singleton_info = v_seq_singleton_info member __.seq_empty_info = v_seq_empty_info + member __.sprintf_info = v_sprintf_info member __.new_format_info = v_new_format_info member __.unbox_info = v_unbox_info - member __.get_generic_comparer_info = v_get_generic_comparer_info - member __.get_generic_er_equality_comparer_info = v_get_generic_er_equality_comparer_info - member __.get_generic_per_equality_comparer_info = v_get_generic_per_equality_comparer_info + member __.get_generic_comparer_info = v_get_generic_comparer_info + member __.get_generic_er_equality_comparer_info = v_get_generic_er_equality_comparer_info + member __.get_generic_per_equality_comparer_info = v_get_generic_per_equality_comparer_info member __.dispose_info = v_dispose_info member __.getstring_info = v_getstring_info member __.unbox_fast_info = v_unbox_fast_info diff --git a/src/fsharp/TypeChecker.fs b/src/fsharp/TypeChecker.fs index 3515f51bd4..20b88579ea 100755 --- a/src/fsharp/TypeChecker.fs +++ b/src/fsharp/TypeChecker.fs @@ -3137,6 +3137,18 @@ let BuildILFieldGet g amap m objExpr (finfo: ILFieldInfo) = // Add an I_nop if this is an initonly field to make sure we never recognize it as an lvalue. See mkExprAddrOfExpr. wrap (mkAsmExpr (([ mkNormalLdfld fspec ] @ (if finfo.IsInitOnly then [ AI_nop ] else [])), tinst, [objExpr], [fieldType], m)) +/// Checks that setting a field value does not set a literal or initonly field +let private CheckFieldLiteralArg (finfo: ILFieldInfo) argExpr m = + finfo.LiteralValue |> Option.iter (fun _ -> + match argExpr with + | Expr.Const (v, _, _) -> + let literalValue = string v + error (Error(FSComp.SR.tcLiteralFieldAssignmentWithArg literalValue, m)) + | _ -> + error (Error(FSComp.SR.tcLiteralFieldAssignmentNoArg(), m)) + ) + if finfo.IsInitOnly then error (Error (FSComp.SR.tcFieldIsReadonly(), m)) + let BuildILFieldSet g m objExpr (finfo: ILFieldInfo) argExpr = let fref = finfo.ILFieldRef let isValueType = finfo.IsValueType @@ -3146,7 +3158,7 @@ let BuildILFieldSet g m objExpr (finfo: ILFieldInfo) argExpr = // This ensures we always get the type instantiation right when doing this from // polymorphic code, after inlining etc. * let fspec = mkILFieldSpec(fref, mkILNamedTy valu fref.DeclaringTypeRef []) - if finfo.IsInitOnly then error (Error (FSComp.SR.tcFieldIsReadonly(), m)) + CheckFieldLiteralArg finfo argExpr m let wrap, objExpr, _readonly, _writeonly = mkExprAddrOfExpr g isValueType false DefinitelyMutates objExpr None m wrap (mkAsmExpr ([ mkNormalStfld fspec ], tinst, [objExpr; argExpr], [], m)) @@ -3159,9 +3171,9 @@ let BuildILStaticFieldSet m (finfo: ILFieldInfo) argExpr = // This ensures we always get the type instantiation right when doing this from // polymorphic code, after inlining etc. let fspec = mkILFieldSpec(fref, mkILNamedTy valu fref.DeclaringTypeRef []) - if finfo.IsInitOnly then error (Error (FSComp.SR.tcFieldIsReadonly(), m)) + CheckFieldLiteralArg finfo argExpr m mkAsmExpr ([ mkNormalStsfld fspec ], tinst, [argExpr], [], m) - + let BuildRecdFieldSet g m objExpr (rfinfo: RecdFieldInfo) argExpr = let tgtTy = rfinfo.DeclaringType let valu = isStructTy g tgtTy @@ -3192,7 +3204,7 @@ let (|JoinRelation|_|) cenv env (e: SynExpr) = let isOpName opName vref s = (s = opName) && match ResolveExprLongIdent cenv.tcSink cenv.nameResolver m ad env.eNameResEnv TypeNameResolutionInfo.Default [ident(opName, m)] with - | Item.Value vref2, [] -> valRefEq cenv.g vref vref2 + | Result (Item.Value vref2, []) -> valRefEq cenv.g vref vref2 | _ -> false match e with @@ -5386,12 +5398,50 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p let args = getArgPatterns () TcPatterns warnOnUpper cenv env vFlags (tpenv, names, takenNames) (NewInferenceTypes args) args + // Note we parse arguments to parameterized pattern labels as patterns, not expressions. + // This means the range of syntactic expression forms that can be used here is limited. + let rec convSynPatToSynExpr x = + match x with + | SynPat.FromParseError(p, _) -> convSynPatToSynExpr p + | SynPat.Const (c, m) -> SynExpr.Const (c, m) + | SynPat.Named (SynPat.Wild _, id, _, None, _) -> SynExpr.Ident id + | SynPat.Typed (p, cty, m) -> SynExpr.Typed (convSynPatToSynExpr p, cty, m) + | SynPat.LongIdent (LongIdentWithDots(longId, dotms) as lidwd, _, _tyargs, args, None, m) -> + let args = match args with SynArgPats.Pats args -> args | _ -> failwith "impossible: active patterns can be used only with SynConstructorArgs.Pats" + let e = + if dotms.Length = longId.Length then + let e = SynExpr.LongIdent (false, LongIdentWithDots(longId, List.truncate (dotms.Length - 1) dotms), None, m) + SynExpr.DiscardAfterMissingQualificationAfterDot (e, unionRanges e.Range (List.last dotms)) + else SynExpr.LongIdent (false, lidwd, None, m) + List.fold (fun f x -> mkSynApp1 f (convSynPatToSynExpr x) m) e args + | SynPat.Tuple (isStruct, args, m) -> SynExpr.Tuple (isStruct, List.map convSynPatToSynExpr args, [], m) + | SynPat.Paren (p, _) -> convSynPatToSynExpr p + | SynPat.ArrayOrList (isArray, args, m) -> SynExpr.ArrayOrList (isArray,List.map convSynPatToSynExpr args, m) + | SynPat.QuoteExpr (e,_) -> e + | SynPat.Null m -> SynExpr.Null m + | _ -> error(Error(FSComp.SR.tcInvalidArgForParameterizedPattern(), x.Range)) + + let isNameof (id: Ident) = + id.idText = "nameof" && + try + match ResolveExprLongIdent cenv.tcSink cenv.nameResolver m ad env.NameEnv TypeNameResolutionInfo.Default [id] with + | Result (Item.Value vref, _) -> valRefEq cenv.g vref cenv.g.nameof_vref + | _ -> false + with _ -> false + match ResolvePatternLongIdent cenv.tcSink cenv.nameResolver warnOnUpperForId false m ad env.NameEnv TypeNameResolutionInfo.Default longId with | Item.NewDef id -> - let _, acc = tcArgPatterns () match getArgPatterns () with - | [] -> TcPat warnOnUpperForId cenv env topValInfo vFlags acc ty (mkSynPatVar vis id) + | [] -> + TcPat warnOnUpperForId cenv env topValInfo vFlags (tpenv, names, takenNames) ty (mkSynPatVar vis id) + + | [arg] + when cenv.g.langVersion.SupportsFeature LanguageFeature.NameOf && isNameof id -> + match TcNameOfExpr cenv env tpenv (convSynPatToSynExpr arg) with + | Expr.Const(c, m, _) -> (fun _ -> TPat_const (c, m)), (tpenv, names, takenNames) + | _ -> failwith "Impossible: TcNameOfExpr must return an Expr.Const" | _ -> + let _, acc = tcArgPatterns () errorR (UndefinedName (0, FSComp.SR.undefinedNamePatternDiscriminator, id, NoSuggestions)) (fun _ -> TPat_error m), acc @@ -5426,29 +5476,6 @@ and TcPat warnOnUpper cenv env topValInfo vFlags (tpenv, names, takenNames) ty p if not (isNil activePatArgsAsSynPats) && apinfo.ActiveTags.Length <> 1 then errorR (Error (FSComp.SR.tcRequireActivePatternWithOneResult (), m)) - // Parse the arguments to an active pattern - // Note we parse arguments to parameterized pattern labels as patterns, not expressions. - // This means the range of syntactic expression forms that can be used here is limited. - let rec convSynPatToSynExpr x = - match x with - | SynPat.FromParseError (p, _) -> convSynPatToSynExpr p - | SynPat.Const (c, m) -> SynExpr.Const (c, m) - | SynPat.Named (SynPat.Wild _, id, _, None, _) -> SynExpr.Ident id - | SynPat.Typed (p, cty, m) -> SynExpr.Typed (convSynPatToSynExpr p, cty, m) - | SynPat.LongIdent (LongIdentWithDots (longId, dotms) as lidwd, _, _tyargs, args, None, m) -> - let args = match args with SynArgPats.Pats args -> args | _ -> failwith "impossible: active patterns can be used only with SynArgPats.Pats" - let e = - if dotms.Length = longId.Length then - let e = SynExpr.LongIdent (false, LongIdentWithDots(longId, List.truncate (dotms.Length - 1) dotms), None, m) - SynExpr.DiscardAfterMissingQualificationAfterDot (e, unionRanges e.Range (List.last dotms)) - else SynExpr.LongIdent (false, lidwd, None, m) - List.fold (fun f x -> mkSynApp1 f (convSynPatToSynExpr x) m) e args - | SynPat.Tuple (isStruct, args, m) -> SynExpr.Tuple (isStruct, List.map convSynPatToSynExpr args, [], m) - | SynPat.Paren (p, _) -> convSynPatToSynExpr p - | SynPat.ArrayOrList (isArray, args, m) -> SynExpr.ArrayOrList (isArray,List.map convSynPatToSynExpr args, m) - | SynPat.QuoteExpr (e,_) -> e - | SynPat.Null m -> SynExpr.Null m - | _ -> error(Error(FSComp.SR.tcInvalidArgForParameterizedPattern(), x.Range)) let activePatArgsAsSynExprs = List.map convSynPatToSynExpr activePatArgsAsSynPats let activePatResTys = NewInferenceTypes apinfo.Names @@ -5911,6 +5938,13 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) = CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy, env.AccessRights) TcConstStringExpr cenv overallTy env m tpenv s + | SynExpr.InterpolatedString (parts, m) -> + tryLanguageFeatureError cenv.g.langVersion LanguageFeature.StringInterpolation m + + CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy, env.AccessRights) + + TcInterpolatedStringExpr cenv overallTy env m tpenv parts + | SynExpr.Const (synConst, m) -> CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy, env.AccessRights) TcConstExpr cenv overallTy env m tpenv synConst @@ -7092,20 +7126,30 @@ and TcObjectExpr cenv overallTy env tpenv (synObjTy, argopt, binds, extraImpls, and TcConstStringExpr cenv overallTy env m tpenv s = if (AddCxTypeEqualsTypeUndoIfFailed env.DisplayEnv cenv.css m overallTy cenv.g.string_ty) then - mkString cenv.g m s, tpenv + mkString cenv.g m s, tpenv else - let aty = NewInferenceType () - let bty = NewInferenceType () - let cty = NewInferenceType () - let dty = NewInferenceType () - let ety = NewInferenceType () - let ty' = mkPrintfFormatTy cenv.g aty bty cty dty ety - if (not (isObjTy cenv.g overallTy) && AddCxTypeMustSubsumeTypeUndoIfFailed env.DisplayEnv cenv.css m overallTy ty') then + TcFormatStringExpr cenv overallTy env m tpenv s + +and TcFormatStringExpr cenv overallTy env m tpenv (fmtString: string) = + let g = cenv.g + let aty = NewInferenceType () + let bty = NewInferenceType () + let cty = NewInferenceType () + let dty = NewInferenceType () + let ety = NewInferenceType () + let formatTy = mkPrintfFormatTy g aty bty cty dty ety + + // This might qualify as a format string - check via a type directed rule + let ok = not (isObjTy g overallTy) && AddCxTypeMustSubsumeTypeUndoIfFailed env.DisplayEnv cenv.css m overallTy formatTy + + if ok then // Parse the format string to work out the phantom types let formatStringCheckContext = match cenv.tcSink.CurrentSink with None -> None | Some sink -> sink.FormatStringCheckContext - let normalizedString = (s.Replace("\r\n", "\n").Replace("\r", "\n")) + let normalizedString = (fmtString.Replace("\r\n", "\n").Replace("\r", "\n")) - let (aty', ety'), specifierLocations = (try CheckFormatStrings.ParseFormatString m cenv.g formatStringCheckContext normalizedString bty cty dty with Failure s -> error (Error(FSComp.SR.tcUnableToParseFormatString s, m))) + let _argTys, atyRequired, etyRequired, _percentATys, specifierLocations, _dotnetFormatString = + try CheckFormatStrings.ParseFormatString m [m] g false false formatStringCheckContext normalizedString bty cty dty + with Failure errString -> error (Error(FSComp.SR.tcUnableToParseFormatString errString, m)) match cenv.tcSink.CurrentSink with | None -> () @@ -7113,12 +7157,195 @@ and TcConstStringExpr cenv overallTy env m tpenv s = for specifierLocation, numArgs in specifierLocations do sink.NotifyFormatSpecifierLocation(specifierLocation, numArgs) - UnifyTypes cenv env m aty aty' - UnifyTypes cenv env m ety ety' - mkCallNewFormat cenv.g m aty bty cty dty ety (mkString cenv.g m s), tpenv - else - UnifyTypes cenv env m overallTy cenv.g.string_ty - mkString cenv.g m s, tpenv + UnifyTypes cenv env m aty atyRequired + UnifyTypes cenv env m ety etyRequired + let fmtExpr = mkCallNewFormat g m aty bty cty dty ety (mkString g m fmtString) + fmtExpr, tpenv + + else + UnifyTypes cenv env m overallTy g.string_ty + mkString g m fmtString, tpenv + +/// Check an interpolated string expression +and TcInterpolatedStringExpr cenv overallTy env m tpenv (parts: SynInterpolatedStringPart list) = + let g = cenv.g + + let synFillExprs = + parts + |> List.choose (function + | SynInterpolatedStringPart.String _ -> None + | SynInterpolatedStringPart.FillExpr (fillExpr, _) -> + match fillExpr with + // Detect "x" part of "...{x,3}..." + | SynExpr.Tuple (false, [e; SynExpr.Const (SynConst.Int32 _align, _)], _, _) -> Some e + | e -> Some e) + + let stringFragmentRanges = + parts + |> List.choose (function + | SynInterpolatedStringPart.String (_,m) -> Some m + | SynInterpolatedStringPart.FillExpr _ -> None) + + let printerTy = NewInferenceType () + let printerArgTy = NewInferenceType () + let printerResidueTy = NewInferenceType () + let printerResultTy = NewInferenceType () + let printerTupleTy = NewInferenceType () + let formatTy = mkPrintfFormatTy g printerTy printerArgTy printerResidueTy printerResultTy printerTupleTy + + // Check the library support is available in the referenced FSharp.Core + let newFormatMethod = + match GetIntrinsicConstructorInfosOfType cenv.infoReader m formatTy |> List.filter (fun minfo -> minfo.NumArgs = [3]) with + | [ctorInfo] -> ctorInfo + | _ -> languageFeatureNotSupportedInLibraryError cenv.g.langVersion LanguageFeature.StringInterpolation m + + let stringKind = + // If this is an interpolated string then try to force the result to be a string + if (AddCxTypeEqualsTypeUndoIfFailed env.DisplayEnv cenv.css m overallTy g.string_ty) then + + // And if that succeeds, the result of printing is a string + UnifyTypes cenv env m printerArgTy g.unit_ty + UnifyTypes cenv env m printerResidueTy g.string_ty + UnifyTypes cenv env m printerResultTy overallTy + + // And if that succeeds, the printerTy and printerResultTy must be the same (there are no curried arguments) + UnifyTypes cenv env m printerTy printerResultTy + + Choice1Of2 (true, newFormatMethod) + + // ... or if that fails then may be a FormattableString by a type-directed rule.... + elif (not (isObjTy g overallTy) && + ((g.system_FormattableString_tcref.CanDeref && AddCxTypeMustSubsumeTypeUndoIfFailed env.DisplayEnv cenv.css m overallTy g.system_FormattableString_ty) + || (g.system_IFormattable_tcref.CanDeref && AddCxTypeMustSubsumeTypeUndoIfFailed env.DisplayEnv cenv.css m overallTy g.system_IFormattable_ty))) then + + // And if that succeeds, the result of printing is a string + UnifyTypes cenv env m printerArgTy g.unit_ty + UnifyTypes cenv env m printerResidueTy g.string_ty + UnifyTypes cenv env m printerResultTy overallTy + + // Find the FormattableStringFactor.Create method in the .NET libraries + let ad = env.eAccessRights + let createMethodOpt = + match TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AllResults cenv env m ad "Create" g.system_FormattableStringFactory_ty with + | [x] -> Some x + | _ -> None + + match createMethodOpt with + | Some createMethod -> Choice2Of2 createMethod + | None -> languageFeatureNotSupportedInLibraryError cenv.g.langVersion LanguageFeature.StringInterpolation m + + // ... or if that fails then may be a PrintfFormat by a type-directed rule.... + elif not (isObjTy g overallTy) && AddCxTypeMustSubsumeTypeUndoIfFailed env.DisplayEnv cenv.css m overallTy formatTy then + + // And if that succeeds, the printerTy and printerResultTy must be the same (there are no curried arguments) + UnifyTypes cenv env m printerTy printerResultTy + Choice1Of2 (false, newFormatMethod) + + else + // this should fail and produce an error + UnifyTypes cenv env m overallTy g.string_ty + Choice1Of2 (true, newFormatMethod) + + let isFormattableString = (match stringKind with Choice2Of2 _ -> true | _ -> false) + + // The format string used for checking in CheckFormatStrings. This replaces interpolation holes with %P + let printfFormatString = + parts + |> List.map (function + | SynInterpolatedStringPart.String (s, _) -> s + | SynInterpolatedStringPart.FillExpr (fillExpr, format) -> + let alignText = + match fillExpr with + // Validate and detect ",3" part of "...{x,3}..." + | SynExpr.Tuple (false, args, _, _) -> + match args with + | [_; SynExpr.Const (SynConst.Int32 align, _)] -> string align + | _ -> errorR(Error(FSComp.SR.tcInvalidAlignmentInInterpolatedString(), m)); "" + | _ -> "" + let formatText = match format with None -> "()" | Some n -> "(" + n.idText + ")" + "%" + alignText + "P" + formatText ) + |> String.concat "" + + // Parse the format string to work out the phantom types and check for absence of '%' specifiers in FormattableString + // + // If FormatStringCheckContext is set (i.e. we are doing foreground checking in the IDE) + // then we check the string twice, once to collect % positions and once to get errors. + // The process of getting % positions doesn't process the string in a semantically accurate way + // (but is enough to report % locations correctly), as it fetched the pieces from the + // original source and this may include some additional characters, + // and also doesn't raise all necessary errors + match cenv.tcSink.CurrentSink with + | Some sink when sink.FormatStringCheckContext.IsSome -> + try + let _argTys, _printerTy, _printerTupleTyRequired, _percentATys, specifierLocations, _dotnetFormatString = + CheckFormatStrings.ParseFormatString m stringFragmentRanges g true isFormattableString sink.FormatStringCheckContext printfFormatString printerArgTy printerResidueTy printerResultTy + for specifierLocation, numArgs in specifierLocations do + sink.NotifyFormatSpecifierLocation(specifierLocation, numArgs) + with _err-> + () + | _ -> () + + let argTys, _printerTy, printerTupleTyRequired, percentATys, _specifierLocations, dotnetFormatString = + try + CheckFormatStrings.ParseFormatString m stringFragmentRanges g true isFormattableString None printfFormatString printerArgTy printerResidueTy printerResultTy + with Failure errString -> + error (Error(FSComp.SR.tcUnableToParseInterpolatedString errString, m)) + + // Check the expressions filling the holes + if argTys.Length <> synFillExprs.Length then + error (Error(FSComp.SR.tcInterpolationMixedWithPercent(), m)) + + match stringKind with + + // The case for $"..." used as type string and $"...%d{x}..." used as type PrintfFormat - create a PrintfFormat that captures + // is arguments + | Choice1Of2 (isString, newFormatMethod) -> + + UnifyTypes cenv env m printerTupleTy printerTupleTyRequired + + // Type check the expressions filling the holes + let flexes = argTys |> List.map (fun _ -> false) + let fillExprs, tpenv = TcExprs cenv env m tpenv flexes argTys synFillExprs + + let fillExprsBoxed = (argTys, fillExprs) ||> List.map2 (mkCallBox g m) + + let argsExpr = mkArray (g.obj_ty, fillExprsBoxed, m) + let percentATysExpr = + if percentATys.Length = 0 then + mkNull m (mkArrayType g g.system_Type_ty) + else + let tyExprs = percentATys |> Array.map (mkCallTypeOf g m) |> Array.toList + mkArray (g.system_Type_ty, tyExprs, m) + + let fmtExpr = MakeMethInfoCall cenv.amap m newFormatMethod [] [mkString g m printfFormatString; argsExpr; percentATysExpr] + + if isString then + // Make the call to sprintf + mkCall_sprintf g m printerTy fmtExpr [], tpenv + else + fmtExpr, tpenv + + // The case for $"..." used as type FormattableString or IFormattable + | Choice2Of2 createFormattableStringMethod -> + + // Type check the expressions filling the holes + let flexes = argTys |> List.map (fun _ -> false) + let fillExprs, tpenv = TcExprs cenv env m tpenv flexes argTys synFillExprs + + let fillExprsBoxed = (argTys, fillExprs) ||> List.map2 (mkCallBox g m) + + let dotnetFormatStringExpr = mkString g m dotnetFormatString + let argsExpr = mkArray (g.obj_ty, fillExprsBoxed, m) + + // FormattableString are *always* turned into FormattableStringFactory.Create calls, boxing each argument + let createExpr, _ = BuildPossiblyConditionalMethodCall cenv env NeverMutates m false createFormattableStringMethod NormalValUse [] [dotnetFormatStringExpr; argsExpr] [] + + let resultExpr = + if typeEquiv g overallTy g.system_IFormattable_ty then + mkCoerceIfNeeded g g.system_IFormattable_ty g.system_FormattableString_ty createExpr + else + createExpr + resultExpr, tpenv //------------------------------------------------------------------------- // TcConstExpr @@ -9278,26 +9505,47 @@ and TcNameOfExpr cenv env tpenv (synArg: SynExpr) = let m = cleanSynArg.Range let rec check overallTyOpt resultOpt expr (delayed: DelayedItem list) = match expr with - | LongOrSingleIdent (false, (LongIdentWithDots(longId, _) as lidd), _, _) -> + | LongOrSingleIdent (false, (LongIdentWithDots(longId, _)), _, _) -> + let ad = env.eAccessRights let result = defaultArg resultOpt (List.last longId) - let resolvedToModuleOrNamespaceName = - if delayed.IsEmpty then - let id,rest = List.headAndTail longId - match ResolveLongIndentAsModuleOrNamespaceOrStaticClass cenv.tcSink ResultCollectionSettings.AllResults cenv.amap m false true OpenQualified env.eNameResEnv ad id rest true with - | Result modref when delayed.IsEmpty && modref |> List.exists (p23 >> IsEntityAccessible cenv.amap m ad) -> - true // resolved to a module or namespace, done with checks - | _ -> - false - else + + // Nameof resolution resolves to a symbol and in general we make that the same symbol as + // would resolve if the long ident was used as an expression at the given location. + // + // So we first check if the first identifier resolves as an expression, if so commit and and resolve. + // + // However we don't commit for a type names - nameof allows 'naked' type names and thus all type name + // resolutions are checked separately in the next step. + let typeNameResInfo = GetLongIdentTypeNameInfo delayed + let nameResolutionResult = ResolveLongIdentAsExprAndComputeRange cenv.tcSink cenv.nameResolver (rangeOfLid longId) ad env.eNameResEnv typeNameResInfo longId + let resolvesAsExpr = + match nameResolutionResult with + | Result ((item, _, _, _) as res) + when + (match item with + | Item.Types _ + | Item.DelegateCtor _ + | Item.CtorGroup _ + | Item.FakeInterfaceCtor _ -> false + | _ -> true) -> + let overallTy = match overallTyOpt with None -> NewInferenceType() | Some t -> t + let _, _ = TcItemThen cenv overallTy env tpenv res delayed + true + | _ -> false - if resolvedToModuleOrNamespaceName then result else + if resolvesAsExpr then result else + // If it's not an expression then try to resolve it as a type name let resolvedToTypeName = if (match delayed with [DelayedTypeApp _] | [] -> true | _ -> false) then let (TypeNameResolutionInfo(_, staticArgsInfo)) = GetLongIdentTypeNameInfo delayed match ResolveTypeLongIdent cenv.tcSink cenv.nameResolver ItemOccurence.UseInAttribute OpenQualified env.eNameResEnv ad longId staticArgsInfo PermitDirectReferenceToGeneratedType.No with - | Result tcref when (match delayed with [DelayedTypeApp _] | [] -> true | _ -> false) && IsEntityAccessible cenv.amap m ad tcref -> + | Result tcref when IsEntityAccessible cenv.amap m ad tcref -> + match delayed with + | [DelayedTypeApp (tyargs, _, mExprAndTypeArgs)] -> + TcTypeApp cenv NewTyparsOK CheckCxs ItemOccurence.UseInType env tpenv mExprAndTypeArgs tcref [] tyargs |> ignore + | _ -> () true // resolved to a type name, done with checks | _ -> false @@ -9305,11 +9553,22 @@ and TcNameOfExpr cenv env tpenv (synArg: SynExpr) = false if resolvedToTypeName then result else - let overallTy = match overallTyOpt with None -> NewInferenceType() | Some t -> t - - // This will raise an error if resolution doesn't succeed - let _, _ = TcLongIdentThen cenv overallTy env tpenv lidd delayed - result // checked as an expression, done with checks + // If it's not an expression or type name then resolve it as a module + let resolvedToModuleOrNamespaceName = + if delayed.IsEmpty then + let id,rest = List.headAndTail longId + match ResolveLongIndentAsModuleOrNamespaceOrStaticClass cenv.tcSink ResultCollectionSettings.AllResults cenv.amap m false true OpenQualified env.eNameResEnv ad id rest true with + | Result modref when delayed.IsEmpty && modref |> List.exists (p23 >> IsEntityAccessible cenv.amap m ad) -> + true // resolved to a module or namespace, done with checks + | _ -> + false + else + false + if resolvedToModuleOrNamespaceName then result else + + ForceRaise nameResolutionResult |> ignore + // If that didn't give aan exception then raise a generic error + error (Error(FSComp.SR.expressionHasNoName(), m)) // expr allowed, even with qualifications | SynExpr.TypeApp (hd, _, types, _, _, _, m) -> @@ -9406,7 +9665,9 @@ and TcLongIdentThen cenv overallTy env tpenv (LongIdentWithDots(longId, _)) dela let ad = env.eAccessRights let typeNameResInfo = GetLongIdentTypeNameInfo delayed - let nameResolutionResult = ResolveLongIdentAsExprAndComputeRange cenv.tcSink cenv.nameResolver (rangeOfLid longId) ad env.eNameResEnv typeNameResInfo longId + let nameResolutionResult = + ResolveLongIdentAsExprAndComputeRange cenv.tcSink cenv.nameResolver (rangeOfLid longId) ad env.eNameResEnv typeNameResInfo longId + |> ForceRaise TcItemThen cenv overallTy env tpenv nameResolutionResult delayed //------------------------------------------------------------------------- @@ -9734,6 +9995,7 @@ and TcItemThen cenv overallTy env tpenv (item, mItem, rest, afterResolution) del | SynExpr.AddressOf (_, synExpr, _, _) | SynExpr.Quote (_, _, synExpr, _, _) -> isSimpleArgument synExpr + | SynExpr.InterpolatedString _ | SynExpr.Null _ | SynExpr.Ident _ | SynExpr.Const _ @@ -12129,7 +12391,7 @@ and AnalyzeAndMakeAndPublishRecursiveValue overridesOK isGeneratedEventVal cenv let prelimValScheme = ValScheme(bindingId, prelimTyscheme, topValInfo, memberInfoOpt, false, inlineFlag, NormalVal, vis, false, false, false, hasDeclaredTypars) // Check the literal r.h.s., if any - let _, konst = TcLiteral cenv ty env tpenv (bindingAttribs, bindingExpr) + let _, konst = TcLiteral cenv ty envinner tpenv (bindingAttribs, bindingExpr) let extraBindings, extraValues, tpenv, recBindIdx = let extraBindings = @@ -15257,7 +15519,10 @@ module TcExceptionDeclarations = let repr = match reprIdOpt with | Some longId -> - match ResolveExprLongIdent cenv.tcSink cenv.nameResolver m ad env.eNameResEnv TypeNameResolutionInfo.Default longId with + let resolution = + ResolveExprLongIdent cenv.tcSink cenv.nameResolver m ad env.eNameResEnv TypeNameResolutionInfo.Default longId + |> ForceRaise + match resolution with | Item.ExnCase exnc, [] -> CheckTyconAccessible cenv.amap m env.eAccessRights exnc |> ignore if not (isNil args') then diff --git a/src/fsharp/TypedTreeOps.fs b/src/fsharp/TypedTreeOps.fs index 229f75fb32..5182f06d05 100644 --- a/src/fsharp/TypedTreeOps.fs +++ b/src/fsharp/TypedTreeOps.fs @@ -7059,7 +7059,8 @@ let mkCallRaise (g: TcGlobals) m ty e1 = mkApps g (typedExprForIntrinsic g m g.r let mkCallNewDecimal (g: TcGlobals) m (e1, e2, e3, e4, e5) = mkApps g (typedExprForIntrinsic g m g.new_decimal_info, [], [ e1;e2;e3;e4;e5 ], m) -let mkCallNewFormat (g: TcGlobals) m aty bty cty dty ety e1 = mkApps g (typedExprForIntrinsic g m g.new_format_info, [[aty;bty;cty;dty;ety]], [ e1 ], m) +let mkCallNewFormat (g: TcGlobals) m aty bty cty dty ety e1 = + mkApps g (typedExprForIntrinsic g m g.new_format_info, [[aty;bty;cty;dty;ety]], [ e1 ], m) let tryMkCallBuiltInWitness (g: TcGlobals) traitInfo argExprs m = let info, tinst = g.MakeBuiltInWitnessInfo traitInfo @@ -7136,6 +7137,9 @@ let mkCallSeqSingleton g m ty1 arg1 = let mkCallSeqEmpty g m ty1 = mkApps g (typedExprForIntrinsic g m g.seq_empty_info, [[ty1]], [ ], m) +let mkCall_sprintf (g: TcGlobals) m aty fmt es = + mkApps g (typedExprForIntrinsic g m g.sprintf_info, [[aty]], fmt::es , m) + let mkCallDeserializeQuotationFSharp20Plus g m e1 e2 e3 e4 = let args = [ e1; e2; e3; e4 ] mkApps g (typedExprForIntrinsic g m g.deserialize_quoted_FSharp_20_plus_info, [], [ mkRefTupledNoTypes g m args ], m) diff --git a/src/fsharp/TypedTreeOps.fsi b/src/fsharp/TypedTreeOps.fsi index 8df899582b..89fae6625e 100755 --- a/src/fsharp/TypedTreeOps.fsi +++ b/src/fsharp/TypedTreeOps.fsi @@ -1791,7 +1791,7 @@ val mkInvalidCastExnNewobj: TcGlobals -> ILInstr // Construct calls to some intrinsic functions //------------------------------------------------------------------------- -val mkCallNewFormat : TcGlobals -> range -> TType -> TType -> TType -> TType -> TType -> Expr -> Expr +val mkCallNewFormat: TcGlobals -> range -> TType -> TType -> TType -> TType -> TType -> formatStringExpr: Expr -> Expr val mkCallUnbox : TcGlobals -> range -> TType -> Expr -> Expr @@ -1991,6 +1991,9 @@ val mkCallSeqSingleton : TcGlobals -> range -> TType -> Expr -> Expr val mkCallSeqEmpty : TcGlobals -> range -> TType -> Expr +/// Make a call to the 'isprintf' function for string interpolation +val mkCall_sprintf: g: TcGlobals -> m: range -> funcTy: TType -> fmtExpr: Expr -> fillExprs: Expr list -> Expr + val mkILAsmCeq : TcGlobals -> range -> Expr -> Expr -> Expr val mkILAsmClt : TcGlobals -> range -> Expr -> Expr -> Expr diff --git a/src/fsharp/fsc.fs b/src/fsharp/fsc.fs index cf17ea4a69..d4fc5019e6 100644 --- a/src/fsharp/fsc.fs +++ b/src/fsharp/fsc.fs @@ -1314,7 +1314,7 @@ module StaticLinker = data=ilxMainModule // any old module edges = [] visited = true } - let assumedIndependentSet = set [ "mscorlib"; "System"; "System.Core"; "System.Xml"; "Microsoft.Build.Framework"; "Microsoft.Build.Utilities" ] + let assumedIndependentSet = set [ "mscorlib"; "System"; "System.Core"; "System.Xml"; "Microsoft.Build.Framework"; "Microsoft.Build.Utilities"; "netstandard" ] begin let mutable remaining = (computeILRefs ilGlobals ilxMainModule).AssemblyReferences @@ -1324,7 +1324,7 @@ module StaticLinker = if assumedIndependentSet.Contains ilAssemRef.Name || (ilAssemRef.PublicKey = Some ecmaPublicKey) then depModuleTable.[ilAssemRef.Name] <- dummyEntry ilAssemRef.Name else - if not (depModuleTable.ContainsKey ilAssemRef.Name) then + if not (depModuleTable.ContainsKey ilAssemRef.Name) then match tcImports.TryFindDllInfo(ctok, Range.rangeStartup, ilAssemRef.Name, lookupOnly=false) with | Some dllInfo -> let ccu = diff --git a/src/fsharp/fsi/fsi.fs b/src/fsharp/fsi/fsi.fs index 5628483bea..c0d60ffdbe 100644 --- a/src/fsharp/fsi/fsi.fs +++ b/src/fsharp/fsi/fsi.fs @@ -1969,7 +1969,7 @@ type internal FsiStdinLexerProvider Lexhelp.resetLexbufPos sourceFileName lexbuf let skip = true // don't report whitespace from lexer let defines = "INTERACTIVE"::tcConfigB.conditionalCompilationDefines - let lexargs = mkLexargs (sourceFileName,defines, interactiveInputLightSyntaxStatus, lexResourceManager, [], errorLogger, PathMap.empty) + let lexargs = mkLexargs (defines, interactiveInputLightSyntaxStatus, lexResourceManager, [], errorLogger, PathMap.empty) let tokenizer = LexFilter.LexFilter(interactiveInputLightSyntaxStatus, tcConfigB.compilingFslib, Lexer.token lexargs skip, lexbuf) tokenizer diff --git a/src/fsharp/fsiaux.fsi b/src/fsharp/fsiaux.fsi index d557c17331..a225e48e7a 100644 --- a/src/fsharp/fsiaux.fsi +++ b/src/fsharp/fsiaux.fsi @@ -7,10 +7,12 @@ namespace FSharp.Compiler.Interactive type IEventLoop = /// Run the event loop. + /// /// True if the event loop was restarted; false otherwise. abstract Run : unit -> bool /// Request that the given operation be run synchronously on the event loop. + /// /// The result of the operation. abstract Invoke : (unit -> 'T) -> 'T diff --git a/src/fsharp/lex.fsl b/src/fsharp/lex.fsl index 527f6ebd08..e1bc80085c 100644 --- a/src/fsharp/lex.fsl +++ b/src/fsharp/lex.fsl @@ -30,20 +30,39 @@ open FSharp.Compiler.ParseHelpers open FSharp.Compiler.Parser open FSharp.Compiler.SyntaxTree +module Ranges = + /// Whether valid as signed int8 when a minus sign is prepended, compares true to 0x80 + let isInt8BadMax x = 1 <<< 7 = x + + /// Whether valid as signed int16 when a minus sign is prepended, compares true to 0x8000 + let isInt16BadMax x = 1 <<< 15 = x + + /// Whether valid as signed int32 when a minus sign is prepended, compares as string against "2147483648". + let isInt32BadMax = let max = string(1UL <<< 31) in fun s -> max = s + + /// Whether valid as signed int64 when a minus sign is prepended, compares as string against "9223372036854775808". + let isInt64BadMax = let max = string(1UL <<< 63) in fun s -> max = s + +/// Get string from lexbuf let lexeme (lexbuf : UnicodeLexing.Lexbuf) = UnicodeLexing.Lexbuf.LexemeString lexbuf +/// Trim n chars from both side of a string let trimBoth (s:string) n m = s.Substring(n, s.Length - (n+m)) +/// Trim n chars from both sides of lexbuf, return string let lexemeTrimBoth lexbuf n m = trimBoth (lexeme lexbuf) n m +/// Trim n chars from the right of lexbuf, return string let lexemeTrimRight lexbuf n = lexemeTrimBoth lexbuf 0 n +/// Trim n chars from the left of lexbuf, return string let lexemeTrimLeft lexbuf n = lexemeTrimBoth lexbuf n 0 +/// Throw a lexing error with a message let fail args (lexbuf:UnicodeLexing.Lexbuf) msg dflt = let m = lexbuf.LexemeRange args.errorLogger.ErrorR(Error(msg,m)) - dflt + dflt //-------------------------- // Integer parsing @@ -115,19 +134,36 @@ let startString args (lexbuf: UnicodeLexing.Lexbuf) = let buf = ByteBuffer.Create 100 let m = lexbuf.LexemeRange let startp = lexbuf.StartPos - let fin = (fun _m2 b s -> - // Adjust the start-of-token mark back to the true start of the token - lexbuf.StartPos <- startp - if b then - if Lexhelp.stringBufferIsBytes buf then - BYTEARRAY (Lexhelp.stringBufferAsBytes buf) - else ( - fail args lexbuf (FSComp.SR.lexByteArrayCannotEncode()) () - BYTEARRAY (Lexhelp.stringBufferAsBytes buf) - ) - else - STRING (Lexhelp.stringBufferAsString s)) + let fin = + LexerStringFinisher (fun buf kind isPart cont -> + // Adjust the start-of-token mark back to the true start of the token + lexbuf.StartPos <- startp + if kind.IsByteString then + if kind.IsInterpolated then + fail args lexbuf (FSComp.SR.lexByteStringMayNotBeInterpolated()) () + BYTEARRAY (Lexhelp.stringBufferAsBytes buf, cont) + elif Lexhelp.stringBufferIsBytes buf then + BYTEARRAY (Lexhelp.stringBufferAsBytes buf, cont) + else + fail args lexbuf (FSComp.SR.lexByteArrayCannotEncode()) () + BYTEARRAY (Lexhelp.stringBufferAsBytes buf, cont) + elif kind.IsInterpolated then + let s = Lexhelp.stringBufferAsString buf + if kind.IsInterpolatedFirst then + if isPart then + INTERP_STRING_BEGIN_PART (s, cont) + else + INTERP_STRING_BEGIN_END (s, cont) + else + if isPart then + INTERP_STRING_PART (s, cont) + else + INTERP_STRING_END (s, cont) + else + let s = Lexhelp.stringBufferAsString buf + STRING (s, cont)) buf,fin,m + // Utility functions for processing XML documentation @@ -313,64 +349,64 @@ rule token args skip = parse | int8 { let n = lexemeTrimRightToInt32 args lexbuf 1 - if n > 0x80 || n < -0x80 then fail args lexbuf (FSComp.SR.lexOutsideEightBitSigned()) (INT8(0y,false)) // Allow to parse as min_int. Allowed only because we parse '-' as an operator. - else if n = 0x80 then INT8(sbyte(-0x80), true (* 'true' = 'bad'*) ) - else INT8(sbyte n,false) } + if Ranges.isInt8BadMax n then INT8(SByte.MinValue, true (* 'true' = 'bad'*) ) + else if n > int SByte.MaxValue || n < int SByte.MinValue then fail args lexbuf (FSComp.SR.lexOutsideEightBitSigned()) (INT8(0y, false)) + else INT8(sbyte n, false) } | xint8 { let n = lexemeTrimRightToInt32 args lexbuf 1 - if n > 0xFF || n < 0 then fail args lexbuf (FSComp.SR.lexOutsideEightBitSignedHex()) (INT8(0y,false)) - else INT8(sbyte(byte(n)),false) } + if n > int Byte.MaxValue || n < 0 then fail args lexbuf (FSComp.SR.lexOutsideEightBitSignedHex()) (INT8(0y, false)) + else INT8(sbyte(byte(n)), false) } | uint8 { let n = lexemeTrimRightToInt32 args lexbuf 2 - if n > 0xFF || n < 0 then fail args lexbuf (FSComp.SR.lexOutsideEightBitUnsigned()) (UINT8(0uy)) - else UINT8(byte n) } + if n > int Byte.MaxValue || n < 0 then fail args lexbuf (FSComp.SR.lexOutsideEightBitUnsigned()) (UINT8(0uy)) + else UINT8(byte n) } | int16 { let n = lexemeTrimRightToInt32 args lexbuf 1 - if n > 0x8000 || n < -0x8000 then fail args lexbuf (FSComp.SR.lexOutsideSixteenBitSigned()) (INT16(0s,false)) // Allow to parse as min_int. Allowed only because we parse '-' as an operator. - else if n = 0x8000 then INT16(-0x8000s,true) - else INT16(int16 n,false) } + if Ranges.isInt16BadMax n then INT16(Int16.MinValue, true (* 'true' = 'bad'*) ) + else if n > int Int16.MaxValue || n < int Int16.MinValue then fail args lexbuf (FSComp.SR.lexOutsideSixteenBitSigned()) (INT16(0s, false)) + else INT16(int16 n, false) } | xint16 { let n = lexemeTrimRightToInt32 args lexbuf 1 - if n > 0xFFFF || n < 0 then fail args lexbuf (FSComp.SR.lexOutsideSixteenBitSigned()) (INT16(0s,false)) - else INT16(int16(uint16(n)),false) } + if n > int UInt16.MaxValue || n < 0 then fail args lexbuf (FSComp.SR.lexOutsideSixteenBitSigned()) (INT16(0s,false)) + else INT16(int16(uint16(n)), false) } | uint16 { let n = lexemeTrimRightToInt32 args lexbuf 2 - if n > 0xFFFF || n < 0 then fail args lexbuf (FSComp.SR.lexOutsideSixteenBitUnsigned()) (UINT16(0us)) + if n > int UInt16.MaxValue || n < 0 then fail args lexbuf (FSComp.SR.lexOutsideSixteenBitUnsigned()) (UINT16(0us)) else UINT16(uint16 n) } | int '.' '.' { let s = removeUnderscores (lexemeTrimRight lexbuf 2) // Allow to parse as min_int. Allowed only because we parse '-' as an operator. - if s = "2147483648" then INT32_DOT_DOT(-2147483648,true) else + if Ranges.isInt32BadMax s then INT32_DOT_DOT(Int32.MinValue, true (* 'true' = 'bad'*) ) else let n = try int32 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitSigned()) 0 - INT32_DOT_DOT(n,false) + INT32_DOT_DOT(n, false) } | xint | int { let s = removeUnderscores (lexeme lexbuf) // Allow to parse as min_int. Allowed only because we parse '-' as an operator. - if s = "2147483648" then INT32(-2147483648,true) else + if Ranges.isInt32BadMax s then INT32(Int32.MinValue, true (* 'true' = 'bad'*) ) else let n = try int32 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitSigned()) 0 - INT32(n,false) + INT32(n, false) } | xint32 | int32 { let s = removeUnderscores (lexemeTrimRight lexbuf 1) // Allow to parse as min_int. Allowed only because we parse '-' as an operator. - if s = "2147483648" then INT32(-2147483648,true) else - let n = + if Ranges.isInt32BadMax s then INT32(Int32.MinValue, true (* 'true' = 'bad'*) ) else + let n = try int32 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitSigned()) 0 - INT32(n,false) + INT32(n, false) } | uint32 @@ -378,7 +414,7 @@ rule token args skip = parse let s = removeUnderscores (lexemeTrimRight lexbuf 1) let n = try int64 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitUnsigned()) 0L - if n > 0xFFFFFFFFL || n < 0L then fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitUnsigned()) (UINT32(0u)) else + if n > int64 UInt32.MaxValue || n < 0L then fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitUnsigned()) (UINT32(0u)) else UINT32(uint32 (uint64 n)) } | uint32l @@ -386,15 +422,15 @@ rule token args skip = parse let s = removeUnderscores (lexemeTrimRight lexbuf 2) let n = try int64 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitUnsigned()) 0L - if n > 0xFFFFFFFFL || n < 0L then fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitUnsigned()) (UINT32(0u)) else + if n > int64 UInt32.MaxValue || n < 0L then fail args lexbuf (FSComp.SR.lexOutsideThirtyTwoBitUnsigned()) (UINT32(0u)) else UINT32(uint32 (uint64 n)) } | int64 { let s = removeUnderscores (lexemeTrimRight lexbuf 1) // Allow to parse as min_int. Stupid but allowed because we parse '-' as an operator. - if s = "9223372036854775808" then INT64(-9223372036854775808L,true) else + if Ranges.isInt64BadMax s then INT64(Int64.MinValue, true (* 'true' = 'bad'*) ) else let n = - try int64 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideSixtyFourBitSigned()) 0L + try int64 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideSixtyFourBitSigned()) 0L INT64(n,false) } @@ -405,9 +441,13 @@ rule token args skip = parse UINT64(n) } | nativeint - { try - NATIVEINT(int64 (removeUnderscores (lexemeTrimRight lexbuf 1))) - with _ -> fail args lexbuf (FSComp.SR.lexOutsideNativeSigned()) (NATIVEINT(0L)) } + { let s = removeUnderscores (lexemeTrimRight lexbuf 1) + // Allow to parse as min_nativeint. Stupid but allowed because we parse '-' as an operator. + if Ranges.isInt64BadMax s then NATIVEINT(Int64.MinValue, true) else + let n = + try int64 s with _ -> fail args lexbuf (FSComp.SR.lexOutsideNativeSigned()) 0L + NATIVEINT(n,false) + } | unativeint { try @@ -502,70 +542,137 @@ rule token args skip = parse | _ -> fail args lexbuf (FSComp.SR.lexThisUnicodeOnlyInStringLiterals()) (CHAR (char 0)) } | "(*IF-FSHARP" - { if not skip then (COMMENT (LexCont.Token args.ifdefStack)) else token args skip lexbuf } + { if not skip then COMMENT (LexCont.Token (args.ifdefStack, args.stringNest)) + else token args skip lexbuf } | "(*F#" - { if not skip then (COMMENT (LexCont.Token args.ifdefStack)) else token args skip lexbuf } + { if not skip then COMMENT (LexCont.Token (args.ifdefStack, args.stringNest)) + else token args skip lexbuf } | "ENDIF-FSHARP*)" - { if not skip then (COMMENT (LexCont.Token args.ifdefStack)) else token args skip lexbuf } + { if not skip then COMMENT (LexCont.Token (args.ifdefStack, args.stringNest)) + else token args skip lexbuf } | "F#*)" - { if not skip then (COMMENT (LexCont.Token args.ifdefStack)) else token args skip lexbuf } + { if not skip then COMMENT (LexCont.Token (args.ifdefStack, args.stringNest)) + else token args skip lexbuf } | "(*)" { LPAREN_STAR_RPAREN } | "(*" { let m = lexbuf.LexemeRange - if not skip then (COMMENT (LexCont.Comment(args.ifdefStack,1,m))) else comment (1,m,args) skip lexbuf } + if not skip then COMMENT (LexCont.Comment(args.ifdefStack, args.stringNest, 1, m)) + else comment (1,m,args) skip lexbuf } | "(*IF-CAML*)" | "(*IF-OCAML*)" { let m = lexbuf.LexemeRange - if not skip then (COMMENT (LexCont.MLOnly(args.ifdefStack,m))) else mlOnly m args skip lexbuf } + if not skip then COMMENT (LexCont.MLOnly(args.ifdefStack, args.stringNest, m)) + else mlOnly m args skip lexbuf } | '"' - { let buf,fin,m = startString args lexbuf - if not skip then (STRING_TEXT (LexCont.String(args.ifdefStack,m))) else string (buf,fin,m,args) skip lexbuf } + { let buf, fin, m = startString args lexbuf + + // Single quote in triple quote ok, others disallowed + match args.stringNest with + | (_, LexerStringStyle.TripleQuote, _) :: _ -> () + | _ :: _ -> errorR(Error(FSComp.SR.lexSingleQuoteInSingleQuote(), m)) + | [] -> () + + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, LexerStringKind.String, m)) + else singleQuoteString (buf, fin, m, LexerStringKind.String, args) skip lexbuf } - | '"' '"' '"' - { let buf,fin,m = startString args lexbuf - if not skip then (STRING_TEXT (LexCont.TripleQuoteString(args.ifdefStack,m))) else tripleQuoteString (buf,fin,m,args) skip lexbuf } + | '$' '"' '"' '"' + { let buf, fin, m = startString args lexbuf + + // Single quote in triple quote ok, others disallowed + match args.stringNest with + | _ :: _ -> errorR(Error(FSComp.SR.lexTripleQuoteInTripleQuote(), m)) + | [] -> () + + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, LexerStringKind.InterpolatedStringFirst, m)) + else tripleQuoteString (buf, fin, m, LexerStringKind.InterpolatedStringFirst, args) skip lexbuf } | '$' '"' - { fail args lexbuf (FSComp.SR.lexTokenReserved()) (WHITESPACE (LexCont.Token args.ifdefStack)) } + { let buf,fin,m = startString args lexbuf + + // Single quote in triple quote ok, others disallowed + match args.stringNest with + | (_, LexerStringStyle.TripleQuote, _) :: _ -> () + | _ :: _ -> errorR(Error(FSComp.SR.lexSingleQuoteInSingleQuote(), m)) + | _ -> () + + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, LexerStringKind.InterpolatedStringFirst, m)) + else singleQuoteString (buf, fin, m, LexerStringKind.InterpolatedStringFirst, args) skip lexbuf } + + | '"' '"' '"' + { let buf, fin, m = startString args lexbuf + + // Single quote in triple quote ok, others disallowed + match args.stringNest with + | _ :: _ -> errorR(Error(FSComp.SR.lexTripleQuoteInTripleQuote(), m)) + | _ -> () + + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, LexerStringKind.String, m)) + else tripleQuoteString (buf, fin, m, LexerStringKind.String, args) skip lexbuf } | '@' '"' - { let buf,fin,m = startString args lexbuf - if not skip then (STRING_TEXT (LexCont.VerbatimString(args.ifdefStack,m))) else verbatimString (buf,fin,m,args) skip lexbuf } + { let buf, fin, m = startString args lexbuf + + // Single quote in triple quote ok, others disallowed + match args.stringNest with + | (_, LexerStringStyle.TripleQuote, _) :: _ -> () + | _ :: _ -> errorR(Error(FSComp.SR.lexSingleQuoteInSingleQuote(), m)) + | _ -> () + + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, LexerStringKind.String, m)) + else verbatimString (buf, fin, m, LexerStringKind.String, args) skip lexbuf } + + | ("$@" | "@$") '"' + { let buf, fin, m = startString args lexbuf + + // Single quote in triple quote ok, others disallowed + match args.stringNest with + | (_, LexerStringStyle.TripleQuote, _) :: _ -> () + | _ :: _ -> errorR(Error(FSComp.SR.lexSingleQuoteInSingleQuote(), m)) + | _ -> () + + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, LexerStringKind.InterpolatedStringFirst, m)) + else verbatimString (buf, fin, m, LexerStringKind.InterpolatedStringFirst, args) skip lexbuf } | truewhite+ { if skip then token args skip lexbuf - else WHITESPACE (LexCont.Token args.ifdefStack) } + else WHITESPACE (LexCont.Token(args.ifdefStack, args.stringNest)) } | offwhite+ - { if args.lightSyntaxStatus.Status then errorR(Error(FSComp.SR.lexTabsNotAllowed(),lexbuf.LexemeRange)) - if not skip then (WHITESPACE (LexCont.Token args.ifdefStack)) else token args skip lexbuf } + { if args.lightStatus.Status then errorR(Error(FSComp.SR.lexTabsNotAllowed(), lexbuf.LexemeRange)) + if not skip then WHITESPACE (LexCont.Token(args.ifdefStack, args.stringNest)) + else token args skip lexbuf } | "////" op_char* { // 4+ slash are 1-line comments, online 3 slash are XmlDoc let m = lexbuf.LexemeRange - if not skip then (LINE_COMMENT (LexCont.SingleLineComment(args.ifdefStack,1,m))) else singleLineComment (None,1,m,args) skip lexbuf } + if not skip then LINE_COMMENT (LexCont.SingleLineComment(args.ifdefStack, args.stringNest, 1, m)) + else singleLineComment (None,1,m,args) skip lexbuf } | "///" op_char* { // Match exactly 3 slash, 4+ slash caught by preceding rule let m = lexbuf.LexemeRange let doc = lexemeTrimLeft lexbuf 3 let sb = (new StringBuilder(100)).Append(doc) - if not skip then (LINE_COMMENT (LexCont.SingleLineComment(args.ifdefStack,1,m))) else singleLineComment (Some sb,1,m,args) skip lexbuf } + if not skip then LINE_COMMENT (LexCont.SingleLineComment(args.ifdefStack, args.stringNest, 1, m)) + else singleLineComment (Some sb,1,m,args) skip lexbuf } | "//" op_char* { // Need to read all operator symbols too, otherwise it might be parsed by a rule below let m = lexbuf.LexemeRange - if not skip then (LINE_COMMENT (LexCont.SingleLineComment(args.ifdefStack,1,m))) else singleLineComment (None,1,m,args) skip lexbuf } + if not skip then LINE_COMMENT (LexCont.SingleLineComment(args.ifdefStack, args.stringNest, 1, m)) + else singleLineComment (None,1,m,args) skip lexbuf } | newline - { newline lexbuf; if not skip then (WHITESPACE (LexCont.Token args.ifdefStack)) else token args skip lexbuf } + { newline lexbuf + if not skip then WHITESPACE (LexCont.Token(args.ifdefStack, args.stringNest)) + else token args skip lexbuf } | '`' '`' ([^'`' '\n' '\r' '\t'] | '`' [^'`''\n' '\r' '\t']) + '`' '`' { Keywords.IdentifierToken args lexbuf (lexemeTrimBoth lexbuf 2 2) } @@ -590,7 +697,7 @@ rule token args skip = parse | _ -> let text = (String.sub s start (n-start)) let lineNumber = try int32 text - with err -> errorR(Error(FSComp.SR.lexInvalidLineNumber(text),lexbuf.LexemeRange)); 0 + with err -> errorR(Error(FSComp.SR.lexInvalidLineNumber(text), lexbuf.LexemeRange)); 0 lineNumber, parseWhitespaceBeforeFile n // goto the next state and parseWhitespaceBeforeFile n = @@ -617,7 +724,7 @@ rule token args skip = parse else // add a newline when we don't apply a directive since we consumed a newline getting here newline lexbuf - (HASH_LINE (LexCont.Token args.ifdefStack)) } + HASH_LINE (LexCont.Token (args.ifdefStack, args.stringNest)) } | "<@" { checkExprOp lexbuf; LQUOTE ("<@ @>", false) } @@ -703,11 +810,48 @@ rule token args skip = parse | ">]" { GREATER_RBRACK } - | "{" { LBRACE } + | "{" + { + match args.stringNest with + | [] -> () + | (counter, style, m) :: rest -> + // Note, we do not update the 'm', any incomplete-interpolation error + // will be reported w.r.t. the first '{' + args.stringNest <- (counter + 1, style, m) :: rest + // To continue token-by-token lexing may involve picking up the new args.stringNes + let cont = LexCont.Token(args.ifdefStack, args.stringNest) + LBRACE cont + } | "|" { BAR } - | "}" { RBRACE } + | "}" + { + // We encounter a '}' in the expression token stream. First check if we're in an interpolated string expression + // and continue the string if necessary + match args.stringNest with + | (1, style, _) :: rest -> + args.stringNest <- rest + let buf, fin, m = startString args lexbuf + if not skip then + STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, style, LexerStringKind.InterpolatedStringPart, m)) + else + match style with + | LexerStringStyle.Verbatim -> verbatimString (buf, fin, m, LexerStringKind.InterpolatedStringPart, args) skip lexbuf + | LexerStringStyle.SingleQuote -> singleQuoteString (buf, fin, m, LexerStringKind.InterpolatedStringPart, args) skip lexbuf + | LexerStringStyle.TripleQuote -> tripleQuoteString (buf, fin, m, LexerStringKind.InterpolatedStringPart, args) skip lexbuf + + | (counter, style, m) :: rest -> + // Note, we do not update the 'm', any incomplete-interpolation error + // will be reported w.r.t. the first '{' + args.stringNest <- (counter - 1, style, m) :: rest + let cont = LexCont.Token(args.ifdefStack, args.stringNest) + RBRACE cont + + | _ -> + let cont = LexCont.Token(args.ifdefStack, args.stringNest) + RBRACE cont + } | "$" { DOLLAR } @@ -744,21 +888,26 @@ rule token args skip = parse | "#!" op_char* { // Treat shebangs like regular comments, but they are only allowed at the start of a file let m = lexbuf.LexemeRange - let tok = shouldStartFile args lexbuf m (0,FSComp.SR.lexHashBangMustBeFirstInFile()) (LINE_COMMENT (LexCont.SingleLineComment(args.ifdefStack,1,m))) + let tok = LINE_COMMENT (LexCont.SingleLineComment(args.ifdefStack, args.stringNest, 1, m)) + let tok = shouldStartFile args lexbuf m (0,FSComp.SR.lexHashBangMustBeFirstInFile()) tok if not skip then tok else singleLineComment (None,1,m,args) skip lexbuf } | "#light" anywhite* | ("#indent" | "#light") anywhite+ "\"on\"" - { if args.lightSyntaxStatus.ExplicitlySet && args.lightSyntaxStatus.WarnOnMultipleTokens then - warning(Error((0,"#light should only occur as the first non-comment text in an F# source file"),lexbuf.LexemeRange)) - // TODO unreachable error above, I think? - brianmcn - args.lightSyntaxStatus.Status <- true - if not skip then (HASH_LIGHT (LexCont.Token args.ifdefStack)) else token args skip lexbuf } + { if args.lightStatus.ExplicitlySet && args.lightStatus.WarnOnMultipleTokens then + let s = lexeme lexbuf + warning(Error((0, sprintf "%s should only be set once in an F# source file." s), lexbuf.LexemeRange)) + // TODO: where should this go? (abelb) + //warning(Error((0,"#light should only occur as the first non-comment text in an F# source file."), lexbuf.LexemeRange)) + args.lightStatus.Status <- true + if not skip then HASH_LIGHT (LexCont.Token(args.ifdefStack, args.stringNest)) + else token args skip lexbuf } | ("#indent" | "#light") anywhite+ "\"off\"" - { args.lightSyntaxStatus.Status <- false + { args.lightStatus.Status <- false mlCompatWarning (FSComp.SR.lexIndentOffForML()) lexbuf.LexemeRange - if not skip then (HASH_LIGHT (LexCont.Token args.ifdefStack)) else token args skip lexbuf } + if not skip then HASH_LIGHT (LexCont.Token (args.ifdefStack, args.stringNest)) + else token args skip lexbuf } | anywhite* "#if" anywhite+ anystring { let m = lexbuf.LexemeRange @@ -769,8 +918,15 @@ rule token args skip = parse // Get the token; make sure it starts at zero position & return let cont, f = - ( if isTrue then (LexCont.EndLine(LexerEndlineContinuation.Token(args.ifdefStack)), endline (LexerEndlineContinuation.Token args.ifdefStack) args skip) - else (LexCont.EndLine(LexerEndlineContinuation.Skip(args.ifdefStack,0,m)), endline (LexerEndlineContinuation.Skip(args.ifdefStack,0,m)) args skip) ) + if isTrue then + let cont = LexCont.EndLine(args.ifdefStack, args.stringNest, LexerEndlineContinuation.Token) + let f = endline LexerEndlineContinuation.Token args skip + cont, f + else + let cont = LexCont.EndLine(args.ifdefStack, args.stringNest, LexerEndlineContinuation.Skip(0, m)) + let f = endline (LexerEndlineContinuation.Skip(0, m)) args skip + cont, f + let tok = shouldStartLine args lexbuf m (FSComp.SR.lexHashIfMustBeFirst()) (HASH_IF(m,lexed,cont)) if not skip then tok else f lexbuf } @@ -782,9 +938,9 @@ rule token args skip = parse | (IfDefIf,_) :: rest -> let m = lexbuf.LexemeRange args.ifdefStack <- (IfDefElse,m) :: rest - let tok = HASH_ELSE(m,lexed, LexCont.EndLine(LexerEndlineContinuation.Skip(args.ifdefStack,0,m))) + let tok = HASH_ELSE(m, lexed, LexCont.EndLine(args.ifdefStack, args.stringNest, LexerEndlineContinuation.Skip(0, m))) let tok = shouldStartLine args lexbuf m (FSComp.SR.lexHashElseMustBeFirst()) tok - if not skip then tok else endline (LexerEndlineContinuation.Skip(args.ifdefStack,0,m)) args skip lexbuf } + if not skip then tok else endline (LexerEndlineContinuation.Skip(0, m)) args skip lexbuf } | anywhite* "#endif" anywhite* ("//" [^'\n''\r']*)? { let lexed = (lexeme lexbuf) @@ -793,21 +949,30 @@ rule token args skip = parse | []-> LEX_FAILURE (FSComp.SR.lexHashEndingNoMatchingIf()) | _ :: rest -> args.ifdefStack <- rest - let tok = HASH_ENDIF(m,lexed,LexCont.EndLine(LexerEndlineContinuation.Token(args.ifdefStack))) + let tok = HASH_ENDIF(m,lexed,LexCont.EndLine(args.ifdefStack, args.stringNest, LexerEndlineContinuation.Token)) let tok = shouldStartLine args lexbuf m (FSComp.SR.lexHashEndifMustBeFirst()) tok - if not skip then tok else endline (LexerEndlineContinuation.Token(args.ifdefStack)) args skip lexbuf } + if not skip then tok else endline LexerEndlineContinuation.Token args skip lexbuf } | "#if" - { let tok = fail args lexbuf (FSComp.SR.lexHashIfMustHaveIdent()) (WHITESPACE (LexCont.Token args.ifdefStack)) + { let tok = WHITESPACE (LexCont.Token (args.ifdefStack, args.stringNest)) + let tok = fail args lexbuf (FSComp.SR.lexHashIfMustHaveIdent()) tok if not skip then tok else token args skip lexbuf } + | anywhite* "#if" ident_char+ + | anywhite* "#else" ident_char+ + | anywhite* "#endif" ident_char+ + | anywhite* "#light" ident_char+ + { let n = Array.IndexOf(lexbuf.Lexeme, '#') + lexbuf.StartPos <- lexbuf.StartPos.ShiftColumnBy(n) + HASH_IDENT(lexemeTrimLeft lexbuf (n+1)) } + | surrogateChar surrogateChar | _ { unexpectedChar lexbuf } | eof - { EOF (LexCont.Token args.ifdefStack) } + { EOF (LexCont.Token(args.ifdefStack, args.stringNest)) } // Skips INACTIVE code until if finds #else / #endif matching with the #if or #else @@ -817,10 +982,11 @@ and ifdefSkip n m args skip = parse // If #if is the first thing on the line then increase depth, otherwise skip, because it is invalid (e.g. "(**) #if ...") if (m.StartColumn <> 0) then - if not skip then (INACTIVECODE (LexCont.IfDefSkip(args.ifdefStack,n,m))) else ifdefSkip n m args skip lexbuf + if not skip then INACTIVECODE (LexCont.IfDefSkip(args.ifdefStack, args.stringNest, n, m)) + else ifdefSkip n m args skip lexbuf else - let tok = INACTIVECODE(LexCont.EndLine(LexerEndlineContinuation.Skip(args.ifdefStack,n+1,m))) - if not skip then tok else endline (LexerEndlineContinuation.Skip(args.ifdefStack,n+1,m)) args skip lexbuf } + let tok = INACTIVECODE(LexCont.EndLine(args.ifdefStack, args.stringNest, LexerEndlineContinuation.Skip(n+1, m))) + if not skip then tok else endline (LexerEndlineContinuation.Skip(n+1, m)) args skip lexbuf } | anywhite* "#else" anywhite* ("//" [^'\n''\r']*)? { let lexed = (lexeme lexbuf) @@ -828,7 +994,8 @@ and ifdefSkip n m args skip = parse // If #else is the first thing on the line then process it, otherwise ignore, because it is invalid (e.g. "(**) #else ...") if (m.StartColumn <> 0) then - if not skip then (INACTIVECODE (LexCont.IfDefSkip(args.ifdefStack,n,m))) else ifdefSkip n m args skip lexbuf + if not skip then INACTIVECODE (LexCont.IfDefSkip(args.ifdefStack, args.stringNest, n, m)) + else ifdefSkip n m args skip lexbuf elif n = 0 then match args.ifdefStack with | []-> LEX_FAILURE (FSComp.SR.lexHashElseNoMatchingIf()) @@ -836,9 +1003,11 @@ and ifdefSkip n m args skip = parse | (IfDefIf,_) :: rest -> let m = lexbuf.LexemeRange args.ifdefStack <- (IfDefElse,m) :: rest - if not skip then (HASH_ELSE(m,lexed,LexCont.EndLine(LexerEndlineContinuation.Token(args.ifdefStack)))) else endline (LexerEndlineContinuation.Token(args.ifdefStack)) args skip lexbuf + if not skip then HASH_ELSE(m,lexed,LexCont.EndLine(args.ifdefStack, args.stringNest, LexerEndlineContinuation.Token)) + else endline LexerEndlineContinuation.Token args skip lexbuf else - if not skip then (INACTIVECODE(LexCont.EndLine(LexerEndlineContinuation.Skip(args.ifdefStack,n,m)))) else endline (LexerEndlineContinuation.Skip(args.ifdefStack,n,m)) args skip lexbuf } + if not skip then INACTIVECODE(LexCont.EndLine(args.ifdefStack, args.stringNest, LexerEndlineContinuation.Skip(n, m))) + else endline (LexerEndlineContinuation.Skip(n, m)) args skip lexbuf } | anywhite* "#endif" anywhite* ("//" [^'\n''\r']*)? { let lexed = lexeme lexbuf @@ -846,17 +1015,19 @@ and ifdefSkip n m args skip = parse // If #endif is the first thing on the line then process it, otherwise ignore, because it is invalid (e.g. "(**) #endif ...") if (m.StartColumn <> 0) then - if not skip then (INACTIVECODE (LexCont.IfDefSkip(args.ifdefStack,n,m))) else ifdefSkip n m args skip lexbuf + if not skip then INACTIVECODE (LexCont.IfDefSkip(args.ifdefStack, args.stringNest, n, m)) + else ifdefSkip n m args skip lexbuf elif n = 0 then match args.ifdefStack with | [] -> LEX_FAILURE (FSComp.SR.lexHashEndingNoMatchingIf()) | _ :: rest -> args.ifdefStack <- rest - if not skip then (HASH_ENDIF(m,lexed,LexCont.EndLine(LexerEndlineContinuation.Token(args.ifdefStack)))) else endline (LexerEndlineContinuation.Token(args.ifdefStack)) args skip lexbuf + if not skip then HASH_ENDIF(m,lexed,LexCont.EndLine(args.ifdefStack, args.stringNest, LexerEndlineContinuation.Token)) + else endline LexerEndlineContinuation.Token args skip lexbuf else - let tok = INACTIVECODE(LexCont.EndLine(LexerEndlineContinuation.Skip(args.ifdefStack,n-1,m))) + let tok = INACTIVECODE(LexCont.EndLine(args.ifdefStack, args.stringNest, LexerEndlineContinuation.Skip(n-1, m))) let tok = shouldStartLine args lexbuf m (FSComp.SR.lexWrongNestedHashEndif()) tok - if not skip then tok else endline (LexerEndlineContinuation.Skip(args.ifdefStack,(n-1),m)) args skip lexbuf } + if not skip then tok else endline (LexerEndlineContinuation.Skip(n-1, m)) args skip lexbuf } | newline { newline lexbuf; ifdefSkip n m args skip lexbuf } @@ -869,10 +1040,11 @@ and ifdefSkip n m args skip = parse | _ { // This tries to be nice and get tokens as 'words' because VS uses this when selecting stuff - if not skip then (INACTIVECODE (LexCont.IfDefSkip(args.ifdefStack,n,m))) else ifdefSkip n m args skip lexbuf } + if not skip then INACTIVECODE (LexCont.IfDefSkip(args.ifdefStack, args.stringNest, n, m)) + else ifdefSkip n m args skip lexbuf } | eof - { EOF (LexCont.IfDefSkip(args.ifdefStack,n,m)) } + { EOF (LexCont.IfDefSkip(args.ifdefStack, args.stringNest, n, m)) } // Called after lexing #if IDENT/#else/#endif - this checks whether there is nothing except end of line // or end of file and then calls the lexing function specified by 'cont' - either token or ifdefSkip @@ -880,272 +1052,424 @@ and endline cont args skip = parse | newline { newline lexbuf match cont with - | LexerEndlineContinuation.Token(ifdefStack) -> if not skip then (WHITESPACE(LexCont.Token ifdefStack)) else token args skip lexbuf - | LexerEndlineContinuation.Skip(ifdefStack, n, m) -> if not skip then (INACTIVECODE (LexCont.IfDefSkip(ifdefStack,n,m))) else ifdefSkip n m args skip lexbuf + | LexerEndlineContinuation.Token -> + if not skip then WHITESPACE(LexCont.Token (args.ifdefStack, args.stringNest)) + else token args skip lexbuf + + | LexerEndlineContinuation.Skip(n, m) -> + if not skip then INACTIVECODE (LexCont.IfDefSkip(args.ifdefStack, args.stringNest, n, m)) + else ifdefSkip n m args skip lexbuf } | eof { match cont with - | LexerEndlineContinuation.Token(ifdefStack) -> (EOF(LexCont.Token ifdefStack)) - | LexerEndlineContinuation.Skip(ifdefStack, n, m) -> (EOF(LexCont.IfDefSkip(ifdefStack,n,m))) + | LexerEndlineContinuation.Token -> + EOF(LexCont.Token(args.ifdefStack, args.stringNest)) + | LexerEndlineContinuation.Skip(n, m) -> + EOF(LexCont.IfDefSkip(args.ifdefStack, args.stringNest, n, m)) } | [^'\r' '\n']+ | _ - { let tok = fail args lexbuf (FSComp.SR.pplexExpectedSingleLineComment()) (WHITESPACE (LexCont.Token args.ifdefStack)) + { let tok = WHITESPACE (LexCont.Token (args.ifdefStack, args.stringNest)) + let tok = fail args lexbuf (FSComp.SR.pplexExpectedSingleLineComment()) tok if not skip then tok else token args skip lexbuf } -and string sargs skip = parse +and singleQuoteString sargs skip = parse | '\\' newline anywhite* - { let (_buf,_fin,m,args) = sargs + { let (_buf, _fin, m, kind, args) = sargs newline lexbuf - if not skip then (STRING_TEXT (LexCont.String(args.ifdefStack,m))) else string sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf } | escape_char - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addByteChar buf (escape (lexeme lexbuf).[1]) - if not skip then (STRING_TEXT (LexCont.String(args.ifdefStack,m))) else string sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf } | trigraph - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs let s = lexeme lexbuf addByteChar buf (trigraph s.[1] s.[2] s.[3]) - if not skip then (STRING_TEXT (LexCont.String(args.ifdefStack,m))) else string sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf } | hexGraphShort - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeChar buf (int (hexGraphShort (lexemeTrimLeft lexbuf 2))) - if not skip then (STRING_TEXT (LexCont.String(args.ifdefStack,m))) else string sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf } | unicodeGraphShort - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeChar buf (int (unicodeGraphShort (lexemeTrimLeft lexbuf 2))) - if not skip then (STRING_TEXT (LexCont.String(args.ifdefStack,m))) else string sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf } | unicodeGraphLong - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs let hexChars = lexemeTrimLeft lexbuf 2 - let result () = if not skip then (STRING_TEXT (LexCont.String(args.ifdefStack,m))) else string sargs skip lexbuf + let result() = + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf match unicodeGraphLong hexChars with | Invalid -> - fail args lexbuf (FSComp.SR.lexInvalidUnicodeLiteral hexChars) (result ()) + fail args lexbuf (FSComp.SR.lexInvalidUnicodeLiteral hexChars) (result()) | SingleChar(c) -> addUnicodeChar buf (int c) - result () + result() | SurrogatePair(hi, lo) -> addUnicodeChar buf (int hi) addUnicodeChar buf (int lo) - result () } + result() } | '"' - { let (buf,fin,_m,_args) = sargs - let m2 = lexbuf.LexemeRange - callStringFinisher fin buf m2 false } + { let (buf, fin, _m, kind, args) = sargs + let cont = LexCont.Token(args.ifdefStack, args.stringNest) + fin.Finish buf kind false cont + } | '"''B' - { let (buf,fin,_m,_args) = sargs - let m2 = lexbuf.LexemeRange - callStringFinisher fin buf m2 true } + { let (buf, fin, _m, kind, args) = sargs + let cont = LexCont.Token(args.ifdefStack, args.stringNest) + fin.Finish buf { kind with IsByteString = true } false cont + } + + | ("{{" | "}}") + { let (buf, _fin, m, kind, args) = sargs + let s = lexeme lexbuf + addUnicodeString buf (if kind.IsInterpolated then s.[0..0] else s) + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf } + + | "{" + { let (buf, fin, m, kind, args) = sargs + if kind.IsInterpolated then + // get a new range for where the fill starts + let m2 = lexbuf.LexemeRange + args.stringNest <- (1, LexerStringStyle.SingleQuote, m2) :: args.stringNest + let cont = LexCont.Token(args.ifdefStack, args.stringNest) + fin.Finish buf kind true cont + else + addUnicodeString buf (lexeme lexbuf) + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf + } + + | "}" + { let (buf, _fin, m, kind, args) = sargs + let result() = + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf + if kind.IsInterpolated then + fail args lexbuf (FSComp.SR.lexRBraceInInterpolatedString()) (result()) + else + addUnicodeString buf (lexeme lexbuf) + (result()) + } | newline - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs newline lexbuf addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.String(args.ifdefStack,m))) else string sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf } | ident - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.String(args.ifdefStack,m))) else string sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf } | integer | xinteger - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.String(args.ifdefStack,m))) else string sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf } | anywhite + - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.String(args.ifdefStack,m))) else string sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf } | eof - { let (_buf,_fin,m,args) = sargs - EOF (LexCont.String(args.ifdefStack,m)) } + { let (_buf, _fin, m, kind, args) = sargs + EOF (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) } | surrogateChar surrogateChar // surrogate code points always come in pairs | _ - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.String(args.ifdefStack,m))) else string sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, kind, m)) + else singleQuoteString sargs skip lexbuf } and verbatimString sargs skip = parse | '"' '"' - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addByteChar buf '\"' - if not skip then (STRING_TEXT (LexCont.VerbatimString(args.ifdefStack,m))) else verbatimString sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, kind, m)) + else verbatimString sargs skip lexbuf } | '"' - { let (buf,fin,_m,_args) = sargs - let m2 = lexbuf.LexemeRange - callStringFinisher fin buf m2 false } + { let (buf, fin, _m, kind, args) = sargs + let cont = LexCont.Token(args.ifdefStack, args.stringNest) + fin.Finish buf kind false cont + } | '"''B' - { let (buf,fin,_m,_args) = sargs - let m2 = lexbuf.LexemeRange - callStringFinisher fin buf m2 true } + { let (buf, fin, _m, kind, args) = sargs + let cont = LexCont.Token(args.ifdefStack, args.stringNest) + fin.Finish buf { kind with IsByteString = true } false cont + } | newline - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs newline lexbuf addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.VerbatimString(args.ifdefStack,m))) else verbatimString sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, kind, m)) + else verbatimString sargs skip lexbuf } + + | ("{{" | "}}") + { let (buf, _fin, m, kind, args) = sargs + let s = lexeme lexbuf + addUnicodeString buf (if kind.IsInterpolated then s.[0..0] else s) + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, kind, m)) + else verbatimString sargs skip lexbuf } + + | "{" + { let (buf, fin, m, kind, args) = sargs + if kind.IsInterpolated then + // get a new range for where the fill starts + let m2 = lexbuf.LexemeRange + args.stringNest <- (1, LexerStringStyle.Verbatim, m2) :: args.stringNest + let cont = LexCont.Token(args.ifdefStack, args.stringNest) + fin.Finish buf kind true cont + else + addUnicodeString buf (lexeme lexbuf) + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, kind, m)) + else verbatimString sargs skip lexbuf + } + + | "}" + { let (buf, _fin, m, kind, args) = sargs + let result() = + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, kind, m)) + else verbatimString sargs skip lexbuf + if kind.IsInterpolated then + fail args lexbuf (FSComp.SR.lexRBraceInInterpolatedString()) (result()) + else + addUnicodeString buf (lexeme lexbuf) + (result()) + } | ident - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.VerbatimString(args.ifdefStack,m))) else verbatimString sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, kind, m)) + else verbatimString sargs skip lexbuf } | integer | xinteger - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.VerbatimString(args.ifdefStack,m))) else verbatimString sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, kind, m)) + else verbatimString sargs skip lexbuf } | anywhite + - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.VerbatimString(args.ifdefStack,m))) else verbatimString sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, kind, m)) + else verbatimString sargs skip lexbuf } | eof - { let (_buf,_fin,m,args) = sargs - EOF (LexCont.VerbatimString(args.ifdefStack,m)) } + { let (_buf, _fin, m, kind, args) = sargs + EOF (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, kind, m)) } + | surrogateChar surrogateChar // surrogate code points always come in pairs | _ - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.VerbatimString(args.ifdefStack,m))) else verbatimString sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, kind, m)) + else verbatimString sargs skip lexbuf } and tripleQuoteString sargs skip = parse | '"' '"' '"' - { let (buf,fin,_m,_args) = sargs - let m2 = lexbuf.LexemeRange - callStringFinisher fin buf m2 false } + { let (buf, fin, _m, kind, args) = sargs + let cont = LexCont.Token(args.ifdefStack, args.stringNest) + fin.Finish buf kind false cont } | newline - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs newline lexbuf addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.TripleQuoteString(args.ifdefStack,m))) else tripleQuoteString sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, kind, m)) + else tripleQuoteString sargs skip lexbuf } // The rest is to break into pieces to allow double-click-on-word and other such things | ident - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.TripleQuoteString(args.ifdefStack,m))) else tripleQuoteString sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, kind, m)) + else tripleQuoteString sargs skip lexbuf } | integer | xinteger - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.TripleQuoteString(args.ifdefStack,m))) else tripleQuoteString sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, kind, m)) + else tripleQuoteString sargs skip lexbuf } | anywhite + - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.TripleQuoteString(args.ifdefStack,m))) else tripleQuoteString sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, kind, m)) + else tripleQuoteString sargs skip lexbuf } + + | ("{{" | "}}") + { let (buf, _fin, m, kind, args) = sargs + let s = lexeme lexbuf + addUnicodeString buf (if kind.IsInterpolated then s.[0..0] else s) + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, kind, m)) + else tripleQuoteString sargs skip lexbuf } + + | "{" + { let (buf, fin, m, kind, args) = sargs + if kind.IsInterpolated then + // get a new range for where the fill starts + let m2 = lexbuf.LexemeRange + args.stringNest <- (1, LexerStringStyle.TripleQuote, m2) :: args.stringNest + let cont = LexCont.Token(args.ifdefStack, args.stringNest) + fin.Finish buf kind true cont + else + addUnicodeString buf (lexeme lexbuf) + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, kind, m)) + else tripleQuoteString sargs skip lexbuf + } + + | "}" + { let (buf, _fin, m, kind, args) = sargs + let result() = + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, kind, m)) + else tripleQuoteString sargs skip lexbuf + if kind.IsInterpolated then + fail args lexbuf (FSComp.SR.lexRBraceInInterpolatedString()) (result()) + else + addUnicodeString buf (lexeme lexbuf) + (result()) + } | eof - { let (_buf,_fin,m,args) = sargs - EOF (LexCont.TripleQuoteString(args.ifdefStack,m)) } + { let (_buf, _fin, m, kind, args) = sargs + EOF (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, kind, m)) } | surrogateChar surrogateChar // surrogate code points always come in pairs | _ - { let (buf,_fin,m,args) = sargs + { let (buf, _fin, m, kind, args) = sargs addUnicodeString buf (lexeme lexbuf) - if not skip then (STRING_TEXT (LexCont.TripleQuoteString(args.ifdefStack,m))) else tripleQuoteString sargs skip lexbuf } + if not skip then STRING_TEXT (LexCont.String(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, kind, m)) + else tripleQuoteString sargs skip lexbuf } // Parsing single-line comment - we need to split it into words for Visual Studio IDE and singleLineComment cargs skip = parse | newline - { let buff,_n,_m,args = cargs + { let buff,_n, _m, args = cargs trySaveXmlDoc lexbuf buff newline lexbuf // Saves the documentation (if we're collecting any) into a buffer-local variable. - if not skip then (LINE_COMMENT (LexCont.Token args.ifdefStack)) else token args skip lexbuf } + if not skip then LINE_COMMENT (LexCont.Token(args.ifdefStack, args.stringNest)) + else token args skip lexbuf } | eof - { let _, _n,_m,args = cargs + { let _, _n, _m, args = cargs // NOTE: it is legal to end a file with this comment, so we'll return EOF as a token - EOF (LexCont.Token args.ifdefStack) } + EOF (LexCont.Token(args.ifdefStack, args.stringNest)) } | [^ ' ' '\n' '\r' ]+ | anywhite+ - { let buff,n,m,args = cargs + { let buff, n, m, args = cargs // Append the current token to the XML documentation if we're collecting it tryAppendXmlDoc buff (lexeme lexbuf) - if not skip then (LINE_COMMENT (LexCont.SingleLineComment(args.ifdefStack,n,m))) else singleLineComment (buff,n,m,args) skip lexbuf } + if not skip then LINE_COMMENT (LexCont.SingleLineComment(args.ifdefStack, args.stringNest, n, m)) + else singleLineComment (buff, n, m, args) skip lexbuf } | surrogateChar surrogateChar - | _ { let _, _n,_m,args = cargs - if not skip then (LINE_COMMENT (LexCont.Token args.ifdefStack)) else token args skip lexbuf } + | _ { let _, _n, _m, args = cargs + if not skip then LINE_COMMENT (LexCont.Token(args.ifdefStack, args.stringNest)) + else token args skip lexbuf } and comment cargs skip = parse | char - { let n,m,args = cargs - if not skip then (COMMENT (LexCont.Comment(args.ifdefStack,n,m))) else comment (n,m,args) skip lexbuf } + { let n, m, args = cargs + if not skip then COMMENT (LexCont.Comment(args.ifdefStack, args.stringNest, n, m)) + else comment (n, m, args) skip lexbuf } | '"' - { let n,m,args = cargs - if not skip then (COMMENT (LexCont.StringInComment(args.ifdefStack,n,m))) else stringInComment n m args skip lexbuf } + { let n, m, args = cargs + if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, n, m)) + else stringInComment n m args skip lexbuf } | '"' '"' '"' - { let n,m,args = cargs - if not skip then (COMMENT (LexCont.TripleQuoteStringInComment(args.ifdefStack,n,m))) else tripleQuoteStringInComment n m args skip lexbuf } + { let n, m, args = cargs + if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, n, m)) + else tripleQuoteStringInComment n m args skip lexbuf } | '@' '"' - { let n,m,args = cargs - if not skip then (COMMENT (LexCont.VerbatimStringInComment(args.ifdefStack,n,m))) else verbatimStringInComment n m args skip lexbuf } + { let n, m, args = cargs + if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, n, m)) + else verbatimStringInComment n m args skip lexbuf } | "(*)" - { let n,m,args = cargs - if not skip then (COMMENT (LexCont.Comment(args.ifdefStack,n,m))) else comment cargs skip lexbuf } + { let n, m, args = cargs + if not skip then COMMENT (LexCont.Comment(args.ifdefStack, args.stringNest, n, m)) + else comment cargs skip lexbuf } | '(' '*' - { let n,m,args = cargs - if not skip then (COMMENT (LexCont.Comment(args.ifdefStack,n+1,m))) else comment (n+1,m,args) skip lexbuf } + { let n, m, args = cargs + if not skip then COMMENT (LexCont.Comment(args.ifdefStack, args.stringNest, n+1, m)) + else comment (n+1,m,args) skip lexbuf } | newline - { let n,m,args = cargs + { let n, m, args = cargs newline lexbuf - if not skip then (COMMENT (LexCont.Comment(args.ifdefStack,n,m))) else comment cargs skip lexbuf } + if not skip then COMMENT (LexCont.Comment(args.ifdefStack, args.stringNest, n, m)) + else comment cargs skip lexbuf } | "*)" { - let n,m,args = cargs - if n > 1 then if not skip then (COMMENT (LexCont.Comment(args.ifdefStack,n-1,m))) else comment (n-1,m,args) skip lexbuf - else if not skip then (COMMENT (LexCont.Token args.ifdefStack)) else token args skip lexbuf } + let n, m, args = cargs + if n > 1 then + if not skip then COMMENT (LexCont.Comment(args.ifdefStack, args.stringNest, n-1, m)) + else comment (n-1,m,args) skip lexbuf + else + if not skip then COMMENT (LexCont.Token(args.ifdefStack, args.stringNest)) + else token args skip lexbuf } | anywhite+ | [^ '\'' '(' '*' '\n' '\r' '"' ')' '@' ' ' '\t' ]+ - { let n,m,args = cargs - if not skip then (COMMENT (LexCont.Comment(args.ifdefStack,n,m))) else comment cargs skip lexbuf } + { let n, m, args = cargs + if not skip then COMMENT (LexCont.Comment(args.ifdefStack, args.stringNest, n, m)) + else comment cargs skip lexbuf } | eof - { let n,m,args = cargs - EOF (LexCont.Comment(args.ifdefStack,n,m)) } + { let n, m, args = cargs + EOF (LexCont.Comment(args.ifdefStack, args.stringNest, n, m)) } | surrogateChar surrogateChar - | _ { let n,m,args = cargs - if not skip then (COMMENT (LexCont.Comment(args.ifdefStack,n,m))) else comment (n,m,args) skip lexbuf } + | _ { let n, m, args = cargs + if not skip then COMMENT (LexCont.Comment(args.ifdefStack, args.stringNest, n, m)) + else comment (n, m, args) skip lexbuf } and stringInComment n m args skip = parse // Follow string lexing, skipping tokens until it finishes | '\\' newline anywhite* { newline lexbuf - if not skip then (COMMENT (LexCont.StringInComment(args.ifdefStack,n,m))) else stringInComment n m args skip lexbuf } + if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, n, m)) + else stringInComment n m args skip lexbuf } | escape_char | trigraph @@ -1156,93 +1480,113 @@ and stringInComment n m args skip = parse | integer | xinteger | anywhite + - { if not skip then (COMMENT (LexCont.StringInComment(args.ifdefStack,n,m))) else stringInComment n m args skip lexbuf } + { if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, n, m)) + else stringInComment n m args skip lexbuf } | '"' - { if not skip then (COMMENT (LexCont.Comment(args.ifdefStack,n,m))) else comment (n,m,args) skip lexbuf } + { if not skip then COMMENT (LexCont.Comment(args.ifdefStack, args.stringNest, n, m)) + else comment (n, m, args) skip lexbuf } | newline { newline lexbuf - if not skip then (COMMENT (LexCont.StringInComment(args.ifdefStack,n,m))) else stringInComment n m args skip lexbuf } + if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, n, m)) + else stringInComment n m args skip lexbuf } | eof - { EOF (LexCont.StringInComment(args.ifdefStack,n,m)) } + { EOF (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, n, m)) } | surrogateChar surrogateChar | _ - { if not skip then (COMMENT (LexCont.StringInComment(args.ifdefStack,n,m))) else stringInComment n m args skip lexbuf } + { if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.SingleQuote, n, m)) + else stringInComment n m args skip lexbuf } and verbatimStringInComment n m args skip = parse // Follow verbatimString lexing, in short, skip double-quotes and other chars until we hit a single quote | '"' '"' - { if not skip then (COMMENT (LexCont.VerbatimStringInComment(args.ifdefStack,n,m))) else verbatimStringInComment n m args skip lexbuf } + { if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, n, m)) + else verbatimStringInComment n m args skip lexbuf } | '"' - { if not skip then (COMMENT (LexCont.Comment(args.ifdefStack,n,m))) else comment (n,m,args) skip lexbuf } + { if not skip then COMMENT (LexCont.Comment(args.ifdefStack, args.stringNest, n, m)) + else comment (n, m, args) skip lexbuf } | ident | integer | xinteger | anywhite + - { if not skip then (COMMENT (LexCont.VerbatimStringInComment(args.ifdefStack,n,m))) else verbatimStringInComment n m args skip lexbuf } + { if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, n, m)) + else verbatimStringInComment n m args skip lexbuf } | newline { newline lexbuf - if not skip then (COMMENT (LexCont.VerbatimStringInComment(args.ifdefStack,n,m))) else verbatimStringInComment n m args skip lexbuf } + if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, n, m)) + else verbatimStringInComment n m args skip lexbuf } | eof - { EOF (LexCont.VerbatimStringInComment(args.ifdefStack,n,m)) } + { EOF (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, n, m)) } | surrogateChar surrogateChar | _ - { if not skip then (COMMENT (LexCont.VerbatimStringInComment(args.ifdefStack,n,m))) else verbatimStringInComment n m args skip lexbuf } + { if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.Verbatim, n, m)) + else verbatimStringInComment n m args skip lexbuf } and tripleQuoteStringInComment n m args skip = parse // Follow tripleQuoteString lexing | '"' '"' '"' - { if not skip then (COMMENT (LexCont.Comment(args.ifdefStack,n,m))) else comment (n,m,args) skip lexbuf } + { if not skip then COMMENT (LexCont.Comment(args.ifdefStack, args.stringNest, n, m)) + else comment (n, m, args) skip lexbuf } | ident | integer | xinteger | anywhite + - { if not skip then (COMMENT (LexCont.TripleQuoteStringInComment(args.ifdefStack,n,m))) else tripleQuoteStringInComment n m args skip lexbuf } + { if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, n, m)) + else tripleQuoteStringInComment n m args skip lexbuf } | newline { newline lexbuf - if not skip then (COMMENT (LexCont.TripleQuoteStringInComment(args.ifdefStack,n,m))) else tripleQuoteStringInComment n m args skip lexbuf } + if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, n, m)) + else tripleQuoteStringInComment n m args skip lexbuf } | eof - { EOF (LexCont.TripleQuoteStringInComment(args.ifdefStack,n,m)) } + { EOF (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, n, m)) } | surrogateChar surrogateChar | _ - { if not skip then (COMMENT (LexCont.TripleQuoteStringInComment(args.ifdefStack,n,m))) else tripleQuoteStringInComment n m args skip lexbuf } + { if not skip then COMMENT (LexCont.StringInComment(args.ifdefStack, args.stringNest, LexerStringStyle.TripleQuote, n, m)) + else tripleQuoteStringInComment n m args skip lexbuf } and mlOnly m args skip = parse | "\"" { let buf = ByteBuffer.Create 100 let m2 = lexbuf.LexemeRange - let _ = string (buf,defaultStringFinisher,m2,args) skip lexbuf - if not skip then (COMMENT (LexCont.MLOnly(args.ifdefStack,m))) else mlOnly m args skip lexbuf } + let _ = singleQuoteString (buf, LexerStringFinisher.Default, m2, LexerStringKind.String, args) skip lexbuf + if not skip then COMMENT (LexCont.MLOnly(args.ifdefStack, args.stringNest, m)) + else mlOnly m args skip lexbuf } | newline - { newline lexbuf; if not skip then (COMMENT (LexCont.MLOnly(args.ifdefStack,m))) else mlOnly m args skip lexbuf } + { newline lexbuf + if not skip then COMMENT (LexCont.MLOnly(args.ifdefStack, args.stringNest, m)) + else mlOnly m args skip lexbuf } | "(*ENDIF-CAML*)" - { if not skip then (COMMENT (LexCont.Token args.ifdefStack)) else token args skip lexbuf } + { if not skip then COMMENT (LexCont.Token(args.ifdefStack, args.stringNest)) + else token args skip lexbuf } | "(*ENDIF-OCAML*)" - { if not skip then (COMMENT (LexCont.Token args.ifdefStack)) else token args skip lexbuf } + { if not skip then COMMENT (LexCont.Token(args.ifdefStack, args.stringNest)) + else token args skip lexbuf } | [^ '(' '"' '\n' '\r' ]+ - { if not skip then (COMMENT (LexCont.MLOnly(args.ifdefStack,m))) else mlOnly m args skip lexbuf } + { if not skip then COMMENT (LexCont.MLOnly(args.ifdefStack, args.stringNest, m)) + else mlOnly m args skip lexbuf } | eof - { EOF (LexCont.MLOnly(args.ifdefStack,m)) } + { EOF (LexCont.MLOnly(args.ifdefStack, args.stringNest, m)) } | surrogateChar surrogateChar | _ - { if not skip then (COMMENT (LexCont.MLOnly(args.ifdefStack,m))) else mlOnly m args skip lexbuf } + { if not skip then COMMENT (LexCont.MLOnly(args.ifdefStack, args.stringNest, m)) + else mlOnly m args skip lexbuf } diff --git a/src/fsharp/lexhelp.fs b/src/fsharp/lexhelp.fs index 707d7f0b49..0600da601c 100644 --- a/src/fsharp/lexhelp.fs +++ b/src/fsharp/lexhelp.fs @@ -49,14 +49,17 @@ type LexResourceManager(?capacity: int) = res /// Lexer parameters -type lexargs = - { defines: string list - mutable ifdefStack: LexerIfdefStack +type LexArgs = + { + defines: string list resourceManager: LexResourceManager - lightSyntaxStatus : LightSyntaxStatus errorLogger: ErrorLogger applyLineDirectives: bool - pathMap: PathMap } + pathMap: PathMap + mutable ifdefStack: LexerIfdefStack + mutable lightStatus : LightSyntaxStatus + mutable stringNest: LexerInterpolatedStringNesting + } /// possible results of lexing a long Unicode escape sequence in a string literal, e.g. "\U0001F47D", /// "\U000000E7", or "\UDEADBEEF" returning SurrogatePair, SingleChar, or Invalid, respectively @@ -65,14 +68,17 @@ type LongUnicodeLexResult = | SingleChar of uint16 | Invalid -let mkLexargs (_filename, defines, lightSyntaxStatus, resourceManager, ifdefStack, errorLogger, pathMap:PathMap) = - { defines = defines +let mkLexargs (defines, lightStatus, resourceManager, ifdefStack, errorLogger, pathMap:PathMap) = + { + defines = defines ifdefStack= ifdefStack - lightSyntaxStatus=lightSyntaxStatus + lightStatus=lightStatus resourceManager=resourceManager errorLogger=errorLogger applyLineDirectives=true - pathMap=pathMap } + stringNest = [] + pathMap=pathMap + } /// Register the lexbuf and call the given function let reusingLexbufForParsing lexbuf f = @@ -95,20 +101,8 @@ let usingLexbufForParsing (lexbuf:UnicodeLexing.Lexbuf, filename) f = // Functions to manipulate lexer transient state //----------------------------------------------------------------------- -let defaultStringFinisher = (fun _endm _b s -> STRING (Encoding.Unicode.GetString(s, 0, s.Length))) - -let callStringFinisher fin (buf: ByteBuffer) endm b = fin endm b (buf.Close()) - -let addUnicodeString (buf: ByteBuffer) (x:string) = buf.EmitBytes (Encoding.Unicode.GetBytes x) - -let addIntChar (buf: ByteBuffer) c = - buf.EmitIntAsByte (c % 256) - buf.EmitIntAsByte (c / 256) - -let addUnicodeChar buf c = addIntChar buf (int c) -let addByteChar buf (c:char) = addIntChar buf (int32 c % 256) - -let stringBufferAsString (buf: byte[]) = +let stringBufferAsString (buf: ByteBuffer) = + let buf = buf.Close() if buf.Length % 2 <> 0 then failwith "Expected even number of bytes" let chars : char[] = Array.zeroCreate (buf.Length/2) for i = 0 to (buf.Length/2) - 1 do @@ -127,6 +121,44 @@ let stringBufferAsBytes (buf: ByteBuffer) = let bytes = buf.Close() Array.init (bytes.Length / 2) (fun i -> bytes.[i*2]) +type LexerStringFinisher = + | LexerStringFinisher of (ByteBuffer -> LexerStringKind -> bool -> LexerContinuation -> token) + + member fin.Finish (buf: ByteBuffer) kind isPart cont = + let (LexerStringFinisher f) = fin + f buf kind isPart cont + + static member Default = + LexerStringFinisher (fun buf kind isPart cont -> + if kind.IsInterpolated then + let s = stringBufferAsString buf + if kind.IsInterpolatedFirst then + if isPart then + INTERP_STRING_BEGIN_PART (s, cont) + else + INTERP_STRING_BEGIN_END (s, cont) + else + if isPart then + INTERP_STRING_PART (s, cont) + else + INTERP_STRING_END (s, cont) + elif kind.IsByteString then + BYTEARRAY (stringBufferAsBytes buf, cont) + else + STRING (stringBufferAsString buf, cont) + ) + +let addUnicodeString (buf: ByteBuffer) (x:string) = + buf.EmitBytes (Encoding.Unicode.GetBytes x) + +let addIntChar (buf: ByteBuffer) c = + buf.EmitIntAsByte (c % 256) + buf.EmitIntAsByte (c / 256) + +let addUnicodeChar buf c = addIntChar buf (int c) + +let addByteChar buf (c:char) = addIntChar buf (int32 c % 256) + /// Sanity check that high bytes are zeros. Further check each low byte <= 127 let stringBufferIsBytes (buf: ByteBuffer) = let bytes = buf.Close() diff --git a/src/fsharp/lexhelp.fsi b/src/fsharp/lexhelp.fsi index 2bed4e89c6..c6de1a9039 100644 --- a/src/fsharp/lexhelp.fsi +++ b/src/fsharp/lexhelp.fsi @@ -8,11 +8,14 @@ open Internal.Utilities.Text open FSharp.Compiler open FSharp.Compiler.AbstractIL.Internal open FSharp.Compiler.ErrorLogger +open FSharp.Compiler.Parser open FSharp.Compiler.ParseHelpers open FSharp.Compiler.Range val stdinMockFilename: string +/// Lexer args: status of #light processing. Mutated when a #light +/// directive is processed. This alters the behaviour of the lexfilter. [] type LightSyntaxStatus = new: initial:bool * warn: bool -> LightSyntaxStatus @@ -25,14 +28,18 @@ type LightSyntaxStatus = type LexResourceManager = new: ?capacity: int -> LexResourceManager -type lexargs = - { defines: string list - mutable ifdefStack: LexerIfdefStack +/// The context applicable to all lexing functions (tokens, strings etc.) +type LexArgs = + { + defines: string list resourceManager: LexResourceManager - lightSyntaxStatus: LightSyntaxStatus errorLogger: ErrorLogger applyLineDirectives: bool - pathMap: PathMap } + pathMap: PathMap + mutable ifdefStack: LexerIfdefStack + mutable lightStatus : LightSyntaxStatus + mutable stringNest: LexerInterpolatedStringNesting + } type LongUnicodeLexResult = | SurrogatePair of uint16 * uint16 @@ -41,15 +48,18 @@ type LongUnicodeLexResult = val resetLexbufPos: string -> UnicodeLexing.Lexbuf -> unit -val mkLexargs: 'a * string list * LightSyntaxStatus * LexResourceManager * LexerIfdefStack * ErrorLogger * PathMap -> lexargs +val mkLexargs: string list * LightSyntaxStatus * LexResourceManager * LexerIfdefStack * ErrorLogger * PathMap -> LexArgs val reusingLexbufForParsing: UnicodeLexing.Lexbuf -> (unit -> 'a) -> 'a val usingLexbufForParsing: UnicodeLexing.Lexbuf * string -> (UnicodeLexing.Lexbuf -> 'a) -> 'a -val defaultStringFinisher: 'a -> 'b -> byte[] -> Parser.token +type LexerStringFinisher = + | LexerStringFinisher of (ByteBuffer -> LexerStringKind -> bool -> LexerContinuation -> token) + + member Finish: buf: ByteBuffer -> kind: LexerStringKind -> isInterpolatedStringPart: bool -> cont: LexerContinuation -> token -val callStringFinisher: ('a -> 'b -> byte[] -> 'c) -> ByteBuffer -> 'a -> 'b -> 'c + static member Default: LexerStringFinisher val addUnicodeString: ByteBuffer -> string -> unit @@ -57,7 +67,7 @@ val addUnicodeChar: ByteBuffer -> int -> unit val addByteChar: ByteBuffer -> char -> unit -val stringBufferAsString: byte[] -> string +val stringBufferAsString: ByteBuffer -> string val stringBufferAsBytes: ByteBuffer -> byte[] @@ -85,9 +95,9 @@ exception IndentationProblem of string * Range.range module Keywords = - val KeywordOrIdentifierToken: lexargs -> UnicodeLexing.Lexbuf -> string -> Parser.token + val KeywordOrIdentifierToken: LexArgs -> UnicodeLexing.Lexbuf -> string -> token - val IdentifierToken: lexargs -> UnicodeLexing.Lexbuf -> string -> Parser.token + val IdentifierToken: LexArgs -> UnicodeLexing.Lexbuf -> string -> token val DoesIdentifierNeedQuotation: string -> bool diff --git a/src/fsharp/lib.fs b/src/fsharp/lib.fs index 5d8649d561..8d89ac8fb3 100755 --- a/src/fsharp/lib.fs +++ b/src/fsharp/lib.fs @@ -96,29 +96,29 @@ module NameMap = //------------------------------------------------------------------------- module Check = - /// Throw System.InvalidOperationException() if argument is None. + /// Throw System.InvalidOperationException if argument is None. /// If there is a value (e.g. Some(value)) then value is returned. let NotNone argName (arg:'T option) : 'T = match arg with | None -> raise (new System.InvalidOperationException(argName)) | Some x -> x - /// Throw System.ArgumentNullException() if argument is null. + /// Throw System.ArgumentNullException if argument is null. let ArgumentNotNull arg argName = match box(arg) with | null -> raise (new System.ArgumentNullException(argName)) | _ -> () - /// Throw System.ArgumentNullException() if array argument is null. - /// Throw System.ArgumentOutOfRangeException() is array argument is empty. + /// Throw System.ArgumentNullException if array argument is null. + /// Throw System.ArgumentOutOfRangeException is array argument is empty. let ArrayArgumentNotNullOrEmpty (arr:'T[]) argName = ArgumentNotNull arr argName if (0 = arr.Length) then raise (new System.ArgumentOutOfRangeException(argName)) - /// Throw System.ArgumentNullException() if string argument is null. - /// Throw System.ArgumentOutOfRangeException() is string argument is empty. + /// Throw System.ArgumentNullException if string argument is null. + /// Throw System.ArgumentOutOfRangeException is string argument is empty. let StringArgumentNotNullOrEmpty (s:string) argName = ArgumentNotNull s argName if s.Length = 0 then diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index 3a035bcdf0..86f48e7448 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -91,24 +91,59 @@ let raiseParseErrorAt m s = // This initiates error recovery raise RecoverableParseError +/// Report a good error at the end of file, e.g. for non-terminated strings let checkEndOfFileError t = match t with - | LexCont.IfDefSkip(_, _, m) -> reportParseErrorAt m (FSComp.SR.parsEofInHashIf()) - | LexCont.String (_, m) -> reportParseErrorAt m (FSComp.SR.parsEofInString()) - | LexCont.TripleQuoteString (_, m) -> reportParseErrorAt m (FSComp.SR.parsEofInTripleQuoteString()) - | LexCont.VerbatimString (_, m) -> reportParseErrorAt m (FSComp.SR.parsEofInVerbatimString()) - | LexCont.Comment (_, _, m) -> reportParseErrorAt m (FSComp.SR.parsEofInComment()) - | LexCont.SingleLineComment (_, _, m) -> reportParseErrorAt m (FSComp.SR.parsEofInComment()) - | LexCont.StringInComment (_, _, m) -> reportParseErrorAt m (FSComp.SR.parsEofInStringInComment()) - | LexCont.VerbatimStringInComment (_, _, m) -> reportParseErrorAt m (FSComp.SR.parsEofInVerbatimStringInComment()) - | LexCont.TripleQuoteStringInComment (_, _, m) -> reportParseErrorAt m (FSComp.SR.parsEofInTripleQuoteStringInComment()) - | LexCont.MLOnly (_, m) -> reportParseErrorAt m (FSComp.SR.parsEofInIfOcaml()) - | LexCont.EndLine(LexerEndlineContinuation.Skip(_, _, m)) -> reportParseErrorAt m (FSComp.SR.parsEofInDirective()) - | LexCont.EndLine(LexerEndlineContinuation.Token(stack)) - | LexCont.Token(stack) -> - match stack with + | LexCont.IfDefSkip(_, _, _, m) -> + reportParseErrorAt m (FSComp.SR.parsEofInHashIf()) + + | LexCont.String (_, _, LexerStringStyle.SingleQuote, kind, m) -> + if kind.IsInterpolated then + reportParseErrorAt m (FSComp.SR.parsEofInInterpolatedString()) + else + reportParseErrorAt m (FSComp.SR.parsEofInString()) + + | LexCont.String (_, _, LexerStringStyle.TripleQuote, kind, m) -> + if kind.IsInterpolated then + reportParseErrorAt m (FSComp.SR.parsEofInInterpolatedTripleQuoteString()) + else + reportParseErrorAt m (FSComp.SR.parsEofInTripleQuoteString()) + + | LexCont.String (_, _, LexerStringStyle.Verbatim, kind, m) -> + if kind.IsInterpolated then + reportParseErrorAt m (FSComp.SR.parsEofInInterpolatedVerbatimString()) + else + reportParseErrorAt m (FSComp.SR.parsEofInVerbatimString()) + + | LexCont.Comment (_, _, _, m) -> + reportParseErrorAt m (FSComp.SR.parsEofInComment()) + + | LexCont.SingleLineComment (_, _, _, m) -> + reportParseErrorAt m (FSComp.SR.parsEofInComment()) + + | LexCont.StringInComment (_, _, LexerStringStyle.SingleQuote, _, m) -> + reportParseErrorAt m (FSComp.SR.parsEofInStringInComment()) + + | LexCont.StringInComment (_, _, LexerStringStyle.Verbatim, _, m) -> + reportParseErrorAt m (FSComp.SR.parsEofInVerbatimStringInComment()) + + | LexCont.StringInComment (_, _, LexerStringStyle.TripleQuote, _, m) -> + reportParseErrorAt m (FSComp.SR.parsEofInTripleQuoteStringInComment()) + + | LexCont.MLOnly (_, _, m) -> + reportParseErrorAt m (FSComp.SR.parsEofInIfOcaml()) + + | LexCont.EndLine(_, _, LexerEndlineContinuation.Skip(_, m)) -> + reportParseErrorAt m (FSComp.SR.parsEofInDirective()) + + | LexCont.EndLine(endifs, nesting, LexerEndlineContinuation.Token) + | LexCont.Token(endifs, nesting) -> + match endifs with | [] -> () | (_, m) :: _ -> reportParseErrorAt m (FSComp.SR.parsNoHashEndIfFound()) + match nesting with + | [] -> () + | (_, _, m) :: _ -> reportParseErrorAt m (FSComp.SR.parsEofInInterpolatedStringFill()) type BindingSet = BindingSetPreAttrs of range * bool * bool * (SynAttributes -> SynAccess option -> SynAttributes * SynBinding list) * range @@ -155,10 +190,18 @@ let rangeOfLongIdent(lid:LongIdent) = %} -%token BYTEARRAY -%token STRING +// Producing these changes the lex state, e.g. string --> token, or nesting level of braces in interpolated strings +%token BYTEARRAY +%token STRING +%token INTERP_STRING_BEGIN_END +%token INTERP_STRING_BEGIN_PART +%token INTERP_STRING_PART +%token INTERP_STRING_END +%token LBRACE RBRACE + %token KEYWORD_STRING // Like __SOURCE_DIRECTORY__ %token IDENT +%token HASH_IDENT %token INFIX_STAR_STAR_OP %token INFIX_COMPARE_OP %token INFIX_AT_HAT_OP @@ -175,13 +218,13 @@ let rangeOfLongIdent(lid:LongIdent) = %token INT16 %token INT32 INT32_DOT_DOT %token INT64 +%token NATIVEINT %token UINT8 %token UINT16 %token UINT32 %token UINT64 %token UNATIVEINT -%token NATIVEINT %token IEEE32 %token IEEE64 %token CHAR @@ -198,9 +241,9 @@ let rangeOfLongIdent(lid:LongIdent) = %token OPEN OR REC THEN TO TRUE TRY TYPE VAL INLINE INTERFACE INSTANCE CONST %token WHEN WHILE WITH HASH AMP AMP_AMP QUOTE LPAREN RPAREN RPAREN_COMING_SOON RPAREN_IS_HERE STAR COMMA RARROW GREATER_BAR_RBRACK LPAREN_STAR_RPAREN %token QMARK QMARK_QMARK DOT COLON COLON_COLON COLON_GREATER COLON_QMARK_GREATER COLON_QMARK COLON_EQUALS SEMICOLON -%token SEMICOLON_SEMICOLON LARROW EQUALS LBRACK LBRACK_BAR LBRACE_BAR LBRACK_LESS LBRACE +%token SEMICOLON_SEMICOLON LARROW EQUALS LBRACK LBRACK_BAR LBRACE_BAR LBRACK_LESS %token BAR_RBRACK BAR_RBRACE UNDERSCORE -%token BAR RBRACK RBRACE RBRACE_COMING_SOON RBRACE_IS_HERE MINUS DOLLAR +%token BAR RBRACK RBRACE_COMING_SOON RBRACE_IS_HERE MINUS DOLLAR %token GREATER_RBRACK STRUCT SIG %token STATIC MEMBER CLASS ABSTRACT OVERRIDE DEFAULT CONSTRUCTOR INHERIT %token EXTERN VOID PUBLIC PRIVATE INTERNAL GLOBAL @@ -261,8 +304,8 @@ let rangeOfLongIdent(lid:LongIdent) = /* These are artificial */ %token LEX_FAILURE -%token COMMENT WHITESPACE HASH_LINE HASH_LIGHT INACTIVECODE LINE_COMMENT STRING_TEXT EOF -%token HASH_IF HASH_ELSE HASH_ENDIF +%token COMMENT WHITESPACE HASH_LINE HASH_LIGHT INACTIVECODE LINE_COMMENT STRING_TEXT EOF +%token HASH_IF HASH_ELSE HASH_ENDIF %start signatureFile implementationFile interaction typedSeqExprEOF typEOF %type typedSeqExprEOF @@ -382,6 +425,7 @@ let rangeOfLongIdent(lid:LongIdent) = */ %nonassoc prec_atompat_pathop %nonassoc INT8 UINT8 INT16 UINT16 INT32 UINT32 INT64 UINT64 NATIVEINT UNATIVEINT IEEE32 IEEE64 CHAR KEYWORD_STRING STRING BYTEARRAY BIGNUM DECIMAL +%nonassoc INTERP_STRING_BEGIN INTERP_STRING_PART INTERP_STRING_END %nonassoc LPAREN LBRACE LBRACK_BAR %nonassoc TRUE FALSE UNDERSCORE NULL @@ -446,7 +490,8 @@ let rangeOfLongIdent(lid:LongIdent) = %right COLON_EQUALS %nonassoc pat_tuple expr_tuple %left COMMA -%nonassoc slice_expr /* matrix.[e COMMA e] has higher precedence than "e COMMA e" */ +%nonassoc slice_expr /* matrix.[e COMMA e] has higher precedence than "e COMMA e" */ +%nonassoc interpolation_fill /* "...{3,N4}..." .NET style fill has higher precedence than "e COMMA e" */ %nonassoc DOT_DOT /* for matrix.[1..2, 3..4] the ".." has higher precedence than expression "2 COMMA 3" */ %nonassoc slice_comma /* for matrix.[1..2, 3..4] the ", " has higher precedence than ".." */ %nonassoc paren_pat_colon @@ -2808,7 +2853,8 @@ rawConstant: { SynConst.UInt64 $1 } | NATIVEINT - { SynConst.IntPtr $1 } + { if snd $1 then errorR(Error(FSComp.SR.lexOutsideNativeSigned(), lhs parseState)) + SynConst.IntPtr (fst $1) } | UNATIVEINT { SynConst.UIntPtr $1 } @@ -2832,7 +2878,7 @@ rawConstant: { SynConst.String ($1, lhs parseState) } | BYTEARRAY - { SynConst.Bytes ($1, lhs parseState) } + { SynConst.Bytes (fst $1, lhs parseState) } rationalConstant: | INT32 INFIX_STAR_DIV_MOD_OP INT32 @@ -4151,7 +4197,7 @@ rangeDeclExpr: if $1 <> "^" then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsInvalidPrefixOperator()) $2, true } -/* the start et of atomicExprAfterType must not overlap with the valid postfix tokens of the type syntax, e.g. new List(...) */ +/* the start of atomicExprAfterType must not overlap with the valid postfix tokens of the type syntax, e.g. new List(...) */ atomicExprAfterType: | constant { SynExpr.Const ($1, $1.Range (lhs parseState)) } @@ -4165,6 +4211,9 @@ atomicExprAfterType: | braceBarExpr { $1 } + | interpolatedString + { SynExpr.InterpolatedString($1, rhs parseState 1) } + | NULL { SynExpr.Null (lhs parseState) } @@ -5437,11 +5486,35 @@ colonOrEquals: | COLON { mlCompatWarning (FSComp.SR.parsSyntaxModuleSigEndDeprecated()) (lhs parseState); } | EQUALS { } -/* A literal string or a string fromm a keyword like __SOURCE_FILE__ */ +/* A literal string or a string from a keyword like __SOURCE_FILE__ */ stringOrKeywordString: - | STRING { $1 } + | STRING { fst $1 } | KEYWORD_STRING { $1 } +interpolatedStringFill: + | declExpr + { ($1, None) } + + | declExpr COLON ident %prec interpolation_fill + { ($1, Some $3) } + +interpolatedStringParts: + | INTERP_STRING_END + { [ SynInterpolatedStringPart.String (fst $1, rhs parseState 1) ] } + + | INTERP_STRING_PART interpolatedStringFill interpolatedStringParts + { SynInterpolatedStringPart.String (fst $1, rhs parseState 1) :: SynInterpolatedStringPart.FillExpr $2 :: $3 } + +/* INTERP_STRING_BEGIN_END */ +/* INTERP_STRING_BEGIN_PART int32 INTERP_STRING_END */ +/* INTERP_STRING_BEGIN_PART int32 INTERP_STRING_PART int32 INTERP_STRING_END */ +interpolatedString: + | INTERP_STRING_BEGIN_PART interpolatedStringFill interpolatedStringParts + { SynInterpolatedStringPart.String (fst $1, rhs parseState 1) :: SynInterpolatedStringPart.FillExpr $2 :: $3 } + + | INTERP_STRING_BEGIN_END + { [ SynInterpolatedStringPart.String (fst $1, rhs parseState 1) ] } + opt_HIGH_PRECEDENCE_APP: | HIGH_PRECEDENCE_BRACK_APP { } | HIGH_PRECEDENCE_PAREN_APP { } diff --git a/src/fsharp/pplex.fsl b/src/fsharp/pplex.fsl index fd984c41b4..d4227d2873 100644 --- a/src/fsharp/pplex.fsl +++ b/src/fsharp/pplex.fsl @@ -15,7 +15,7 @@ open Internal.Utilities.Text.Lexing let lexeme (lexbuf : UnicodeLexing.Lexbuf) = UnicodeLexing.Lexbuf.LexemeString lexbuf -let fail (args : lexargs) (lexbuf:UnicodeLexing.Lexbuf) e = +let fail (args : LexArgs) (lexbuf:UnicodeLexing.Lexbuf) e = let m = lexbuf.LexemeRange args.errorLogger.ErrorR(Error(e,m)) PPParser.EOF diff --git a/src/fsharp/service/FSharpCheckerResults.fs b/src/fsharp/service/FSharpCheckerResults.fs index 31263f4e28..8de2a871d5 100644 --- a/src/fsharp/service/FSharpCheckerResults.fs +++ b/src/fsharp/service/FSharpCheckerResults.fs @@ -1431,11 +1431,11 @@ module internal ParseAndCheckFile = let getLightSyntaxStatus fileName options = let lower = String.lowercase fileName let lightOnByDefault = List.exists (Filename.checkSuffix lower) FSharpLightSyntaxFileSuffixes - let lightSyntaxStatus = if lightOnByDefault then (options.LightSyntax <> Some false) else (options.LightSyntax = Some true) - LightSyntaxStatus(lightSyntaxStatus, true) + let lightStatus = if lightOnByDefault then (options.LightSyntax <> Some false) else (options.LightSyntax = Some true) + LightSyntaxStatus(lightStatus, true) let createLexerFunction fileName options lexbuf (errHandler: ErrorHandler) = - let lightSyntaxStatus = getLightSyntaxStatus fileName options + let lightStatus = getLightSyntaxStatus fileName options // If we're editing a script then we define INTERACTIVE otherwise COMPILED. // Since this parsing for intellisense we always define EDITING. @@ -1446,10 +1446,10 @@ module internal ParseAndCheckFile = // When analyzing files using ParseOneFile, i.e. for the use of editing clients, we do not apply line directives. // TODO(pathmap): expose PathMap on the service API, and thread it through here - let lexargs = mkLexargs(fileName, defines, lightSyntaxStatus, lexResourceManager, [], errHandler.ErrorLogger, PathMap.empty) + let lexargs = mkLexargs(defines, lightStatus, lexResourceManager, [], errHandler.ErrorLogger, PathMap.empty) let lexargs = { lexargs with applyLineDirectives = false } - let tokenizer = LexFilter.LexFilter(lightSyntaxStatus, options.CompilingFsLib, Lexer.token lexargs true, lexbuf) + let tokenizer = LexFilter.LexFilter(lightStatus, options.CompilingFsLib, Lexer.token lexargs true, lexbuf) tokenizer.Lexer // Public callers are unable to answer LanguageVersion feature support questions. @@ -1479,8 +1479,13 @@ module internal ParseAndCheckFile = match t1, t2 with | (LPAREN, RPAREN) | (LPAREN, RPAREN_IS_HERE) - | (LBRACE, RBRACE) - | (LBRACE, RBRACE_IS_HERE) + | (LBRACE _, RBRACE _) + | (LBRACE_BAR, BAR_RBRACE) + | (LBRACE _, RBRACE_IS_HERE) + | (INTERP_STRING_BEGIN_PART _, INTERP_STRING_END _) + | (INTERP_STRING_BEGIN_PART _, INTERP_STRING_PART _) + | (INTERP_STRING_PART _, INTERP_STRING_PART _) + | (INTERP_STRING_PART _, INTERP_STRING_END _) | (SIG, END) | (STRUCT, END) | (LBRACK_BAR, BAR_RBRACK) @@ -1489,13 +1494,49 @@ module internal ParseAndCheckFile = | (BEGIN, END) -> true | (LQUOTE q1, RQUOTE q2) -> q1 = q2 | _ -> false + let rec matchBraces stack = match lexfun lexbuf, stack with - | tok2, ((tok1, m1) :: stack') when parenTokensBalance tok1 tok2 -> - matchingBraces.Add(m1, lexbuf.LexemeRange) - matchBraces stack' - | ((LPAREN | LBRACE | LBRACK | LBRACK_BAR | LQUOTE _ | LBRACK_LESS) as tok), _ -> + | tok2, ((tok1, m1) :: stackAfterMatch) when parenTokensBalance tok1 tok2 -> + let m2 = lexbuf.LexemeRange + + // For INTERP_STRING_PART and INTERP_STRING_END grab the one character + // range that corresponds to the "}" at the start of the token + let m2Start = + match tok2 with + | INTERP_STRING_PART _ + | INTERP_STRING_END _ -> + Range.mkFileIndexRange m2.FileIndex m2.Start (mkPos m2.Start.Line (m2.Start.Column+1)) + | _ -> m2 + + matchingBraces.Add(m1, m2Start) + + // INTERP_STRING_PART corresponds to both "} ... {" i.e. both the completion + // of a match and the start of a potential new one. + let stackAfterMatch = + match tok2 with + | INTERP_STRING_PART _ -> + let m2End = Range.mkFileIndexRange m2.FileIndex (mkPos m2.End.Line (max (m2.End.Column-1) 0)) m2.End + (tok2, m2End) :: stackAfterMatch + | _ -> stackAfterMatch + + matchBraces stackAfterMatch + + | ((LPAREN | LBRACE _ | LBRACK | LBRACE_BAR | LBRACK_BAR | LQUOTE _ | LBRACK_LESS) as tok), _ -> matchBraces ((tok, lexbuf.LexemeRange) :: stack) + + // INTERP_STRING_BEGIN_PART corresponds to $"... {" at the start of an interpolated string + // + // INTERP_STRING_PART corresponds to "} ... {" in the middle of an interpolated string (in + // this case it msut not have matched something on the stack, e.g. an incomplete '[' in the + // interpolation expression) + // + // Either way we start a new potential match at the last character + | ((INTERP_STRING_BEGIN_PART _ | INTERP_STRING_PART _) as tok), _ -> + let m = lexbuf.LexemeRange + let m2 = Range.mkFileIndexRange m.FileIndex (mkPos m.End.Line (max (m.End.Column-1) 0)) m.End + matchBraces ((tok, m2) :: stack) + | (EOF _ | LEX_FAILURE _), _ -> () | _ -> matchBraces stack matchBraces []) diff --git a/src/fsharp/service/FSharpCheckerResults.fsi b/src/fsharp/service/FSharpCheckerResults.fsi index 67f4900b4a..9705c1da0b 100644 --- a/src/fsharp/service/FSharpCheckerResults.fsi +++ b/src/fsharp/service/FSharpCheckerResults.fsi @@ -236,10 +236,12 @@ type public FSharpCheckFileResults = member GetDisplayContextForPos : pos : pos -> Async /// Determines if a long ident is resolvable at a specific point. + /// /// An optional string used for tracing compiler operations associated with this request. member internal IsRelativeNameResolvable: cursorPos : pos * plid : string list * item: Item * ?userOpName: string -> Async /// Determines if a long ident is resolvable at a specific point. + /// /// An optional string used for tracing compiler operations associated with this request. member IsRelativeNameResolvableFromSymbol: cursorPos : pos * plid : string list * symbol: FSharpSymbol * ?userOpName: string -> Async diff --git a/src/fsharp/service/ServiceLexing.fs b/src/fsharp/service/ServiceLexing.fs old mode 100755 new mode 100644 index 8e93e37205..d98da168ef --- a/src/fsharp/service/ServiceLexing.fs +++ b/src/fsharp/service/ServiceLexing.fs @@ -27,17 +27,23 @@ type Position = int * int type Range = Position * Position module FSharpTokenTag = + let Identifier = tagOfToken (IDENT "a") - let String = tagOfToken (STRING "a") + let String = tagOfToken (STRING ("a", LexCont.Default)) let IDENT = tagOfToken (IDENT "a") - let STRING = tagOfToken (STRING "a") + let HASH_IDENT = tagOfToken (HASH_IDENT "a") + let STRING = String + let INTERP_STRING_BEGIN_END = tagOfToken (INTERP_STRING_BEGIN_END ("a", LexCont.Default)) + let INTERP_STRING_BEGIN_PART = tagOfToken (INTERP_STRING_BEGIN_PART ("a", LexCont.Default)) + let INTERP_STRING_PART = tagOfToken (INTERP_STRING_PART ("a", LexCont.Default)) + let INTERP_STRING_END = tagOfToken (INTERP_STRING_END ("a", LexCont.Default)) let LPAREN = tagOfToken LPAREN let RPAREN = tagOfToken RPAREN let LBRACK = tagOfToken LBRACK let RBRACK = tagOfToken RBRACK - let LBRACE = tagOfToken LBRACE - let RBRACE = tagOfToken RBRACE + let LBRACE = tagOfToken (LBRACE LexCont.Default) + let RBRACE = tagOfToken (RBRACE LexCont.Default) let LBRACK_LESS = tagOfToken LBRACK_LESS let GREATER_RBRACK = tagOfToken GREATER_RBRACK let LESS = tagOfToken (LESS true) @@ -167,6 +173,7 @@ module internal TokenClassifications = let tokenInfo token = match token with + | HASH_IDENT s | IDENT s -> if s.Length <= 0 then System.Diagnostics.Debug.Assert(false, "BUG: Received zero length IDENT token.") @@ -250,13 +257,13 @@ module internal TokenClassifications = | LBRACK_LESS -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.None ) - | LQUOTE _ | LBRACK | LBRACE | LBRACK_BAR | LBRACE_BAR -> + | LQUOTE _ | LBRACK | LBRACE _ | LBRACK_BAR | LBRACE_BAR -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.MatchBraces ) | GREATER_RBRACK | GREATER_BAR_RBRACK -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.None ) - | RQUOTE _ | RBRACK | RBRACE | RBRACE_COMING_SOON | RBRACE_IS_HERE | BAR_RBRACK | BAR_RBRACE -> + | RQUOTE _ | RBRACK | RBRACE _ | RBRACE_COMING_SOON | RBRACE_IS_HERE | BAR_RBRACK | BAR_RBRACE -> (FSharpTokenColorKind.Punctuation, FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.MatchBraces ) | PUBLIC | PRIVATE | INTERNAL | BASE | GLOBAL @@ -304,12 +311,14 @@ module internal TokenClassifications = | LINE_COMMENT _ -> (FSharpTokenColorKind.Comment, FSharpTokenCharKind.LineComment, FSharpTokenTriggerClass.None) - | STRING_TEXT _ -> - (FSharpTokenColorKind.String, FSharpTokenCharKind.String, FSharpTokenTriggerClass.None) - | KEYWORD_STRING _ -> (FSharpTokenColorKind.Keyword, FSharpTokenCharKind.Keyword, FSharpTokenTriggerClass.None) + | STRING_TEXT _ + | INTERP_STRING_BEGIN_END _ + | INTERP_STRING_BEGIN_PART _ + | INTERP_STRING_PART _ + | INTERP_STRING_END _ | BYTEARRAY _ | STRING _ | CHAR _ -> (FSharpTokenColorKind.String, FSharpTokenCharKind.String, FSharpTokenTriggerClass.None) @@ -319,9 +328,13 @@ module internal TokenClassifications = module internal TestExpose = let TokenInfo tok = TokenClassifications.tokenInfo tok - //---------------------------------------------------------------------------- - // Lexer states encoded to/from integers - //-------------------------------------------------------------------------- +/// Lexer states are encoded to/from integers. Typically one lexer state is +/// keep at the end of each line in an IDE service. IDE services are sometimes highly limited in the +/// memory they can use and this per-line state can be a significant cost if it associates with +/// many allocated objects. +/// +/// The encoding is lossy so some incremental lexing scenarios such as deeply nested #if +/// or accurate error messages from lexing for mismtached #if are not supported. [] type FSharpTokenizerLexState = { PosBits: int64 @@ -350,73 +363,125 @@ type FSharpTokenizerColorState = module internal LexerStateEncoding = - let computeNextLexState token (prevLexcont: LexerWhitespaceContinuation) = + let computeNextLexState token (prevLexcont: LexerContinuation) = match token with - | HASH_LINE s - | HASH_LIGHT s - | HASH_IF(_, _, s) - | HASH_ELSE(_, _, s) - | HASH_ENDIF(_, _, s) - | INACTIVECODE s - | WHITESPACE s - | COMMENT s - | LINE_COMMENT s - | STRING_TEXT s - | EOF s -> s - | BYTEARRAY _ | STRING _ -> LexCont.Token(prevLexcont.LexerIfdefStack) + | HASH_LINE cont + | HASH_LIGHT cont + | HASH_IF(_, _, cont) + | HASH_ELSE(_, _, cont) + | HASH_ENDIF(_, _, cont) + | INACTIVECODE cont + | WHITESPACE cont + | COMMENT cont + | LINE_COMMENT cont + | STRING_TEXT cont + | EOF cont + | INTERP_STRING_BEGIN_PART (_, cont) + | INTERP_STRING_PART (_, cont) + | INTERP_STRING_BEGIN_END (_, cont) + | INTERP_STRING_END (_, cont) + | LBRACE cont + | RBRACE cont + | BYTEARRAY (_, cont) + | STRING (_, cont) -> cont | _ -> prevLexcont // Note that this will discard all lexcont state, including the ifdefStack. - let revertToDefaultLexCont = LexCont.Token [] + let revertToDefaultLexCont = LexCont.Default let lexstateNumBits = 4 let ncommentsNumBits = 4 let hardwhiteNumBits = 1 let ifdefstackCountNumBits = 8 let ifdefstackNumBits = 24 // 0 means if, 1 means else + let stringKindBits = 3 + let nestingBits = 12 let _ = assert (lexstateNumBits + ncommentsNumBits + hardwhiteNumBits + ifdefstackCountNumBits - + ifdefstackNumBits <= 64) + + ifdefstackNumBits + + stringKindBits + + nestingBits <= 64) let lexstateStart = 0 let ncommentsStart = lexstateNumBits let hardwhitePosStart = lexstateNumBits+ncommentsNumBits let ifdefstackCountStart = lexstateNumBits+ncommentsNumBits+hardwhiteNumBits let ifdefstackStart = lexstateNumBits+ncommentsNumBits+hardwhiteNumBits+ifdefstackCountNumBits + let stringKindStart = lexstateNumBits+ncommentsNumBits+hardwhiteNumBits+ifdefstackCountNumBits+ifdefstackNumBits + let nestingStart = lexstateNumBits+ncommentsNumBits+hardwhiteNumBits+ifdefstackCountNumBits+ifdefstackNumBits+stringKindBits let lexstateMask = Bits.mask64 lexstateStart lexstateNumBits let ncommentsMask = Bits.mask64 ncommentsStart ncommentsNumBits let hardwhitePosMask = Bits.mask64 hardwhitePosStart hardwhiteNumBits let ifdefstackCountMask = Bits.mask64 ifdefstackCountStart ifdefstackCountNumBits let ifdefstackMask = Bits.mask64 ifdefstackStart ifdefstackNumBits + let stringKindMask = Bits.mask64 stringKindStart stringKindBits + let nestingMask = Bits.mask64 nestingStart nestingBits let bitOfBool b = if b then 1 else 0 let boolOfBit n = (n = 1L) - let inline colorStateOfLexState (state: FSharpTokenizerLexState) = + let colorStateOfLexState (state: FSharpTokenizerLexState) = enum (int32 ((state.OtherBits &&& lexstateMask) >>> lexstateStart)) - let inline lexStateOfColorState (state: FSharpTokenizerColorState) = + let lexStateOfColorState (state: FSharpTokenizerColorState) = (int64 state <<< lexstateStart) &&& lexstateMask - let encodeLexCont (colorState: FSharpTokenizerColorState) ncomments (b: pos) ifdefStack light = + let encodeStringStyle kind = + match kind with + | LexerStringStyle.SingleQuote -> 0 + | LexerStringStyle.Verbatim -> 1 + | LexerStringStyle.TripleQuote -> 2 + + let decodeStringStyle kind = + match kind with + | 0 -> LexerStringStyle.SingleQuote + | 1 -> LexerStringStyle.Verbatim + | 2 -> LexerStringStyle.TripleQuote + | _ -> assert false; LexerStringStyle.SingleQuote + + let encodeLexCont (colorState: FSharpTokenizerColorState, numComments, b: pos, ifdefStack, light, stringKind: LexerStringKind, stringNest) = let mutable ifdefStackCount = 0 let mutable ifdefStackBits = 0 for ifOrElse in ifdefStack do match ifOrElse with - | (IfDefIf, _) -> () - | (IfDefElse, _) -> - ifdefStackBits <- (ifdefStackBits ||| (1 <<< ifdefStackCount)) + | (IfDefIf, _) -> () + | (IfDefElse, _) -> + ifdefStackBits <- (ifdefStackBits ||| (1 <<< ifdefStackCount)) ifdefStackCount <- ifdefStackCount + 1 + let stringKindValue = + (if stringKind.IsByteString then 0b100 else 0) ||| + (if stringKind.IsInterpolated then 0b010 else 0) ||| + (if stringKind.IsInterpolatedFirst then 0b001 else 0) + + let nestingValue = + let tag1, i1, kind1, rest = + match stringNest with + | [] -> false, 0, 0, [] + | (i1, kind1, _)::rest -> true, i1, encodeStringStyle kind1, rest + let tag2, i2, kind2 = + match rest with + | [] -> false, 0, 0 + | (i2, kind2, _)::_ -> true, i2, encodeStringStyle kind2 + (if tag1 then 0b100000000000 else 0) ||| + (if tag2 then 0b010000000000 else 0) ||| + ((i1 <<< 7) &&& 0b001110000000) ||| + ((i2 <<< 4) &&& 0b000001110000) ||| + ((kind1 <<< 2) &&& 0b000000001100) ||| + ((kind2 <<< 0) &&& 0b000000000011) + let bits = lexStateOfColorState colorState - ||| ((ncomments <<< ncommentsStart) &&& ncommentsMask) + ||| ((numComments <<< ncommentsStart) &&& ncommentsMask) ||| ((int64 (bitOfBool light) <<< hardwhitePosStart) &&& hardwhitePosMask) ||| ((int64 ifdefStackCount <<< ifdefstackCountStart) &&& ifdefstackCountMask) ||| ((int64 ifdefStackBits <<< ifdefstackStart) &&& ifdefstackMask) + ||| ((int64 stringKindValue <<< stringKindStart) &&& stringKindMask) + ||| ((int64 nestingValue <<< nestingStart) &&& nestingMask) + { PosBits = b.Encoding OtherBits = bits } @@ -424,6 +489,11 @@ module internal LexerStateEncoding = let decodeLexCont (state: FSharpTokenizerLexState) = let mutable ifDefs = [] let bits = state.OtherBits + + let colorState = colorStateOfLexState state + let ncomments = int32 ((bits &&& ncommentsMask) >>> ncommentsStart) + let pos = pos.Decode state.PosBits + let ifdefStackCount = int32 ((bits &&& ifdefstackCountMask) >>> ifdefstackCountStart) if ifdefStackCount>0 then let ifdefStack = int32 ((bits &&& ifdefstackMask) >>> ifdefstackStart) @@ -432,73 +502,97 @@ module internal LexerStateEncoding = let mask = 1 <<< bit let ifDef = (if ifdefStack &&& mask = 0 then IfDefIf else IfDefElse) ifDefs <- (ifDef, range0) :: ifDefs - colorStateOfLexState state, - int32 ((bits &&& ncommentsMask) >>> ncommentsStart), - pos.Decode state.PosBits, - ifDefs, - boolOfBit ((bits &&& hardwhitePosMask) >>> hardwhitePosStart) - - let encodeLexInt lightSyntaxStatus (lexcont: LexerWhitespaceContinuation) = - let tag, n1, p1, ifd = - match lexcont with - | LexCont.Token ifd -> FSharpTokenizerColorState.Token, 0L, pos0, ifd - | LexCont.IfDefSkip (ifd, n, m) -> FSharpTokenizerColorState.IfDefSkip, int64 n, m.Start, ifd - | LexCont.EndLine(LexerEndlineContinuation.Skip(ifd, n, m)) -> FSharpTokenizerColorState.EndLineThenSkip, int64 n, m.Start, ifd - | LexCont.EndLine(LexerEndlineContinuation.Token ifd) -> FSharpTokenizerColorState.EndLineThenToken, 0L, pos0, ifd - | LexCont.String (ifd, m) -> FSharpTokenizerColorState.String, 0L, m.Start, ifd - | LexCont.Comment (ifd, n, m) -> FSharpTokenizerColorState.Comment, int64 n, m.Start, ifd - | LexCont.SingleLineComment (ifd, n, m) -> FSharpTokenizerColorState.SingleLineComment, int64 n, m.Start, ifd - | LexCont.StringInComment (ifd, n, m) -> FSharpTokenizerColorState.StringInComment, int64 n, m.Start, ifd - | LexCont.VerbatimStringInComment (ifd, n, m) -> FSharpTokenizerColorState.VerbatimStringInComment, int64 n, m.Start, ifd - | LexCont.TripleQuoteStringInComment (ifd, n, m) -> FSharpTokenizerColorState.TripleQuoteStringInComment, int64 n, m.Start, ifd - | LexCont.MLOnly (ifd, m) -> FSharpTokenizerColorState.CamlOnly, 0L, m.Start, ifd - | LexCont.VerbatimString (ifd, m) -> FSharpTokenizerColorState.VerbatimString, 0L, m.Start, ifd - | LexCont.TripleQuoteString (ifd, m) -> FSharpTokenizerColorState.TripleQuoteString, 0L, m.Start, ifd - encodeLexCont tag n1 p1 ifd lightSyntaxStatus - + let stringKindValue = int32 ((bits &&& stringKindMask) >>> stringKindStart) + let stringKind : LexerStringKind = + { IsByteString = ((stringKindValue &&& 0b100) = 0b100) + IsInterpolated = ((stringKindValue &&& 0b010) = 0b010) + IsInterpolatedFirst = ((stringKindValue &&& 0b001) = 0b001) } + + let hardwhite = boolOfBit ((bits &&& hardwhitePosMask) >>> hardwhitePosStart) + + let nestingValue = int32 ((bits &&& nestingMask) >>> nestingStart) + let stringNest : LexerInterpolatedStringNesting = + let tag1 = ((nestingValue &&& 0b100000000000) = 0b100000000000) + let tag2 = ((nestingValue &&& 0b010000000000) = 0b010000000000) + let i1 = ((nestingValue &&& 0b001110000000) >>> 7) + let i2 = ((nestingValue &&& 0b000001110000) >>> 4) + let kind1 = ((nestingValue &&& 0b000000001100) >>> 2) + let kind2 = ((nestingValue &&& 0b000000000011) >>> 0) + [ if tag1 then + i1, decodeStringStyle kind1, range0 + if tag2 then + i2, decodeStringStyle kind2, range0 + ] + + (colorState, ncomments, pos, ifDefs, hardwhite, stringKind, stringNest) + + let encodeLexInt lightStatus (lexcont: LexerContinuation) = + match lexcont with + | LexCont.Token (ifdefs, stringNest) -> + encodeLexCont (FSharpTokenizerColorState.Token, 0L, pos0, ifdefs, lightStatus, LexerStringKind.String, stringNest) + | LexCont.IfDefSkip (ifdefs, stringNest, n, m) -> + encodeLexCont (FSharpTokenizerColorState.IfDefSkip, int64 n, m.Start, ifdefs, lightStatus, LexerStringKind.String, stringNest) + | LexCont.EndLine(ifdefs, stringNest, econt) -> + match econt with + | LexerEndlineContinuation.Skip(n, m) -> + encodeLexCont (FSharpTokenizerColorState.EndLineThenSkip, int64 n, m.Start, ifdefs, lightStatus, LexerStringKind.String, stringNest) + | LexerEndlineContinuation.Token -> + encodeLexCont (FSharpTokenizerColorState.EndLineThenToken, 0L, pos0, ifdefs, lightStatus, LexerStringKind.String, stringNest) + | LexCont.String (ifdefs, stringNest, style, kind, m) -> + let state = + match style with + | LexerStringStyle.SingleQuote -> FSharpTokenizerColorState.String + | LexerStringStyle.Verbatim -> FSharpTokenizerColorState.VerbatimString + | LexerStringStyle.TripleQuote -> FSharpTokenizerColorState.TripleQuoteString + encodeLexCont (state, 0L, m.Start, ifdefs, lightStatus, kind, stringNest) + | LexCont.Comment (ifdefs, stringNest, n, m) -> + encodeLexCont (FSharpTokenizerColorState.Comment, int64 n, m.Start, ifdefs, lightStatus, LexerStringKind.String, stringNest) + | LexCont.SingleLineComment (ifdefs, stringNest, n, m) -> + encodeLexCont (FSharpTokenizerColorState.SingleLineComment, int64 n, m.Start, ifdefs, lightStatus, LexerStringKind.String, stringNest) + | LexCont.StringInComment (ifdefs, stringNest, style, n, m) -> + let state = + match style with + | LexerStringStyle.SingleQuote -> FSharpTokenizerColorState.StringInComment + | LexerStringStyle.Verbatim -> FSharpTokenizerColorState.VerbatimStringInComment + | LexerStringStyle.TripleQuote -> FSharpTokenizerColorState.TripleQuoteStringInComment + encodeLexCont (state, int64 n, m.Start, ifdefs, lightStatus, LexerStringKind.String, stringNest) + | LexCont.MLOnly (ifdefs, stringNest, m) -> + encodeLexCont (FSharpTokenizerColorState.CamlOnly, 0L, m.Start, ifdefs, lightStatus, LexerStringKind.String, stringNest) + let decodeLexInt (state: FSharpTokenizerLexState) = - let tag, n1, p1, ifd, lightSyntaxStatusInitial = decodeLexCont state + let tag, n1, p1, ifdefs, lightSyntaxStatusInitial, stringKind, stringNest = decodeLexCont state let lexcont = match tag with - | FSharpTokenizerColorState.Token -> LexCont.Token ifd - | FSharpTokenizerColorState.IfDefSkip -> LexCont.IfDefSkip (ifd, n1, mkRange "file" p1 p1) - | FSharpTokenizerColorState.String -> LexCont.String (ifd, mkRange "file" p1 p1) - | FSharpTokenizerColorState.Comment -> LexCont.Comment (ifd, n1, mkRange "file" p1 p1) - | FSharpTokenizerColorState.SingleLineComment -> LexCont.SingleLineComment (ifd, n1, mkRange "file" p1 p1) - | FSharpTokenizerColorState.StringInComment -> LexCont.StringInComment (ifd, n1, mkRange "file" p1 p1) - | FSharpTokenizerColorState.VerbatimStringInComment -> LexCont.VerbatimStringInComment (ifd, n1, mkRange "file" p1 p1) - | FSharpTokenizerColorState.TripleQuoteStringInComment -> LexCont.TripleQuoteStringInComment (ifd, n1, mkRange "file" p1 p1) - | FSharpTokenizerColorState.CamlOnly -> LexCont.MLOnly (ifd, mkRange "file" p1 p1) - | FSharpTokenizerColorState.VerbatimString -> LexCont.VerbatimString (ifd, mkRange "file" p1 p1) - | FSharpTokenizerColorState.TripleQuoteString -> LexCont.TripleQuoteString (ifd, mkRange "file" p1 p1) - | FSharpTokenizerColorState.EndLineThenSkip -> LexCont.EndLine(LexerEndlineContinuation.Skip(ifd, n1, mkRange "file" p1 p1)) - | FSharpTokenizerColorState.EndLineThenToken -> LexCont.EndLine(LexerEndlineContinuation.Token ifd) - | _ -> LexCont.Token [] + | FSharpTokenizerColorState.Token -> + LexCont.Token (ifdefs, stringNest) + | FSharpTokenizerColorState.IfDefSkip -> + LexCont.IfDefSkip (ifdefs, stringNest, n1, mkRange "file" p1 p1) + | FSharpTokenizerColorState.String -> + LexCont.String (ifdefs, stringNest, LexerStringStyle.SingleQuote, stringKind, mkRange "file" p1 p1) + | FSharpTokenizerColorState.Comment -> + LexCont.Comment (ifdefs, stringNest, n1, mkRange "file" p1 p1) + | FSharpTokenizerColorState.SingleLineComment -> + LexCont.SingleLineComment (ifdefs, stringNest, n1, mkRange "file" p1 p1) + | FSharpTokenizerColorState.StringInComment -> + LexCont.StringInComment (ifdefs, stringNest, LexerStringStyle.SingleQuote, n1, mkRange "file" p1 p1) + | FSharpTokenizerColorState.VerbatimStringInComment -> + LexCont.StringInComment (ifdefs, stringNest, LexerStringStyle.Verbatim, n1, mkRange "file" p1 p1) + | FSharpTokenizerColorState.TripleQuoteStringInComment -> + LexCont.StringInComment (ifdefs, stringNest, LexerStringStyle.TripleQuote, n1, mkRange "file" p1 p1) + | FSharpTokenizerColorState.CamlOnly -> + LexCont.MLOnly (ifdefs, stringNest, mkRange "file" p1 p1) + | FSharpTokenizerColorState.VerbatimString -> + LexCont.String (ifdefs, stringNest, LexerStringStyle.Verbatim, stringKind, mkRange "file" p1 p1) + | FSharpTokenizerColorState.TripleQuoteString -> + LexCont.String (ifdefs, stringNest, LexerStringStyle.TripleQuote, stringKind, mkRange "file" p1 p1) + | FSharpTokenizerColorState.EndLineThenSkip -> + LexCont.EndLine(ifdefs, stringNest, LexerEndlineContinuation.Skip(n1, mkRange "file" p1 p1)) + | FSharpTokenizerColorState.EndLineThenToken -> + LexCont.EndLine(ifdefs, stringNest, LexerEndlineContinuation.Token) + | _ -> LexCont.Token ([], stringNest) lightSyntaxStatusInitial, lexcont - let callLexCont lexcont args skip lexbuf = - let argsWithIfDefs ifd = - if args.ifdefStack = ifd then - args - else - {args with ifdefStack = ifd} - match lexcont with - | LexCont.EndLine cont -> Lexer.endline cont args skip lexbuf - | LexCont.Token ifd -> Lexer.token (argsWithIfDefs ifd) skip lexbuf - | LexCont.IfDefSkip (ifd, n, m) -> Lexer.ifdefSkip n m (argsWithIfDefs ifd) skip lexbuf - // Q: What's this magic 100 number for? Q: it's just an initial buffer size. - | LexCont.String (ifd, m) -> Lexer.string (ByteBuffer.Create 100, defaultStringFinisher, m, (argsWithIfDefs ifd)) skip lexbuf - | LexCont.Comment (ifd, n, m) -> Lexer.comment (n, m, (argsWithIfDefs ifd)) skip lexbuf - // The first argument is 'None' because we don't need XML comments when called from VS - | LexCont.SingleLineComment (ifd, n, m) -> Lexer.singleLineComment (None, n, m, (argsWithIfDefs ifd)) skip lexbuf - | LexCont.StringInComment (ifd, n, m) -> Lexer.stringInComment n m (argsWithIfDefs ifd) skip lexbuf - | LexCont.VerbatimStringInComment (ifd, n, m) -> Lexer.verbatimStringInComment n m (argsWithIfDefs ifd) skip lexbuf - | LexCont.TripleQuoteStringInComment (ifd, n, m) -> Lexer.tripleQuoteStringInComment n m (argsWithIfDefs ifd) skip lexbuf - | LexCont.MLOnly (ifd, m) -> Lexer.mlOnly m (argsWithIfDefs ifd) skip lexbuf - | LexCont.VerbatimString (ifd, m) -> Lexer.verbatimString (ByteBuffer.Create 100, defaultStringFinisher, m, (argsWithIfDefs ifd)) skip lexbuf - | LexCont.TripleQuoteString (ifd, m) -> Lexer.tripleQuoteString (ByteBuffer.Create 100, defaultStringFinisher, m, (argsWithIfDefs ifd)) skip lexbuf - //---------------------------------------------------------------------------- // Colorization //---------------------------------------------------------------------------- @@ -514,16 +608,16 @@ type SingleLineTokenState = [] type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, maxLength: int option, - filename: Option, - lexArgsLightOn: lexargs, - lexArgsLightOff: lexargs) = + filename: string option, + lexargs: LexArgs) = let skip = false // don't skip whitespace in the lexer let mutable singleLineTokenState = SingleLineTokenState.BeforeHash - let fsx = match filename with - | None -> false - | Some value -> CompileOps.IsScript value + let fsx = + match filename with + | None -> false + | Some value -> CompileOps.IsScript value // ---------------------------------------------------------------------------------- // This implements post-processing of #directive tokens - not very elegant, but it works... @@ -586,104 +680,160 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, let offset = beforeIdent + identLength processWhiteAndComment str offset delay cont ) - // ---------------------------------------------------------------------------------- - - - + // Set up the initial file position do match filename with | None -> lexbuf.EndPos <- Internal.Utilities.Text.Lexing.Position.Empty | Some value -> resetLexbufPos value lexbuf - member x.ScanToken lexintInitial: FSharpTokenInfo option * FSharpTokenizerLexState = + // Call the given continuation, reusing the same 'lexargs' each time but adjust + // its mutable entries to set up the right state + let callLexCont lexcont lightStatus skip = + + // Set up the arguments to lexing + lexargs.lightStatus <- lightStatus + + match lexcont with + | LexCont.EndLine (ifdefs, stringNest, cont) -> + lexargs.ifdefStack <- ifdefs + lexargs.stringNest <- stringNest + Lexer.endline cont lexargs skip lexbuf + + | LexCont.Token (ifdefs, stringNest) -> + lexargs.ifdefStack <- ifdefs + lexargs.stringNest <- stringNest + Lexer.token lexargs skip lexbuf + + | LexCont.IfDefSkip (ifdefs, stringNest, n, m) -> + lexargs.ifdefStack <- ifdefs + lexargs.stringNest <- stringNest + Lexer.ifdefSkip n m lexargs skip lexbuf + + | LexCont.String (ifdefs, stringNest, style, kind, m) -> + lexargs.ifdefStack <- ifdefs + lexargs.stringNest <- stringNest + let buf = ByteBuffer.Create 100 + let args = (buf, LexerStringFinisher.Default, m, kind, lexargs) + match style with + | LexerStringStyle.SingleQuote -> Lexer.singleQuoteString args skip lexbuf + | LexerStringStyle.Verbatim -> Lexer.verbatimString args skip lexbuf + | LexerStringStyle.TripleQuote -> Lexer.tripleQuoteString args skip lexbuf + + | LexCont.Comment (ifdefs, stringNest, n, m) -> + lexargs.ifdefStack <- ifdefs + lexargs.stringNest <- stringNest + Lexer.comment (n, m, lexargs) skip lexbuf + + | LexCont.SingleLineComment (ifdefs, stringNest, n, m) -> + lexargs.ifdefStack <- ifdefs + lexargs.stringNest <- stringNest + // The first argument is 'None' because we don't need XML comments when called from VS tokenizer + Lexer.singleLineComment (None, n, m, lexargs) skip lexbuf + + | LexCont.StringInComment (ifdefs, stringNest, style, n, m) -> + lexargs.ifdefStack <- ifdefs + lexargs.stringNest <- stringNest + match style with + | LexerStringStyle.SingleQuote -> Lexer.stringInComment n m lexargs skip lexbuf + | LexerStringStyle.Verbatim -> Lexer.verbatimStringInComment n m lexargs skip lexbuf + | LexerStringStyle.TripleQuote -> Lexer.tripleQuoteStringInComment n m lexargs skip lexbuf + + | LexCont.MLOnly (ifdefs, stringNest, m) -> + lexargs.ifdefStack <- ifdefs + lexargs.stringNest <- stringNest + Lexer.mlOnly m lexargs skip lexbuf + + let columnsOfCurrentToken() = + let leftp = lexbuf.StartPos + let rightp = lexbuf.EndPos + let leftc = leftp.Column + let rightc = + match maxLength with + | Some mx when rightp.Line > leftp.Line -> mx + | _ -> rightp.Column + let rightc = rightc - 1 + struct (leftc, rightc) + + let getTokenWithPosition lexcont lightStatus = + // Column of token + // Get the token & position - either from a stack or from the lexer + try + if (tokenStack.Count > 0) then + true, tokenStack.Pop() + else + // Choose which lexer entry point to call and call it + let token = callLexCont lexcont lightStatus skip + let struct (leftc, rightc) = columnsOfCurrentToken() + + // Splits tokens like ">." into multiple tokens - this duplicates behavior from the 'lexfilter' + // which cannot be (easily) used from the language service. The rules here are not always valid, + // because sometimes token shouldn't be split. However it is just for colorization & + // for VS (which needs to recognize when user types "."). + match token with + | HASH_IF (m, lineStr, cont) when lineStr <> "" -> + false, processHashIfLine m.StartColumn lineStr cont + | HASH_ELSE (m, lineStr, cont) when lineStr <> "" -> + false, processHashEndElse m.StartColumn lineStr 4 cont + | HASH_ENDIF (m, lineStr, cont) when lineStr <> "" -> + false, processHashEndElse m.StartColumn lineStr 5 cont + | HASH_IDENT(ident) -> + delayToken(IDENT (ident), leftc + 1, rightc) + false, (HASH, leftc, leftc) + | RQUOTE_DOT (s, raw) -> + delayToken(DOT, rightc, rightc) + false, (RQUOTE (s, raw), leftc, rightc - 1) + | INFIX_COMPARE_OP (LexFilter.TyparsCloseOp(greaters, afterOp) as opstr) -> + match afterOp with + | None -> () + | Some tok -> delayToken(tok, leftc + greaters.Length, rightc) + for i = greaters.Length - 1 downto 1 do + delayToken(greaters.[i] false, leftc + i, rightc - opstr.Length + i + 1) + false, (greaters.[0] false, leftc, rightc - opstr.Length + 1) + // break up any operators that start with '.' so that we can get auto-popup-completion for e.g. "x.+1" when typing the dot + | INFIX_STAR_STAR_OP opstr when opstr.StartsWithOrdinal(".") -> + delayToken(INFIX_STAR_STAR_OP(opstr.Substring 1), leftc+1, rightc) + false, (DOT, leftc, leftc) + | PLUS_MINUS_OP opstr when opstr.StartsWithOrdinal(".") -> + delayToken(PLUS_MINUS_OP(opstr.Substring 1), leftc+1, rightc) + false, (DOT, leftc, leftc) + | INFIX_COMPARE_OP opstr when opstr.StartsWithOrdinal(".") -> + delayToken(INFIX_COMPARE_OP(opstr.Substring 1), leftc+1, rightc) + false, (DOT, leftc, leftc) + | INFIX_AT_HAT_OP opstr when opstr.StartsWithOrdinal(".") -> + delayToken(INFIX_AT_HAT_OP(opstr.Substring 1), leftc+1, rightc) + false, (DOT, leftc, leftc) + | INFIX_BAR_OP opstr when opstr.StartsWithOrdinal(".") -> + delayToken(INFIX_BAR_OP(opstr.Substring 1), leftc+1, rightc) + false, (DOT, leftc, leftc) + | PREFIX_OP opstr when opstr.StartsWithOrdinal(".") -> + delayToken(PREFIX_OP(opstr.Substring 1), leftc+1, rightc) + false, (DOT, leftc, leftc) + | INFIX_STAR_DIV_MOD_OP opstr when opstr.StartsWithOrdinal(".") -> + delayToken(INFIX_STAR_DIV_MOD_OP(opstr.Substring 1), leftc+1, rightc) + false, (DOT, leftc, leftc) + | INFIX_AMP_OP opstr when opstr.StartsWithOrdinal(".") -> + delayToken(INFIX_AMP_OP(opstr.Substring 1), leftc+1, rightc) + false, (DOT, leftc, leftc) + | ADJACENT_PREFIX_OP opstr when opstr.StartsWithOrdinal(".") -> + delayToken(ADJACENT_PREFIX_OP(opstr.Substring 1), leftc+1, rightc) + false, (DOT, leftc, leftc) + | FUNKY_OPERATOR_NAME opstr when opstr.StartsWithOrdinal(".") -> + delayToken(FUNKY_OPERATOR_NAME(opstr.Substring 1), leftc+1, rightc) + false, (DOT, leftc, leftc) + | _ -> false, (token, leftc, rightc) + with _ -> + false, (EOF LexerStateEncoding.revertToDefaultLexCont, 0, 0) + + // Scan a token starting with the given lexer state + member x.ScanToken (lexState: FSharpTokenizerLexState) : FSharpTokenInfo option * FSharpTokenizerLexState = use unwindBP = PushThreadBuildPhaseUntilUnwind BuildPhase.Parse use unwindEL = PushErrorLoggerPhaseUntilUnwind (fun _ -> DiscardErrorsLogger) - let lightSyntaxStatusInitial, lexcontInitial = LexerStateEncoding.decodeLexInt lexintInitial - let lightSyntaxStatus = LightSyntaxStatus(lightSyntaxStatusInitial, false) - - // Build the arguments to the lexer function - let lexargs = if lightSyntaxStatusInitial then lexArgsLightOn else lexArgsLightOff - - let GetTokenWithPosition lexcontInitial = - // Column of token - let ColumnsOfCurrentToken() = - let leftp = lexbuf.StartPos - let rightp = lexbuf.EndPos - let leftc = leftp.Column - let rightc = - match maxLength with - | Some mx when rightp.Line > leftp.Line -> mx - | _ -> rightp.Column - let rightc = rightc - 1 - struct (leftc, rightc) - - // Get the token & position - either from a stack or from the lexer - try - if (tokenStack.Count > 0) then true, tokenStack.Pop() - else - // Choose which lexer entry point to call and call it - let token = LexerStateEncoding.callLexCont lexcontInitial lexargs skip lexbuf - let struct (leftc, rightc) = ColumnsOfCurrentToken() - - // Splits tokens like ">." into multiple tokens - this duplicates behavior from the 'lexfilter' - // which cannot be (easily) used from the language service. The rules here are not always valid, - // because sometimes token shouldn't be split. However it is just for colorization & - // for VS (which needs to recognize when user types "."). - match token with - | HASH_IF (m, lineStr, cont) when lineStr <> "" -> - false, processHashIfLine m.StartColumn lineStr cont - | HASH_ELSE (m, lineStr, cont) when lineStr <> "" -> - false, processHashEndElse m.StartColumn lineStr 4 cont - | HASH_ENDIF (m, lineStr, cont) when lineStr <> "" -> - false, processHashEndElse m.StartColumn lineStr 5 cont - | RQUOTE_DOT (s, raw) -> - delayToken(DOT, rightc, rightc) - false, (RQUOTE (s, raw), leftc, rightc - 1) - | INFIX_COMPARE_OP (LexFilter.TyparsCloseOp(greaters, afterOp) as opstr) -> - match afterOp with - | None -> () - | Some tok -> delayToken(tok, leftc + greaters.Length, rightc) - for i = greaters.Length - 1 downto 1 do - delayToken(greaters.[i] false, leftc + i, rightc - opstr.Length + i + 1) - false, (greaters.[0] false, leftc, rightc - opstr.Length + 1) - // break up any operators that start with '.' so that we can get auto-popup-completion for e.g. "x.+1" when typing the dot - | INFIX_STAR_STAR_OP opstr when opstr.StartsWithOrdinal(".") -> - delayToken(INFIX_STAR_STAR_OP(opstr.Substring 1), leftc+1, rightc) - false, (DOT, leftc, leftc) - | PLUS_MINUS_OP opstr when opstr.StartsWithOrdinal(".") -> - delayToken(PLUS_MINUS_OP(opstr.Substring 1), leftc+1, rightc) - false, (DOT, leftc, leftc) - | INFIX_COMPARE_OP opstr when opstr.StartsWithOrdinal(".") -> - delayToken(INFIX_COMPARE_OP(opstr.Substring 1), leftc+1, rightc) - false, (DOT, leftc, leftc) - | INFIX_AT_HAT_OP opstr when opstr.StartsWithOrdinal(".") -> - delayToken(INFIX_AT_HAT_OP(opstr.Substring 1), leftc+1, rightc) - false, (DOT, leftc, leftc) - | INFIX_BAR_OP opstr when opstr.StartsWithOrdinal(".") -> - delayToken(INFIX_BAR_OP(opstr.Substring 1), leftc+1, rightc) - false, (DOT, leftc, leftc) - | PREFIX_OP opstr when opstr.StartsWithOrdinal(".") -> - delayToken(PREFIX_OP(opstr.Substring 1), leftc+1, rightc) - false, (DOT, leftc, leftc) - | INFIX_STAR_DIV_MOD_OP opstr when opstr.StartsWithOrdinal(".") -> - delayToken(INFIX_STAR_DIV_MOD_OP(opstr.Substring 1), leftc+1, rightc) - false, (DOT, leftc, leftc) - | INFIX_AMP_OP opstr when opstr.StartsWithOrdinal(".") -> - delayToken(INFIX_AMP_OP(opstr.Substring 1), leftc+1, rightc) - false, (DOT, leftc, leftc) - | ADJACENT_PREFIX_OP opstr when opstr.StartsWithOrdinal(".") -> - delayToken(ADJACENT_PREFIX_OP(opstr.Substring 1), leftc+1, rightc) - false, (DOT, leftc, leftc) - | FUNKY_OPERATOR_NAME opstr when opstr.StartsWithOrdinal(".") -> - delayToken(FUNKY_OPERATOR_NAME(opstr.Substring 1), leftc+1, rightc) - false, (DOT, leftc, leftc) - | _ -> false, (token, leftc, rightc) - with - | e -> false, (EOF LexerStateEncoding.revertToDefaultLexCont, 0, 0) // REVIEW: report lex failure here + let lightStatus, lexcont = LexerStateEncoding.decodeLexInt lexState + let lightStatus = LightSyntaxStatus(lightStatus, false) // Grab a token - let isCached, (token, leftc, rightc) = GetTokenWithPosition lexcontInitial + let isCached, (token, leftc, rightc) = getTokenWithPosition lexcont lightStatus // Check for end-of-string and failure let tokenDataOption, lexcontFinal, tokenTag = @@ -696,13 +846,20 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, | _ -> // Get the information about the token let (colorClass, charClass, triggerClass) = TokenClassifications.tokenInfo token + let lexcontFinal = // If we're using token from cache, we don't move forward with lexing - if isCached then lexcontInitial else LexerStateEncoding.computeNextLexState token lexcontInitial + if isCached then lexcont + else LexerStateEncoding.computeNextLexState token lexcont + let tokenTag = tagOfToken token + + let tokenName = token_to_string token + let fullMatchedLength = lexbuf.EndPos.AbsoluteOffset - lexbuf.StartPos.AbsoluteOffset + let tokenData = - { TokenName = token_to_string token + { TokenName = tokenName LeftColumn=leftc RightColumn=rightc ColorClass=colorClass @@ -712,19 +869,15 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, FullMatchedLength=fullMatchedLength} Some tokenData, lexcontFinal, tokenTag - // Get the final lex int and color state - let FinalState lexcontFinal = - LexerStateEncoding.encodeLexInt lightSyntaxStatus.Status lexcontFinal - // Check for patterns like #-IDENT and see if they look like meta commands for .fsx files. If they do then merge them into a single token. let tokenDataOption, lexintFinal = - let lexintFinal = FinalState lexcontFinal + let lexintFinal = LexerStateEncoding.encodeLexInt lightStatus.Status lexcontFinal match tokenDataOption, singleLineTokenState, tokenTagToTokenId tokenTag with | Some tokenData, SingleLineTokenState.BeforeHash, TOKEN_HASH -> // Don't allow further matches. singleLineTokenState <- SingleLineTokenState.NoFurtherMatchPossible // Peek at the next token - let isCached, (nextToken, _, rightc) = GetTokenWithPosition lexcontInitial + let isCached, (nextToken, _, rightc) = getTokenWithPosition lexcont lightStatus match nextToken with | IDENT possibleMetaCommand -> match fsx, possibleMetaCommand with @@ -749,9 +902,9 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf, // These are for script and non-script | _, "nowarn" -> // Merge both tokens into one. - let lexcontFinal = if isCached then lexcontInitial else LexerStateEncoding.computeNextLexState token lexcontInitial + let lexcontFinal = if isCached then lexcont else LexerStateEncoding.computeNextLexState token lexcont let tokenData = {tokenData with RightColumn=rightc;ColorClass=FSharpTokenColorKind.PreprocessorKeyword;CharClass=FSharpTokenCharKind.Keyword;FSharpTokenTriggerClass=FSharpTokenTriggerClass.None} - let lexintFinal = FinalState lexcontFinal + let lexintFinal = LexerStateEncoding.encodeLexInt lightStatus.Status lexcontFinal Some tokenData, lexintFinal | _ -> tokenDataOption, lexintFinal | _ -> tokenDataOption, lexintFinal @@ -779,16 +932,15 @@ type FSharpSourceTokenizer(defineConstants: string list, filename: string option let lexResourceManager = new Lexhelp.LexResourceManager() - let lexArgsLightOn = mkLexargs(filename, defineConstants, LightSyntaxStatus(true, false), lexResourceManager, [], DiscardErrorsLogger, PathMap.empty) - let lexArgsLightOff = mkLexargs(filename, defineConstants, LightSyntaxStatus(false, false), lexResourceManager, [], DiscardErrorsLogger, PathMap.empty) + let lexargs = mkLexargs(defineConstants, LightSyntaxStatus(true, false), lexResourceManager, [], DiscardErrorsLogger, PathMap.empty) - member this.CreateLineTokenizer(lineText: string) = + member _.CreateLineTokenizer(lineText: string) = let lexbuf = UnicodeLexing.StringAsLexbuf(isFeatureSupported, lineText) - FSharpLineTokenizer(lexbuf, Some lineText.Length, filename, lexArgsLightOn, lexArgsLightOff) + FSharpLineTokenizer(lexbuf, Some lineText.Length, filename, lexargs) - member this.CreateBufferTokenizer bufferFiller = + member _.CreateBufferTokenizer bufferFiller = let lexbuf = UnicodeLexing.FunctionAsLexbuf(isFeatureSupported, bufferFiller) - FSharpLineTokenizer(lexbuf, None, filename, lexArgsLightOn, lexArgsLightOff) + FSharpLineTokenizer(lexbuf, None, filename, lexargs) module Keywords = open FSharp.Compiler.Lexhelp.Keywords @@ -801,14 +953,7 @@ module Keywords = module Lexer = open System.Threading - open FSharp.Compiler.Features - open FSharp.Compiler.Lexhelp - open FSharp.Compiler.Parser - open FSharp.Compiler.Range - open FSharp.Compiler.SyntaxTree open FSharp.Compiler.Text - open FSharp.Compiler.UnicodeLexing - open Internal.Utilities [] type FSharpLexerFlags = @@ -1082,7 +1227,7 @@ module Lexer = | SIG -> FSharpSyntaxTokenKind.Sig | BAR -> FSharpSyntaxTokenKind.Bar | RBRACK -> FSharpSyntaxTokenKind.RightBracket - | RBRACE -> FSharpSyntaxTokenKind.RightBrace + | RBRACE _ -> FSharpSyntaxTokenKind.RightBrace | MINUS -> FSharpSyntaxTokenKind.Minus | DOLLAR -> FSharpSyntaxTokenKind.Dollar | BAR_RBRACK -> FSharpSyntaxTokenKind.BarRightBracket @@ -1095,7 +1240,7 @@ module Lexer = | LBRACK_BAR -> FSharpSyntaxTokenKind.LeftBracketBar | LBRACE_BAR -> FSharpSyntaxTokenKind.LeftBraceBar | LBRACK_LESS -> FSharpSyntaxTokenKind.LeftBracketLess - | LBRACE -> FSharpSyntaxTokenKind.LeftBrace + | LBRACE _ -> FSharpSyntaxTokenKind.LeftBrace | QMARK -> FSharpSyntaxTokenKind.QuestionMark | QMARK_QMARK -> FSharpSyntaxTokenKind.QuestionMarkQuestionMark | DOT -> FSharpSyntaxTokenKind.Dot @@ -1211,6 +1356,10 @@ module Lexer = | INFIX_STAR_STAR_OP _ -> FSharpSyntaxTokenKind.InfixStarStarOperator | IDENT _ -> FSharpSyntaxTokenKind.Identifier | KEYWORD_STRING _ -> FSharpSyntaxTokenKind.KeywordString + | INTERP_STRING_BEGIN_END _ + | INTERP_STRING_BEGIN_PART _ + | INTERP_STRING_PART _ + | INTERP_STRING_END _ | STRING _ -> FSharpSyntaxTokenKind.String | BYTEARRAY _ -> FSharpSyntaxTokenKind.ByteArray | _ -> FSharpSyntaxTokenKind.None @@ -1367,7 +1516,7 @@ module Lexer = | FSharpSyntaxTokenKind.LineCommentTrivia -> true | _ -> false - let lexWithErrorLogger (text: ISourceText) (filePath: string) conditionalCompilationDefines (flags: FSharpLexerFlags) supportsFeature errorLogger onToken pathMap (ct: CancellationToken) = + let lexWithErrorLogger (text: ISourceText) conditionalCompilationDefines (flags: FSharpLexerFlags) supportsFeature errorLogger onToken pathMap (ct: CancellationToken) = let canSkipTrivia = (flags &&& FSharpLexerFlags.SkipTrivia) = FSharpLexerFlags.SkipTrivia let isLightSyntaxOn = (flags &&& FSharpLexerFlags.LightSyntaxOn) = FSharpLexerFlags.LightSyntaxOn let isCompiling = (flags &&& FSharpLexerFlags.Compiling) = FSharpLexerFlags.Compiling @@ -1375,15 +1524,15 @@ module Lexer = let canUseLexFilter = (flags &&& FSharpLexerFlags.UseLexFilter) = FSharpLexerFlags.UseLexFilter let lexbuf = UnicodeLexing.SourceTextAsLexbuf(supportsFeature, text) - let lightSyntaxStatus = LightSyntaxStatus(isLightSyntaxOn, true) - let lexargs = mkLexargs (filePath, conditionalCompilationDefines, lightSyntaxStatus, Lexhelp.LexResourceManager(0), [], errorLogger, pathMap) + let lightStatus = LightSyntaxStatus(isLightSyntaxOn, true) + let lexargs = mkLexargs (conditionalCompilationDefines, lightStatus, Lexhelp.LexResourceManager(0), [], errorLogger, pathMap) let lexargs = { lexargs with applyLineDirectives = isCompiling } let getNextToken = let lexer = Lexer.token lexargs canSkipTrivia if canUseLexFilter then - LexFilter.LexFilter(lexargs.lightSyntaxStatus, isCompilingFSharpCore, lexer, lexbuf).Lexer + LexFilter.LexFilter(lexargs.lightStatus, isCompilingFSharpCore, lexer, lexbuf).Lexer else lexer @@ -1394,17 +1543,17 @@ module Lexer = ct.ThrowIfCancellationRequested () onToken (getNextToken lexbuf) lexbuf.LexemeRange - let lex text filePath conditionalCompilationDefines flags supportsFeature lexCallback pathMap ct = + let lex text conditionalCompilationDefines flags supportsFeature lexCallback pathMap ct = let errorLogger = CompilationErrorLogger("Lexer", ErrorLogger.FSharpErrorSeverityOptions.Default) - lexWithErrorLogger text filePath conditionalCompilationDefines flags supportsFeature errorLogger lexCallback pathMap ct + lexWithErrorLogger text conditionalCompilationDefines flags supportsFeature errorLogger lexCallback pathMap ct [] type FSharpLexer = - static member Lex(text: ISourceText, tokenCallback, ?langVersion, ?filePath, ?conditionalCompilationDefines, ?flags, ?pathMap, ?ct) = + static member Lex(text: ISourceText, tokenCallback, ?langVersion, ?filePath: string, ?conditionalCompilationDefines, ?flags, ?pathMap, ?ct) = let langVersion = defaultArg langVersion "latestmajor" let flags = defaultArg flags FSharpLexerFlags.Default - let filePath = defaultArg filePath String.Empty + ignore filePath // can be removed at later point let conditionalCompilationDefines = defaultArg conditionalCompilationDefines [] let pathMap = defaultArg pathMap Map.Empty let ct = defaultArg ct CancellationToken.None @@ -1422,4 +1571,4 @@ module Lexer = | FSharpSyntaxTokenKind.None -> () | _ -> tokenCallback fsTok - lex text filePath conditionalCompilationDefines flags supportsFeature onToken pathMap ct \ No newline at end of file + lex text conditionalCompilationDefines flags supportsFeature onToken pathMap ct \ No newline at end of file diff --git a/src/fsharp/service/ServiceLexing.fsi b/src/fsharp/service/ServiceLexing.fsi index 5bd784e9e4..9e05df2732 100755 --- a/src/fsharp/service/ServiceLexing.fsi +++ b/src/fsharp/service/ServiceLexing.fsi @@ -86,8 +86,16 @@ module FSharpTokenTag = val String : int /// Indicates the token is an identifier (synonym for FSharpTokenTag.Identifier) val IDENT : int - /// Indicates the token is an string (synonym for FSharpTokenTag.String) + /// Indicates the token is a string (synonym for FSharpTokenTag.String) val STRING : int + /// Indicates the token is a part of an interpolated string + val INTERP_STRING_BEGIN_END : int + /// Indicates the token is a part of an interpolated string + val INTERP_STRING_BEGIN_PART : int + /// Indicates the token is a part of an interpolated string + val INTERP_STRING_PART : int + /// Indicates the token is a part of an interpolated string + val INTERP_STRING_END : int /// Indicates the token is a `(` val LPAREN : int /// Indicates the token is a `)` @@ -236,15 +244,29 @@ type FSharpTokenInfo = [] type FSharpLineTokenizer = /// Scan one token from the line - member ScanToken : lexState:FSharpTokenizerLexState -> FSharpTokenInfo option * FSharpTokenizerLexState - static member ColorStateOfLexState : FSharpTokenizerLexState -> FSharpTokenizerColorState - static member LexStateOfColorState : FSharpTokenizerColorState -> FSharpTokenizerLexState + member ScanToken: lexState:FSharpTokenizerLexState -> FSharpTokenInfo option * FSharpTokenizerLexState + + /// Get the color state from the lexer state + static member ColorStateOfLexState: FSharpTokenizerLexState -> FSharpTokenizerColorState + + /// Get a default lexer state for a color state. + /// + /// NOTE: This may result in an inaccurate lexer state + /// not taking into account things such as the #if/#endif and string interpolation context + /// within the file + static member LexStateOfColorState: FSharpTokenizerColorState -> FSharpTokenizerLexState /// Tokenizer for a source file. Holds some expensive-to-compute resources at the scope of the file. [] type FSharpSourceTokenizer = + + /// Create a tokenizer for a source file. new : conditionalDefines:string list * fileName:string option -> FSharpSourceTokenizer - member CreateLineTokenizer : lineText:string -> FSharpLineTokenizer + + /// Create a tokenizer for a line of this source file + member CreateLineTokenizer: lineText:string -> FSharpLineTokenizer + + /// Create a tokenizer for a line of this source file using a buffer filler member CreateBufferTokenizer : bufferFiller:(char[] * int * int -> int) -> FSharpLineTokenizer module internal TestExpose = diff --git a/src/fsharp/service/ServiceParseTreeWalk.fs b/src/fsharp/service/ServiceParseTreeWalk.fs index 698776bc01..2d5d1729d9 100755 --- a/src/fsharp/service/ServiceParseTreeWalk.fs +++ b/src/fsharp/service/ServiceParseTreeWalk.fs @@ -201,15 +201,30 @@ module public AstTraversal = let path = TraverseStep.Expr e :: path let traverseSynExpr = traverseSynExpr path match e with + | SynExpr.Paren (synExpr, _, _, _parenRange) -> traverseSynExpr synExpr + | SynExpr.Quote (_synExpr, _, synExpr2, _, _range) -> [//dive synExpr synExpr.Range traverseSynExpr // TODO, what is this? dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr + | SynExpr.Const (_synConst, _range) -> None - | SynExpr.Typed (synExpr, synType, _range) -> [ traverseSynExpr synExpr; traverseSynType synType ] |> List.tryPick id + + | SynExpr.InterpolatedString (parts, _) -> + [ for part in parts do + match part with + | SynInterpolatedStringPart.String _ -> () + | SynInterpolatedStringPart.FillExpr (fillExpr, _) -> + yield dive fillExpr fillExpr.Range traverseSynExpr ] + |> pick expr + + | SynExpr.Typed (synExpr, synType, _range) -> + [ traverseSynExpr synExpr; traverseSynType synType ] |> List.tryPick id + | SynExpr.Tuple (_, synExprList, _, _range) - | SynExpr.ArrayOrList (_, synExprList, _range) -> synExprList |> List.map (fun x -> dive x x.Range traverseSynExpr) |> pick expr + | SynExpr.ArrayOrList (_, synExprList, _range) -> + synExprList |> List.map (fun x -> dive x x.Range traverseSynExpr) |> pick expr | SynExpr.AnonRecd (_isStruct, copyOpt, synExprList, _range) -> [ match copyOpt with @@ -227,6 +242,7 @@ module public AstTraversal = for (_,x) in synExprList do yield dive x x.Range traverseSynExpr ] |> pick expr + | SynExpr.Record (inheritOpt,copyOpt,fields, _range) -> [ let diveIntoSeparator offsideColumn scPosOpt copyOpt = @@ -313,6 +329,7 @@ module public AstTraversal = | _ -> () ] |> pick expr + | SynExpr.New (_, _synType, synExpr, _range) -> traverseSynExpr synExpr | SynExpr.ObjExpr (ty,baseCallOpt,binds,ifaces,_range1,_range2) -> let result = @@ -336,21 +353,26 @@ module public AstTraversal = for b in binds do yield dive b b.RangeOfBindingAndRhs (traverseSynBinding path) ] |> pick expr + | SynExpr.While (_sequencePointInfoForWhileLoop, synExpr, synExpr2, _range) -> [dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr + | SynExpr.For (_sequencePointInfoForForLoop, _ident, synExpr, _, synExpr2, synExpr3, _range) -> [dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr dive synExpr3 synExpr3.Range traverseSynExpr] |> pick expr + | SynExpr.ForEach (_sequencePointInfoForForLoop, _seqExprOnly, _isFromSource, synPat, synExpr, synExpr2, _range) -> [dive synPat synPat.Range traversePat dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr + | SynExpr.ArrayOrListOfSeqExpr (_, synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.CompExpr (_, _, synExpr, _range) -> // now parser treats this syntactic expression as computation expression // { identifier } @@ -368,6 +390,7 @@ module public AstTraversal = if ok.IsSome then ok else traverseSynExpr synExpr + | SynExpr.Lambda (_, _, synSimplePats, synExpr, _range) -> match synSimplePats with | SynSimplePats.SimplePats(pats,_) -> @@ -375,17 +398,23 @@ module public AstTraversal = | Some x -> Some x | None -> traverseSynExpr synExpr | _ -> traverseSynExpr synExpr + | SynExpr.MatchLambda (_isExnMatch,_argm,synMatchClauseList,_spBind,_wholem) -> synMatchClauseList |> List.map (fun x -> dive x x.Range (traverseSynMatchClause path)) |> pick expr + | SynExpr.Match (_sequencePointInfoForBinding, synExpr, synMatchClauseList, _range) -> [yield dive synExpr synExpr.Range traverseSynExpr yield! synMatchClauseList |> List.map (fun x -> dive x x.RangeOfGuardAndRhs (traverseSynMatchClause path))] |> pick expr + | SynExpr.Do (synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.Assert (synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.Fixed (synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.App (_exprAtomicFlag, isInfix, synExpr, synExpr2, _range) -> if isInfix then [dive synExpr2 synExpr2.Range traverseSynExpr @@ -395,7 +424,9 @@ module public AstTraversal = [dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr + | SynExpr.TypeApp (synExpr, _, _synTypeList, _commas, _, _, _range) -> traverseSynExpr synExpr + | SynExpr.LetOrUse (_, _, synBindingList, synExpr, range) -> match visitor.VisitLetOrUse(path, traverseSynBinding path, synBindingList, range) with | Some x -> Some x @@ -403,20 +434,26 @@ module public AstTraversal = [yield! synBindingList |> List.map (fun x -> dive x x.RangeOfBindingAndRhs (traverseSynBinding path)) yield dive synExpr synExpr.Range traverseSynExpr] |> pick expr + | SynExpr.TryWith (synExpr, _range, synMatchClauseList, _range2, _range3, _sequencePointInfoForTry, _sequencePointInfoForWith) -> [yield dive synExpr synExpr.Range traverseSynExpr yield! synMatchClauseList |> List.map (fun x -> dive x x.Range (traverseSynMatchClause path))] |> pick expr + | SynExpr.TryFinally (synExpr, synExpr2, _range, _sequencePointInfoForTry, _sequencePointInfoForFinally) -> [dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr + | SynExpr.Lazy (synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.SequentialOrImplicitYield (_sequencePointInfoForSequential, synExpr, synExpr2, _, _range) + | SynExpr.Sequential (_sequencePointInfoForSequential, _, synExpr, synExpr2, _range) -> [dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr + | SynExpr.IfThenElse (synExpr, synExpr2, synExprOpt, _sequencePointInfoForBinding, _isRecovery, _range, _range2) -> [yield dive synExpr synExpr.Range traverseSynExpr yield dive synExpr2 synExpr2.Range traverseSynExpr @@ -424,21 +461,29 @@ module public AstTraversal = | None -> () | Some(x) -> yield dive x x.Range traverseSynExpr] |> pick expr + | SynExpr.Ident (_ident) -> None + | SynExpr.LongIdent (_, _longIdent, _altNameRefCell, _range) -> None + | SynExpr.LongIdentSet (_longIdent, synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.DotGet (synExpr, _dotm, _longIdent, _range) -> traverseSynExpr synExpr + | SynExpr.Set (synExpr, synExpr2, _) + | SynExpr.DotSet (synExpr, _, synExpr2, _) -> [dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr + | SynExpr.DotIndexedGet (synExpr, synExprList, _range, _range2) -> [yield dive synExpr synExpr.Range traverseSynExpr for synExpr in synExprList do for x in synExpr.Exprs do yield dive x x.Range traverseSynExpr] |> pick expr + | SynExpr.DotIndexedSet (synExpr, synExprList, synExpr2, _, _range, _range2) -> [yield dive synExpr synExpr.Range traverseSynExpr for synExpr in synExprList do @@ -446,33 +491,48 @@ module public AstTraversal = yield dive x x.Range traverseSynExpr yield dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr + | SynExpr.JoinIn (synExpr1, _range, synExpr2, _range2) -> [dive synExpr1 synExpr1.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr + | SynExpr.NamedIndexedPropertySet (_longIdent, synExpr, synExpr2, _range) -> [dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr + | SynExpr.DotNamedIndexedPropertySet (synExpr, _longIdent, synExpr2, synExpr3, _range) -> [dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr dive synExpr3 synExpr3.Range traverseSynExpr] |> pick expr + | SynExpr.TypeTest (synExpr, synType, _range) + | SynExpr.Upcast (synExpr, synType, _range) + | SynExpr.Downcast (synExpr, synType, _range) -> [dive synExpr synExpr.Range traverseSynExpr dive synType synType.Range traverseSynType] |> pick expr + | SynExpr.InferredUpcast (synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.InferredDowncast (synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.Null (_range) -> None + | SynExpr.AddressOf (_, synExpr, _range, _range2) -> traverseSynExpr synExpr + | SynExpr.TraitCall (_synTyparList, _synMemberSig, synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.ImplicitZero (_range) -> None + | SynExpr.YieldOrReturn (_, synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.YieldOrReturnFrom (_, synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.LetOrUseBang(_sequencePointInfoForBinding, _, _, synPat, synExpr, andBangSynExprs, synExpr2, _range) -> [ yield dive synPat synPat.Range traversePat @@ -484,17 +544,26 @@ module public AstTraversal = yield dive synExpr2 synExpr2.Range traverseSynExpr ] |> pick expr + | SynExpr.MatchBang (_sequencePointInfoForBinding, synExpr, synMatchClauseList, _range) -> [yield dive synExpr synExpr.Range traverseSynExpr yield! synMatchClauseList |> List.map (fun x -> dive x x.RangeOfGuardAndRhs (traverseSynMatchClause path))] |> pick expr + | SynExpr.DoBang (synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.LibraryOnlyILAssembly _ -> None + | SynExpr.LibraryOnlyStaticOptimization _ -> None + | SynExpr.LibraryOnlyUnionCaseFieldGet _ -> None + | SynExpr.LibraryOnlyUnionCaseFieldSet _ -> None + | SynExpr.ArbitraryAfterError (_debugStr, _range) -> None + | SynExpr.FromParseError (synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.DiscardAfterMissingQualificationAfterDot (synExpr, _range) -> traverseSynExpr synExpr visitor.VisitExpr(path, traverseSynExpr path, defaultTraverse, expr) diff --git a/src/fsharp/service/ServiceUntypedParse.fs b/src/fsharp/service/ServiceUntypedParse.fs index b9902e67f4..02054ef540 100755 --- a/src/fsharp/service/ServiceUntypedParse.fs +++ b/src/fsharp/service/ServiceUntypedParse.fs @@ -209,6 +209,12 @@ type FSharpParseFileResults(errors: FSharpErrorInfo[], input: ParsedInput option | SynExpr.Paren (e, _, _, _) -> yield! walkExpr false e + | SynExpr.InterpolatedString (parts, _) -> + yield! walkExprs [ for part in parts do + match part with + | SynInterpolatedStringPart.String _ -> () + | SynInterpolatedStringPart.FillExpr (fillExpr, _) -> yield fillExpr ] + | SynExpr.YieldOrReturn (_, e, _) | SynExpr.YieldOrReturnFrom (_, e, _) | SynExpr.DoBang (e, _) -> diff --git a/src/fsharp/service/service.fsi b/src/fsharp/service/service.fsi index cb414c87ab..3ed57fa2f2 100755 --- a/src/fsharp/service/service.fsi +++ b/src/fsharp/service/service.fsi @@ -314,6 +314,7 @@ type public FSharpChecker = /// /// TypeCheck and compile provided AST /// + /// /// An optional string used for tracing compiler operations associated with this request. member Compile: ast:ParsedInput list * assemblyName:string * outFile:string * dependencies:string list * ?pdbFile:string * ?executable:bool * ?noframework:bool * ?userOpName: string -> Async @@ -329,12 +330,14 @@ type public FSharpChecker = /// the given TextWriters are used for the stdout and stderr streams respectively. In this /// case, a global setting is modified during the execution. /// + /// /// An optional string used for tracing compiler operations associated with this request. member CompileToDynamicAssembly: otherFlags:string [] * execute:(TextWriter * TextWriter) option * ?userOpName: string -> Async /// /// TypeCheck and compile provided AST /// + /// /// An optional string used for tracing compiler operations associated with this request. member CompileToDynamicAssembly: ast:ParsedInput list * assemblyName:string * dependencies:string list * execute:(TextWriter * TextWriter) option * ?debug:bool * ?noframework:bool * ?userOpName: string -> Async @@ -344,6 +347,7 @@ type public FSharpChecker = /// If the source of the file has changed the results returned by this function may be out of date, though may /// still be usable for generating intellisense menus and information. /// + /// /// The filename for the file. /// The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. /// Optionally, specify source that must match the previous parse precisely. @@ -392,6 +396,7 @@ type public FSharpChecker = /// /// This function is called when a project has been cleaned/rebuilt, and thus any live type providers should be refreshed. /// + /// /// An optional string used for tracing compiler operations associated with this request. member NotifyProjectCleaned: options: FSharpProjectOptions * ?userOpName: string -> Async diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf index 85af396cf5..d49dee66cd 100644 --- a/src/fsharp/xlf/FSComp.txt.cs.xlf +++ b/src/fsharp/xlf/FSComp.txt.cs.xlf @@ -4,12 +4,12 @@ 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. + Funkce {0} není v jazyce F# {1} dostupná. Použijte prosím jazyk verze {2} nebo vyšší. Feature '{0}' is not supported by target runtime. - Feature '{0}' is not supported by target runtime. + Cílový modul runtime nepodporuje funkci {0}. @@ -54,52 +54,47 @@ 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} - 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} + Navržené sestavení poskytovatele typu {0} nešlo načíst ze složky {1}, protože chyběla závislost nebo ji nešlo načíst. Všechny závislosti tohoto sestavení se musí nacházet ve stejné složce jako toto sestavení. Ohlášená výjimka: {2} – {3} The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} - The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} + Navržené sestavení poskytovatele typu {0} nešlo načíst ze složky {1}. Ohlášená výjimka: {2} – {3} Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - - - - {0} for F# {1} - {0} pro F# {1} + Atribut sestavení {0} odkazuje na navržené sestavení {1}, které se nedá načíst nebo neexistuje. Ohlášená výjimka: {2} – {3} applicative computation expressions - applicative computation expressions + aplikativní výpočetní výrazy default interface member consumption - default interface member consumption + využití člena výchozího rozhraní dotless float32 literal - dotless float32 literal + literál float32 bez tečky fixed-index slice 3d/4d - fixed-index slice 3d/4d + řez 3d/4d s pevným indexem from-end slicing - from-end slicing + řez od konce implicit yield - implicit yield + implicitní yield @@ -109,42 +104,42 @@ nameof - nameof + nameof nullable optional interop - nullable optional interop + nepovinný zprostředkovatel komunikace s možnou hodnotou null open static classes - open static classes + otevřít statické třídy package management - package management + správa balíčků whitespace relexation - whitespace relexation + uvolnění prázdných znaků single underscore pattern - single underscore pattern + vzor s jedním podtržítkem wild card in for loop - wild card in for loop + zástupný znak ve smyčce for witness passing for trait constraints in F# quotations - witness passing for trait constraints in F# quotations + předávání kopie clusteru pro omezení vlastností v uvozovkách v jazyce F# @@ -237,6 +232,16 @@ use! se nedá kombinovat s and!. + + Cannot assign a value to another value marked literal + Cannot assign a value to another value marked literal + + + + Cannot assign '{0}' to a value marked literal + Cannot assign '{0}' to a value marked literal + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSource' and 'Bind' methods Konstrukt let! ... and! ... se dá použít jen v případě, že tvůrce výpočetních výrazů definuje buď metodu {0}, nebo vhodné metody MergeSource a Bind. @@ -244,7 +249,7 @@ Interface member '{0}' does not have a most specific implementation. - Interface member '{0}' does not have a most specific implementation. + Člen rozhraní {0} nemá nejvíce specifickou implementaci. @@ -427,16 +432,6 @@ Neplatný soubor verze {0} - - Microsoft (R) F# Compiler version {0} - Microsoft (R) F# Compiler verze {0} - - - - F# Compiler for F# {0} - Kompilátor jazyka F# pro F# {0} - - Problem with filename '{0}': {1} Problém s názvem souboru {0}: {1} @@ -1204,7 +1199,7 @@ The named argument '{0}' has been assigned more than one value - The named argument '{0}' has been assigned more than one value + Pojmenovaný argument {0} má přiřazenou víc než jednu hodnotu. @@ -3738,8 +3733,8 @@ - Only record fields and simple, non-recursive 'let' bindings may be marked mutable - Označení mutable můžou mít jenom pole záznamu a jednoduché, nerekurzivní vazby let. + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces @@ -5909,7 +5904,7 @@ Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} + Atribut sestavení {0} odkazuje na navržené sestavení {1}, které se nedá načíst z cesty {2}. Ohlášená výjimka: {3} – {4} diff --git a/src/fsharp/xlf/FSComp.txt.de.xlf b/src/fsharp/xlf/FSComp.txt.de.xlf index ba71a1e94f..fa24372bb0 100644 --- a/src/fsharp/xlf/FSComp.txt.de.xlf +++ b/src/fsharp/xlf/FSComp.txt.de.xlf @@ -4,12 +4,12 @@ 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. + Das Feature "{0}" ist in F# {1} nicht verfügbar. Verwenden Sie Sprachversion {2} oder höher. Feature '{0}' is not supported by target runtime. - Feature '{0}' is not supported by target runtime. + Das Feature "{0}" wird von der Zielruntime nicht unterstützt. @@ -54,52 +54,47 @@ 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} - 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} + Die Typanbieter-Designerassembly "{0}" konnte aus dem Ordner "{1}" nicht geladen werden, weil eine Abhängigkeit fehlte oder nicht geladen werden konnte. Alle Abhängigkeiten der Typanbieter-Designerassembly müssen sich in demselben Ordner wie die Assembly befinden. Gemeldete Ausnahme: {2} – {3} The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} - The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} + Die Typanbieter-Designerassembly "{0}" konnte aus dem Ordner "{1}" nicht geladen werden. Gemeldete Ausnahme: {2} – {3} Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - - - - {0} for F# {1} - {0} für F# {1} + Das Assemblyattribut "{0}" verweist auf eine Designerassembly "{1}", die entweder nicht geladen werden kann oder nicht vorhanden ist. Gemeldete Ausnahme: {2} – {3} applicative computation expressions - applicative computation expressions + applikative Berechnungsausdrücke default interface member consumption - default interface member consumption + standardmäßige Schnittstellenmembernutzung dotless float32 literal - dotless float32 literal + punktloses float32-Literal fixed-index slice 3d/4d - fixed-index slice 3d/4d + Segment 3D/4D mit feststehendem Index from-end slicing - from-end slicing + Segmentierung ab Ende implicit yield - implicit yield + implizite yield-Anweisung @@ -109,42 +104,42 @@ nameof - nameof + nameof nullable optional interop - nullable optional interop + Interop, NULL-Werte zulassend, optional open static classes - open static classes + geöffnete statische Klassen package management - package management + Paketverwaltung whitespace relexation - whitespace relexation + Lockerung für Leerraum single underscore pattern - single underscore pattern + Muster mit einzelnem Unterstrich wild card in for loop - wild card in for loop + Platzhalter in for-Schleife witness passing for trait constraints in F# quotations - witness passing for trait constraints in F# quotations + Zeugenübergabe für Merkmalseinschränkungen in F#-Zitaten @@ -237,6 +232,16 @@ "use!" darf nicht mit "and!" kombiniert werden. + + Cannot assign a value to another value marked literal + Cannot assign a value to another value marked literal + + + + Cannot assign '{0}' to a value marked literal + Cannot assign '{0}' to a value marked literal + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSource' and 'Bind' methods Das Konstrukt "let! ... and! ..." kann nur verwendet werden, wenn der Berechnungsausdrucks-Generator entweder eine {0}-Methode oder geeignete MergeSource- und Bind-Methoden definiert. @@ -244,7 +249,7 @@ Interface member '{0}' does not have a most specific implementation. - Interface member '{0}' does not have a most specific implementation. + Der Schnittstellenmember "{0}" weist keine spezifischste Implementierung auf. @@ -427,16 +432,6 @@ Ungültige Versionsdatei "{0}". - - Microsoft (R) F# Compiler version {0} - Microsoft (R) F# Compiler, Version {0} - - - - F# Compiler for F# {0} - F# Compiler für F# {0} - - Problem with filename '{0}': {1} Problem mit Dateinamen "{0}": {1} @@ -1204,7 +1199,7 @@ The named argument '{0}' has been assigned more than one value - The named argument '{0}' has been assigned more than one value + Dem benannten Argument "{0}" wurden mehrere Werte zugewiesen. @@ -3738,8 +3733,8 @@ - Only record fields and simple, non-recursive 'let' bindings may be marked mutable - Nur Datensatzfelder und einfache, nicht rekursive let-Bindungen dürfen als "mutable" markiert werden. + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces @@ -4419,32 +4414,32 @@ Embed all source files in the portable PDB file - Alle Quelldateien in der portablen PDB-Datei einbetten + Alle Quelldateien in der portierbaren PDB-Datei einbetten Embed specific source files in the portable PDB file - Bestimmte Quelldateien in der portablen PDB-Datei einbetten + Bestimmte Quelldateien in der portierbaren PDB-Datei einbetten Source link information file to embed in the portable PDB file - Die Datei mit Quelllinkinformationen, die in die portable PDB-Datei eingebettet werden soll + Die Datei mit Quelllinkinformationen, die in die portierbare PDB-Datei eingebettet werden soll --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) - Die Option "--embed" wird nur bei der Ausgabe einer portablen PDB unterstützt (--debug:portable oder --debug:embedded). + Die Option "--embed" wird nur bei der Ausgabe einer portierbaren PDB unterstützt (--debug:portable oder --debug:embedded). --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) - Die Option "--sourcelink" wird nur bei der Ausgabe einer portablen PDB unterstützt (--debug:portable oder --debug:embedded). + Die Option "--sourcelink" wird nur bei der Ausgabe einer portierbaren PDB unterstützt (--debug:portable oder --debug:embedded). Source file is too large to embed in a portable PDB - Die Quelldatei ist zu groß, um in eine portable PDB eingebettet zu werden. + Die Quelldatei ist zu groß, um in eine portierbare PDB eingebettet zu werden. @@ -4464,7 +4459,7 @@ Specify debugging type: full, portable, embedded, pdbonly. ('{0}' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). - Geben Sie den Debugtyp an: vollständig, portabel, eingebettet, pdbonly. ("{0}" ist der Standardwert, wenn kein Debugtyp angegeben wird, und ermöglicht das Anfügen eines Debuggers an ein aktuell ausgeführtes Programm. "Portabel" ist ein plattformübergreifendes Format, "eingebettet" ein plattformübergreifendes, in die Ausgabedatei eingebettetes Format). + Geben Sie den Debugtyp an: full, portable, embedded, pdbonly. ("{0}" ist der Standardwert, wenn kein Debugtyp angegeben wird, und ermöglicht das Anfügen eines Debuggers an ein aktuell ausgeführtes Programm. "portable" ist ein plattformübergreifendes Format, "embedded" ein plattformübergreifendes, in die Ausgabedatei eingebettetes Format). @@ -5909,7 +5904,7 @@ Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} + Das Assemblyattribut "{0}" verweist auf eine Designerassembly "{1}", die nicht aus dem Pfad "{2}" geladen werden kann. Gemeldete Ausnahme: {3} – {4} @@ -7419,7 +7414,7 @@ --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded) - --pathmap kann nur mit portablen PDB-Dateien verwendet werden (--debug:portable oder --debug:embedded) + --pathmap kann nur mit portierbaren PDB-Dateien verwendet werden (--debug:portable oder --debug:embedded) diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf index 6a8d27fdd3..b3417fbe7f 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -4,12 +4,12 @@ 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. + La característica "{0}" no está disponible en F# {1}. Use la versión {2} del lenguaje o una posterior. Feature '{0}' is not supported by target runtime. - Feature '{0}' is not supported by target runtime. + El entorno de ejecución de destino no admite la característica "{0}". @@ -54,52 +54,47 @@ 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} - 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} + No se pudo cargar el ensamblado del diseñador de proveedores de tipos "{0}" desde la carpeta "{1}" porque falta una dependencia o no se pudo cargar. Todas las dependencias del ensamblado del diseñador de proveedores de tipos deben encontrarse en la misma carpeta que el ensamblado. Se notificó la excepción: {2} - {3}. The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} - The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} + No se pudo cargar el ensamblado del diseñador de proveedores de tipos "{0}" desde la carpeta "{1}". Se notificó la excepción: {2} - {3}. Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - - - - {0} for F# {1} - {0} para F# {1} + El atributo de ensamblado "{0}" hace referencia a un ensamblado de diseñador "{1}" que no se puede cargar o no existe. Se notificó la excepción: {2} - {3}. applicative computation expressions - applicative computation expressions + expresiones de cálculo aplicativas default interface member consumption - default interface member consumption + consumo de miembros de interfaz predeterminados dotless float32 literal - dotless float32 literal + literal float32 sin punto fixed-index slice 3d/4d - fixed-index slice 3d/4d + segmento de índice fijo 3d/4d from-end slicing - from-end slicing + segmentación desde el final implicit yield - implicit yield + elemento yield implícito @@ -109,42 +104,42 @@ nameof - nameof + nameof nullable optional interop - nullable optional interop + interoperabilidad opcional que admite valores NULL open static classes - open static classes + abrir clases estáticas package management - package management + administración de paquetes whitespace relexation - whitespace relexation + relajación de espacio en blanco single underscore pattern - single underscore pattern + patrón de subrayado simple wild card in for loop - wild card in for loop + carácter comodín en bucle for witness passing for trait constraints in F# quotations - witness passing for trait constraints in F# quotations + paso de testigo para las restricciones de rasgos en las expresiones de código delimitadas de F# @@ -237,6 +232,16 @@ No se puede combinar use! con and! + + Cannot assign a value to another value marked literal + Cannot assign a value to another value marked literal + + + + Cannot assign '{0}' to a value marked literal + Cannot assign '{0}' to a value marked literal + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSource' and 'Bind' methods La construcción "let! ... and! ..." solo se puede usar si el generador de expresiones de cálculo define un método "{0}" o bien los métodos "MergeSource" y "Bind" adecuados. @@ -244,7 +249,7 @@ Interface member '{0}' does not have a most specific implementation. - Interface member '{0}' does not have a most specific implementation. + El miembro de interfaz "{0}" no tiene una implementación más específica. @@ -369,7 +374,7 @@ 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}'. - 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}'. + Todas las ramas de una expresión de coincidencia de patrón deben devolver valores del mismo tipo. La primera rama devolvió un valor de tipo "{0}", pero esta rama devolvió un valor de tipo "\{1 \}". @@ -427,16 +432,6 @@ Archivo de versión '{0}' no válido. - - Microsoft (R) F# Compiler version {0} - Compilador de Microsoft (R) F#, versión {0} - - - - F# Compiler for F# {0} - Compilador F# para F# {0} - - Problem with filename '{0}': {1} Problema con el nombre de archivo '{0}': {1}. @@ -1204,7 +1199,7 @@ The named argument '{0}' has been assigned more than one value - The named argument '{0}' has been assigned more than one value + Se ha asignado más de un valor al argumento con nombre "{0}". @@ -3738,8 +3733,8 @@ - Only record fields and simple, non-recursive 'let' bindings may be marked mutable - Solo los campos de registro y los enlaces 'let' sencillos no recursivos se pueden marcar como mutables + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces @@ -4419,17 +4414,17 @@ Embed all source files in the portable PDB file - Inserta todos los archivos de código fuente en el archivo PDB portátil. + Inserta todos los archivos de código fuente en el archivo PDB portable. Embed specific source files in the portable PDB file - Inserta archivos de código fuente específicos en el archivo PDB portátil + Inserta archivos de código fuente específicos en el archivo PDB portable Source link information file to embed in the portable PDB file - Archivo de información de vínculos de origen para insertar en el archivo PDB portátil + Archivo de información de vínculos de origen para insertar en el archivo PDB portable @@ -4444,7 +4439,7 @@ Source file is too large to embed in a portable PDB - El archivo de código fuente es demasiado grande para insertarlo en un archivo PDB portátil + El archivo de código fuente es demasiado grande para insertarlo en un archivo PDB portable @@ -5779,7 +5774,7 @@ Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). - No se puede usar la vinculación estática en un ensamblado que haga referencia a mscorlib (por ejemplo, un ensamblado de .NET Framework) al generar un ensamblado que haga referencia a System.Runtime (por ejemplo, un ensamblado portátil o de .NET Core). + No se puede usar la vinculación estática en un ensamblado que haga referencia a mscorlib (por ejemplo, un ensamblado de .NET Framework) al generar un ensamblado que haga referencia a System.Runtime (por ejemplo, un ensamblado portable o de .NET Core). @@ -5909,7 +5904,7 @@ Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} + El atributo de ensamblado "{0}" hace referencia a un ensamblado de diseñador "{1}" que no se puede cargar desde la ruta de acceso "{2}". Se notificó la excepción: {3} - {4}. diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf index cc158d8cf4..86b022e3a0 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -4,12 +4,12 @@ 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. + La fonctionnalité '{0}' n'est pas disponible en F# {1}. Utilisez la version de langage {2} ou une version ultérieure. Feature '{0}' is not supported by target runtime. - Feature '{0}' is not supported by target runtime. + La fonctionnalité '{0}' n'est pas prise en charge par le runtime cible. @@ -54,52 +54,47 @@ 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} - 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} + Impossible de charger l'assembly de concepteur de fournisseur de type '{0}' à partir du dossier '{1}', car une dépendance est manquante ou n'a pas pu être chargée. Toutes les dépendances de l'assembly de concepteur de fournisseur de type doivent se trouver dans le même dossier que cet assembly. Exception signalée : {2} - {3} The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} - The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} + Impossible de charger l'assembly de concepteur de fournisseur de type '{0}' à partir du dossier '{1}'. Exception signalée : {2} - {3} Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - - - - {0} for F# {1} - {0} pour F# {1} + L'attribut d'assembly '{0}' fait référence à un assembly de concepteur '{1}' qui ne peut pas être chargé ou qui n'existe pas. Exception signalée : {2} - {3} applicative computation expressions - applicative computation expressions + expressions de calcul applicatives default interface member consumption - default interface member consumption + consommation par défaut des membres d'interface dotless float32 literal - dotless float32 literal + littéral float32 sans point fixed-index slice 3d/4d - fixed-index slice 3d/4d + section à index fixe 3D/4D from-end slicing - from-end slicing + découpage depuis la fin implicit yield - implicit yield + yield implicite @@ -109,42 +104,42 @@ nameof - nameof + nameof nullable optional interop - nullable optional interop + interopérabilité facultative pouvant accepter une valeur null open static classes - open static classes + ouvrir les classes statiques package management - package management + Package Management whitespace relexation - whitespace relexation + assouplissement de la mise en retrait avec des espaces blancs single underscore pattern - single underscore pattern + modèle de trait de soulignement unique wild card in for loop - wild card in for loop + caractère générique dans une boucle for witness passing for trait constraints in F# quotations - witness passing for trait constraints in F# quotations + passage de témoin pour les contraintes de trait dans les quotations F# @@ -237,6 +232,16 @@ use! ne peut pas être combiné avec and! + + Cannot assign a value to another value marked literal + Cannot assign a value to another value marked literal + + + + Cannot assign '{0}' to a value marked literal + Cannot assign '{0}' to a value marked literal + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSource' and 'Bind' methods La construction 'let! ... and! ...' peut uniquement être utilisée si le générateur d'expressions de calcul définit une méthode '{0}' ou les méthodes 'MergeSource' et 'Bind' appropriées @@ -244,7 +249,7 @@ Interface member '{0}' does not have a most specific implementation. - Interface member '{0}' does not have a most specific implementation. + Le membre d'interface '{0}' n'a pas l'implémentation la plus spécifique. @@ -427,16 +432,6 @@ Fichier de version non valide '{0}' - - Microsoft (R) F# Compiler version {0} - Compilateur F# Microsoft (R) version {0} - - - - F# Compiler for F# {0} - Compilateur F# pour F# {0} - - Problem with filename '{0}': {1} Problème avec le nom de fichier '{0}' : {1} @@ -1204,7 +1199,7 @@ The named argument '{0}' has been assigned more than one value - The named argument '{0}' has been assigned more than one value + Plusieurs valeurs ont été affectées à l'argument nommé '{0}' @@ -3738,8 +3733,8 @@ - Only record fields and simple, non-recursive 'let' bindings may be marked mutable - Seuls les champs d'enregistrement et les liaisons 'let' simples non récursives peuvent être marqués comme mutables + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces @@ -5909,7 +5904,7 @@ Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} + L'attribut d'assembly '{0}' fait référence à un assembly de concepteur '{1}' qui ne peut pas être chargé à partir du chemin '{2}'. Exception signalée : {3} - {4} diff --git a/src/fsharp/xlf/FSComp.txt.it.xlf b/src/fsharp/xlf/FSComp.txt.it.xlf index 28a352f71a..9caf160444 100644 --- a/src/fsharp/xlf/FSComp.txt.it.xlf +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -4,12 +4,12 @@ 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. + La funzionalità '{0}' non è disponibile in F# {1}. Usare la versione {2} o versioni successive del linguaggio. Feature '{0}' is not supported by target runtime. - Feature '{0}' is not supported by target runtime. + La funzionalità '{0}' non è supportata dal runtime di destinazione. @@ -54,52 +54,47 @@ 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} - 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} + Non è stato possibile caricare l'assembly '{0}' della finestra di progettazione del provider di tipi dalla cartella '{1}' perché una dipendenza non è presente o non è stato possibile caricarla. Tutte le dipendenze dell'assembly della finestra di progettazione del provider di tipi devono trovarsi nella stessa cartella dell'assembly. L'eccezione restituita è {2} - {3} The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} - The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} + Non è stato possibile caricare l'assembly '{0}' della finestra di progettazione del provider di tipi dalla cartella '{1}'. L'eccezione restituita è {2} - {3} Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - - - - {0} for F# {1} - {0} per F# {1} + L'attributo di assembly '{0}' fa riferimento a un assembly '{1}' della finestra di progettazione che non è stato caricato o non esiste. L'eccezione restituita è {2} - {3} applicative computation expressions - applicative computation expressions + espressioni di calcolo applicativo default interface member consumption - default interface member consumption + utilizzo predefinito dei membri di interfaccia dotless float32 literal - dotless float32 literal + valore letterale float32 senza punti fixed-index slice 3d/4d - fixed-index slice 3d/4d + sezione a indice fisso 3D/4D from-end slicing - from-end slicing + sezionamento dalla fine implicit yield - implicit yield + istruzione yield implicita @@ -109,42 +104,42 @@ nameof - nameof + nameof nullable optional interop - nullable optional interop + Interop facoltativo nullable open static classes - open static classes + classi statiche aperte package management - package management + gestione pacchetti whitespace relexation - whitespace relexation + uso meno restrittivo degli spazi vuoti single underscore pattern - single underscore pattern + criterio per carattere di sottolineatura singolo wild card in for loop - wild card in for loop + carattere jolly nel ciclo for witness passing for trait constraints in F# quotations - witness passing for trait constraints in F# quotations + passaggio del testimone per vincoli di tratto in quotation F# @@ -237,6 +232,16 @@ Non è possibile combinare use! con and! + + Cannot assign a value to another value marked literal + Cannot assign a value to another value marked literal + + + + Cannot assign '{0}' to a value marked literal + Cannot assign '{0}' to a value marked literal + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSource' and 'Bind' methods È possibile usare il costrutto 'let! ... and! ...' solo se il generatore di espressioni di calcolo definisce un metodo '{0}' o metodi 'MergeSource' e 'Bind' appropriati @@ -244,7 +249,7 @@ Interface member '{0}' does not have a most specific implementation. - Interface member '{0}' does not have a most specific implementation. + Il membro di interfaccia '{0}' non contiene un'implementazione più specifica. @@ -427,16 +432,6 @@ File di versione '{0}' non valido - - Microsoft (R) F# Compiler version {0} - Compilatore Microsoft (R) F# versione {0} - - - - F# Compiler for F# {0} - Compilatore F# per F# {0} - - Problem with filename '{0}': {1} Problema con il nome di file '{0}': {1} @@ -1204,7 +1199,7 @@ The named argument '{0}' has been assigned more than one value - The named argument '{0}' has been assigned more than one value + All'argomento denominato '{0}' sono stati assegnati più valori @@ -3738,8 +3733,8 @@ - Only record fields and simple, non-recursive 'let' bindings may be marked mutable - Solo i campi di record e i binding 'let' semplici non ricorsivi possono essere contrassegnati come mutable + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces @@ -4419,22 +4414,22 @@ Embed all source files in the portable PDB file - Incorpora tutti i file di origine nel file PDB portatile + Incorpora tutti i file di origine nel file PDB portabile Embed specific source files in the portable PDB file - Incorpora file di origine specifici nel file PDB portatile + Incorpora file di origine specifici nel file PDB portabile Source link information file to embed in the portable PDB file - File di informazioni sul collegamento all'origine da incorporare nel file PDB portatile + File di informazioni sul collegamento all'origine da incorporare nel file PDB portabile --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) - Opzione --embed supportata solo quando si crea un file PDB portatile (--debug:portable o --debug:embedded) + Opzione --embed supportata solo quando si crea un file PDB portabile (--debug:portable o --debug:embedded) @@ -4444,7 +4439,7 @@ Source file is too large to embed in a portable PDB - Le dimensioni del file di origine sono eccessive per consentirne l'incorporamento in un PDB portatile + Le dimensioni del file di origine sono eccessive per consentirne l'incorporamento in un PDB portabile @@ -5789,7 +5784,7 @@ Deterministic builds only support portable PDBs (--debug:portable or --debug:embedded) - Le compilazioni deterministiche supportano solo file PDB portatili (--debug:portable o --debug:embedded) + Le compilazioni deterministiche supportano solo file PDB portabili (--debug:portable o --debug:embedded) @@ -5909,7 +5904,7 @@ Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} + L'attributo di assembly '{0}' fa riferimento a un assembly '{1}' della finestra di progettazione che non può essere caricato dal percorso '{2}'. L'eccezione restituita è {3} - {4} @@ -7419,7 +7414,7 @@ --pathmap can only be used with portable PDBs (--debug:portable or --debug:embedded) - --pathmap può essere usato solo con file PDB portatili (--debug:portable o --debug:embedded) + --pathmap può essere usato solo con file PDB portabili (--debug:portable o --debug:embedded) diff --git a/src/fsharp/xlf/FSComp.txt.ja.xlf b/src/fsharp/xlf/FSComp.txt.ja.xlf index 53d07ef597..aa5a388c2a 100644 --- a/src/fsharp/xlf/FSComp.txt.ja.xlf +++ b/src/fsharp/xlf/FSComp.txt.ja.xlf @@ -4,12 +4,12 @@ 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. + 機能 '{0}' は F# {1} では使用できません。{2} 以上の言語バージョンをお使いください。 Feature '{0}' is not supported by target runtime. - Feature '{0}' is not supported by target runtime. + 機能 '{0}' は、ターゲット ランタイムではサポートされていません。 @@ -54,52 +54,47 @@ 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} - 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 type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} - The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} + 型プロバイダーのデザイナー アセンブリ '{0}' をフォルダー '{1}' から読み込めませんでした。次の例外が報告されました: {2} - {3} Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - - - - {0} for F# {1} - F# {1} のための {0} + アセンブリ属性 '{0}' は、デザイナー アセンブリ '{1}' を参照していますが、これは読み込むことができないか、存在していません。報告された例外: {2} - {3} applicative computation expressions - applicative computation expressions + 適用できる計算式 default interface member consumption - default interface member consumption + 既定のインターフェイス メンバーの消費 dotless float32 literal - dotless float32 literal + ドットなしの float32 リテラル fixed-index slice 3d/4d - fixed-index slice 3d/4d + 固定インデックス スライス 3d/4d from-end slicing - from-end slicing + 開始と終了を指定したスライス implicit yield - implicit yield + 暗黙的な yield @@ -109,42 +104,42 @@ nameof - nameof + nameof nullable optional interop - nullable optional interop + Null 許容のオプションの相互運用 open static classes - open static classes + 静的クラスを開く package management - package management + パッケージの管理 whitespace relexation - whitespace relexation + 空白の緩和 single underscore pattern - single underscore pattern + 単一のアンダースコア パターン wild card in for loop - wild card in for loop + for ループのワイルド カード witness passing for trait constraints in F# quotations - witness passing for trait constraints in F# quotations + F# 引用での特性制約に対する監視の引き渡し @@ -237,6 +232,16 @@ use! を and! と組み合わせて使用することはできません + + Cannot assign a value to another value marked literal + Cannot assign a value to another value marked literal + + + + Cannot assign '{0}' to a value marked literal + Cannot assign '{0}' to a value marked literal + + 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' メソッドのいずれかを定義している場合にのみ使用できます @@ -244,7 +249,7 @@ Interface member '{0}' does not have a most specific implementation. - Interface member '{0}' does not have a most specific implementation. + インターフェイス メンバー '{0}' には最も固有な実装がありません。 @@ -427,16 +432,6 @@ バージョン ファイル '{0}' が無効です - - Microsoft (R) F# Compiler version {0} - Microsoft (R) F# Compiler バージョン {0} - - - - F# Compiler for F# {0} - F# {0} の F# コンパイラ - - Problem with filename '{0}': {1} ファイル名 '{0}' に問題があります: {1} @@ -1204,7 +1199,7 @@ The named argument '{0}' has been assigned more than one value - The named argument '{0}' has been assigned more than one value + 名前付き引数 '{0}' に複数の値が割り当てられました @@ -3738,8 +3733,8 @@ - Only record fields and simple, non-recursive 'let' bindings may be marked mutable - 'mutable' とマークできるのはレコード フィールドと単純で非再帰的な 'let' バインディングのみです + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces @@ -4419,32 +4414,32 @@ Embed all source files in the portable PDB file - ポータブル PDB ファイル内にすべてのソース ファイルを埋め込む + 移植可能な PDB ファイル内にすべてのソース ファイルを埋め込む Embed specific source files in the portable PDB file - ポータブル PDB ファイル内に特定のソース ファイルを埋め込む + 移植可能な PDB ファイル内に特定のソース ファイルを埋め込む Source link information file to embed in the portable PDB file - ポータブル PDB ファイルに埋め込むソース リンク情報ファイル + 移植可能な PDB ファイルに埋め込むソース リンク情報ファイル --embed switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) - --embed スイッチは、ポータブル PDB の生成時にのみサポートされます (--debug:portable または --debug:embedded) + --embed スイッチは、移植可能な PDB の生成時にのみサポートされます (--debug:portable または --debug:embedded) --sourcelink switch only supported when emitting a Portable PDB (--debug:portable or --debug:embedded) - --sourcelink スイッチは、ポータブル PDB の生成時にのみサポートされます (--debug:portable または --debug:embedded) + --sourcelink スイッチは、移植可能な PDB の生成時にのみサポートされます (--debug:portable または --debug:embedded) Source file is too large to embed in a portable PDB - ソース ファイルが大きすぎるので、ポータブル PDB 内に埋め込めません + ソース ファイルが大きすぎるので、移植可能な PDB 内に埋め込めません @@ -5779,7 +5774,7 @@ Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). - 静的リンクは、System.Runtime (.NET Core またはポータブル アセンブリなど) を参照するアセンブリを生成する場合、mscorlib (.NET Framework アセンブリなど) を参照するアセンブリには使用できません。 + 静的リンクは、System.Runtime (.NET Core または移植可能なアセンブリなど) を参照するアセンブリを生成する場合、mscorlib (.NET Framework アセンブリなど) を参照するアセンブリには使用できません。 @@ -5909,7 +5904,7 @@ Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} + アセンブリ属性 '{0}' は、デザイナー アセンブリ '{1}' を参照していますが、これはパス '{2}' から読み込むことができません。報告された例外: {3} - {4} diff --git a/src/fsharp/xlf/FSComp.txt.ko.xlf b/src/fsharp/xlf/FSComp.txt.ko.xlf index cd857ba213..60d43fa763 100644 --- a/src/fsharp/xlf/FSComp.txt.ko.xlf +++ b/src/fsharp/xlf/FSComp.txt.ko.xlf @@ -4,12 +4,12 @@ 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. + '{0}' 기능은 F# {1}에서 사용할 수 없습니다. {2} 이상의 언어 버전을 사용하세요. Feature '{0}' is not supported by target runtime. - Feature '{0}' is not supported by target runtime. + '{0}' 기능은 대상 런타임에서 지원되지 않습니다. @@ -54,52 +54,47 @@ 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} - 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 type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} - The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} + '{0}' 형식 공급자 디자이너 어셈블리를 '{1}' 폴더에서 로드할 수 없습니다. 보고된 예외: {2} - {3} Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - - - - {0} for F# {1} - F# {1}용 {0} + '{0}' 어셈블리 특성이 로드할 수 없거나 존재하지 않는 디자이너 어셈블리'{1}'을(를) 참조합니다. 보고된 예외: {2} - {3} applicative computation expressions - applicative computation expressions + 적용 가능한 계산 식 default interface member consumption - default interface member consumption + 기본 인터페이스 멤버 사용 dotless float32 literal - dotless float32 literal + 점이 없는 float32 리터럴 fixed-index slice 3d/4d - fixed-index slice 3d/4d + 고정 인덱스 슬라이스 3d/4d from-end slicing - from-end slicing + 끝에서부터 조각화 implicit yield - implicit yield + 암시적 yield @@ -109,42 +104,42 @@ nameof - nameof + nameof nullable optional interop - nullable optional interop + nullable 선택적 interop open static classes - open static classes + 정적 클래스 열기 package management - package management + 패키지 관리 whitespace relexation - whitespace relexation + 공백 완화 single underscore pattern - single underscore pattern + 단일 밑줄 패턴 wild card in for loop - wild card in for loop + for 루프의 와일드카드 witness passing for trait constraints in F# quotations - witness passing for trait constraints in F# quotations + F# 인용의 특성 제약 조건에 대한 감시 전달 @@ -237,6 +232,16 @@ use!는 and!와 함께 사용할 수 없습니다. + + Cannot assign a value to another value marked literal + Cannot assign a value to another value marked literal + + + + Cannot assign '{0}' to a value marked literal + Cannot assign '{0}' to a value marked literal + + 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' 메서드를 정의한 경우에만 사용할 수 있습니다. @@ -244,7 +249,7 @@ Interface member '{0}' does not have a most specific implementation. - Interface member '{0}' does not have a most specific implementation. + 인터페이스 멤버 '{0}'에 가장 한정적인 구현이 없습니다. @@ -427,16 +432,6 @@ 버전 파일 '{0}'이(가) 잘못되었습니다. - - Microsoft (R) F# Compiler version {0} - Microsoft (R) F# Compiler 버전 {0} - - - - F# Compiler for F# {0} - F# {0}에 대한 F# 컴파일러 - - Problem with filename '{0}': {1} 파일 이름 '{0}'에 문제가 있습니다. {1} @@ -1204,7 +1199,7 @@ The named argument '{0}' has been assigned more than one value - The named argument '{0}' has been assigned more than one value + 명명된 인수 '{0}'에 둘 이상의 값이 할당되었습니다. @@ -3738,8 +3733,8 @@ - Only record fields and simple, non-recursive 'let' bindings may be marked mutable - 레코드 필드 및 단순, 비재귀적 'let' 바인딩만 mutable로 표시할 수 있습니다. + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces @@ -5909,7 +5904,7 @@ Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} + 어셈블리 특성 '{0}'은(는) '{2}' 경로에서 로드할 수 없는 디자이너 어셈블리 '{1}'을(를) 참조합니다. 보고된 예외: {3} - {4} diff --git a/src/fsharp/xlf/FSComp.txt.pl.xlf b/src/fsharp/xlf/FSComp.txt.pl.xlf index 8b9d38f36a..34d162bfa5 100644 --- a/src/fsharp/xlf/FSComp.txt.pl.xlf +++ b/src/fsharp/xlf/FSComp.txt.pl.xlf @@ -4,12 +4,12 @@ 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. + Funkcja „{0}” nie jest dostępna w języku F# {1}. Użyj języka w wersji {2} lub nowszej. Feature '{0}' is not supported by target runtime. - Feature '{0}' is not supported by target runtime. + Funkcja „{0}” nie jest obsługiwana przez docelowe środowisko uruchomieniowe. @@ -54,52 +54,47 @@ 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} - 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} + Nie można załadować zestawu projektanta dostawców typów „{0}” z folderu „{1}”, ponieważ brakuje zależności lub nie można jej załadować. Wszystkie zależności zestawu projektanta dostawców typów muszą znajdować się w tym samym folderze co ten zestaw. Zgłoszony wyjątek: {2} — {3} The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} - The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} + Nie można załadować zestawu projektanta dostawców typów „{0}” z folderu „{1}”. Zgłoszony wyjątek: {2} — {3} Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - - - - {0} for F# {1} - {0} dla języka F# {1} + Atrybut zestawu „{0}” odwołuje się do zestawu projektanta „{1}”, którego nie można załadować lub który nie istnieje. Zgłoszony wyjątek: {2} — {3} applicative computation expressions - applicative computation expressions + praktyczne wyrażenia obliczeniowe default interface member consumption - default interface member consumption + domyślne użycie składowej interfejsu dotless float32 literal - dotless float32 literal + bezkropkowy literał float32 fixed-index slice 3d/4d - fixed-index slice 3d/4d + część o stałym indeksie 3d/4d from-end slicing - from-end slicing + wycinanie od końca implicit yield - implicit yield + niejawne słowo kluczowe yield @@ -109,42 +104,42 @@ nameof - nameof + nameof nullable optional interop - nullable optional interop + opcjonalna międzyoperacyjność dopuszczająca wartość null open static classes - open static classes + otwórz klasy statyczne package management - package management + zarządzanie pakietami whitespace relexation - whitespace relexation + rozluźnianie reguł dotyczących odstępów single underscore pattern - single underscore pattern + wzorzec z pojedynczym podkreśleniem wild card in for loop - wild card in for loop + symbol wieloznaczny w pętli for witness passing for trait constraints in F# quotations - witness passing for trait constraints in F# quotations + monitor, który przekazuje ograniczenia cech języka F# @@ -237,6 +232,16 @@ Elementu use! nie można łączyć z elementem and! + + Cannot assign a value to another value marked literal + Cannot assign a value to another value marked literal + + + + Cannot assign '{0}' to a value marked literal + Cannot assign '{0}' to a value marked literal + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSource' and 'Bind' methods Konstrukcji „let! ... and! ...” można użyć tylko wtedy, gdy konstruktor wyrażeń obliczeniowych definiuje metodę „{0}” lub odpowiednie metody „MergeSource” i „Bind” @@ -244,7 +249,7 @@ Interface member '{0}' does not have a most specific implementation. - Interface member '{0}' does not have a most specific implementation. + Składowa interfejsu „{0}” nie ma najbardziej specyficznej implementacji. @@ -427,16 +432,6 @@ Nieprawidłowy plik wersji „{0}” - - Microsoft (R) F# Compiler version {0} - Wersja {0} kompilatora języka Microsoft (R) F# - - - - F# Compiler for F# {0} - Kompilator języka F# dla języka F# {0} - - Problem with filename '{0}': {1} Problem z nazwą pliku „{0}”: {1} @@ -1204,7 +1199,7 @@ The named argument '{0}' has been assigned more than one value - The named argument '{0}' has been assigned more than one value + Do nazwanego argumentu „{0}” przypisano więcej niż jedną wartość @@ -3738,8 +3733,8 @@ - Only record fields and simple, non-recursive 'let' bindings may be marked mutable - Tylko pola rekordów i proste, niecykliczne powiązania „let” mogą być oznaczone jako modyfikowalne + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces @@ -5909,7 +5904,7 @@ Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} + Atrybut zestawu „{0}” odwołuje się do zestawu projektanta „{1}”, którego nie można załadować ze ścieżki „{2}”. Zgłoszony wyjątek: {3} — {4} diff --git a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf index 4dd0ec18ee..9ee6409b21 100644 --- a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf +++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf @@ -4,12 +4,12 @@ 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. + O recurso '{0}' não está disponível no F# {1}. Use a versão da linguagem {2} ou superior. Feature '{0}' is not supported by target runtime. - Feature '{0}' is not supported by target runtime. + O recurso '{0}' não é compatível com o runtime de destino. @@ -54,52 +54,47 @@ 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} - 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} + Não foi possível carregar o assembly do designer do provedor de tipos '{0}' da pasta '{1}' porque uma dependência estava ausente ou não pôde ser carregada. Todas as dependências do assembly do designer do provedor de tipos precisam estar localizadas na mesma pasta que esse assembly. A exceção relatada foi: {2} – {3} The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} - The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} + Não foi possível carregar o assembly do designer do provedor de tipos '{0}' da pasta '{1}'. A exceção relatada foi: {2} – {3} Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - - - - {0} for F# {1} - {0} para F# {1} + O atributo de assembly '{0}' refere-se a um assembly de designer '{1}' que não pode ser carregado ou que não existe. A exceção relatada foi {2} – {3} applicative computation expressions - applicative computation expressions + expressões de computação aplicáveis default interface member consumption - default interface member consumption + consumo de membro da interface padrão dotless float32 literal - dotless float32 literal + literal float32 sem ponto fixed-index slice 3d/4d - fixed-index slice 3d/4d + fatia de índice fixo 3d/4d from-end slicing - from-end slicing + divisão começando no final implicit yield - implicit yield + yield implícito @@ -109,42 +104,42 @@ nameof - nameof + nameof nullable optional interop - nullable optional interop + interoperabilidade opcional anulável open static classes - open static classes + abrir classes estáticas package management - package management + gerenciamento de pacotes whitespace relexation - whitespace relexation + atenuação de espaço em branco single underscore pattern - single underscore pattern + padrão de sublinhado simples wild card in for loop - wild card in for loop + curinga para loop witness passing for trait constraints in F# quotations - witness passing for trait constraints in F# quotations + passagem de testemunha para restrições de característica nas citações do F# @@ -237,6 +232,16 @@ use! não pode ser combinado com and! + + Cannot assign a value to another value marked literal + Cannot assign a value to another value marked literal + + + + Cannot assign '{0}' to a value marked literal + Cannot assign '{0}' to a value marked literal + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSource' and 'Bind' methods O constructo 'let! ... and! ...' só pode ser usado se o construtor de expressões de computação definir um método '{0}' ou um método 'MergeSource' ou 'Bind' apropriado @@ -244,7 +249,7 @@ Interface member '{0}' does not have a most specific implementation. - Interface member '{0}' does not have a most specific implementation. + O membro de interface '{0}' não tem uma implementação mais específica. @@ -427,16 +432,6 @@ Arquivo de versão inválida '{0}' - - Microsoft (R) F# Compiler version {0} - Compilador Microsoft (R) F# versão {0} - - - - F# Compiler for F# {0} - Compilador F# para F# {0} - - Problem with filename '{0}': {1} Problema com nome de arquivo '{0}': {1} @@ -1204,7 +1199,7 @@ The named argument '{0}' has been assigned more than one value - The named argument '{0}' has been assigned more than one value + Foi atribuído mais de um valor a um argumento nomeado '{0}' @@ -3738,8 +3733,8 @@ - Only record fields and simple, non-recursive 'let' bindings may be marked mutable - Apenas campos de registro e associações 'let' simples e não recursivas podem ser marcados como mutáveis + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces @@ -5909,7 +5904,7 @@ Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} + O atributo de assembly '{0}' se refere a um assembly de designer '{1}' que não pode ser carregado do caminho '{2}'. A exceção relatada foi: {3} – {4} diff --git a/src/fsharp/xlf/FSComp.txt.ru.xlf b/src/fsharp/xlf/FSComp.txt.ru.xlf index 56b8c542b0..089fd6d57b 100644 --- a/src/fsharp/xlf/FSComp.txt.ru.xlf +++ b/src/fsharp/xlf/FSComp.txt.ru.xlf @@ -4,12 +4,12 @@ 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. + Компонент "{0}" недоступен в F# {1}. Используйте версию языка {2} или выше. Feature '{0}' is not supported by target runtime. - Feature '{0}' is not supported by target runtime. + Компонент "{0}" не поддерживается целевой средой выполнения. @@ -54,52 +54,47 @@ 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} - 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 type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} - The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} + Не удалось загрузить сборку конструктора поставщика типа "{0}" из папки "{1}". Получено исключение: {2} — {3} Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - - - - {0} for F# {1} - {0} для F# {1} + Атрибут сборки "{0}" ссылается на сборку конструктора "{1}", которая не может быть загружена или не существует. Получено исключение: {2} — {3} applicative computation expressions - applicative computation expressions + применимые вычислительные выражения default interface member consumption - default interface member consumption + использование элемента интерфейса по умолчанию dotless float32 literal - dotless float32 literal + литерал float32 без точки fixed-index slice 3d/4d - fixed-index slice 3d/4d + срез с фиксированным индексом 3d/4d from-end slicing - from-end slicing + срезы от конца implicit yield - implicit yield + неявное использование yield @@ -109,42 +104,42 @@ nameof - nameof + nameof nullable optional interop - nullable optional interop + необязательное взаимодействие, допускающее значение NULL open static classes - open static classes + открытые статические классы package management - package management + управление пакетами whitespace relexation - whitespace relexation + уменьшение строгости для пробелов single underscore pattern - single underscore pattern + шаблон с одним подчеркиванием wild card in for loop - wild card in for loop + подстановочный знак в цикле for witness passing for trait constraints in F# quotations - witness passing for trait constraints in F# quotations + передача свидетеля для ограничений признаков в цитированиях F# @@ -237,6 +232,16 @@ use! запрещено сочетать с and! + + Cannot assign a value to another value marked literal + Cannot assign a value to another value marked literal + + + + Cannot assign '{0}' to a value marked literal + Cannot assign '{0}' to a value marked literal + + 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" @@ -244,7 +249,7 @@ Interface member '{0}' does not have a most specific implementation. - Interface member '{0}' does not have a most specific implementation. + Элемент интерфейса "{0}" не имеет наиболее конкретной реализации. @@ -427,16 +432,6 @@ Недопустимый файл версии "{0}" - - Microsoft (R) F# Compiler version {0} - Microsoft (R) F# Compiler, версия {0} - - - - F# Compiler for F# {0} - Компилятор F# для F# {0} - - Problem with filename '{0}': {1} Ошибка в имени файла "{0}": {1} @@ -1204,7 +1199,7 @@ The named argument '{0}' has been assigned more than one value - The named argument '{0}' has been assigned more than one value + Именованному аргументу "{0}" было присвоено несколько значений @@ -3738,8 +3733,8 @@ - Only record fields and simple, non-recursive 'let' bindings may be marked mutable - Только поля записей и простые нерекурсивные привязки "let" могут быть помечены как изменяемые + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces @@ -5909,7 +5904,7 @@ Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} + Атрибут сборки "{0}" ссылается на сборку конструктора "{1}", которая не может быть загружена по пути "{2}". Получено исключение: {3} — {4} diff --git a/src/fsharp/xlf/FSComp.txt.tr.xlf b/src/fsharp/xlf/FSComp.txt.tr.xlf index dc434b9351..7eb254d812 100644 --- a/src/fsharp/xlf/FSComp.txt.tr.xlf +++ b/src/fsharp/xlf/FSComp.txt.tr.xlf @@ -4,12 +4,12 @@ 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. + '{0}' özelliği F# {1} sürümünde kullanılamıyor. Lütfen {2} veya daha yüksek bir dil sürümünü kullanın. Feature '{0}' is not supported by target runtime. - Feature '{0}' is not supported by target runtime. + '{0}' özelliği hedef çalışma zamanı tarafından desteklenmiyor. @@ -54,52 +54,47 @@ 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} - 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}' tür sağlayıcısı tasarımcı bütünleştirilmiş kodu, bir bağımlılık eksik olduğundan veya yüklenemediğinden '{1}' klasöründen yüklenemedi. Tür sağlayıcısı tasarımcısı bütünleştirilmiş kodunun tüm bağımlılıkları, ilgili bütünleştirilmiş kodun bulunduğu klasörde bulunmalıdır. Bildirilen özel durum: {2} - {3} The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} - The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} + '{0}' tür sağlayıcısı tasarımcı bütünleştirilmiş kodu '{1}' klasöründen yüklenemedi. Bildirilen özel durum: {2} - {3} Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - - - - {0} for F# {1} - F# {1} için {0} + '{0}' bütünleştirilmiş kod özniteliği, yüklenemeyen veya mevcut olmayan '{1}' tasarımcı bütünleştirilmiş koduna başvuruyor. Bildirilen özel durum: {2} - {3} applicative computation expressions - applicative computation expressions + uygulama hesaplama ifadeleri default interface member consumption - default interface member consumption + varsayılan arabirim üyesi tüketimi dotless float32 literal - dotless float32 literal + noktasız float32 sabit değeri fixed-index slice 3d/4d - fixed-index slice 3d/4d + sabit dizinli dilim 3d/4d from-end slicing - from-end slicing + uçtan dilimleme implicit yield - implicit yield + örtük yield @@ -109,42 +104,42 @@ nameof - nameof + nameof nullable optional interop - nullable optional interop + null atanabilir isteğe bağlı birlikte çalışma open static classes - open static classes + açık statik sınıflar package management - package management + paket yönetimi whitespace relexation - whitespace relexation + boşluk genişlemesi single underscore pattern - single underscore pattern + tek alt çizgi deseni wild card in for loop - wild card in for loop + for döngüsünde joker karakter witness passing for trait constraints in F# quotations - witness passing for trait constraints in F# quotations + F# alıntılarındaki nitelik kısıtlamaları için tanık geçirme @@ -237,6 +232,16 @@ use!, and! ile birleştirilemez + + Cannot assign a value to another value marked literal + Cannot assign a value to another value marked literal + + + + Cannot assign '{0}' to a value marked literal + Cannot assign '{0}' to a value marked literal + + 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! ...' yapısı, yalnızca hesaplama ifadesi oluşturucu bir '{0}' metodunu ya da uygun 'MergeSource' ve 'Bind' metotlarını tanımlarsa kullanılabilir @@ -244,7 +249,7 @@ Interface member '{0}' does not have a most specific implementation. - Interface member '{0}' does not have a most specific implementation. + '{0}' arabirim üyesinin en belirgin uygulaması yok. @@ -427,16 +432,6 @@ Geçersiz dosya sürümü '{0}' - - Microsoft (R) F# Compiler version {0} - Microsoft (R) F# Derleyicisi sürümü {0} - - - - F# Compiler for F# {0} - F# {0} için F# Derleyicisi - - Problem with filename '{0}': {1} Dosya adında hata: '{0}': {1} @@ -1204,7 +1199,7 @@ The named argument '{0}' has been assigned more than one value - The named argument '{0}' has been assigned more than one value + '{0}' adlandırılmış bağımsız değişkeni birden fazla değere atanmış @@ -3738,8 +3733,8 @@ - Only record fields and simple, non-recursive 'let' bindings may be marked mutable - Yalnızca kayıt alanları ve basit, özyinelemeli olmayan 'let' bağlamaları değişebilir olarak işaretlenebilir + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces @@ -5909,7 +5904,7 @@ Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} + '{0}' bütünleştirilmiş kod özniteliği, '{2}' yolundan yüklenemeyen '{1}' tasarımcı bütünleştirilmiş koduna başvuruyor. Bildirilen özel durum: {3} - {4} diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf index 3dddbf576b..b74ae3d462 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf @@ -4,12 +4,12 @@ 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. + 功能“{0}”在 F# {1} 中不可用。请使用 {2} 或更高的语言版本。 Feature '{0}' is not supported by target runtime. - Feature '{0}' is not supported by target runtime. + 目标运行时不支持功能“{0}”。 @@ -54,52 +54,47 @@ 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} - 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} + 无法从文件夹“{1}”加载类型提供程序设计器程序集“{0}”,因为依赖项缺失或无法加载。类型提供程序设计器程序集的所有依赖项必须与该程序集位于同一文件夹中。报告的异常是: {2} - {3} The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} - The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} + 未能从文件夹“{1}”加载类型提供程序设计器程序集“{0}”。报告的异常是: {2} - {3} Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - - - - {0} for F# {1} - F# {1} 的 {0} + 程序集属性“{0}”引用了无法加载或不存在的设计器程序集“{1}”。报告的异常是: {2} - {3} applicative computation expressions - applicative computation expressions + 适用的计算表达式 default interface member consumption - default interface member consumption + 默认接口成员消耗 dotless float32 literal - dotless float32 literal + 无点 float32 文本 fixed-index slice 3d/4d - fixed-index slice 3d/4d + 固定索引切片 3d/4d from-end slicing - from-end slicing + 从端切片 implicit yield - implicit yield + 隐式 yield @@ -109,42 +104,42 @@ nameof - nameof + nameof nullable optional interop - nullable optional interop + 可以为 null 的可选互操作 open static classes - open static classes + 打开静态类 package management - package management + 包管理 whitespace relexation - whitespace relexation + 空格松弛法 single underscore pattern - single underscore pattern + 单下划线模式 wild card in for loop - wild card in for loop + for 循环中的通配符 witness passing for trait constraints in F# quotations - witness passing for trait constraints in F# quotations + F# 引号中特征约束的见证传递 @@ -237,6 +232,16 @@ use! 不得与 and! 结合使用 + + Cannot assign a value to another value marked literal + Cannot assign a value to another value marked literal + + + + Cannot assign '{0}' to a value marked literal + Cannot assign '{0}' to a value marked literal + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSource' and 'Bind' methods 仅当计算表达式生成器定义了 "{0}" 方法或适当的 "MergeSource" 和 "Bind" 方法时,才可以使用 "let! ... and! ..." 构造 @@ -244,7 +249,7 @@ Interface member '{0}' does not have a most specific implementation. - Interface member '{0}' does not have a most specific implementation. + 接口成员“{0}”没有最具体的实现。 @@ -427,16 +432,6 @@ 版本文件“{0}”无效 - - Microsoft (R) F# Compiler version {0} - Microsoft(R) F# 编译器版本 {0} - - - - F# Compiler for F# {0} - 适用于 F# {0} 的 F# 编译器 - - Problem with filename '{0}': {1} 文件名“{0}”存在问题: {1} @@ -1204,7 +1199,7 @@ The named argument '{0}' has been assigned more than one value - The named argument '{0}' has been assigned more than one value + 已向命名参数“{0}”分配多个值 @@ -3738,8 +3733,8 @@ - Only record fields and simple, non-recursive 'let' bindings may be marked mutable - 只有记录字段和简单的非递归 "let" 绑定可能会被标记为“可变” + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces @@ -5909,7 +5904,7 @@ Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} + 程序集属性“{0}”引用了无法从路径“{2}”加载的设计器程序集“{1}”。报告的异常是: {3} - {4} diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf index cff0c65064..cfe529fcd9 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf @@ -4,12 +4,12 @@ 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. + F# {1} 中無法使用 '{0}' 功能。請使用語言版本 {2} 或更新的版本。 Feature '{0}' is not supported by target runtime. - Feature '{0}' is not supported by target runtime. + 目標執行階段不支援功能 '{0}'。 @@ -54,52 +54,47 @@ 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} - 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} + 因為缺少相依性或相依性無法載入,導致無法從資料夾 '{1}' 載入類型提供者設計工具組件 '{0}'。類型提供者設計工具組件的所有相依性都必須位於該組件所在的資料夾內。回報的例外狀況: {2} - {3} The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} - The type provider designer assembly '{0}' could not be loaded from folder '{1}'. The exception reported was: {2} - {3} + 無法從資料夾 '{1}' 載入類型提供者設計工具組件 '{0}'。回報的例外狀況: {2} - {3} Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded or doesn't exist. The exception reported was: {2} - {3} - - - - {0} for F# {1} - F # {1} 的 {0} + 無法載入組件屬性 '{0}' 參考的設計工具組件 '{1}' 或其不存在。回報的例外狀況: {2} - {3} applicative computation expressions - applicative computation expressions + 適用的計算運算式 default interface member consumption - default interface member consumption + 預設介面成員使用 dotless float32 literal - dotless float32 literal + 無點號的 float32 常值 fixed-index slice 3d/4d - fixed-index slice 3d/4d + 固定索引切割 3d/4d from-end slicing - from-end slicing + 從尾端切割 implicit yield - implicit yield + 隱含 yield @@ -109,42 +104,42 @@ nameof - nameof + nameof nullable optional interop - nullable optional interop + 可為 Null 的選擇性 Interop open static classes - open static classes + 開啟靜態類別 package management - package management + 套件管理 whitespace relexation - whitespace relexation + 空白字元放寬 single underscore pattern - single underscore pattern + 單一底線模式 wild card in for loop - wild card in for loop + for 迴圈中的萬用字元 witness passing for trait constraints in F# quotations - witness passing for trait constraints in F# quotations + 用於 F# 引號中特徵條件約束的見證傳遞 @@ -237,6 +232,16 @@ use! 不可與 and! 合併 + + Cannot assign a value to another value marked literal + Cannot assign a value to another value marked literal + + + + Cannot assign '{0}' to a value marked literal + Cannot assign '{0}' to a value marked literal + + The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '{0}' method or appropriate 'MergeSource' and 'Bind' methods 只有在計算運算式產生器定義 '{0}' 方法或正確的 'MergeSource' 和 'Bind' 方法時,才可使用 'let! ... and! ...' 建構 @@ -244,7 +249,7 @@ Interface member '{0}' does not have a most specific implementation. - Interface member '{0}' does not have a most specific implementation. + 介面成員 '{0}' 沒有最具體的實作。 @@ -427,16 +432,6 @@ 無效的版本檔案 '{0}' - - Microsoft (R) F# Compiler version {0} - Microsoft (R) F# 編譯器版本 {0} - - - - F# Compiler for F# {0} - 適用於 F# {0} 的 F# 編譯器 - - Problem with filename '{0}': {1} 檔名 '{0}' 有問題: {1} @@ -1204,7 +1199,7 @@ The named argument '{0}' has been assigned more than one value - The named argument '{0}' has been assigned more than one value + 為具名引數 '{0}' 指派了多個值 @@ -3738,8 +3733,8 @@ - Only record fields and simple, non-recursive 'let' bindings may be marked mutable - 只有記錄欄位及簡單的非遞迴 'let' 繫結可以標記為可變動 + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces + Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces @@ -5909,7 +5904,7 @@ Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} - Assembly attribute '{0}' refers to a designer assembly '{1}' which cannot be loaded from path '{2}'. The exception reported was: {3} - {4} + 無法從路徑 '{2}' 載入組件屬性 '{0}' 參考的設計工具組件 '{1}'。回報告的例外狀況: {3} - {4} diff --git a/src/fsharp/xlf/FSStrings.cs.xlf b/src/fsharp/xlf/FSStrings.cs.xlf index fc719cd81a..c3d39051c6 100644 --- a/src/fsharp/xlf/FSStrings.cs.xlf +++ b/src/fsharp/xlf/FSStrings.cs.xlf @@ -69,7 +69,7 @@ Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name. - Identifikátory proměnných psané velkými písmeny se ve vzorech obecně nedoporučují. Můžou označovat špatně napsaný název vzoru. + Identifikátory proměnných psané velkými písmeny se ve vzorech obecně nedoporučují. Můžou označovat chybějící otevřenou deklaraci nebo špatně napsaný název vzoru. diff --git a/src/fsharp/xlf/FSStrings.de.xlf b/src/fsharp/xlf/FSStrings.de.xlf index c9bf6de009..6332b4ec4e 100644 --- a/src/fsharp/xlf/FSStrings.de.xlf +++ b/src/fsharp/xlf/FSStrings.de.xlf @@ -69,7 +69,7 @@ Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name. - Variablenbezeichner in Großbuchstaben sollten im Allgemeinen nicht in Mustern verwendet werden und können ein Hinweis auf einen falsch geschriebenen Musternamen sein. + Variablenbezeichner in Großbuchstaben sollten im Allgemeinen nicht in Mustern verwendet werden und können ein Hinweis auf eine fehlende open-Deklaration oder einen falsch geschriebenen Musternamen sein. diff --git a/src/fsharp/xlf/FSStrings.es.xlf b/src/fsharp/xlf/FSStrings.es.xlf index 21f3c4ab7a..d174ca2d37 100644 --- a/src/fsharp/xlf/FSStrings.es.xlf +++ b/src/fsharp/xlf/FSStrings.es.xlf @@ -69,7 +69,7 @@ Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name. - En general, los identificadores de variable en mayúscula no deben usarse en patrones y pueden indicar un nombre de patrón mal escrito. + En general, los identificadores de variables en mayúscula no deben usarse en patrones y pueden indicar una declaración abierta que falta o un nombre de patrón mal escrito. diff --git a/src/fsharp/xlf/FSStrings.fr.xlf b/src/fsharp/xlf/FSStrings.fr.xlf index 0b3644d731..15144388a8 100644 --- a/src/fsharp/xlf/FSStrings.fr.xlf +++ b/src/fsharp/xlf/FSStrings.fr.xlf @@ -69,7 +69,7 @@ Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name. - En règle générale, les identificateurs de variable en majuscules ne doivent pas être utilisés dans les modèles. En outre, ils peuvent indiquer une erreur d'orthographe dans le nom du modèle. + Les identificateurs de variables en majuscules ne doivent généralement pas être utilisés dans les modèles. Ils peuvent indiquer une absence de déclaration open ou un nom de modèle mal orthographié. diff --git a/src/fsharp/xlf/FSStrings.it.xlf b/src/fsharp/xlf/FSStrings.it.xlf index 9715ec1682..6c77284981 100644 --- a/src/fsharp/xlf/FSStrings.it.xlf +++ b/src/fsharp/xlf/FSStrings.it.xlf @@ -69,7 +69,7 @@ Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name. - In genere non è consigliabile usare identificatori di variabili in lettere maiuscole nei criteri perché potrebbero indicare un nome di criterio con ortografia errata. + In genere è consigliabile non usare identificatori di variabili scritti in maiuscolo nei criteri perché potrebbero indicare una dichiarazione OPEN mancante o un nome di criterio con ortografia errata. diff --git a/src/fsharp/xlf/FSStrings.ja.xlf b/src/fsharp/xlf/FSStrings.ja.xlf index e055cf262f..85255ccd59 100644 --- a/src/fsharp/xlf/FSStrings.ja.xlf +++ b/src/fsharp/xlf/FSStrings.ja.xlf @@ -69,7 +69,7 @@ Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name. - 通常、大文字の変数識別子はパターンに使用しません。また、つづりが間違っているパターン名を示す可能性があります。 + 通常、大文字の変数識別子はパターンに使用できません。また、欠落している open 宣言か、つづりが間違っているパターン名を示す可能性があります。 diff --git a/src/fsharp/xlf/FSStrings.ko.xlf b/src/fsharp/xlf/FSStrings.ko.xlf index 62147543f8..24e250ef6a 100644 --- a/src/fsharp/xlf/FSStrings.ko.xlf +++ b/src/fsharp/xlf/FSStrings.ko.xlf @@ -69,7 +69,7 @@ Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name. - 일반적으로 대문자 변수 식별자는 패턴에 사용하지 말아야 합니다. 이러한 식별자는 철자가 잘못된 패턴 이름을 나타낼 수 있습니다. + 일반적으로 대문자 변수 식별자는 패턴에 사용하지 말아야 합니다. 이러한 식별자는 열려 있는 선언이 없거나 철자가 잘못된 패턴 이름을 나타낼 수 있습니다. diff --git a/src/fsharp/xlf/FSStrings.pl.xlf b/src/fsharp/xlf/FSStrings.pl.xlf index 0feea19067..341db2e351 100644 --- a/src/fsharp/xlf/FSStrings.pl.xlf +++ b/src/fsharp/xlf/FSStrings.pl.xlf @@ -69,7 +69,7 @@ Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name. - Identyfikatory zmiennych pisane wielkimi literami nie powinny być używane we wzorcach i mogą oznaczać nazwę wzorca z błędami pisowni. + Identyfikatory zmiennych pisane wielkimi literami nie powinny być na ogół używane we wzorcach i mogą oznaczać brak deklaracji otwierającej lub błąd pisowni w nazwie wzorca. diff --git a/src/fsharp/xlf/FSStrings.pt-BR.xlf b/src/fsharp/xlf/FSStrings.pt-BR.xlf index dc96593ddf..7870e19551 100644 --- a/src/fsharp/xlf/FSStrings.pt-BR.xlf +++ b/src/fsharp/xlf/FSStrings.pt-BR.xlf @@ -69,7 +69,7 @@ Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name. - Identificadores de variáveis maiúsculas geralmente não devem ser usados nos padrões, podendo indicar um nome de padrão escrito incorretamente. + Identificadores de variáveis em maiúsculas geralmente não devem ser usados em padrões, podendo indicar uma declaração aberta ausente ou um nome de padrão escrito incorretamente. diff --git a/src/fsharp/xlf/FSStrings.ru.xlf b/src/fsharp/xlf/FSStrings.ru.xlf index c55e25658e..aa0c96193b 100644 --- a/src/fsharp/xlf/FSStrings.ru.xlf +++ b/src/fsharp/xlf/FSStrings.ru.xlf @@ -69,7 +69,7 @@ Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name. - Идентификаторы переменных в верхнем регистре обычно не должны использоваться в шаблонах, и могут указывать на неправильно написанное имя шаблона. + Идентификаторы переменных в верхнем регистре обычно не должны использоваться в шаблонах, и могут указывать на отсутствующую открытую декларацию или неправильно написанное имя шаблона. diff --git a/src/fsharp/xlf/FSStrings.tr.xlf b/src/fsharp/xlf/FSStrings.tr.xlf index 702a7a3516..93f54eecd8 100644 --- a/src/fsharp/xlf/FSStrings.tr.xlf +++ b/src/fsharp/xlf/FSStrings.tr.xlf @@ -69,7 +69,7 @@ Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name. - Büyük harfli değişken tanımlayıcıları desenlerde genel olarak kullanılmamalıdır, yanlış yazılmış bir desen adının göstergesi olabilirler. + Büyük harfli değişken tanımlayıcıları desenlerde genel olarak kullanılmamalıdır. Bunlar, eksik bir açık bildirimin veya yanlış yazılmış bir desen adının göstergesi olabilirler. diff --git a/src/fsharp/xlf/FSStrings.zh-Hans.xlf b/src/fsharp/xlf/FSStrings.zh-Hans.xlf index 80f7968de1..86c1e4591c 100644 --- a/src/fsharp/xlf/FSStrings.zh-Hans.xlf +++ b/src/fsharp/xlf/FSStrings.zh-Hans.xlf @@ -69,7 +69,7 @@ Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name. - 通常不应在模式中使用大写的变量标识符,这可能标明某个模式名称存在拼写错误。 + 通常不得在模式中使用大写的变量标识符,存在它们可能表示缺少某个开放声明或某个模式名称拼写错误。 diff --git a/src/fsharp/xlf/FSStrings.zh-Hant.xlf b/src/fsharp/xlf/FSStrings.zh-Hant.xlf index 215554d12e..9cd631f165 100644 --- a/src/fsharp/xlf/FSStrings.zh-Hant.xlf +++ b/src/fsharp/xlf/FSStrings.zh-Hant.xlf @@ -69,7 +69,7 @@ Uppercase variable identifiers should not generally be used in patterns, and may indicate a missing open declaration or a misspelt pattern name. - 模式中通常不應該使用大寫的變數識別項,這可能表示模式名稱拼字錯誤。 + 通常不應在樣式中使用大寫的變數識別碼。這可能表示缺少公開宣告或樣式名稱拼字錯誤。 diff --git a/src/utils/CompilerLocationUtils.fs b/src/utils/CompilerLocationUtils.fs index eb581029ca..58f9a03d1f 100644 --- a/src/utils/CompilerLocationUtils.fs +++ b/src/utils/CompilerLocationUtils.fs @@ -15,15 +15,9 @@ open Microsoft.FSharp.Core module internal FSharpEnvironment = /// The F# version reported in the banner -#if LOCALIZATION_FSBUILD - let FSharpBannerVersion = FSBuild.SR.fSharpBannerVersion(FSharp.BuildProperties.fsProductVersion, FSharp.BuildProperties.fsLanguageVersion) -#else -#if LOCALIZATION_FSCOMP - let FSharpBannerVersion = FSComp.SR.fSharpBannerVersion(FSharp.BuildProperties.fsProductVersion, FSharp.BuildProperties.fsLanguageVersion) -#else - let FSharpBannerVersion = sprintf "%s for F# %s" (FSharp.BuildProperties.fsProductVersion) (FSharp.BuildProperties.fsLanguageVersion) -#endif -#endif + let FSharpBannerVersion = UtilsStrings.SR.fSharpBannerVersion(FSharp.BuildProperties.fsProductVersion, FSharp.BuildProperties.fsLanguageVersion) + + let FSharpProductName = UtilsStrings.SR.buildProductName(FSharpBannerVersion) let versionOf<'t> = typeof<'t>.Assembly.GetName().Version.ToString() diff --git a/src/utils/UtilsStrings.txt b/src/utils/UtilsStrings.txt new file mode 100644 index 0000000000..7c6971436b --- /dev/null +++ b/src/utils/UtilsStrings.txt @@ -0,0 +1,2 @@ +buildProductName,"Microsoft (R) F# Compiler version %s" +fSharpBannerVersion,"%s for F# %s" \ No newline at end of file diff --git a/src/utils/prim-lexing.fs b/src/utils/prim-lexing.fs index 1f772d6e87..151052b5f8 100644 --- a/src/utils/prim-lexing.fs +++ b/src/utils/prim-lexing.fs @@ -52,7 +52,12 @@ type StringText(str: string) = member __.String = str override __.GetHashCode() = str.GetHashCode() - override __.Equals(obj: obj) = str.Equals(obj) + override __.Equals(obj: obj) = + match obj with + | :? StringText as other -> other.String.Equals(str) + | :? string as other -> other.Equals(str) + | _ -> false + override __.ToString() = str interface ISourceText with diff --git a/src/utils/xlf/UtilsStrings.txt.cs.xlf b/src/utils/xlf/UtilsStrings.txt.cs.xlf new file mode 100644 index 0000000000..7596abac27 --- /dev/null +++ b/src/utils/xlf/UtilsStrings.txt.cs.xlf @@ -0,0 +1,17 @@ + + + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + {0} for F# {1} + {0} for F# {1} + + + + + \ No newline at end of file diff --git a/src/utils/xlf/UtilsStrings.txt.de.xlf b/src/utils/xlf/UtilsStrings.txt.de.xlf new file mode 100644 index 0000000000..bbac48e815 --- /dev/null +++ b/src/utils/xlf/UtilsStrings.txt.de.xlf @@ -0,0 +1,17 @@ + + + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + {0} for F# {1} + {0} for F# {1} + + + + + \ No newline at end of file diff --git a/src/utils/xlf/UtilsStrings.txt.es.xlf b/src/utils/xlf/UtilsStrings.txt.es.xlf new file mode 100644 index 0000000000..570040170d --- /dev/null +++ b/src/utils/xlf/UtilsStrings.txt.es.xlf @@ -0,0 +1,17 @@ + + + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + {0} for F# {1} + {0} for F# {1} + + + + + \ No newline at end of file diff --git a/src/utils/xlf/UtilsStrings.txt.fr.xlf b/src/utils/xlf/UtilsStrings.txt.fr.xlf new file mode 100644 index 0000000000..bdb1a00233 --- /dev/null +++ b/src/utils/xlf/UtilsStrings.txt.fr.xlf @@ -0,0 +1,17 @@ + + + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + {0} for F# {1} + {0} for F# {1} + + + + + \ No newline at end of file diff --git a/src/utils/xlf/UtilsStrings.txt.it.xlf b/src/utils/xlf/UtilsStrings.txt.it.xlf new file mode 100644 index 0000000000..6897e5d91f --- /dev/null +++ b/src/utils/xlf/UtilsStrings.txt.it.xlf @@ -0,0 +1,17 @@ + + + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + {0} for F# {1} + {0} for F# {1} + + + + + \ No newline at end of file diff --git a/src/utils/xlf/UtilsStrings.txt.ja.xlf b/src/utils/xlf/UtilsStrings.txt.ja.xlf new file mode 100644 index 0000000000..acf1b95908 --- /dev/null +++ b/src/utils/xlf/UtilsStrings.txt.ja.xlf @@ -0,0 +1,17 @@ + + + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + {0} for F# {1} + {0} for F# {1} + + + + + \ No newline at end of file diff --git a/src/utils/xlf/UtilsStrings.txt.ko.xlf b/src/utils/xlf/UtilsStrings.txt.ko.xlf new file mode 100644 index 0000000000..54afe171c7 --- /dev/null +++ b/src/utils/xlf/UtilsStrings.txt.ko.xlf @@ -0,0 +1,17 @@ + + + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + {0} for F# {1} + {0} for F# {1} + + + + + \ No newline at end of file diff --git a/src/utils/xlf/UtilsStrings.txt.pl.xlf b/src/utils/xlf/UtilsStrings.txt.pl.xlf new file mode 100644 index 0000000000..948b605c13 --- /dev/null +++ b/src/utils/xlf/UtilsStrings.txt.pl.xlf @@ -0,0 +1,17 @@ + + + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + {0} for F# {1} + {0} for F# {1} + + + + + \ No newline at end of file diff --git a/src/utils/xlf/UtilsStrings.txt.pt-BR.xlf b/src/utils/xlf/UtilsStrings.txt.pt-BR.xlf new file mode 100644 index 0000000000..fc9eeb01c3 --- /dev/null +++ b/src/utils/xlf/UtilsStrings.txt.pt-BR.xlf @@ -0,0 +1,17 @@ + + + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + {0} for F# {1} + {0} for F# {1} + + + + + \ No newline at end of file diff --git a/src/utils/xlf/UtilsStrings.txt.ru.xlf b/src/utils/xlf/UtilsStrings.txt.ru.xlf new file mode 100644 index 0000000000..449d63bdae --- /dev/null +++ b/src/utils/xlf/UtilsStrings.txt.ru.xlf @@ -0,0 +1,17 @@ + + + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + {0} for F# {1} + {0} for F# {1} + + + + + \ No newline at end of file diff --git a/src/utils/xlf/UtilsStrings.txt.tr.xlf b/src/utils/xlf/UtilsStrings.txt.tr.xlf new file mode 100644 index 0000000000..91ef9ad223 --- /dev/null +++ b/src/utils/xlf/UtilsStrings.txt.tr.xlf @@ -0,0 +1,17 @@ + + + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + {0} for F# {1} + {0} for F# {1} + + + + + \ No newline at end of file diff --git a/src/utils/xlf/UtilsStrings.txt.zh-Hans.xlf b/src/utils/xlf/UtilsStrings.txt.zh-Hans.xlf new file mode 100644 index 0000000000..89e1889ce0 --- /dev/null +++ b/src/utils/xlf/UtilsStrings.txt.zh-Hans.xlf @@ -0,0 +1,17 @@ + + + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + {0} for F# {1} + {0} for F# {1} + + + + + \ No newline at end of file diff --git a/src/utils/xlf/UtilsStrings.txt.zh-Hant.xlf b/src/utils/xlf/UtilsStrings.txt.zh-Hant.xlf new file mode 100644 index 0000000000..6df9a338d0 --- /dev/null +++ b/src/utils/xlf/UtilsStrings.txt.zh-Hant.xlf @@ -0,0 +1,17 @@ + + + + + + Microsoft (R) F# Compiler version {0} + Microsoft (R) F# Compiler version {0} + + + + {0} for F# {1} + {0} for F# {1} + + + + + \ No newline at end of file diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj index 708a3b9d89..84caced58f 100644 --- a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj @@ -2,10 +2,11 @@ Library - netcoreapp3.1;net461 + netcoreapp3.1;net472 typeproviders NO_GENERATIVE IS_DESIGNTIME + $(FSharpCoreShippedPackageVersion) diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj index 46bdb547f1..f6d202a0d5 100644 --- a/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider.Tests/BasicProvider.Tests.fsproj @@ -6,6 +6,7 @@ $(TestTargetFramework) false NO_GENERATIVE + $(FSharpCoreShippedPackageVersion) diff --git a/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj b/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj index 312f02e7cc..9e6714f99d 100644 --- a/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj +++ b/tests/EndToEndBuildTests/BasicProvider/BasicProvider/BasicProvider.fsproj @@ -2,8 +2,9 @@ Library - netcoreapp3.1;net461 + netcoreapp3.1;net472 typeproviders + $(FSharpCoreShippedPackageVersion) typeproviders diff --git a/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd b/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd index 0acebd17dd..bce9551e2c 100644 --- a/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd +++ b/tests/EndToEndBuildTests/BasicProvider/TestBasicProvider.cmd @@ -38,8 +38,8 @@ echo dotnet pack BasicProvider\BasicProvider.fsproj -o %~dp0artifacts -c %config dotnet pack BasicProvider\BasicProvider.fsproj -o %~dp0artifacts -c %configuration% -v minimal -p:FSharpTestCompilerVersion=net40 if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure -echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 - dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 +echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40 + dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40 if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=netcoreapp3.1 -p:FSharpTestCompilerVersion=coreclr @@ -56,8 +56,8 @@ echo dotnet pack BasicProvider\BasicProvider.fsproj -o %~dp0artifacts -c %config dotnet pack BasicProvider\BasicProvider.fsproj -o %~dp0artifacts -c %configuration% -v minimal -p:FSharpTestCompilerVersion=coreclr if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure -echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 - dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 +echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40 + dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40 if ERRORLEVEL 1 echo Error: TestBasicProvider failed && goto :failure echo dotnet test BasicProvider.Tests\BasicProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=netcoreapp3.1 -p:FSharpTestCompilerVersion=coreclr diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj index deba0334dd..21a2234258 100644 --- a/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj +++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider.Tests/ComboProvider.Tests.fsproj @@ -5,6 +5,7 @@ netcoreapp3.1 $(TestTargetFramework) false + $(FSharpCoreShippedPackageVersion) NO_GENERATIVE diff --git a/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj b/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj index d76fef766d..0b35bb4aac 100644 --- a/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj +++ b/tests/EndToEndBuildTests/ComboProvider/ComboProvider/ComboProvider.fsproj @@ -2,7 +2,9 @@ Library - netcoreapp3.1;net461 + netcoreapp3.1;net472 + $(FSharpCoreShippedPackageVersion) + netcoreapp3.1;net472 diff --git a/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd b/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd index 26f819d1b3..b8e68e2413 100644 --- a/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd +++ b/tests/EndToEndBuildTests/ComboProvider/TestComboProvider.cmd @@ -38,8 +38,8 @@ echo dotnet pack ComboProvider\ComboProvider.fsproj -o %~dp0artifacts -c %config dotnet pack ComboProvider\ComboProvider.fsproj -o %~dp0artifacts -c %configuration% -v minimal -p:FSharpTestCompilerVersion=net40 if ERRORLEVEL 1 echo Error: TestComboProvider failed && goto :failure -echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 - dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 +echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40 + dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40 if ERRORLEVEL 1 echo Error: TestComboProvider failed && goto :failure echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=netcoreapp3.1 -p:FSharpTestCompilerVersion=coreclr @@ -56,8 +56,8 @@ echo dotnet pack ComboProvider\ComboProvider.fsproj -o %~dp0artifacts -c %config dotnet pack ComboProvider\ComboProvider.fsproj -o %~dp0artifacts -c %configuration% -v minimal -p:FSharpTestCompilerVersion=coreclr if ERRORLEVEL 1 echo Error: TestComboProvider failed && goto :failure -echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 - dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net461 -p:FSharpTestCompilerVersion=net40 +echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40 + dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -c %configuration% -v minimal -p:TestTargetFramework=net472 -p:FSharpTestCompilerVersion=net40 if ERRORLEVEL 1 echo Error: TestComboProvider failed && goto :failure echo dotnet test ComboProvider.Tests\ComboProvider.Tests.fsproj -v %configuration% -p:TestTargetFramework=netcoreapp3.1 -p:FSharpTestCompilerVersion=coreclr diff --git a/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj index 0a91d3d70c..ffc6aa91e4 100644 --- a/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj +++ b/tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj @@ -12,6 +12,7 @@ + diff --git a/tests/FSharp.Build.UnitTests/MapSourceRootsTests.fs b/tests/FSharp.Build.UnitTests/MapSourceRootsTests.fs new file mode 100644 index 0000000000..a5d852b262 --- /dev/null +++ b/tests/FSharp.Build.UnitTests/MapSourceRootsTests.fs @@ -0,0 +1,419 @@ + +namespace FSharp.Build.UnitTests + +open Microsoft.Build.Framework +open Microsoft.Build.Utilities +open FSharp.Build +open NUnit.Framework +open System.Collections.Generic + +type MockEngine() = + member val Errors = ResizeArray() with get + member val Warnings = ResizeArray() with get + member val Custom = ResizeArray() with get + member val Messages = ResizeArray() with get + + interface IBuildEngine with + member this.BuildProjectFile(projectFileName: string, targetNames: string [], globalProperties: System.Collections.IDictionary, targetOutputs: System.Collections.IDictionary): bool = + failwith "Not Implemented" + member this.ColumnNumberOfTaskNode: int = 0 + member this.ContinueOnError: bool = true + member this.LineNumberOfTaskNode: int = 0 + member this.LogCustomEvent(e: CustomBuildEventArgs): unit = + this.Custom.Add e + failwith "Not Implemented" + member this.LogErrorEvent(e: BuildErrorEventArgs): unit = + this.Errors.Add e + member this.LogMessageEvent(e: BuildMessageEventArgs): unit = + this.Messages.Add e + member this.LogWarningEvent(e: BuildWarningEventArgs): unit = + this.Warnings.Add e + member this.ProjectFileOfTaskNode: string = "" + +type SourceRoot = + SourceRoot of + path: string * + props: list * + expectedProps: list + + +/// these tests are ported from https://github.com/dotnet/roslyn/blob/093ea477717001c58be6231cf2a793f4245cbf72/src/Compilers/Core/MSBuildTaskTests/MapSourceRootTests.cs +/// Same scenarios, slightly different setup/teardown +[] +type MapSourceRootsTests() = + + let assertNoErrors (t: MapSourceRoots) = + let engine = t.BuildEngine :?> MockEngine + let errors = engine.Errors + Assert.AreEqual(0, errors.Count, sprintf "Expected no errors, but found the following: %A" errors) + let newTask () = + MapSourceRoots(BuildEngine = MockEngine()) + let toTaskItem (SourceRoot(path, props, _)) = + let dict = Dictionary() + for (k, v) in props do dict.Add(k, v) + TaskItem(path, dict) :> ITaskItem + let checkExpectations position (SourceRoot(path, _, expectedProps), mapping: ITaskItem) = + Assert.AreEqual(Utilities.FixFilePath path, mapping.ItemSpec, sprintf "expected paths to be the same while checking position %d" position) + for (key, value) in expectedProps do + Assert.AreEqual(value, mapping.GetMetadata(key), sprintf "expected values for metadata key %s to be the same while checking position %d" key position) + + let successfulTest items = + let task = newTask() + let outputs = MapSourceRoots.PerformMapping task.Log (items |> Array.map toTaskItem) true + + assertNoErrors task + + match outputs with + | None -> + Assert.Fail("Expected to get some mappings back from this scenario") + | Some mappings -> + Array.zip items mappings + |> Array.iteri checkExpectations + + [] + member this.``basic deterministic scenarios`` () = + let items = + [| + SourceRoot(@"c:\packages\SourcePackage1\", [], ["MappedPath", @"/_1/"]) + SourceRoot(@"/packages/SourcePackage2/", [], ["MappedPath", @"/_2/"]) + SourceRoot(@"c:\MyProjects\MyProject\", ["SourceControl", "Git"], [ + "SourceControl", "Git" + "MappedPath", @"/_/" + ]) + SourceRoot(@"c:\MyProjects\MyProject\a\b\", [ + "SourceControl", "Git" + "NestedRoot", "a/b" + "ContainingRoot", @"c:\MyProjects\MyProject\" + "some metadata", "some value" + ], [ + "SourceControl", "Git" + "some metadata", "some value" + "MappedPath", @"/_/a/b/" + ]) + |] + + successfulTest items + + + [] + member this.``invalid chars`` () = + let items = + [| + SourceRoot(@"!@#:;$%^&*()_+|{}\", [], ["MappedPath", @"/_1/"]) + SourceRoot(@"****/", ["SourceControl", "Git"], [ + "MappedPath", @"/_/" + "SourceControl", "Git" + ]) + SourceRoot(@"****\|||:;\", [ + "SourceControl", "Git" + "NestedRoot","|||:;" + "ContainingRoot", @"****/" + ], [ + "MappedPath", @"/_/|||:;/" + "SourceControl", "Git" + ]) + |] + successfulTest items + + [] + member this.``input paths must end with separator`` () = + let items = + [| + SourceRoot(@"C:\", [], []) + SourceRoot(@"C:/", [], []) + SourceRoot(@"C:", [], []) + SourceRoot(@"C", [], []) + |] + let task = newTask() + let outputs = MapSourceRoots.PerformMapping task.Log (items |> Array.map toTaskItem) true + + match outputs with + | None -> + let errors = (task.BuildEngine :?> MockEngine).Errors + Assert.AreEqual(2, errors.Count, "Should have had some errors with path mappings") + let expectedErrors = ["'C:'"; "'C'"] + let errorMessages = errors |> Seq.map (fun e -> e.Message) + + Assert.IsTrue(errorMessages |> Seq.forall (fun error -> error.Contains("end with a slash or backslash"))) + + expectedErrors + |> Seq.iter (fun expectedErrorPath -> + Assert.IsTrue(errorMessages |> Seq.exists (fun err -> err.EndsWith expectedErrorPath), + sprintf "expected an error to end with '%s', none did.\nMessages were:\n%A" expectedErrorPath errorMessages) + ) + | Some mappings -> + Assert.Fail("Expected to fail on the inputs") + + [] + member this.``nested roots separators`` () = + let items = + [| + SourceRoot(@"c:\MyProjects\MyProject\", [], [ + "MappedPath", @"/_/" + ]) + SourceRoot(@"c:\MyProjects\MyProject\a\a\", [ + "NestedRoot", @"a/a/" + "ContainingRoot", @"c:\MyProjects\MyProject\" + ], [ + "MappedPath", @"/_/a/a/" + ]) + SourceRoot(@"c:\MyProjects\MyProject\a\b\", [ + "NestedRoot", @"a/b\" + "ContainingRoot", @"c:\MyProjects\MyProject\" + ],[ + "MappedPath", @"/_/a/b/" + ]) + SourceRoot(@"c:\MyProjects\MyProject\a\c\", [ + "NestedRoot", @"a\c" + "ContainingRoot", @"c:\MyProjects\MyProject\" + ], [ + "MappedPath", @"/_/a/c/" + ]) + |] + + successfulTest items + + [] + member this.``sourceroot case sensitivity``() = + let items = [| + SourceRoot(@"c:\packages\SourcePackage1\", [], ["MappedPath", @"/_/"]) + SourceRoot(@"C:\packages\SourcePackage1\", [], ["MappedPath", @"/_1/"]) + SourceRoot(@"c:\packages\SourcePackage2\", [], ["MappedPath", @"/_2/"]) + |] + + successfulTest items + + [] + member this.``recursion error`` () = + let path1 = Utilities.FixFilePath @"c:\MyProjects\MyProject\a\1\" + let path2 = Utilities.FixFilePath @"c:\MyProjects\MyProject\a\2\" + let path3 = Utilities.FixFilePath @"c:\MyProjects\MyProject\" + let items = + [| + SourceRoot(path1, [ + "ContainingRoot", path2 + "NestedRoot", "a/1" + ], []) + SourceRoot(path2, [ + "ContainingRoot", path1 + "NestedRoot", "a/2" + ], []) + SourceRoot(path3, [], []) + |] + + let task = newTask() + let outputs = MapSourceRoots.PerformMapping task.Log (items |> Array.map toTaskItem) true + + match outputs with + | None -> + let errors = (task.BuildEngine :?> MockEngine).Errors + Assert.AreEqual(2, errors.Count, "Should have had some errors with path mappings") + let expectedErrors = [path2; path1] |> List.map (sprintf "'%s'") + let errorMessages = errors |> Seq.map (fun e -> e.Message) + + Assert.IsTrue(errorMessages |> Seq.forall (fun error -> error.Contains("ContainingRoot was not found in SourceRoot items")), + sprintf "Expected to have the same type of errors but had %A" errorMessages + ) + + expectedErrors + |> Seq.iter (fun expectedErrorPath -> + Assert.IsTrue(errorMessages |> Seq.exists (fun err -> err.EndsWith expectedErrorPath), sprintf "expected an error to end with '%s', none did.\nMessages were:\n%A" expectedErrorPath errorMessages) + ) + | Some mappings -> + Assert.Fail("Expected to fail on the inputs") + + [] + [] + [] + member this.``metadata merge 1`` (deterministic: bool) = + let path1 = Utilities.FixFilePath @"c:\packages\SourcePackage1\" + let path2 = Utilities.FixFilePath @"c:\packages\SourcePackage2\" + let path3 = Utilities.FixFilePath @"c:\packages\SourcePackage3\" + + let items = [| + SourceRoot(path1, [ + "NestedRoot", @"NR1A" + "ContainingRoot", path3 + "RevisionId", "RevId1" + "SourceControl", "git" + "MappedPath", "MP1" + "SourceLinkUrl", "URL1" + ], []) + SourceRoot(path1, [ + "NestedRoot", @"NR1B" + "ContainingRoot", @"CR" + "RevisionId", "RevId2" + "SourceControl", "tfvc" + "MappedPath", "MP2" + "SourceLinkUrl", "URL2" + ], []) + SourceRoot(path2, [ + "NestedRoot", @"NR2" + "SourceControl", "git" + ], []) + SourceRoot(path2, [ + "ContainingRoot", path3 + "SourceControl", "git" + ], []) + SourceRoot(path3, [], []) + |] + + /// because this test isn't one to one we have to put the expecations in another structure + let actualExpectations = [| + SourceRoot(path1, [], [ + "SourceControl", "git" + "RevisionId", "RevId1" + "NestedRoot", "NR1A" + "ContainingRoot", path3 + "MappedPath", if deterministic then "/_/NR1A/" else path1 + "SourceLinkUrl", "URL1" + ]) + SourceRoot(path2, [], [ + "SourceControl", "git" + "RevisionId", "" + "NestedRoot", "NR2" + "ContainingRoot", path3 + "MappedPath", if deterministic then "/_/NR2/" else path2 + "SourceLinkUrl", "" + ]) + SourceRoot(path3, [], [ + "SourceControl", "" + "RevisionId", "" + "NestedRoot", "" + "ContainingRoot", "" + "MappedPath", if deterministic then "/_/" else path3 + "SourceLinkUrl", "" + ]) + |] + + let task = newTask() + let outputs = MapSourceRoots.PerformMapping task.Log (items |> Array.map toTaskItem) deterministic + + assertNoErrors task + + match outputs with + | None -> + Assert.Fail("Expected to get some mappings back from this scenario") + | Some mappings -> + let warnings = (task.BuildEngine :?> MockEngine).Warnings |> Seq.map (fun w -> w.Message) + + Assert.AreEqual(6, Seq.length warnings) + Assert.IsTrue(warnings |> Seq.forall (fun w -> w.Contains "duplicate items")) + + [ + "SourceControl", "git", "tfvc" + "RevisionId", "RevId1", "RevId2" + "NestedRoot", "NR1A", "NR1B" + "ContainingRoot", path3, "CR" + "MappedPath", "MP1", "MP2" + "SourceLinkUrl", "URL1", "URL2" + ] + |> List.iter (fun (key, lval, rval) -> + Assert.IsTrue( + (warnings |> Seq.exists (fun warn -> warn.Contains(sprintf "SourceRoot contains duplicate items '%s' with conflicting metadata '%s': '%s' and '%s'" path1 key lval rval))), + sprintf "Expected to find an error message for %s comparing %s and %s, but got %A" key lval rval warnings + ) + ) + + Array.zip actualExpectations mappings + |> Array.iteri checkExpectations + + [] + member this.``missing containing root`` () = + let items = [| + SourceRoot(@"c:\MyProjects\MYPROJECT\", [], []) + SourceRoot(@"c:\MyProjects\MyProject\a\b\", [ + "SourceControl", "Git" + "NestedRoot", "a/b" + "ContainingRoot", @"c:\MyProjects\MyProject\" + ], [] + ) + |] + + let task = newTask() + let outputs = MapSourceRoots.PerformMapping task.Log (items |> Array.map toTaskItem) true + + match outputs with + | None -> + let errors = (task.BuildEngine :?> MockEngine).Errors + Assert.AreEqual(1, errors.Count, "Should have had some errors with path mappings") + let expectedErrors = [@"c:\MyProjects\MyProject\"] |> List.map (sprintf "'%s'") + let errorMessages = errors |> Seq.map (fun e -> e.Message) + + Assert.IsTrue(errorMessages |> Seq.forall (fun error -> error.Contains("corresponding item is not a top-level source root")), + sprintf "Expected to have the same type of errors but had %A" errorMessages + ) + + expectedErrors + |> Seq.iter (fun expectedErrorPath -> + Assert.IsTrue(errorMessages |> Seq.exists (fun err -> err.EndsWith expectedErrorPath), sprintf "expected an error to end with '%s', none did.\nMessages were:\n%A" expectedErrorPath errorMessages) + ) + | Some mappings -> + Assert.Fail("Expected to fail on the inputs") + + [] + member this.``no containing root`` () = + let items = [| + SourceRoot(@"c:\MyProjects\MyProject\", [], []) + SourceRoot(@"c:\MyProjects\MyProject\a\b\", [ + "SourceControl", "Git" + "NestedRoot", "a/b" + ], []) + |] + + let task = newTask() + let outputs = MapSourceRoots.PerformMapping task.Log (items |> Array.map toTaskItem) true + + match outputs with + | None -> + let errors = (task.BuildEngine :?> MockEngine).Errors + Assert.AreEqual(1, errors.Count, "Should have had some errors with path mappings") + let expectedErrors = [@""] |> List.map (sprintf "'%s'") + let errorMessages = errors |> Seq.map (fun e -> e.Message) + + Assert.IsTrue(errorMessages |> Seq.forall (fun error -> error.Contains("corresponding item is not a top-level source root")), + sprintf "Expected to have the same type of errors but had %A" errorMessages + ) + + expectedErrors + |> Seq.iter (fun expectedErrorPath -> + Assert.IsTrue(errorMessages |> Seq.exists (fun err -> err.EndsWith expectedErrorPath), sprintf "expected an error to end with '%s', none did.\nMessages were:\n%A" expectedErrorPath errorMessages) + ) + | Some mappings -> + Assert.Fail("Expected to fail on the inputs") + + [] + [] + [] + member this.``no top level source root`` (deterministic: bool) = + let path1 = Utilities.FixFilePath @"c:\MyProjects\MyProject\a\b\" + let items = [| + SourceRoot(path1, [ + "ContainingRoot", path1 + "NestedRoot", "a/b" + ], [ + "SourceControl", "" + "RevisionId", "" + "NestedRoot", "a/b" + "ContainingRoot", path1 + "MappedPath", path1 + "SourceLinkUrl", "" + ]) + |] + + let task = newTask() + let outputs = MapSourceRoots.PerformMapping task.Log (items |> Array.map toTaskItem) deterministic + + match outputs, deterministic with + | Some _, true -> + Assert.Fail "Expected to fail when deterministic" + | None, true -> + let errors = (task.BuildEngine :?> MockEngine).Errors + Assert.AreEqual(1, errors.Count, "Should have had some errors with path mappings") + let error = errors.[0].Message + Assert.IsTrue(error.Contains "when DeterministicSourcePaths is true") + | None, false -> + Assert.Fail (sprintf "Expected to succeed when not deterministic") + | Some mappings, false -> + Array.zip items mappings + |> Array.iteri checkExpectations diff --git a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/MemberConstraints.fs b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/MemberConstraints.fs index 6cdd83a599..77ae35463f 100644 --- a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/MemberConstraints.fs +++ b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/MemberConstraints.fs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ConstraintSolver.ComponentTests +namespace FSharp.Compiler.ComponentTests.ConstraintSolver open Xunit open FSharp.Test.Utilities.Compiler @@ -18,7 +18,7 @@ module MemberConstraints = |> withSingleDiagnostic (Error 697, Line 2, Col 43, Line 2, Col 76, "Invalid constraint") [] - let ``we can overload operators on a type and not add all the extra jazz such as inlining and the ^ operator.``() = + let ``We can overload operators on a type and not add all the extra jazz such as inlining and the ^ operator.``() = FSharp """ type Foo(x : int) = @@ -40,8 +40,9 @@ elif y.Val <> 7 then failwith "y.Val <> 7" elif x2.Val <> 7 then failwith "x2.Val <> 7" elif y2.Val <> 7 then failwith "x.Val <> 7" else () - """ +""" |> asExe |> compile |> run - // OR |> compileAsExeAndRun + |> shouldSucceed + |> withExitCode 0 diff --git a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs index 873864edaf..a22d61db60 100644 --- a/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs +++ b/tests/FSharp.Compiler.ComponentTests/ConstraintSolver/PrimitiveConstraints.fs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ConstraintSolver.ComponentTests +namespace FSharp.Compiler.ComponentTests.ConstraintSolver open Xunit open FSharp.Test.Utilities.Compiler diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/AccessOfTypeAbbreviationTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/AccessOfTypeAbbreviationTests.fs index 416c62d63f..df9acf7efc 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/AccessOfTypeAbbreviationTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/AccessOfTypeAbbreviationTests.fs @@ -1,75 +1,74 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities +open FSharp.Test.Utilities.Compiler open FSharp.Compiler.SourceCodeServices module ``Access Of Type Abbreviation`` = + let warning44Message = "This construct is deprecated. The type 'Hidden' is less accessible than the value, member or type 'Exported' it is used in." + System.Environment.NewLine + "As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors." + [] let ``Private type produces warning when trying to export``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ module Library = type private Hidden = Hidden of unit type Exported = Hidden - """ - FSharpErrorSeverity.Warning - 44 - (4, 8, 4, 16) - ("This construct is deprecated. The type 'Hidden' is less accessible than the value, member or type 'Exported' it is used in." + System.Environment.NewLine + "As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors.") + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 44, Line 4, Col 8, Line 4, Col 16, warning44Message) [] let ``Internal type passes when abbrev is internal``() = - CompilerAssert.Pass - """ + FSharp """ module Library = type internal Hidden = Hidden of unit type internal Exported = Hidden - """ + """ + |> typecheck + |> shouldSucceed [] let ``Internal type produces warning when trying to export``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ module Library = type internal Hidden = Hidden of unit type Exported = Hidden - """ - FSharpErrorSeverity.Warning - 44 - (4, 8, 4, 16) - ("This construct is deprecated. The type 'Hidden' is less accessible than the value, member or type 'Exported' it is used in." + System.Environment.NewLine + "As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors.") + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 44, Line 4, Col 8, Line 4, Col 16, warning44Message) [] let ``Private type produces warning when abbrev is internal``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ module Library = type private Hidden = Hidden of unit type internal Exported = Hidden - """ - FSharpErrorSeverity.Warning - 44 - (4, 17, 4, 25) - ("This construct is deprecated. The type 'Hidden' is less accessible than the value, member or type 'Exported' it is used in." + System.Environment.NewLine + "As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors.") + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 44, Line 4, Col 17, Line 4, Col 25, warning44Message) [] let ``Private type passes when abbrev is private``() = - CompilerAssert.Pass - """ + FSharp """ module Library = type private Hidden = Hidden of unit type private Exported = Hidden - """ + """ + |> typecheck + |> shouldSucceed [] let ``Default access type passes when abbrev is default``() = - CompilerAssert.Pass - """ + FSharp """ module Library = type Hidden = Hidden of unit type Exported = Hidden - """ + """ + |> typecheck + |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/AssignmentErrorTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/AssignmentErrorTests.fs index f2f598d9db..dd986cf500 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/AssignmentErrorTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/AssignmentErrorTests.fs @@ -1,22 +1,19 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices - +open FSharp.Test.Utilities.Compiler module ``Errors assigning to mutable objects`` = [] let ``Assign to immutable error``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let x = 10 x <- 20 - """ - FSharpErrorSeverity.Error - 27 - (3, 1, 3, 8) - "This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable x = expression'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 27, Line 3, Col 1, Line 3, Col 8, + "This value is not mutable. Consider using the mutable keyword, e.g. 'let mutable x = expression'.") diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ClassesTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ClassesTests.fs index a51e92ed94..e1941a3d7e 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ClassesTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ClassesTests.fs @@ -1,17 +1,15 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities.Compiler module ``Classes`` = [] let ``Tuple In Abstract Method``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ type IInterface = abstract Function : (int32 * int32) -> unit @@ -19,47 +17,44 @@ let x = { new IInterface with member this.Function (i, j) = () } - """ - [| - FSharpErrorSeverity.Error, 768, (7, 16, 7, 36), "The member 'Function' does not accept the correct number of arguments. 1 argument(s) are expected, but 2 were given. The required signature is 'member IInterface.Function : (int32 * int32) -> unit'.\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." - FSharpErrorSeverity.Error, 17, (7, 21, 7, 29), "The member 'Function : 'a * 'b -> unit' does not have the correct type to override the corresponding abstract method. The required signature is 'Function : (int32 * int32) -> unit'." - FSharpErrorSeverity.Error, 783, (6, 9, 6, 19), "At least one override did not correctly implement its corresponding abstract member" - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 768, Line 7, Col 16, Line 7, Col 36, "The member 'Function' does not accept the correct number of arguments. 1 argument(s) are expected, but 2 were given. The required signature is 'member IInterface.Function : (int32 * int32) -> unit'.\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.") + (Error 17, Line 7, Col 21, Line 7, Col 29, "The member 'Function : 'a * 'b -> unit' does not have the correct type to override the corresponding abstract method. The required signature is 'Function : (int32 * int32) -> unit'.") + (Error 783, Line 6, Col 9, Line 6, Col 19, "At least one override did not correctly implement its corresponding abstract member")] [] let ``Wrong Arity``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type MyType() = static member MyMember(arg1, arg2:int ) = () static member MyMember(arg1, arg2:byte) = () MyType.MyMember("", 0, 0) - """ - FSharpErrorSeverity.Error - 503 - (7, 1, 7, 26) - "A member or object constructor 'MyMember' taking 3 arguments is not accessible from this code location. All accessible versions of method 'MyMember' take 2 arguments." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 503, Line 7, Col 1, Line 7, Col 26, + "A member or object constructor 'MyMember' taking 3 arguments is not accessible from this code location. All accessible versions of method 'MyMember' take 2 arguments.") [] let ``Method Is Not Static``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type Class1() = member this.X() = "F#" let x = Class1.X() - """ - FSharpErrorSeverity.Error - 3214 - (5, 9, 5, 17) - "Method or object constructor 'X' is not static" + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 3214, Line 5, Col 9, Line 5, Col 17, "Method or object constructor 'X' is not static") [] let ``Matching Method With Same Name Is Not Abstract``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ type Foo(x : int) = member v.MyX() = x @@ -67,17 +62,17 @@ let foo = { new Foo(3) with member v.MyX() = 4 } - """ - [| - FSharpErrorSeverity.Error, 767, (8, 16, 8, 23), "The type Foo contains the member 'MyX' but it is not a virtual or abstract method that is available to override or implement." - FSharpErrorSeverity.Error, 17, (8, 18, 8, 21), "The member 'MyX : unit -> int' does not have the correct type to override any given virtual method" - FSharpErrorSeverity.Error, 783, (6, 11, 6, 14), "At least one override did not correctly implement its corresponding abstract member" - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 767, Line 8, Col 16, Line 8, Col 23, "The type Foo contains the member 'MyX' but it is not a virtual or abstract method that is available to override or implement.") + (Error 17, Line 8, Col 18, Line 8, Col 21, "The member 'MyX : unit -> int' does not have the correct type to override any given virtual method") + (Error 783, Line 6, Col 11, Line 6, Col 14, "At least one override did not correctly implement its corresponding abstract member")] [] let ``No Matching Abstract Method With Same Name``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ type IInterface = abstract MyFunction : int32 * int32 -> unit abstract SomeOtherFunction : int32 * int32 -> unit @@ -86,18 +81,18 @@ let x = { new IInterface with member this.Function (i, j) = () } - """ - [| - FSharpErrorSeverity.Error, 767, (8, 14, 8, 34), "The member 'Function' does not correspond to any abstract or virtual method available to override or implement. Maybe you want one of the following:" + System.Environment.NewLine + " MyFunction" - FSharpErrorSeverity.Error, 17, (8, 19, 8, 27), "The member 'Function : 'a * 'b -> unit' does not have the correct type to override any given virtual method" - FSharpErrorSeverity.Error, 366, (7, 3, 9, 4), "No implementation was given for those members: " + System.Environment.NewLine + "\t'abstract member IInterface.MyFunction : int32 * int32 -> unit'" + System.Environment.NewLine + "\t'abstract member IInterface.SomeOtherFunction : int32 * int32 -> unit'" + System.Environment.NewLine + "Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'." - FSharpErrorSeverity.Error, 783, (7, 9, 7, 19), "At least one override did not correctly implement its corresponding abstract member" - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 767, Line 8, Col 14, Line 8, Col 34, "The member 'Function' does not correspond to any abstract or virtual method available to override or implement. Maybe you want one of the following:" + System.Environment.NewLine + " MyFunction") + (Error 17, Line 8, Col 19, Line 8, Col 27, "The member 'Function : 'a * 'b -> unit' does not have the correct type to override any given virtual method") + (Error 366, Line 7, Col 3, Line 9, Col 4, "No implementation was given for those members: " + System.Environment.NewLine + "\t'abstract member IInterface.MyFunction : int32 * int32 -> unit'" + System.Environment.NewLine + "\t'abstract member IInterface.SomeOtherFunction : int32 * int32 -> unit'" + System.Environment.NewLine + "Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'.") + (Error 783, Line 7, Col 9, Line 7, Col 19, "At least one override did not correctly implement its corresponding abstract member")] [] let ``Member Has Multiple Possible Dispatch Slots``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ type IOverload = abstract member Bar : int -> int abstract member Bar : double -> int @@ -105,23 +100,24 @@ type IOverload = type Overload = interface IOverload with override __.Bar _ = 1 - """ - [| - FSharpErrorSeverity.Error, 366, (7, 15, 7, 24), "No implementation was given for those members: " + System.Environment.NewLine + "\t'abstract member IOverload.Bar : double -> int'" + System.Environment.NewLine + "\t'abstract member IOverload.Bar : int -> int'" + System.Environment.NewLine + "Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'." - FSharpErrorSeverity.Error, 3213, (8, 21, 8, 24), "The member 'Bar<'a0> : 'a0 -> int' matches multiple overloads of the same method.\nPlease restrict it to one of the following:" + System.Environment.NewLine + " Bar : double -> int" + System.Environment.NewLine + " Bar : int -> int." - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 366, Line 7, Col 15, Line 7, Col 24, "No implementation was given for those members: " + System.Environment.NewLine + "\t'abstract member IOverload.Bar : double -> int'" + System.Environment.NewLine + "\t'abstract member IOverload.Bar : int -> int'" + System.Environment.NewLine + "Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'.") + (Error 3213, Line 8, Col 21, Line 8, Col 24, "The member 'Bar<'a0> : 'a0 -> int' matches multiple overloads of the same method.\nPlease restrict it to one of the following:" + System.Environment.NewLine + " Bar : double -> int" + System.Environment.NewLine + " Bar : int -> int.")] [] let ``Do Cannot Have Visibility Declarations``() = - CompilerAssert.ParseWithErrors - """ + FSharp """ type X() = do () private do () static member Y() = 1 - """ - [| - FSharpErrorSeverity.Error, 531, (4, 5, 4, 12), "Accessibility modifiers should come immediately prior to the identifier naming a construct" - FSharpErrorSeverity.Error, 512, (4, 13, 4, 18), "Accessibility modifiers are not permitted on 'do' bindings, but 'Private' was given." - FSharpErrorSeverity.Error, 222, (2, 1, 3, 1), "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." - |] + """ + |> parse + |> shouldFail + |> withDiagnostics [ + (Error 531, Line 4, Col 5, Line 4, Col 12, "Accessibility modifiers should come immediately prior to the identifier naming a construct") + (Error 512, Line 4, Col 13, Line 4, Col 18, "Accessibility modifiers are not permitted on 'do' bindings, but 'Private' was given.") + (Error 222, Line 2, Col 1, Line 3, Col 1, "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.")] diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ConfusingTypeName.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ConfusingTypeName.fs index 3c7e569007..0f4e12d960 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ConfusingTypeName.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ConfusingTypeName.fs @@ -1,16 +1,12 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities open FSharp.Test.Utilities.Compiler -open FSharp.Test.Utilities.Utilities -open FSharp.Compiler.SourceCodeServices module ``Confusing Type Name`` = - [] let ``Expected types with multiple references`` () = let csLibA = @@ -58,5 +54,4 @@ printfn "%A" (b = otherB) (Warning 686, Line 9, Col 14, Line 9, Col 36, "The method or function 'makeOtherB' should not be given explicit type argument(s) because it does not declare its type parameters explicitly") (Error 1, Line 6, Col 19, Line 6, Col 25, "This expression was expected to have type\n 'A (libA, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)' \nbut here has type\n 'A (libB, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)' ") (Error 1, Line 11, Col 19, Line 11, Col 25, "This expression was expected to have type\n 'B (libA, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)' \nbut here has type\n 'B (libB, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)' ") - ] diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ConstructorTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ConstructorTests.fs index c9636e711a..1806defe4e 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ConstructorTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ConstructorTests.fs @@ -1,42 +1,40 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities.Compiler module ``Constructor`` = [] let ``Invalid Record``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ type Record = {field1:int; field2:int} let doSomething (xs) = List.map (fun {field1=x} -> x) xs doSomething {Record.field1=0; field2=0} - """ - [| - FSharpErrorSeverity.Error, 1, (4, 13, 4, 40), "This expression was expected to have type\n 'Record list' \nbut here has type\n 'Record' " - FSharpErrorSeverity.Warning, 20, (4, 1, 4, 40), "The result of this expression has type 'int list' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'." - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 20, Line 4, Col 1, Line 4, Col 40, "The result of this expression has type 'int list' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'.") + (Error 1, Line 4, Col 13, Line 4, Col 40, "This expression was expected to have type\n 'Record list' \nbut here has type\n 'Record' ")] [] let ``Comma In Rec Ctor``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ type Person = { Name : string; Age : int; City : string } let x = { Name = "Isaac", Age = 21, City = "London" } - """ - [| - FSharpErrorSeverity.Error, 1, (3, 18, 3, 52), "This expression was expected to have type\n 'string' \nbut here has type\n ''a * 'b * 'c' " + System.Environment.NewLine + "A ';' is used to separate field values in records. Consider replacing ',' with ';'." - FSharpErrorSeverity.Error, 764, (3, 9, 3, 54), "No assignment given for field 'Age' of type 'Test.Person'" - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 1, Line 3, Col 18, Line 3, Col 52, "This expression was expected to have type\n 'string' \nbut here has type\n ''a * 'b * 'c' " + System.Environment.NewLine + "A ';' is used to separate field values in records. Consider replacing ',' with ';'.") + (Error 764, Line 3, Col 9, Line 3, Col 54, "No assignment given for field 'Age' of type 'Test.Person'")] [] let ``Missing Comma In Ctor``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ type Person() = member val Name = "" with get,set member val Age = 0 with get,set @@ -44,18 +42,18 @@ type Person() = let p = Person(Name = "Fred" Age = 18) - """ - [| - FSharpErrorSeverity.Error, 39, (7, 12, 7, 16), "The value or constructor 'Name' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " nan" - FSharpErrorSeverity.Warning, 20, (7, 12, 7, 25), "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'." - FSharpErrorSeverity.Error, 39, (8, 12, 8, 15), "The value or constructor 'Age' is not defined." - FSharpErrorSeverity.Error, 501, (7, 5, 8, 21), "The object constructor 'Person' takes 0 argument(s) but is here given 1. The required signature is 'new : unit -> Person'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (',')." - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 20, Line 7, Col 12, Line 7, Col 25, "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'.") + (Error 39, Line 7, Col 12, Line 7, Col 16, "The value or constructor 'Name' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " nan") + (Error 39, Line 8, Col 12, Line 8, Col 15, "The value or constructor 'Age' is not defined.") + (Error 501, Line 7, Col 5, Line 8, Col 21, "The object constructor 'Person' takes 0 argument(s) but is here given 1. The required signature is 'new : unit -> Person'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (',').")] [] let ``Missing Ctor Value``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type Person(x:int) = member val Name = "" with get,set member val Age = x with get,set @@ -63,32 +61,29 @@ type Person(x:int) = let p = Person(Name = "Fred", Age = 18) - """ - FSharpErrorSeverity.Error - 496 - (7, 5, 8, 21) - "The member or object constructor 'Person' requires 1 argument(s). The required signature is 'new : x:int -> Person'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 496, Line 7, Col 5, Line 8, Col 21, "The member or object constructor 'Person' requires 1 argument(s). The required signature is 'new : x:int -> Person'.") [] let ``Extra Argument In Ctor``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type Person() = member val Name = "" with get,set member val Age = 0 with get,set let p = Person(1) - """ - FSharpErrorSeverity.Error - 501 - (7, 5, 7, 14) - "The object constructor 'Person' takes 0 argument(s) but is here given 1. The required signature is 'new : unit -> Person'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 501, Line 7, Col 5, Line 7, Col 14, + "The object constructor 'Person' takes 0 argument(s) but is here given 1. The required signature is 'new : unit -> Person'.") [] let ``Extra Argument In Ctor2``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type Person() = member val Name = "" with get,set member val Age = 0 with get,set @@ -97,18 +92,17 @@ let b = 1 let p = Person(1=b) - """ - FSharpErrorSeverity.Error - 501 - (9, 5, 9, 16) - "The object constructor 'Person' takes 0 argument(s) but is here given 1. The required signature is 'new : unit -> Person'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 501, Line 9, Col 5, Line 9, Col 16, + "The object constructor 'Person' takes 0 argument(s) but is here given 1. The required signature is 'new : unit -> Person'.") [] let ``Valid Comma In Rec Ctor``() = - CompilerAssert.Pass - """ + FSharp """ type Person = { Name : string * bool * bool } let Age = 22 let City = "London" let x = { Name = "Isaac", Age = 21, City = "London" } - """ + """ |> typecheck |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/DontSuggestTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/DontSuggestTests.fs index 13a6f6b0dc..d1511da554 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/DontSuggestTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/DontSuggestTests.fs @@ -1,28 +1,25 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities.Compiler module ``Don't Suggest`` = [] let ``Dont Suggest Completely Wrong Stuff``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let _ = Path.GetFullPath "images" - """ - FSharpErrorSeverity.Error - 39 - (2, 9, 2, 13) - ("The value, namespace, type or module 'Path' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " Math") + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 2, Col 9, Line 2, Col 13, + "The value, namespace, type or module 'Path' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " Math") [] let ``Dont Suggest When Things Are Open``() = - CompilerAssert.ParseWithErrors - """ + FSharp """ module N = let name = "hallo" @@ -30,19 +27,18 @@ type T = static member myMember = 1 let x = N. - """ - [| - FSharpErrorSeverity.Error, 599, (8, 10, 8, 11), "Missing qualification after '.'" - FSharpErrorSeverity.Error, 222, (2, 1, 3, 1), "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." - |] + """ + |> parse + |> shouldFail + |> withDiagnostics [ + (Error 599, Line 8, Col 10, Line 8, Col 11, "Missing qualification after '.'") + (Error 222, Line 2, Col 1, Line 3, Col 1, "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.")] [] let ``Dont Suggest Intentionally Unused Variables``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let hober xy _xyz = xyz - """ - FSharpErrorSeverity.Error - 39 - (2, 21, 2, 24) - "The value or constructor 'xyz' is not defined." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 2, Col 21, Line 2, Col 24, "The value or constructor 'xyz' is not defined.") diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ElseBranchHasWrongTypeTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ElseBranchHasWrongTypeTests.fs index 54d5c41a68..8c41285448 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ElseBranchHasWrongTypeTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ElseBranchHasWrongTypeTests.fs @@ -1,48 +1,43 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices - +open FSharp.Test.Utilities.Compiler module ``Else branch has wrong type`` = [] let ``Else branch is int while if branch is string``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let test = 100 let y = if test > 10 then "test" else 123 - """ - FSharpErrorSeverity.Error - 1 - (5, 10, 5, 13) - "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'string'. This branch returns a value of type 'int'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 5, Col 10, Line 5, Col 13, + "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'string'. This branch returns a value of type 'int'.") [] let ``Else branch is a function that returns int while if branch is string``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let test = 100 let f x = test let y = if test > 10 then "test" else f 10 - """ - FSharpErrorSeverity.Error - 1 - (6, 10, 6, 14) - "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'string'. This branch returns a value of type 'int'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 6, Col 10, Line 6, Col 14, + "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'string'. This branch returns a value of type 'int'.") [] let ``Else branch is a sequence of expressions that returns int while if branch is string``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let f x = x + 4 let y = @@ -51,17 +46,16 @@ let y = else "" |> ignore (f 5) - """ - FSharpErrorSeverity.Error - 1 - (9, 10, 9, 13) - "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'string'. This branch returns a value of type 'int'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 9, Col 10, Line 9, Col 13, + "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'string'. This branch returns a value of type 'int'.") [] let ``Else branch is a longer sequence of expressions that returns int while if branch is string``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let f x = x + 4 let y = @@ -72,33 +66,31 @@ let y = let z = f 4 let a = 3 * z (f a) - """ - FSharpErrorSeverity.Error - 1 - (11, 10, 11, 13) - "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'string'. This branch returns a value of type 'int'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 11, Col 10, Line 11, Col 13, + "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'string'. This branch returns a value of type 'int'.") [] let ``Else branch context doesn't propagate into function application``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let test = 100 let f x : string = x let y = if test > 10 then "test" else f 123 - """ - FSharpErrorSeverity.Error - 1 - (7, 11, 7, 14) - "This expression was expected to have type\n 'string' \nbut here has type\n 'int' " + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 7, Col 11, Line 7, Col 14, + "This expression was expected to have type\n 'string' \nbut here has type\n 'int' ") [] let ``Else branch context doesn't propagate into function application even if not last expr``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let test = 100 let f x = printfn "%s" x let y = @@ -106,16 +98,15 @@ let y = else f 123 "test" - """ - FSharpErrorSeverity.Error - 1 - (7, 11, 7, 14) - "This expression was expected to have type\n 'string' \nbut here has type\n 'int' " + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 7, Col 11, Line 7, Col 14, + "This expression was expected to have type\n 'string' \nbut here has type\n 'int' ") [] let ``Else branch context doesn't propagate into for loop``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let test = 100 let list = [1..10] let y = @@ -125,16 +116,15 @@ let y = printfn "%s" x "test" - """ - FSharpErrorSeverity.Error - 1 - (7, 14, 7, 22) - "This expression was expected to have type\n 'int' \nbut here has type\n 'string' " + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 7, Col 14, Line 7, Col 22, + "This expression was expected to have type\n 'int' \nbut here has type\n 'string' ") [] let ``Else branch context doesn't propagate to lines before last line``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let test = 100 let list = [1..10] let y = @@ -143,35 +133,39 @@ let y = printfn "%s" 1 "test" - """ - FSharpErrorSeverity.Error - 1 - (7, 22, 7, 23) - "This expression was expected to have type\n 'string' \nbut here has type\n 'int' " + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 7, Col 22, Line 7, Col 23, + "This expression was expected to have type\n 'string' \nbut here has type\n 'int' ") [] let ``Else branch should not have wrong context type``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ let x = 1 let y : bool = if x = 2 then "A" else "B" - """ - [| FSharpErrorSeverity.Error, 1, (4, 19, 4, 22), "The 'if' expression needs to have type 'bool' to satisfy context type requirements. It currently has type 'string'." - FSharpErrorSeverity.Error, 1, (5, 10, 5, 13), "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'bool'. This branch returns a value of type 'string'." |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 1, Line 4, Col 19, Line 4, Col 22, "The 'if' expression needs to have type 'bool' to satisfy context type requirements. It currently has type 'string'.") + (Error 1, Line 5, Col 10, Line 5, Col 13, "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'bool'. This branch returns a value of type 'string'.")] [] let ``Else branch has wrong type in nested if``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ let x = 1 if x = 1 then true else if x = 2 then "A" else "B" - """ - [| FSharpErrorSeverity.Error, 1, (5, 19, 5, 22), "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'bool'. This branch returns a value of type 'string'." - FSharpErrorSeverity.Error, 1, (6, 10, 6, 13), "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'bool'. This branch returns a value of type 'string'." - FSharpErrorSeverity.Warning, 20, (3, 1, 6, 13), "The result of this expression has type 'bool' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'." |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 20, Line 3, Col 1, Line 6, Col 13, "The result of this expression has type 'bool' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'.") + (Error 1, Line 5, Col 19, Line 5, Col 22, "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'bool'. This branch returns a value of type 'string'.") + (Error 1, Line 6, Col 10, Line 6, Col 13, "All branches of an 'if' expression must return values of the same type as the first branch, which here is 'bool'. This branch returns a value of type 'string'.")] diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/InvalidNumericLiteralTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/InvalidNumericLiteralTests.fs index 720f18a06d..4862927ba5 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/InvalidNumericLiteralTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/InvalidNumericLiteralTests.fs @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit open FSharp.Test.Utilities +open FSharp.Test.Utilities.Compiler open FSharp.Compiler.SourceCodeServices open FSharp.Compiler.AbstractIL.Internal @@ -25,51 +26,41 @@ module ``Numeric Literals`` = [] [] let ``Invalid Numeric Literals`` literal = - CompilerAssert.TypeCheckSingleError - ("let x = " + literal) - FSharpErrorSeverity.Error - 1156 - (1, 9, 1, 9 + (String.length literal)) - "This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0o1, 0b1, 1l (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger)." + FSharp ("let x = " + literal) + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1156, Line 1, Col 9, Line 1, Col (9 + (String.length literal)), + "This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0o1, 0b1, 1l (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger).") [] let ``3_(dot)1415F is invalid numeric literal``() = - CompilerAssert.TypeCheckWithErrors - """ -let x = 3_.1415F - """ - [| - FSharpErrorSeverity.Error, 1156, (2, 9, 2, 11), "This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0o1, 0b1, 1l (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger)."; - FSharpErrorSeverity.Error, 599, (2, 11, 2, 12),"Missing qualification after '.'" - |] + FSharp "let x = 3_.1415F" + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 1156, Line 1, Col 9, Line 1, Col 11, "This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0o1, 0b1, 1l (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger).";) + (Error 599, Line 1, Col 11, Line 1, Col 12,"Missing qualification after '.'")] [] let ``_52 is invalid numeric literal``() = - CompilerAssert.TypeCheckSingleError - """ -let x = _52 - """ - FSharpErrorSeverity.Error - 39 - (2, 9, 2, 12) - "The value or constructor '_52' is not defined." + FSharp "let x = _52" + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 1, Col 9, Line 1, Col 12, "The value or constructor '_52' is not defined.") [] let ``1N is invalid numeric literal``() = - CompilerAssert.TypeCheckSingleError - """ -let x = 1N - """ - FSharpErrorSeverity.Error - 0784 - (2, 9, 2, 11) - "This numeric literal requires that a module 'NumericLiteralN' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope" + FSharp "let x = 1N" + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 0784, Line 1, Col 9, Line 1, Col 11, + "This numeric literal requires that a module 'NumericLiteralN' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope") [] let ``1N is invalid numeric literal in FSI``() = if Utils.runningOnMono then () - else + else CompilerAssert.RunScriptWithOptions [| "--langversion:preview"; "--test:ErrorRanges" |] """ let x = 1N @@ -79,10 +70,10 @@ let x = 1N "Operation could not be completed due to earlier error" ] + // Regressiont test for FSharp1.0: 2543 - Decimal literals do not support exponents [] [] [] let ``Valid Numeric Literals`` literal = - // Regressiont test for FSharp1.0: 2543 - Decimal literals do not support exponents - - CompilerAssert.Pass ("let x = " + literal) \ No newline at end of file + FSharp ("let x = " + literal) + |> typecheck |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/MissingElseBranch.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/MissingElseBranch.fs index 9ab09f8a9e..07a40b5c9a 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/MissingElseBranch.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/MissingElseBranch.fs @@ -1,50 +1,46 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities.Compiler module ``Else branch is missing`` = [] let ``Fail if else branch is missing``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let x = 10 let y = if x > 10 then "test" - """ - FSharpErrorSeverity.Error - 1 - (4, 19, 4, 25) - "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 'string'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 4, Col 19, Line 4, Col 25, + "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 'string'.") [] let ``Fail on type error in condition``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let x = 10 let y = - if x > 10 then + if x > 10 then if x <> "test" then printfn "test" () - """ - FSharpErrorSeverity.Error - 1 - (5, 14, 5, 20) - "This expression was expected to have type\n 'int' \nbut here has type\n 'string' " + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 5, Col 14, Line 5, Col 20, + "This expression was expected to have type\n 'int' \nbut here has type\n 'string' ") [] let ``Fail if else branch is missing in nesting``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let x = 10 let y = if x > 10 then ("test") - """ - FSharpErrorSeverity.Error - 1 - (4, 20, 4, 26) - "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 'string'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 4, Col 20, Line 4, Col 26, + "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 'string'.") diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/MissingExpressionTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/MissingExpressionTests.fs index 802bcfd675..f91d8b3d68 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/MissingExpressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/MissingExpressionTests.fs @@ -1,23 +1,21 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities.Compiler module ``Missing Expression`` = - + [] let ``Missing Expression after let``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let sum = 0 for x in 0 .. 10 do let sum = sum + x - """ - FSharpErrorSeverity.Error - 588 - (4,5,4,8) - "The block following this 'let' is unfinished. Every code block is an expression and must have a result. 'let' cannot be the final code element in a block. Consider giving this block an explicit result." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 588, Line 4, Col 5, Line 4, Col 8, + "The block following this 'let' is unfinished. Every code block is an expression and must have a result. 'let' cannot be the final code element in a block. Consider giving this block an explicit result.") diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ModuleAbbreviationTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ModuleAbbreviationTests.fs index 5c9647fb07..932fde27aa 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ModuleAbbreviationTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/ModuleAbbreviationTests.fs @@ -1,21 +1,17 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities.Compiler module ``Module Abbreviations`` = [] let ``Public Module Abbreviation``() = - CompilerAssert.TypeCheckSingleError - """ -module public L1 = List - """ - FSharpErrorSeverity.Error - 536 - (2, 1, 2, 7) - "The 'Public' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private." + FSharp "module public L1 = List" + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 536, Line 1, Col 1, Line 1, Col 7, + "The 'Public' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private.") diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/NameResolutionTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/NameResolutionTests.fs index c48a5c9113..016bbdcadc 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/NameResolutionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/NameResolutionTests.fs @@ -1,17 +1,15 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities.Compiler module NameResolutionTests = [] let FieldNotInRecord () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type A = { Hello:string; World:string } type B = { Size:int; Height:int } type C = { Wheels:int } @@ -20,16 +18,15 @@ type E = { Unknown:string } type F = { Wallis:int; Size:int; Height:int; } let r:F = { Size=3; Height=4; Wall=1 } - """ - FSharpErrorSeverity.Error - 1129 - (9, 31, 9, 35) - ("The record type 'F' does not contain a label 'Wall'. Maybe you want one of the following:" + System.Environment.NewLine + " Wallis") + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1129, Line 9, Col 31, Line 9, Col 35, + ("The record type 'F' does not contain a label 'Wall'. Maybe you want one of the following:" + System.Environment.NewLine + " Wallis")) [] let RecordFieldProposal () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type A = { Hello:string; World:string } type B = { Size:int; Height:int } type C = { Wheels:int } @@ -38,8 +35,8 @@ type E = { Unknown:string } type F = { Wallis:int; Size:int; Height:int; } let r = { Size=3; Height=4; Wall=1 } - """ - FSharpErrorSeverity.Error - 39 - (9, 29, 9, 33) - ("The record label 'Wall' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " Walls" + System.Environment.NewLine + " Wallis") + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 9, Col 29, Line 9, Col 33, + ("The record label 'Wall' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " Walls" + System.Environment.NewLine + " Wallis")) diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/SuggestionsTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/SuggestionsTests.fs index bf26f8a210..abdc7b92ca 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/SuggestionsTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/SuggestionsTests.fs @@ -1,87 +1,69 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities.Compiler module Suggestions = [] let ``Field Suggestion`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type Person = { Name : string; } let x = { Person.Names = "Isaac" } - """ - FSharpErrorSeverity.Error - 39 - (4, 18, 4, 23) - ("The type 'Person' does not define the field, constructor or member 'Names'. Maybe you want one of the following:" + System.Environment.NewLine + " Name") - + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 4, Col 18, Line 4, Col 23, + ("The type 'Person' does not define the field, constructor or member 'Names'. Maybe you want one of the following:" + System.Environment.NewLine + " Name")) [] let ``Suggest Array Module Functions`` () = - CompilerAssert.TypeCheckSingleError - """ -let f = - Array.blt - """ - FSharpErrorSeverity.Error - 39 - (3, 11, 3, 14) - ("The value, constructor, namespace or type 'blt' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " blit") - + FSharp "let f = Array.blt" + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 1, Col 15, Line 1, Col 18, + ("The value, constructor, namespace or type 'blt' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " blit")) [] let ``Suggest Async Module`` () = - CompilerAssert.TypeCheckSingleError - """ -let f = - Asnc.Sleep 1000 - """ - FSharpErrorSeverity.Error - 39 - (3, 5, 3, 9) - ("The value, namespace, type or module 'Asnc' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " Async" + System.Environment.NewLine + " async" + System.Environment.NewLine + " asin" + System.Environment.NewLine + " snd") - + FSharp "let f = Asnc.Sleep 1000" + |> typecheck + |> shouldFail + |> withSingleDiagnostic( Error 39, Line 1, Col 9, Line 1, Col 13, + ("The value, namespace, type or module 'Asnc' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " Async" + System.Environment.NewLine + " async" + System.Environment.NewLine + " asin" + System.Environment.NewLine + " snd")) [] let ``Suggest Attribute`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ [] type MyClass<'Bar>() = abstract M<'T> : 'T -> 'T abstract M2<'T> : 'T -> 'Bar - """ - FSharpErrorSeverity.Error - 39 - (2, 3, 2, 15) - ("The type 'AbstractClas' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " AbstractClass" + System.Environment.NewLine + " AbstractClassAttribute") - + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 2, Col 3, Line 2, Col 15, + ("The type 'AbstractClas' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " AbstractClass" + System.Environment.NewLine + " AbstractClassAttribute")) [] let ``Suggest Double Backtick Identifiers`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ module N = let ``longer name`` = "hallo" let x = N.``longe name`` - """ - FSharpErrorSeverity.Error - 39 - (5, 11, 5, 25) - ("The value, constructor, namespace or type 'longe name' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " longer name") - + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 5, Col 11, Line 5, Col 25, + ("The value, constructor, namespace or type 'longe name' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " longer name")) [] let ``Suggest Double Backtick Unions`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ module N = type MyUnion = | ``My Case1`` @@ -90,46 +72,41 @@ module N = open N let x = N.MyUnion.``My Case2`` - """ - FSharpErrorSeverity.Error - 39 - (9, 19, 9,31) - ("The type 'MyUnion' does not define the field, constructor or member 'My Case2'. Maybe you want one of the following:" + System.Environment.NewLine + " My Case1" + System.Environment.NewLine + " Case2") + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 9, Col 19, Line 9,Col 31, + ("The type 'MyUnion' does not define the field, constructor or member 'My Case2'. Maybe you want one of the following:" + System.Environment.NewLine + " My Case1" + System.Environment.NewLine + " Case2")) [] let ``Suggest Fields In Constructor`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type MyClass() = member val MyProperty = "" with get, set member val MyProperty2 = "" with get, set member val ABigProperty = "" with get, set let c = MyClass(Property = "") - """ - FSharpErrorSeverity.Error - 495 - (7, 17, 7, 25) - ("The object constructor 'MyClass' has no argument or settable return property 'Property'. The required signature is new : unit -> MyClass. Maybe you want one of the following:" + System.Environment.NewLine + " MyProperty" + System.Environment.NewLine + " MyProperty2" + System.Environment.NewLine + " ABigProperty") - + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 495, Line 7, Col 17, Line 7, Col 25, + ("The object constructor 'MyClass' has no argument or settable return property 'Property'. The required signature is new : unit -> MyClass. Maybe you want one of the following:" + System.Environment.NewLine + " MyProperty" + System.Environment.NewLine + " MyProperty2" + System.Environment.NewLine + " ABigProperty")) [] let ``Suggest Generic Type`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type T = System.Collections.Generic.Dictionary - """ - FSharpErrorSeverity.Error - 39 - (2, 48, 2, 53) - ("The type 'int11' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " int16" + System.Environment.NewLine + " int16`1" + System.Environment.NewLine + " int8" + System.Environment.NewLine + " uint16" + System.Environment.NewLine + " int") - + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 2, Col 48, Line 2, Col 53, + ("The type 'int11' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " int16" + System.Environment.NewLine + " int16`1" + System.Environment.NewLine + " int8" + System.Environment.NewLine + " uint16" + System.Environment.NewLine + " int")) [] let ``Suggest Methods`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ module Test2 = type D() = @@ -138,61 +115,53 @@ module Test2 = member x.Method1() = 10 D.Method2() - """ - FSharpErrorSeverity.Error - 39 - (9, 7, 9, 14) - ("The type 'D' does not define the field, constructor or member 'Method2'. Maybe you want one of the following:" + System.Environment.NewLine + " Method1") - + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 9, Col 7, Line 9, Col 14, + ("The type 'D' does not define the field, constructor or member 'Method2'. Maybe you want one of the following:" + System.Environment.NewLine + " Method1")) [] let ``Suggest Modules`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ module Collections = let f () = printfn "%s" "Hello" open Collectons - """ - FSharpErrorSeverity.Error - 39 - (6, 6, 6, 16) - ("The namespace or module 'Collectons' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " Collections") - + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 6, Col 6, Line 6, Col 16, + ("The namespace or module 'Collectons' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " Collections")) [] let ``Suggest Namespaces`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ open System.Collectons - """ - FSharpErrorSeverity.Error - 39 - (2, 13, 2, 23) - "The namespace 'Collectons' is not defined." - + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 2, Col 13, Line 2, Col 23, + "The namespace 'Collectons' is not defined.") [] let ``Suggest Record Labels`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type MyRecord = { Hello: int; World: bool} let r = { Hello = 2 ; World = true} let x = r.ello - """ - FSharpErrorSeverity.Error - 39 - (6, 11, 6, 15) - ("The type 'MyRecord' does not define the field, constructor or member 'ello'. Maybe you want one of the following:" + System.Environment.NewLine + " Hello") - + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 6, Col 11, Line 6, Col 15, + ("The type 'MyRecord' does not define the field, constructor or member 'ello'. Maybe you want one of the following:" + System.Environment.NewLine + " Hello")) [] let ``Suggest Record Type for RequireQualifiedAccess Records`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ [] type MyRecord = { Field1: string @@ -200,17 +169,15 @@ type MyRecord = { } let r = { Field1 = "hallo"; Field2 = 1 } - """ - FSharpErrorSeverity.Error - 39 - (8, 11, 8, 17) - ("The record label 'Field1' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " MyRecord.Field1") - + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 8, Col 11, Line 8, Col 17, + ("The record label 'Field1' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " MyRecord.Field1")) [] let ``Suggest To Use Indexer`` () = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ let d = [1,1] |> dict let y = d[1] @@ -218,90 +185,82 @@ let z = d[|1|] let f() = d let a = (f())[1] - """ - [| - FSharpErrorSeverity.Error, 3217, (3, 9, 3, 10), "This value is not a function and cannot be applied. Did you intend to access the indexer via d.[index] instead?" - FSharpErrorSeverity.Error, 3, (5, 9, 5, 10), "This value is not a function and cannot be applied." - FSharpErrorSeverity.Error, 3217, (8, 10, 8, 13), "This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead?" - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 3217, Line 3, Col 9, Line 3, Col 10, "This value is not a function and cannot be applied. Did you intend to access the indexer via d.[index] instead?") + (Error 3, Line 5, Col 9, Line 5, Col 10, "This value is not a function and cannot be applied.") + (Error 3217, Line 8, Col 10, Line 8, Col 13, "This expression is not a function and cannot be applied. Did you intend to access the indexer via expr.[index] instead?")] [] let ``Suggest Type Parameters`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ [] type MyClass<'Bar>() = abstract M<'T> : 'T -> 'T abstract M2<'T> : 'T -> 'Bar abstract M3<'T> : 'T -> 'B - """ - FSharpErrorSeverity.Error - 39 - (6, 28, 6, 30) - "The type parameter 'B is not defined." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 6, Col 28, Line 6, Col 30, + "The type parameter 'B is not defined.") [] let ``Suggest Types in Module`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let x : System.Collections.Generic.Lst = ResizeArray() - """ - FSharpErrorSeverity.Error - 39 - (2, 36, 2, 39) - ("The type 'Lst' is not defined in 'System.Collections.Generic'. Maybe you want one of the following:" + System.Environment.NewLine + " List" + System.Environment.NewLine + " IList" + System.Environment.NewLine + " List`1") + """ |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 2, Col 36, Line 2, Col 39, + ("The type 'Lst' is not defined in 'System.Collections.Generic'. Maybe you want one of the following:" + System.Environment.NewLine + " List" + System.Environment.NewLine + " IList" + System.Environment.NewLine + " List`1")) [] let ``Suggest Types in Namespace`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let x = System.DateTie.MaxValue - """ - FSharpErrorSeverity.Error - 39 - (2, 16, 2, 23) - ("The value, constructor, namespace or type 'DateTie' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " DateTime" + System.Environment.NewLine + " DateTimeKind" + System.Environment.NewLine + " DateTimeOffset" + System.Environment.NewLine + " Data") - + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 2, Col 16, Line 2, Col 23, + ("The value, constructor, namespace or type 'DateTie' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " DateTime" + System.Environment.NewLine + " DateTimeKind" + System.Environment.NewLine + " DateTimeOffset" + System.Environment.NewLine + " Data")) [] let ``Suggest Union Cases`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type MyUnion = | ASimpleCase | AnotherCase of int let u = MyUnion.AntherCase - """ - FSharpErrorSeverity.Error - 39 - (6, 17, 6, 27) - ("The type 'MyUnion' does not define the field, constructor or member 'AntherCase'. Maybe you want one of the following:" + System.Environment.NewLine + " AnotherCase") - + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 6, Col 17, Line 6, Col 27, + ("The type 'MyUnion' does not define the field, constructor or member 'AntherCase'. Maybe you want one of the following:" + System.Environment.NewLine + " AnotherCase")) [] let ``Suggest Union Type for RequireQualifiedAccess Unions`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ [] type MyUnion = | MyCase1 | MyCase2 of string let x : MyUnion = MyCase1 - """ - FSharpErrorSeverity.Error - 39 - (7, 19, 7, 26) - ("The value or constructor 'MyCase1' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " MyUnion.MyCase1") + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 7, Col 19, Line 7, Col 26, + ("The value or constructor 'MyCase1' is not defined. Maybe you want one of the following:" + System.Environment.NewLine + " MyUnion.MyCase1")) [] let ``Suggest Unions in PatternMatch`` () = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ [] type MyUnion = | Case1 @@ -313,8 +272,8 @@ let x = match y with | MyUnion.Cas1 -> 1 | _ -> 2 - """ - FSharpErrorSeverity.Error - 39 - (11, 15, 11, 19) - ("The type 'MyUnion' does not define the field, constructor or member 'Cas1'. Maybe you want one of the following:" + System.Environment.NewLine + " Case1" + System.Environment.NewLine + " Case2") + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 39, Line 11, Col 15, Line 11, Col 19, + ("The type 'MyUnion' does not define the field, constructor or member 'Cas1'. Maybe you want one of the following:" + System.Environment.NewLine + " Case1" + System.Environment.NewLine + " Case2")) diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TypeMismatchTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TypeMismatchTests.fs index 817e0a588c..8d2d86d1d7 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TypeMismatchTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/TypeMismatchTests.fs @@ -1,81 +1,75 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities.Compiler module ``Type Mismatch`` = [] let ``return Instead Of return!``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let rec foo() = async { return foo() } - """ - FSharpErrorSeverity.Error - 1 - (2, 32, 2, 37) - "Type mismatch. Expecting a\n ''a' \nbut given a\n 'Async<'a>' \nThe types ''a' and 'Async<'a>' cannot be unified. Consider using 'return!' instead of 'return'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 2, Col 32, Line 2, Col 37, + "Type mismatch. Expecting a\n ''a' \nbut given a\n 'Async<'a>' \nThe types ''a' and 'Async<'a>' cannot be unified. Consider using 'return!' instead of 'return'.") [] let ``yield Instead Of yield!``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type Foo() = member this.Yield(x) = [x] let rec f () = Foo() { yield f ()} - """ - FSharpErrorSeverity.Error - 1 - (5, 30, 5, 34) - "Type mismatch. Expecting a\n ''a' \nbut given a\n ''a list' \nThe types ''a' and ''a list' cannot be unified. Consider using 'yield!' instead of 'yield'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 5, Col 30, Line 5, Col 34, + "Type mismatch. Expecting a\n ''a' \nbut given a\n ''a list' \nThe types ''a' and ''a list' cannot be unified. Consider using 'yield!' instead of 'yield'.") [] let ``Ref Cell Instead Of Not``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let x = true if !x then printfn "hello" - """ - FSharpErrorSeverity.Error - 1 - (3, 5, 3, 6) - ("This expression was expected to have type\n 'bool ref' \nbut here has type\n 'bool' " + System.Environment.NewLine + "The '!' operator is used to dereference a ref cell. Consider using 'not expr' here.") + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 3, Col 5, Line 3, Col 6, + ("This expression was expected to have type\n 'bool ref' \nbut here has type\n 'bool' " + System.Environment.NewLine + "The '!' operator is used to dereference a ref cell. Consider using 'not expr' here.")) [] let ``Ref Cell Instead Of Not 2``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let x = true let y = !x - """ - FSharpErrorSeverity.Error - 1 - (3, 10, 3, 11) - ("This expression was expected to have type\n ''a ref' \nbut here has type\n 'bool' " + System.Environment.NewLine + "The '!' operator is used to dereference a ref cell. Consider using 'not expr' here.") + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 1, Line 3, Col 10, Line 3, Col 11, + ("This expression was expected to have type\n ''a ref' \nbut here has type\n 'bool' " + System.Environment.NewLine + "The '!' operator is used to dereference a ref cell. Consider using 'not expr' here.")) [] let ``Guard Has Wrong Type``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ let x = 1 match x with | 1 when "s" -> true | _ -> false - """ - [| - FSharpErrorSeverity.Error, 1, (4, 10, 4, 13), "A pattern match guard must be of type 'bool', but this 'when' expression is of type 'string'." - FSharpErrorSeverity.Warning, 20, (3, 1, 5, 13), "The result of this expression has type 'bool' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'." - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 20, Line 3, Col 1, Line 5, Col 13, "The result of this expression has type 'bool' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'.") + (Error 1, Line 4, Col 10, Line 4, Col 13, "A pattern match guard must be of type 'bool', but this 'when' expression is of type 'string'.")] [] let ``Runtime Type Test In Pattern``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ open System.Collections.Generic let orig = Dictionary() @@ -84,16 +78,16 @@ let c = match orig with | :? IDictionary -> "yes" | _ -> "no" - """ - [| - FSharpErrorSeverity.Warning, 67, (8, 5, 8, 28), "This type test or downcast will always hold" - FSharpErrorSeverity.Error, 193, (8, 5, 8, 28), "Type constraint mismatch. The type \n 'IDictionary' \nis not compatible with type\n 'Dictionary' \n" - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 67, Line 8, Col 5, Line 8, Col 28, "This type test or downcast will always hold") + (Error 193, Line 8, Col 5, Line 8, Col 28, "Type constraint mismatch. The type \n 'IDictionary' \nis not compatible with type\n 'Dictionary' \n")] [] let ``Runtime Type Test In Pattern 2``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ open System.Collections.Generic let orig = Dictionary() @@ -102,16 +96,16 @@ let c = match orig with | :? IDictionary as y -> "yes" + y.ToString() | _ -> "no" - """ - [| - FSharpErrorSeverity.Warning, 67, (8, 5, 8, 28), "This type test or downcast will always hold" - FSharpErrorSeverity.Error, 193, (8, 5, 8, 28), "Type constraint mismatch. The type \n 'IDictionary' \nis not compatible with type\n 'Dictionary' \n" - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 67, Line 8, Col 5, Line 8, Col 28, "This type test or downcast will always hold") + (Error 193, Line 8, Col 5, Line 8, Col 28, "Type constraint mismatch. The type \n 'IDictionary' \nis not compatible with type\n 'Dictionary' \n")] [] let ``Override Errors``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ type Base() = abstract member Member: int * string -> string default x.Member (i, s) = s @@ -127,9 +121,10 @@ type Derived2() = type Derived3() = inherit Base() override x.Member (s : string, i : int) = sprintf "Hello %s" s - """ - [| - FSharpErrorSeverity.Error, 856, (8, 16, 8, 22), "This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:" + System.Environment.NewLine + " abstract member Base.Member : int * string -> string" - FSharpErrorSeverity.Error, 856, (12, 16, 12, 22), "This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:" + System.Environment.NewLine + " abstract member Base.Member : int * string -> string" - FSharpErrorSeverity.Error, 1, (16, 24, 16, 34), "This expression was expected to have type\n 'int' \nbut here has type\n 'string' " - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Error 856, Line 8, Col 16, Line 8, Col 22, "This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:" + System.Environment.NewLine + " abstract member Base.Member : int * string -> string") + (Error 856, Line 12, Col 16, Line 12, Col 22, "This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:" + System.Environment.NewLine + " abstract member Base.Member : int * string -> string") + (Error 1, Line 16, Col 24, Line 16, Col 34, "This expression was expected to have type\n 'int' \nbut here has type\n 'string' ")] diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnitGenericAbstactType.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnitGenericAbstactType.fs index 11ec30ab19..2b244e1215 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnitGenericAbstactType.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UnitGenericAbstactType.fs @@ -1,28 +1,25 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities.Compiler module ``Unit generic abstract Type`` = [] - let ``Unit can not be used as return type of abstract method paramete on return type``() = - CompilerAssert.TypeCheckSingleError - """ + let ``Unit can not be used as return type of abstract method paramete on return type``() = + FSharp """ type EDF<'S> = abstract member Apply : int -> 'S type SomeEDF () = interface EDF with - member this.Apply d = + member this.Apply d = // [ERROR] The member 'Apply' does not have the correct type to override the corresponding abstract method. () - """ - FSharpErrorSeverity.Error - 17 - (6, 21, 6, 26) - "The member 'Apply : int -> unit' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type." - + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 17, Line 6, Col 21, Line 6, Col 26, + "The member 'Apply : int -> unit' is specialized with 'unit' but 'unit' can't be used as return type of an abstract method parameterized on return type.") diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UpcastDowncastTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UpcastDowncastTests.fs index 79e32f9e3e..61fcaadf12 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UpcastDowncastTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/UpcastDowncastTests.fs @@ -1,51 +1,49 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities.Compiler module ``Upcast and Downcast`` = [] let ``Downcast Instead Of Upcast``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ open System.Collections.Generic let orig = Dictionary() :> IDictionary let c = orig :> Dictionary - """ - FSharpErrorSeverity.Error - 193 - (5, 9, 5, 36) - "Type constraint mismatch. The type \n 'IDictionary' \nis not compatible with type\n 'Dictionary' \n" + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Error 193, Line 5, Col 9, Line 5, Col 36, + "Type constraint mismatch. The type \n 'IDictionary' \nis not compatible with type\n 'Dictionary' \n") [] let ``Upcast Instead Of Downcast``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ open System.Collections.Generic let orig = Dictionary() let c = orig :?> IDictionary - """ - [| - FSharpErrorSeverity.Warning, 67, (5, 9, 5, 38), "This type test or downcast will always hold" - FSharpErrorSeverity.Error, 3198, (5, 9, 5, 38), "The conversion from Dictionary to IDictionary is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator." - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 67, Line 5, Col 9, Line 5, Col 38, "This type test or downcast will always hold") + (Error 3198, Line 5, Col 9, Line 5, Col 38, "The conversion from Dictionary to IDictionary is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator.")] [] let ``Upcast Function Instead Of Downcast``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ open System.Collections.Generic let orig = Dictionary() let c : IDictionary = downcast orig - """ - [| - FSharpErrorSeverity.Warning, 67, (5, 32, 5, 45), "This type test or downcast will always hold" - FSharpErrorSeverity.Error, 3198, (5, 32, 5, 45), "The conversion from Dictionary to IDictionary is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'." - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 67, Line 5, Col 32, Line 5, Col 45, "This type test or downcast will always hold") + (Error 3198, Line 5, Col 32, Line 5, Col 45, "The conversion from Dictionary to IDictionary is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'.")] diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/WarnExpressionTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/WarnExpressionTests.fs index 565e423407..28487c97aa 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/WarnExpressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/WarnExpressionTests.fs @@ -1,62 +1,57 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities.Compiler module ``Warn Expression`` = [] let ``Warn If Expression Result Unused``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ 1 + 2 printfn "%d" 3 - """ - FSharpErrorSeverity.Warning - 20 - (2, 1, 2, 6) - "The result of this expression has type 'int' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 20, Line 2, Col 1, Line 2, Col 6, + "The result of this expression has type 'int' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'.") [] let ``Warn If Possible Assignment``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let x = 10 let y = "hello" let changeX() = x = 20 y = "test" - """ - FSharpErrorSeverity.Warning - 20 - (6, 5, 6, 11) - "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. 'x <- expression'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 20, Line 6, Col 5, Line 6, Col 11, + "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. 'x <- expression'.") [] let ``Warn If Possible Assignment To Mutable``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let mutable x = 10 let y = "hello" let changeX() = x = 20 y = "test" - """ - FSharpErrorSeverity.Warning - 20 - (6, 5, 6, 11) - "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. 'x <- expression'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 20, Line 6, Col 5, Line 6, Col 11, + "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. 'x <- expression'.") [] let ``Warn If Possible dotnet Property Setter``() = - CompilerAssert.TypeCheckWithErrors - """ + FSharp """ open System let z = System.Timers.Timer() @@ -65,16 +60,16 @@ let y = "hello" let changeProperty() = z.Enabled = true y = "test" - """ - [| - FSharpErrorSeverity.Warning, 760, (4, 9, 4, 30), "It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value" - FSharpErrorSeverity.Warning, 20, (8, 5, 8, 21), "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. 'z.Enabled <- expression'." - |] + """ + |> typecheck + |> shouldFail + |> withDiagnostics [ + (Warning 760, Line 4, Col 9, Line 4, Col 30, "It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value") + (Warning 20, Line 8, Col 5, Line 8, Col 21, "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. 'z.Enabled <- expression'.")] [] let ``Don't Warn If Property Without Setter``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type MyClass(property1 : int) = member val Property2 = "" with get @@ -84,33 +79,30 @@ let y = "hello" let changeProperty() = x.Property2 = "22" y = "test" - """ - FSharpErrorSeverity.Warning - 20 - (9, 5, 9, 23) - "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 20, Line 9, Col 5, Line 9, Col 23, + "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'.") [] let ``Warn If Implicitly Discarded``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let x = 10 let y = 20 let changeX() = y * x = 20 y = 30 - """ - FSharpErrorSeverity.Warning - 20 - (6, 5, 6, 15) - "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 20, Line 6, Col 5, Line 6, Col 15, + "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'.") [] let ``Warn If Discarded In List``() = - CompilerAssert.TypeCheckWithErrorsAndOptions - [| "--langversion:4.6" |] - """ + FSharp """ let div _ _ = 1 let subView _ _ = [1; 2] @@ -120,19 +112,16 @@ let view model dispatch = yield! subView model dispatch div [] [] ] - """ - [| - FSharpErrorSeverity.Warning, - 3221, - (9, 8, 9, 17), - "This expression returns a value of type 'int' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'." - |] + """ + |> withOptions ["--langversion:4.6"] + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3221, Line 9, Col 8, Line 9, Col 17, + "This expression returns a value of type 'int' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'.") [] let ``Warn If Discarded In List 2``() = - CompilerAssert.TypeCheckWithErrorsAndOptions - [| "--langversion:4.6" |] - """ + FSharp """ // stupid things to make the sample compile let div _ _ = 1 let subView _ _ = [1; 2] @@ -147,19 +136,16 @@ let view model dispatch = | _ -> subView model dispatch ] ] - """ - [| - FSharpErrorSeverity.Warning, - 3222, - (13, 19, 13, 41), - "This expression returns a value of type 'int list' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'." - |] + """ + |> withOptions ["--langversion:4.6"] + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 3222, Line 13, Col 19, Line 13, Col 41, + "This expression returns a value of type 'int list' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'.") [] let ``Warn If Discarded In List 3``() = - CompilerAssert.TypeCheckWithErrorsAndOptions - [| "--langversion:4.6" |] - """ + FSharp """ // stupid things to make the sample compile let div _ _ = 1 let subView _ _ = true @@ -174,33 +160,30 @@ let view model dispatch = | _ -> subView model dispatch ] ] - """ - [| - FSharpErrorSeverity.Warning, - 20, - (13, 19, 13, 41), - "The result of this expression has type 'bool' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'." - |] + """ + |> withOptions ["--langversion:4.6"] + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 20, Line 13, Col 19, Line 13, Col 41, + "The result of this expression has type 'bool' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'.") [] let ``Warn Only On Last Expression``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ let mutable x = 0 while x < 1 do printfn "unneeded" x <- x + 1 true - """ - FSharpErrorSeverity.Warning - 20 - (6, 5, 6, 9) - "The result of this expression has type 'bool' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 20, Line 6, Col 5, Line 6, Col 9, + "The result of this expression has type 'bool' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'.") [] let ``Warn If Possible Property Setter``() = - CompilerAssert.TypeCheckSingleError - """ + FSharp """ type MyClass(property1 : int) = member val Property1 = property1 member val Property2 = "" with get, set @@ -211,17 +194,16 @@ let y = "hello" let changeProperty() = x.Property2 = "20" y = "test" - """ - FSharpErrorSeverity.Warning - 20 - (10, 5, 10, 23) - "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. 'x.Property2 <- expression'." + """ + |> typecheck + |> shouldFail + |> withSingleDiagnostic (Warning 20, Line 10, Col 5, Line 10, Col 23, + "The result of this equality expression has type 'bool' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. 'x.Property2 <- expression'.") [] let ``Dont warn external function as unused``() = - CompilerAssert.Pass - """ + FSharp """ open System open System.Runtime.InteropServices @@ -240,4 +222,6 @@ let main _argv = let _ = Test.ExtractIconEx("", 0, [| |], [| |], 0u) 0 - """ + """ + |> typecheck + |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/WrongSyntaxInForLoop.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/WrongSyntaxInForLoop.fs index d7cd606810..89e3707c24 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/WrongSyntaxInForLoop.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/WrongSyntaxInForLoop.fs @@ -1,20 +1,21 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.ErrorMessages open Xunit -open FSharp.Test.Utilities -open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities.Compiler module ``Wrong syntax in for loop`` = [] let ``Equals instead of in``() = - CompilerAssert.ParseWithErrors - """ + FSharp """ module X for i = 0 .. 100 do () - """ - [|FSharpErrorSeverity.Error, 3215, (3, 7, 3, 8), "Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead?" |] + """ + |> parse + |> shouldFail + |> withSingleDiagnostic (Error 3215, Line 3, Col 7, Line 3, Col 8, + "Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead?") diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 14e96dfa23..9059a4946c 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -1,14 +1,9 @@  - net472;netcoreapp3.1 - win-x86;win-x64;linux-x64;osx-x64 netcoreapp3.1 - linux-x64;osx-x64 - $(AssetTargetFallback);portable-net45+win8+wp8+wpa81 - true Library true false @@ -38,9 +33,11 @@ + - + + @@ -48,17 +45,4 @@ - - - - - - - - - - - - - diff --git a/tests/FSharp.Compiler.ComponentTests/Interop/SimpleInteropTests.fs b/tests/FSharp.Compiler.ComponentTests/Interop/SimpleInteropTests.fs index 59b0ce8343..94eb790fe5 100644 --- a/tests/FSharp.Compiler.ComponentTests/Interop/SimpleInteropTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Interop/SimpleInteropTests.fs @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.ErrorMessages.ComponentTests +namespace FSharp.Compiler.ComponentTests.Interop open Xunit -open FSharp.Test.Utilities open FSharp.Test.Utilities.Compiler module ``C# <-> F# basic interop`` = @@ -32,8 +31,7 @@ let a = AMaker.makeA() |> compile |> shouldSucceed - - [] + [] let ``Instantiate F# type from C#`` () = let FSLib = FSharp """ @@ -73,3 +71,46 @@ public class BicycleShop { app |> compile |> shouldFail + +module ``C# <-> F# interop: fields`` = + [] + let ``can't mutably set a C#-const field in F#`` () = + let csLib = + CSharp """ +public static class Holder { + public const string Label = "label"; +} + """ + |> withName "CsharpConst" + + let fsLib = + FSharp """ +module CannotSetCSharpConst +Holder.Label <- "nope" + """ + |> withReferences [csLib] + + fsLib + |> compile + |> shouldFail + + [] + let ``can't mutably set a C#-readonly field in F#`` () = + let csLib = + CSharp """ +public static class Holder { + public static readonly string Label = "label"; +} + """ + |> withName "CsharpReadonly" + + let fsLib = + FSharp """ +module CannotSetCSharpReadonly +Holder.Label <- "nope" + """ + |> withReferences [csLib] + + fsLib + |> compile + |> shouldFail diff --git a/tests/fsharp/Compiler/Conformance/Properties/ILMemberAccessTests.fs b/tests/FSharp.Compiler.ComponentTests/Interop/VisibilityTests.fs similarity index 65% rename from tests/fsharp/Compiler/Conformance/Properties/ILMemberAccessTests.fs rename to tests/FSharp.Compiler.ComponentTests/Interop/VisibilityTests.fs index e421db9e53..89367e9885 100644 --- a/tests/fsharp/Compiler/Conformance/Properties/ILMemberAccessTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Interop/VisibilityTests.fs @@ -1,16 +1,9 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. +namespace FSharp.Compiler.ComponentTests.Interop -namespace FSharp.Compiler.UnitTests +open Xunit +open FSharp.Test.Utilities.Compiler -open FSharp.Compiler.SourceCodeServices -open FSharp.Reflection -open FSharp.Test -open FSharp.Test.Utilities -open FSharp.Test.Utilities.Utilities -open NUnit.Framework - -[] -module ILMemberAccessTests = +module ``Verify visibility of properties`` = let csharpBaseClass = """ namespace ExhaustiveCombinations @@ -29,8 +22,7 @@ namespace ExhaustiveCombinations public string SetPublicGetProtectedInternal { protected internal get; set; } public string SetPublicGetPrivate { private get; set; } } -} -""" +}""" let fsharpBaseClass = """ namespace ExhaustiveCombinations @@ -38,17 +30,15 @@ namespace ExhaustiveCombinations open System type FSharpBaseClass () = - member this.GetPublicSetInternal with public get() = "" and internal set (parameter:string) = ignore parameter member this.GetPublicSetPrivate with public get() = "" and private set (parameter:string) = ignore parameter member this.SetPublicGetInternal with internal get() = "" and public set (parameter:string) = ignore parameter - member this.SetPublicGetPrivate with private get() = "" and public set (parameter:string) = ignore parameter + member this.SetPublicGetPrivate with private get() = "" and public set (parameter:string) = ignore parameter""" -""" + [] + let ``C# class F# derived class - access public`` () = - - [] - let ``VerifyVisibility of Properties C# class F# derived class -- AccessPublicStuff`` () = + let csharpLib = CSharp csharpBaseClass |> withName "csLib" let fsharpSource = fsharpBaseClass + """ @@ -76,25 +66,23 @@ type MyFSharpClass () = let _ = this.GetPublicSetPrivate // Accessible () """ - - let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpBaseClass, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) - |> CompilationReference.Create - - let fsCmpl = - Compilation.Create(fsharpSource, Fsx, Exe, options = [|"--langversion:preview"|], cmplRefs = [csCmpl]) - - CompilerAssert.CompileWithErrors(fsCmpl, [| - (FSharpErrorSeverity.Error, 491, (22, 9, 22, 41), - "The member or object constructor 'GetPublicSetInternal' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions."); - (FSharpErrorSeverity.Error, 491, (25, 9, 25, 49), - "The member or object constructor 'GetPublicSetPrivateProtected' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions."); - (FSharpErrorSeverity.Error, 491, (34, 9, 34, 40), - "The member or object constructor 'GetPublicSetPrivate' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.")|]) - - - [] - let ``VerifyVisibility of Properties C# class F# non-derived class -- AccessPublicStuff`` () = + Fsx fsharpSource + |> withOptions ["--langversion:preview"] + |> withReferences [csharpLib] + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 491, Line 19, Col 9, Line 19, Col 41, + "The member or object constructor 'GetPublicSetInternal' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 491, Line 22, Col 9, Line 22, Col 49, + "The member or object constructor 'GetPublicSetPrivateProtected' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 491, Line 31, Col 9, Line 31, Col 40, + "The member or object constructor 'GetPublicSetPrivate' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.")] + + [] + let ``C# class F# non-derived class - access public`` () = + + let csharpLib = CSharp csharpBaseClass |> withName "csLib" let fsharpSource = fsharpBaseClass + """ @@ -123,30 +111,29 @@ type MyFSharpClass () = () """ - let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpBaseClass, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) - |> CompilationReference.Create - - let fsCmpl = - Compilation.Create(fsharpSource, Fsx, Exe, options = [|"--langversion:preview"|], cmplRefs = [csCmpl]) - - CompilerAssert.CompileWithErrors(fsCmpl, [| - (FSharpErrorSeverity.Error, 491, (22, 9, 22, 39), - "The member or object constructor 'GetPublicSetInternal' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions."); - (FSharpErrorSeverity.Error, 491, (25, 9, 25, 47), - "The member or object constructor 'GetPublicSetPrivateProtected' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions."); - (FSharpErrorSeverity.Error, 491, (28, 9, 28, 48), - "The member or object constructor 'GetPublicSetProtectedInternal' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions."); - (FSharpErrorSeverity.Error, 491, (31, 9, 31, 40), - "The member or object constructor 'GetPublicSetProtected' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions."); - (FSharpErrorSeverity.Error, 491, (32, 17, 32, 41), + Fsx fsharpSource + |> withOptions ["--langversion:preview"] + |> withReferences [csharpLib] + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 491, Line 19, Col 9, Line 19, Col 39, + "The member or object constructor 'GetPublicSetInternal' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 491, Line 22, Col 9, Line 22, Col 47, + "The member or object constructor 'GetPublicSetPrivateProtected' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 491, Line 25, Col 9, Line 25, Col 48, + "The member or object constructor 'GetPublicSetProtectedInternal' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 491, Line 28, Col 9, Line 28, Col 40, + "The member or object constructor 'GetPublicSetProtected' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.") + (Error 491, Line 29, Col 17, Line 29, Col 41, "The member or object constructor 'SetPublicGetProtected' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions."); - (FSharpErrorSeverity.Error, 491, (34, 9, 34, 38), - "The member or object constructor 'GetPublicSetPrivate' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.")|]) + (Error 491, Line 31, Col 9, Line 31, Col 38, + "The member or object constructor 'GetPublicSetPrivate' is not accessible. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions.")] + [] + let ``F# base F# derived class - access public`` () = - [] - let ``VerifyVisibility of Properties F# base F# derived class -- AccessPublicStuff`` () = + let csharpLib = CSharp csharpBaseClass |> withName "csLib" let fsharpSource = fsharpBaseClass + """ @@ -155,7 +142,6 @@ open ExhaustiveCombinations type MyFSharpClass () = inherit FSharpBaseClass() - member this.AccessPublicStuff() = this.GetPublicSetInternal <- "1" // Inaccessible @@ -170,26 +156,20 @@ type MyFSharpClass () = this.SetPublicGetPrivate <- "1" // Accessible let _ = this.SetPublicGetPrivate // accessible - () -""" + ()""" + Fsx fsharpSource + |> withOptions ["--langversion:preview"] + |> withReferences [csharpLib] + |> compile + |> shouldFail + |> withDiagnostics [ + (Error 810, Line 21, Col 9, Line 21, Col 33, "Property 'GetPublicSetPrivate' cannot be set") + (Error 807, Line 28, Col 17, Line 28, Col 41, "Property 'SetPublicGetPrivate' is not readable")] - let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpBaseClass, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) - |> CompilationReference.Create + [] + let ``F# class F# non-derived class - access public`` () = - let fsCmpl = - Compilation.Create(fsharpSource, Fsx, Exe, options = [|"--langversion:preview"|], cmplRefs = [csCmpl]) - - CompilerAssert.CompileWithErrors(fsCmpl, [| - (FSharpErrorSeverity.Error, 810, (25, 9, 25, 33), - "Property 'GetPublicSetPrivate' cannot be set"); - (FSharpErrorSeverity.Error, 807, (32, 17, 32, 41), - "Property 'SetPublicGetPrivate' is not readable") - |]) - - - [] - let ``VerifyVisibility of Properties F# class F# non-derived class -- AccessPublicStuff`` () = + let csharpLib = CSharp csharpBaseClass |> withName "csLib" let fsharpSource = fsharpBaseClass + """ @@ -197,7 +177,6 @@ open System open ExhaustiveCombinations type MyFSharpClass () = - member _.AccessPublicStuff() = let bc = new FSharpBaseClass() @@ -206,19 +185,11 @@ type MyFSharpClass () = bc.GetPublicSetPrivate <- "1" // Inaccessible let _ = bc.GetPublicSetPrivate // Accessible - () -""" - - let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpBaseClass, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) - |> CompilationReference.Create - - let fsCmpl = - Compilation.Create(fsharpSource, Fsx, Exe, options = [|"--langversion:preview"|], cmplRefs = [csCmpl]) - - CompilerAssert.CompileWithErrors(fsCmpl, [| - (FSharpErrorSeverity.Error, 810, (25, 9, 25, 31), - "Property 'GetPublicSetPrivate' cannot be set")|]) - - - + ()""" + + Fsx fsharpSource + |> withOptions ["--langversion:preview"] + |> withReferences [csharpLib] + |> compile + |> shouldFail + |> withSingleDiagnostic (Error 810, Line 21, Col 9, Line 21, Col 31, "Property 'GetPublicSetPrivate' cannot be set") diff --git a/tests/fsharp/Compiler/Language/CodeQuotationTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/CodeQuotationTests.fs similarity index 88% rename from tests/fsharp/Compiler/Language/CodeQuotationTests.fs rename to tests/FSharp.Compiler.ComponentTests/Language/CodeQuotationTests.fs index c3feb8277a..04e39bdb82 100644 --- a/tests/fsharp/Compiler/Language/CodeQuotationTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/CodeQuotationTests.fs @@ -1,15 +1,14 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.UnitTests +namespace FSharp.Compiler.ComponentTests.Language -open NUnit.Framework +open Xunit open FSharp.Test.Utilities.Compiler open FSharp.Quotations.Patterns -[] module CodeQuotationsTests = - [] + [] let ``Quotation on op_UnaryPlus(~+) compiles and runs`` () = Fsx """ open FSharp.Linq.RuntimeHelpers @@ -37,7 +36,6 @@ let z : unit = failwithf "did not expect expression for 'z': %A" e """ |> asExe - |> withOptions ["--langversion:preview"] + |> withPreview |> compileAndRun - - + |> shouldSucceed diff --git a/tests/FSharp.Compiler.ComponentTests/Language/CompilerDirectiveTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/CompilerDirectiveTests.fs index 9f9d949667..32219920d9 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/CompilerDirectiveTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/CompilerDirectiveTests.fs @@ -1,11 +1,9 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace FSharp.Compiler.Language.ComponentTests +namespace FSharp.Compiler.ComponentTests.Language open Xunit -open FSharp.Test.Utilities open FSharp.Test.Utilities.Compiler -open FSharp.Compiler.SourceCodeServices module ``Test Compiler Directives`` = diff --git a/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj b/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj index eac6510990..27f0a5f4cf 100644 --- a/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj +++ b/tests/FSharp.Compiler.UnitTests/FSharp.Compiler.UnitTests.fsproj @@ -7,6 +7,7 @@ netcoreapp3.1 Library true + $(DefineConstants);ASSUME_PREVIEW_FSHARP_CORE xunit $(NoWarn);3186;1104 @@ -21,12 +22,64 @@ + + CompilerService\FsUnit.fs + + + CompilerService\Common.fs + + + CompilerService\Symbols.fs + + + CompilerService\EditorTests.fs + + + CompilerService\FileSystemTests.fs + + + CompilerService\ProjectAnalysisTests.fs + + + CompilerService\TokenizerTests.fs + + + + CompilerService\PerfTests.fs + + + CompilerService\InteractiveCheckerTests.fs + + + CompilerService\ExprTests.fs + + + CompilerService\CSharpProjectAnalysis.fs + + + CompilerService\StructureTests.fs + + + CompilerService\AssemblyContentProviderTests.fs + + + CompilerService\ServiceUntypedParseTests.fs + + + CompilerService\TreeVisitorTests.fs + + + diff --git a/tests/FSharp.Compiler.UnitTests/HashIfExpression.fs b/tests/FSharp.Compiler.UnitTests/HashIfExpression.fs index 6481801adb..705ce465b1 100644 --- a/tests/FSharp.Compiler.UnitTests/HashIfExpression.fs +++ b/tests/FSharp.Compiler.UnitTests/HashIfExpression.fs @@ -49,21 +49,21 @@ type public HashIfExpression() = sb.ToString () let createParser () = - let errors = ResizeArray() - let warnings = ResizeArray() + let errors = ResizeArray() + let warnings = ResizeArray() - let errorLogger = + let errorLogger = { new ErrorLogger("TestErrorLogger") with member x.DiagnosticSink(e, isError) = if isError then errors.Add e else warnings.Add e member x.ErrorCount = errors.Count } - let lightSyntax = LightSyntaxStatus(true, false) + let lightSyntax = LightSyntaxStatus(true, false) let resourceManager = LexResourceManager () - let defines = [] - let startPos = Position.Empty - let args = mkLexargs ("dummy", defines, lightSyntax, resourceManager, [], errorLogger, PathMap.empty) + let defines= [] + let startPos = Position.Empty + let args = mkLexargs (defines, lightSyntax, resourceManager, [], errorLogger, PathMap.empty) CompileThreadStatic.ErrorLogger <- errorLogger diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj index 5588351917..c6921315b2 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj @@ -85,9 +85,7 @@ - - - + diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/OperatorsModule2.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/OperatorsModule2.fs index da874ebe11..49f2557443 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/OperatorsModule2.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/OperatorsModule2.fs @@ -180,6 +180,10 @@ type OperatorsModule2() = let result = Operators.int64 UInt64.MaxValue Assert.AreEqual(-1L, result) + // max and min value as literals (this breaks compilation if the lexer fails) + Assert.AreEqual(-9223372036854775808L, Int64.MinValue) + Assert.AreEqual(9223372036854775807L, Int64.MaxValue) + // OverflowException, from decimal is always checked CheckThrowsOverflowException(fun() -> Operators.int64 Decimal.MinValue |> ignore) @@ -355,6 +359,16 @@ type OperatorsModule2() = // Cannot express this as a literal, see https://github.com/dotnet/fsharp/issues/9524 Assert.AreEqual("-9223372036854775808", string result) + // Max and min value as literals (this breaks compilation if the lexer fails). + // The following tests ensure that the proper value is parsed, which is similar to `nativeint Int64.MaxValue` etc. + if Info.isX86Runtime then + Assert.AreEqual("0", string -9223372036854775808n) // same as int32 -9223372036854775808L + Assert.AreEqual("-1", string 9223372036854775807n) // same as int32 9223372036854775807L + else + Assert.AreEqual("-9223372036854775808", string -9223372036854775808n) + Assert.AreEqual("9223372036854775807", string 9223372036854775807n) + + [] member _.not() = let result = Operators.not true diff --git a/tests/FSharp.Core.UnitTests/SurfaceArea.coreclr.fs b/tests/FSharp.Core.UnitTests/SurfaceArea.fs similarity index 99% rename from tests/FSharp.Core.UnitTests/SurfaceArea.coreclr.fs rename to tests/FSharp.Core.UnitTests/SurfaceArea.fs index 5f6fa5cc7f..75e66bbb0a 100644 --- a/tests/FSharp.Core.UnitTests/SurfaceArea.coreclr.fs +++ b/tests/FSharp.Core.UnitTests/SurfaceArea.fs @@ -2235,10 +2235,20 @@ Microsoft.FSharp.Core.PrintfFormat`4[TPrinter,TState,TResidue,TResult]: System.S Microsoft.FSharp.Core.PrintfFormat`4[TPrinter,TState,TResidue,TResult]: System.String Value Microsoft.FSharp.Core.PrintfFormat`4[TPrinter,TState,TResidue,TResult]: System.String get_Value() Microsoft.FSharp.Core.PrintfFormat`4[TPrinter,TState,TResidue,TResult]: Void .ctor(System.String) +Microsoft.FSharp.Core.PrintfFormat`4[TPrinter,TState,TResidue,TResult]: Void .ctor(System.String, System.Object[], System.Type[]) +Microsoft.FSharp.Core.PrintfFormat`4[TPrinter,TState,TResidue,TResult]: System.Object[] Captures +Microsoft.FSharp.Core.PrintfFormat`4[TPrinter,TState,TResidue,TResult]: System.Object[] get_Captures() +Microsoft.FSharp.Core.PrintfFormat`4[TPrinter,TState,TResidue,TResult]: System.Type[] CaptureTypes +Microsoft.FSharp.Core.PrintfFormat`4[TPrinter,TState,TResidue,TResult]: System.Type[] get_CaptureTypes() Microsoft.FSharp.Core.PrintfFormat`5[TPrinter,TState,TResidue,TResult,TTuple]: System.String ToString() Microsoft.FSharp.Core.PrintfFormat`5[TPrinter,TState,TResidue,TResult,TTuple]: System.String Value Microsoft.FSharp.Core.PrintfFormat`5[TPrinter,TState,TResidue,TResult,TTuple]: System.String get_Value() Microsoft.FSharp.Core.PrintfFormat`5[TPrinter,TState,TResidue,TResult,TTuple]: Void .ctor(System.String) +Microsoft.FSharp.Core.PrintfFormat`5[TPrinter,TState,TResidue,TResult,TTuple]: Void .ctor(System.String, System.Object[], System.Type[]) +Microsoft.FSharp.Core.PrintfFormat`5[TPrinter,TState,TResidue,TResult,TTuple]: System.Object[] Captures +Microsoft.FSharp.Core.PrintfFormat`5[TPrinter,TState,TResidue,TResult,TTuple]: System.Object[] get_Captures() +Microsoft.FSharp.Core.PrintfFormat`5[TPrinter,TState,TResidue,TResult,TTuple]: System.Type[] CaptureTypes +Microsoft.FSharp.Core.PrintfFormat`5[TPrinter,TState,TResidue,TResult,TTuple]: System.Type[] get_CaptureTypes() Microsoft.FSharp.Core.PrintfModule: T PrintFormatLineToError[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) Microsoft.FSharp.Core.PrintfModule: T PrintFormatLineToTextWriter[T](System.IO.TextWriter, Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) Microsoft.FSharp.Core.PrintfModule: T PrintFormatLine[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) diff --git a/tests/FSharp.Core.UnitTests/SurfaceArea.net40.fs b/tests/FSharp.Core.UnitTests/SurfaceArea.net40.fs deleted file mode 100644 index 20a8635188..0000000000 --- a/tests/FSharp.Core.UnitTests/SurfaceArea.net40.fs +++ /dev/null @@ -1,2931 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. - -namespace FSharp.Core.UnitTests.SurfaceArea - -open NUnit.Framework -open FSharp.Core.UnitTests.LibraryTestFx - -type SurfaceAreaTest() = - [] - member this.VerifyArea() = - let expected = @" -Microsoft.FSharp.Collections.Array2DModule: Int32 Base1[T](T[,]) -Microsoft.FSharp.Collections.Array2DModule: Int32 Base2[T](T[,]) -Microsoft.FSharp.Collections.Array2DModule: Int32 Length1[T](T[,]) -Microsoft.FSharp.Collections.Array2DModule: Int32 Length2[T](T[,]) -Microsoft.FSharp.Collections.Array2DModule: T Get[T](T[,], Int32, Int32) -Microsoft.FSharp.Collections.Array2DModule: TResult[,] MapIndexed[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]]], T[,]) -Microsoft.FSharp.Collections.Array2DModule: TResult[,] Map[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[,]) -Microsoft.FSharp.Collections.Array2DModule: T[,] Copy[T](T[,]) -Microsoft.FSharp.Collections.Array2DModule: T[,] CreateBased[T](Int32, Int32, Int32, Int32, T) -Microsoft.FSharp.Collections.Array2DModule: T[,] Create[T](Int32, Int32, T) -Microsoft.FSharp.Collections.Array2DModule: T[,] InitializeBased[T](Int32, Int32, Int32, Int32, Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]]) -Microsoft.FSharp.Collections.Array2DModule: T[,] Initialize[T](Int32, Int32, Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]]) -Microsoft.FSharp.Collections.Array2DModule: T[,] Rebase[T](T[,]) -Microsoft.FSharp.Collections.Array2DModule: T[,] ZeroCreateBased[T](Int32, Int32, Int32, Int32) -Microsoft.FSharp.Collections.Array2DModule: T[,] ZeroCreate[T](Int32, Int32) -Microsoft.FSharp.Collections.Array2DModule: Void CopyTo[T](T[,], Int32, Int32, T[,], Int32, Int32, Int32, Int32) -Microsoft.FSharp.Collections.Array2DModule: Void IterateIndexed[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit]]], T[,]) -Microsoft.FSharp.Collections.Array2DModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], T[,]) -Microsoft.FSharp.Collections.Array2DModule: Void Set[T](T[,], Int32, Int32, T) -Microsoft.FSharp.Collections.Array3DModule: Int32 Length1[T](T[,,]) -Microsoft.FSharp.Collections.Array3DModule: Int32 Length2[T](T[,,]) -Microsoft.FSharp.Collections.Array3DModule: Int32 Length3[T](T[,,]) -Microsoft.FSharp.Collections.Array3DModule: T Get[T](T[,,], Int32, Int32, Int32) -Microsoft.FSharp.Collections.Array3DModule: TResult[,,] MapIndexed[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]]]], T[,,]) -Microsoft.FSharp.Collections.Array3DModule: TResult[,,] Map[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[,,]) -Microsoft.FSharp.Collections.Array3DModule: T[,,] Create[T](Int32, Int32, Int32, T) -Microsoft.FSharp.Collections.Array3DModule: T[,,] Initialize[T](Int32, Int32, Int32, Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]]]) -Microsoft.FSharp.Collections.Array3DModule: T[,,] ZeroCreate[T](Int32, Int32, Int32) -Microsoft.FSharp.Collections.Array3DModule: Void IterateIndexed[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit]]]], T[,,]) -Microsoft.FSharp.Collections.Array3DModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], T[,,]) -Microsoft.FSharp.Collections.Array3DModule: Void Set[T](T[,,], Int32, Int32, Int32, T) -Microsoft.FSharp.Collections.Array4DModule: Int32 Length1[T](T[,,,]) -Microsoft.FSharp.Collections.Array4DModule: Int32 Length2[T](T[,,,]) -Microsoft.FSharp.Collections.Array4DModule: Int32 Length3[T](T[,,,]) -Microsoft.FSharp.Collections.Array4DModule: Int32 Length4[T](T[,,,]) -Microsoft.FSharp.Collections.Array4DModule: T Get[T](T[,,,], Int32, Int32, Int32, Int32) -Microsoft.FSharp.Collections.Array4DModule: T[,,,] Create[T](Int32, Int32, Int32, Int32, T) -Microsoft.FSharp.Collections.Array4DModule: T[,,,] Initialize[T](Int32, Int32, Int32, Int32, Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]]]]) -Microsoft.FSharp.Collections.Array4DModule: T[,,,] ZeroCreate[T](Int32, Int32, Int32, Int32) -Microsoft.FSharp.Collections.Array4DModule: Void Set[T](T[,,,], Int32, Int32, Int32, Int32, T) -Microsoft.FSharp.Collections.ArrayModule+Parallel: System.Tuple`2[T[],T[]] Partition[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule+Parallel: TResult[] Choose[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], T[]) -Microsoft.FSharp.Collections.ArrayModule+Parallel: TResult[] Collect[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult[]], T[]) -Microsoft.FSharp.Collections.ArrayModule+Parallel: TResult[] MapIndexed[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]], T[]) -Microsoft.FSharp.Collections.ArrayModule+Parallel: TResult[] Map[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[]) -Microsoft.FSharp.Collections.ArrayModule+Parallel: T[] Initialize[T](Int32, Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]) -Microsoft.FSharp.Collections.ArrayModule+Parallel: Void IterateIndexed[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit]], T[]) -Microsoft.FSharp.Collections.ArrayModule+Parallel: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], T[]) -Microsoft.FSharp.Collections.ArrayModule: Boolean Contains[T](T, T[]) -Microsoft.FSharp.Collections.ArrayModule: Boolean Exists2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,System.Boolean]], T1[], T2[]) -Microsoft.FSharp.Collections.ArrayModule: Boolean Exists[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: Boolean ForAll2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,System.Boolean]], T1[], T2[]) -Microsoft.FSharp.Collections.ArrayModule: Boolean ForAll[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: Boolean IsEmpty[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: Int32 CompareWith[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]], T[], T[]) -Microsoft.FSharp.Collections.ArrayModule: Int32 FindIndexBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: Int32 FindIndex[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: Int32 Length[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: Microsoft.FSharp.Collections.ArrayModule+Parallel -Microsoft.FSharp.Collections.ArrayModule: Microsoft.FSharp.Collections.FSharpList`1[T] ToList[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: Microsoft.FSharp.Core.FSharpOption`1[System.Int32] TryFindIndexBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: Microsoft.FSharp.Core.FSharpOption`1[System.Int32] TryFindIndex[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: Microsoft.FSharp.Core.FSharpOption`1[TResult] TryPick[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], T[]) -Microsoft.FSharp.Collections.ArrayModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryExactlyOne[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryFindBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryFind[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryHead[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryItem[T](Int32, T[]) -Microsoft.FSharp.Collections.ArrayModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryLast[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: System.Collections.Generic.IEnumerable`1[T] ToSeq[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[System.Int32,T][] Indexed[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T,T][] Pairwise[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1,T2][] AllPairs[T1,T2](T1[], T2[]) -Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1,T2][] Zip[T1,T2](T1[], T2[]) -Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1[],T2[]] Unzip[T1,T2](System.Tuple`2[T1,T2][]) -Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[TKey,System.Int32][] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[]) -Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[TKey,T[]][] GroupBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[]) -Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[TResult[],TState] MapFoldBack[T,TState,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TState,System.Tuple`2[TResult,TState]]], T[], TState) -Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[TResult[],TState] MapFold[T,TState,TResult](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Tuple`2[TResult,TState]]], TState, T[]) -Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T[],T[]] Partition[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T[],T[]] SplitAt[T](Int32, T[]) -Microsoft.FSharp.Collections.ArrayModule: System.Tuple`3[T1,T2,T3][] Zip3[T1,T2,T3](T1[], T2[], T3[]) -Microsoft.FSharp.Collections.ArrayModule: System.Tuple`3[T1[],T2[],T3[]] Unzip3[T1,T2,T3](System.Tuple`3[T1,T2,T3][]) -Microsoft.FSharp.Collections.ArrayModule: T Average[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: T ExactlyOne[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: T FindBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: T Find[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: T Get[T](T[], Int32) -Microsoft.FSharp.Collections.ArrayModule: T Head[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: T Item[T](Int32, T[]) -Microsoft.FSharp.Collections.ArrayModule: T Last[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: T MaxBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[]) -Microsoft.FSharp.Collections.ArrayModule: T Max[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[]) -Microsoft.FSharp.Collections.ArrayModule: T Min[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) -Microsoft.FSharp.Collections.ArrayModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) -Microsoft.FSharp.Collections.ArrayModule: T Sum[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: TResult AverageBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[]) -Microsoft.FSharp.Collections.ArrayModule: TResult Pick[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], T[]) -Microsoft.FSharp.Collections.ArrayModule: TResult SumBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[]) -Microsoft.FSharp.Collections.ArrayModule: TResult[] Choose[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], T[]) -Microsoft.FSharp.Collections.ArrayModule: TResult[] Collect[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult[]], T[]) -Microsoft.FSharp.Collections.ArrayModule: TResult[] Map2[T1,T2,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]], T1[], T2[]) -Microsoft.FSharp.Collections.ArrayModule: TResult[] Map3[T1,T2,T3,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]], T1[], T2[], T3[]) -Microsoft.FSharp.Collections.ArrayModule: TResult[] MapIndexed2[T1,T2,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]]], T1[], T2[]) -Microsoft.FSharp.Collections.ArrayModule: TResult[] MapIndexed[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]], T[]) -Microsoft.FSharp.Collections.ArrayModule: TResult[] Map[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[]) -Microsoft.FSharp.Collections.ArrayModule: TState Fold2[T1,T2,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TState]]], TState, T1[], T2[]) -Microsoft.FSharp.Collections.ArrayModule: TState FoldBack2[T1,T2,TState](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[TState,TState]]], T1[], T2[], TState) -Microsoft.FSharp.Collections.ArrayModule: TState FoldBack[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TState,TState]], T[], TState) -Microsoft.FSharp.Collections.ArrayModule: TState Fold[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]], TState, T[]) -Microsoft.FSharp.Collections.ArrayModule: TState[] ScanBack[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TState,TState]], T[], TState) -Microsoft.FSharp.Collections.ArrayModule: TState[] Scan[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]], TState, T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Append[T](T[], T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Concat[T](System.Collections.Generic.IEnumerable`1[T[]]) -Microsoft.FSharp.Collections.ArrayModule: T[] Copy[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Create[T](Int32, T) -Microsoft.FSharp.Collections.ArrayModule: T[] DistinctBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Distinct[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Empty[T]() -Microsoft.FSharp.Collections.ArrayModule: T[] Except[T](System.Collections.Generic.IEnumerable`1[T], T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Filter[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] GetSubArray[T](T[], Int32, Int32) -Microsoft.FSharp.Collections.ArrayModule: T[] Initialize[T](Int32, Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]) -Microsoft.FSharp.Collections.ArrayModule: T[] OfList[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ArrayModule: T[] OfSeq[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.ArrayModule: T[] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Replicate[T](Int32, T) -Microsoft.FSharp.Collections.ArrayModule: T[] Reverse[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Singleton[T](T) -Microsoft.FSharp.Collections.ArrayModule: T[] SkipWhile[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Skip[T](Int32, T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] SortByDescending[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] SortBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] SortDescending[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] SortWith[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]], T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Sort[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Tail[T](T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] TakeWhile[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Take[T](Int32, T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Truncate[T](Int32, T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] Unfold[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[T,TState]]], TState) -Microsoft.FSharp.Collections.ArrayModule: T[] Where[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], T[]) -Microsoft.FSharp.Collections.ArrayModule: T[] ZeroCreate[T](Int32) -Microsoft.FSharp.Collections.ArrayModule: T[][] ChunkBySize[T](Int32, T[]) -Microsoft.FSharp.Collections.ArrayModule: T[][] SplitInto[T](Int32, T[]) -Microsoft.FSharp.Collections.ArrayModule: T[][] Transpose[T](System.Collections.Generic.IEnumerable`1[T[]]) -Microsoft.FSharp.Collections.ArrayModule: T[][] Windowed[T](Int32, T[]) -Microsoft.FSharp.Collections.ArrayModule: Void CopyTo[T](T[], Int32, T[], Int32, Int32) -Microsoft.FSharp.Collections.ArrayModule: Void Fill[T](T[], Int32, Int32, T) -Microsoft.FSharp.Collections.ArrayModule: Void Iterate2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.Unit]], T1[], T2[]) -Microsoft.FSharp.Collections.ArrayModule: Void IterateIndexed2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.Unit]]], T1[], T2[]) -Microsoft.FSharp.Collections.ArrayModule: Void IterateIndexed[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit]], T[]) -Microsoft.FSharp.Collections.ArrayModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], T[]) -Microsoft.FSharp.Collections.ArrayModule: Void Set[T](T[], Int32, T) -Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[]) -Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceWith[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]], T[]) -Microsoft.FSharp.Collections.ArrayModule: Void SortInPlace[T](T[]) -Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] FromFunction[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]]) -Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] NonStructural[T]() -Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] Structural[T]() -Microsoft.FSharp.Collections.FSharpList`1+Tags[T]: Int32 Cons -Microsoft.FSharp.Collections.FSharpList`1+Tags[T]: Int32 Empty -Microsoft.FSharp.Collections.FSharpList`1[T]: Boolean Equals(Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.FSharpList`1[T]: Boolean Equals(System.Object) -Microsoft.FSharp.Collections.FSharpList`1[T]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Collections.FSharpList`1[T]: Boolean IsCons -Microsoft.FSharp.Collections.FSharpList`1[T]: Boolean IsEmpty -Microsoft.FSharp.Collections.FSharpList`1[T]: Boolean get_IsCons() -Microsoft.FSharp.Collections.FSharpList`1[T]: Boolean get_IsEmpty() -Microsoft.FSharp.Collections.FSharpList`1[T]: Int32 CompareTo(Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.FSharpList`1[T]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Collections.FSharpList`1[T]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Collections.FSharpList`1[T]: Int32 GetHashCode() -Microsoft.FSharp.Collections.FSharpList`1[T]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Collections.FSharpList`1[T]: Int32 GetReverseIndex(Int32, Int32) -Microsoft.FSharp.Collections.FSharpList`1[T]: Int32 Length -Microsoft.FSharp.Collections.FSharpList`1[T]: Int32 Tag -Microsoft.FSharp.Collections.FSharpList`1[T]: Int32 get_Length() -Microsoft.FSharp.Collections.FSharpList`1[T]: Int32 get_Tag() -Microsoft.FSharp.Collections.FSharpList`1[T]: Microsoft.FSharp.Collections.FSharpList`1+Tags[T] -Microsoft.FSharp.Collections.FSharpList`1[T]: Microsoft.FSharp.Collections.FSharpList`1[T] Cons(T, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.FSharpList`1[T]: Microsoft.FSharp.Collections.FSharpList`1[T] Empty -Microsoft.FSharp.Collections.FSharpList`1[T]: Microsoft.FSharp.Collections.FSharpList`1[T] GetSlice(Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Collections.FSharpList`1[T]: Microsoft.FSharp.Collections.FSharpList`1[T] Tail -Microsoft.FSharp.Collections.FSharpList`1[T]: Microsoft.FSharp.Collections.FSharpList`1[T] TailOrNull -Microsoft.FSharp.Collections.FSharpList`1[T]: Microsoft.FSharp.Collections.FSharpList`1[T] get_Empty() -Microsoft.FSharp.Collections.FSharpList`1[T]: Microsoft.FSharp.Collections.FSharpList`1[T] get_Tail() -Microsoft.FSharp.Collections.FSharpList`1[T]: Microsoft.FSharp.Collections.FSharpList`1[T] get_TailOrNull() -Microsoft.FSharp.Collections.FSharpList`1[T]: System.String ToString() -Microsoft.FSharp.Collections.FSharpList`1[T]: T Head -Microsoft.FSharp.Collections.FSharpList`1[T]: T HeadOrDefault -Microsoft.FSharp.Collections.FSharpList`1[T]: T Item [Int32] -Microsoft.FSharp.Collections.FSharpList`1[T]: T get_Head() -Microsoft.FSharp.Collections.FSharpList`1[T]: T get_HeadOrDefault() -Microsoft.FSharp.Collections.FSharpList`1[T]: T get_Item(Int32) -Microsoft.FSharp.Collections.FSharpList`1[T]: Void .ctor(T, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Boolean ContainsKey(TKey) -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Boolean Equals(System.Object) -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Boolean IsEmpty -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Boolean TryGetValue(TKey, TValue ByRef) -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Boolean get_IsEmpty() -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Int32 Count -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Int32 GetHashCode() -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Int32 get_Count() -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue] Add(TKey, TValue) -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue] Remove(TKey) -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Microsoft.FSharp.Core.FSharpOption`1[TValue] TryFind(TKey) -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Boolean TryGetValue(TKey, TValue ByRef) -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue] Change(TKey, Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.FSharpOption`1[TValue],Microsoft.FSharp.Core.FSharpOption`1[TValue]]) -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: System.String ToString() -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: TValue Item [TKey] -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: TValue get_Item(TKey) -Microsoft.FSharp.Collections.FSharpMap`2[TKey,TValue]: Void .ctor(System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) -Microsoft.FSharp.Collections.FSharpSet`1[T]: Boolean Contains(T) -Microsoft.FSharp.Collections.FSharpSet`1[T]: Boolean Equals(System.Object) -Microsoft.FSharp.Collections.FSharpSet`1[T]: Boolean IsEmpty -Microsoft.FSharp.Collections.FSharpSet`1[T]: Boolean IsProperSubsetOf(Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.FSharpSet`1[T]: Boolean IsProperSupersetOf(Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.FSharpSet`1[T]: Boolean IsSubsetOf(Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.FSharpSet`1[T]: Boolean IsSupersetOf(Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.FSharpSet`1[T]: Boolean get_IsEmpty() -Microsoft.FSharp.Collections.FSharpSet`1[T]: Int32 Count -Microsoft.FSharp.Collections.FSharpSet`1[T]: Int32 GetHashCode() -Microsoft.FSharp.Collections.FSharpSet`1[T]: Int32 get_Count() -Microsoft.FSharp.Collections.FSharpSet`1[T]: Microsoft.FSharp.Collections.FSharpSet`1[T] Add(T) -Microsoft.FSharp.Collections.FSharpSet`1[T]: Microsoft.FSharp.Collections.FSharpSet`1[T] Remove(T) -Microsoft.FSharp.Collections.FSharpSet`1[T]: Microsoft.FSharp.Collections.FSharpSet`1[T] op_Addition(Microsoft.FSharp.Collections.FSharpSet`1[T], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.FSharpSet`1[T]: Microsoft.FSharp.Collections.FSharpSet`1[T] op_Subtraction(Microsoft.FSharp.Collections.FSharpSet`1[T], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.FSharpSet`1[T]: System.String ToString() -Microsoft.FSharp.Collections.FSharpSet`1[T]: T MaximumElement -Microsoft.FSharp.Collections.FSharpSet`1[T]: T MinimumElement -Microsoft.FSharp.Collections.FSharpSet`1[T]: T get_MaximumElement() -Microsoft.FSharp.Collections.FSharpSet`1[T]: T get_MinimumElement() -Microsoft.FSharp.Collections.FSharpSet`1[T]: Void .ctor(System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.HashIdentity: System.Collections.Generic.IEqualityComparer`1[T] FromFunctions[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]]) -Microsoft.FSharp.Collections.HashIdentity: System.Collections.Generic.IEqualityComparer`1[T] LimitedStructural[T](Int32) -Microsoft.FSharp.Collections.HashIdentity: System.Collections.Generic.IEqualityComparer`1[T] NonStructural[T]() -Microsoft.FSharp.Collections.HashIdentity: System.Collections.Generic.IEqualityComparer`1[T] Reference[T]() -Microsoft.FSharp.Collections.HashIdentity: System.Collections.Generic.IEqualityComparer`1[T] Structural[T]() -Microsoft.FSharp.Collections.ListModule: Boolean Contains[T](T, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Boolean Exists2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,System.Boolean]], Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2]) -Microsoft.FSharp.Collections.ListModule: Boolean Exists[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Boolean ForAll2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,System.Boolean]], Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2]) -Microsoft.FSharp.Collections.ListModule: Boolean ForAll[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Boolean IsEmpty[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Int32 CompareWith[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]], Microsoft.FSharp.Collections.FSharpList`1[T], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Int32 FindIndexBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Int32 FindIndex[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Int32 Length[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] ChunkBySize[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] SplitInto[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] Transpose[T](System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Collections.FSharpList`1[T]]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] Windowed[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[System.Int32,T]] Indexed[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T,T]] Pairwise[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T1,T2]] Zip[T1,T2](Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,Microsoft.FSharp.Collections.FSharpList`1[T]]] GroupBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,System.Int32]] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[T1,T2,T3]] Zip3[T1,T2,T3](Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2], Microsoft.FSharp.Collections.FSharpList`1[T3]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[TResult] Choose[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[TResult] Collect[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Collections.FSharpList`1[TResult]], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[TResult] Map2[T1,T2,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]], Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[TResult] Map3[T1,T2,T3,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]], Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2], Microsoft.FSharp.Collections.FSharpList`1[T3]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[TResult] MapIndexed2[T1,T2,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]]], Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[TResult] MapIndexed[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[TResult] Map[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[TState] ScanBack[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TState,TState]], Microsoft.FSharp.Collections.FSharpList`1[T], TState) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[TState] Scan[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]], TState, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Append[T](Microsoft.FSharp.Collections.FSharpList`1[T], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Concat[T](System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Collections.FSharpList`1[T]]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] DistinctBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Distinct[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Empty[T]() -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Except[T](System.Collections.Generic.IEnumerable`1[T], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Filter[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Initialize[T](Int32, Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] OfArray[T](T[]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] OfSeq[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Replicate[T](Int32, T) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Reverse[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Singleton[T](T) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] SkipWhile[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Skip[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] SortByDescending[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] SortBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] SortDescending[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] SortWith[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Sort[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Tail[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] TakeWhile[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Take[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Truncate[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Unfold[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[T,TState]]], TState) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Where[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Core.FSharpOption`1[System.Int32] TryFindIndexBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Core.FSharpOption`1[System.Int32] TryFindIndex[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Core.FSharpOption`1[TResult] TryPick[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryExactlyOne[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryFindBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryFind[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryHead[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryItem[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryLast[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: System.Collections.Generic.IEnumerable`1[T] ToSeq[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[T1],Microsoft.FSharp.Collections.FSharpList`1[T2]] Unzip[T1,T2](Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T1,T2]]) -Microsoft.FSharp.Collections.ListModule: System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[TResult],TState] MapFoldBack[T,TState,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TState,System.Tuple`2[TResult,TState]]], Microsoft.FSharp.Collections.FSharpList`1[T], TState) -Microsoft.FSharp.Collections.ListModule: System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[TResult],TState] MapFold[T,TState,TResult](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Tuple`2[TResult,TState]]], TState, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[T],Microsoft.FSharp.Collections.FSharpList`1[T]] Partition[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[T],Microsoft.FSharp.Collections.FSharpList`1[T]] SplitAt[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: System.Tuple`3[Microsoft.FSharp.Collections.FSharpList`1[T1],Microsoft.FSharp.Collections.FSharpList`1[T2],Microsoft.FSharp.Collections.FSharpList`1[T3]] Unzip3[T1,T2,T3](Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[T1,T2,T3]]) -Microsoft.FSharp.Collections.ListModule: T Average[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T ExactlyOne[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T FindBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T Find[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T Get[T](Microsoft.FSharp.Collections.FSharpList`1[T], Int32) -Microsoft.FSharp.Collections.ListModule: T Head[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T Item[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T Last[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T MaxBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T Max[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T Min[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T Sum[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: TResult AverageBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: TResult Pick[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: TResult SumBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: TState Fold2[T1,T2,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TState]]], TState, Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2]) -Microsoft.FSharp.Collections.ListModule: TState FoldBack2[T1,T2,TState](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[TState,TState]]], Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2], TState) -Microsoft.FSharp.Collections.ListModule: TState FoldBack[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TState,TState]], Microsoft.FSharp.Collections.FSharpList`1[T], TState) -Microsoft.FSharp.Collections.ListModule: TState Fold[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]], TState, Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T[] ToArray[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Void Iterate2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.Unit]], Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2]) -Microsoft.FSharp.Collections.ListModule: Void IterateIndexed2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.Unit]]], Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2]) -Microsoft.FSharp.Collections.ListModule: Void IterateIndexed[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit]], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.MapModule: Boolean ContainsKey[TKey,T](TKey, Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Boolean Exists[TKey,T](Microsoft.FSharp.Core.FSharpFunc`2[TKey,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Boolean ForAll[TKey,T](Microsoft.FSharp.Core.FSharpFunc`2[TKey,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Boolean IsEmpty[TKey,T](Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Int32 Count[TKey,T](Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,T]] ToList[TKey,T](Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Microsoft.FSharp.Collections.FSharpMap`2[TKey,TResult] Map[TKey,T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[TKey,Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]], Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Microsoft.FSharp.Collections.FSharpMap`2[TKey,T] Add[TKey,T](TKey, T, Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Microsoft.FSharp.Collections.FSharpMap`2[TKey,T] Empty[TKey,T]() -Microsoft.FSharp.Collections.MapModule: Microsoft.FSharp.Collections.FSharpMap`2[TKey,T] Filter[TKey,T](Microsoft.FSharp.Core.FSharpFunc`2[TKey,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Microsoft.FSharp.Collections.FSharpMap`2[TKey,T] OfArray[TKey,T](System.Tuple`2[TKey,T][]) -Microsoft.FSharp.Collections.MapModule: Microsoft.FSharp.Collections.FSharpMap`2[TKey,T] OfList[TKey,T](Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,T]]) -Microsoft.FSharp.Collections.MapModule: Microsoft.FSharp.Collections.FSharpMap`2[TKey,T] OfSeq[TKey,T](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,T]]) -Microsoft.FSharp.Collections.MapModule: Microsoft.FSharp.Collections.FSharpMap`2[TKey,T] Remove[TKey,T](TKey, Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Microsoft.FSharp.Core.FSharpOption`1[TKey] TryFindKey[TKey,T](Microsoft.FSharp.Core.FSharpFunc`2[TKey,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Microsoft.FSharp.Core.FSharpOption`1[TResult] TryPick[TKey,T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[TKey,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]]], Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryFind[TKey,T](TKey, Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,T]] ToSeq[TKey,T](Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: System.Tuple`2[Microsoft.FSharp.Collections.FSharpMap`2[TKey,T],Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]] Partition[TKey,T](Microsoft.FSharp.Core.FSharpFunc`2[TKey,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: System.Tuple`2[TKey,T][] ToArray[TKey,T](Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: T Find[TKey,T](TKey, Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Microsoft.FSharp.Collections.FSharpMap`2[TKey,T] Change[TKey,T](TKey, Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.FSharpOption`1[T],Microsoft.FSharp.Core.FSharpOption`1[T]], Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: TKey FindKey[TKey,T](Microsoft.FSharp.Core.FSharpFunc`2[TKey,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: TResult Pick[TKey,T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[TKey,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]]], Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: TState FoldBack[TKey,T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TKey,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TState,TState]]], Microsoft.FSharp.Collections.FSharpMap`2[TKey,T], TState) -Microsoft.FSharp.Collections.MapModule: TState Fold[TKey,T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[TKey,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]]], TState, Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.MapModule: Void Iterate[TKey,T](Microsoft.FSharp.Core.FSharpFunc`2[TKey,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit]], Microsoft.FSharp.Collections.FSharpMap`2[TKey,T]) -Microsoft.FSharp.Collections.SeqModule: Boolean Contains[T](T, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Boolean Exists2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,System.Boolean]], System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2]) -Microsoft.FSharp.Collections.SeqModule: Boolean Exists[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Boolean ForAll2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,System.Boolean]], System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2]) -Microsoft.FSharp.Collections.SeqModule: Boolean ForAll[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Boolean IsEmpty[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Int32 CompareWith[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]], System.Collections.Generic.IEnumerable`1[T], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Int32 FindIndexBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Int32 FindIndex[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Int32 Length[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Collections.FSharpList`1[T] ToList[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[System.Int32] TryFindIndexBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[System.Int32] TryFindIndex[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[TResult] TryPick[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryExactlyOne[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryFindBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryFind[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryHead[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryItem[T](Int32, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryLast[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[T]] Transpose[TCollection,T](System.Collections.Generic.IEnumerable`1[TCollection]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[System.Int32,T]] Indexed[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T,T]] Pairwise[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] Zip[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,System.Collections.Generic.IEnumerable`1[T]]] GroupBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,System.Int32]] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`3[T1,T2,T3]] Zip3[T1,T2,T3](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2], System.Collections.Generic.IEnumerable`1[T3]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[TResult] Choose[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[TResult] Collect[T,TCollection,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TCollection], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[TResult] Map2[T1,T2,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]], System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[TResult] Map3[T1,T2,T3,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]], System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2], System.Collections.Generic.IEnumerable`1[T3]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[TResult] MapIndexed2[T1,T2,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]]], System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[TResult] MapIndexed[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[TResult] Map[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[TState] ScanBack[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TState,TState]], System.Collections.Generic.IEnumerable`1[T], TState) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[TState] Scan[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]], TState, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T[]] ChunkBySize[T](Int32, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T[]] SplitInto[T](Int32, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T[]] Windowed[T](Int32, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Append[T](System.Collections.Generic.IEnumerable`1[T], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Cache[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Cast[T](System.Collections.IEnumerable) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Concat[TCollection,T](System.Collections.Generic.IEnumerable`1[TCollection]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Delay[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Collections.Generic.IEnumerable`1[T]]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] DistinctBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Distinct[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Empty[T]() -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Except[T](System.Collections.Generic.IEnumerable`1[T], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Filter[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] InitializeInfinite[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Initialize[T](Int32, Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] OfArray[T](T[]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] OfList[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] ReadOnly[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Replicate[T](Int32, T) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Reverse[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Singleton[T](T) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] SkipWhile[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Skip[T](Int32, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] SortByDescending[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] SortBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] SortDescending[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] SortWith[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Sort[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Tail[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] TakeWhile[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Take[T](Int32, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Truncate[T](Int32, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Unfold[TState,T](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[T,TState]]], TState) -Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Where[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: System.Tuple`2[System.Collections.Generic.IEnumerable`1[TResult],TState] MapFoldBack[T,TState,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TState,System.Tuple`2[TResult,TState]]], System.Collections.Generic.IEnumerable`1[T], TState) -Microsoft.FSharp.Collections.SeqModule: System.Tuple`2[System.Collections.Generic.IEnumerable`1[TResult],TState] MapFold[T,TState,TResult](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Tuple`2[TResult,TState]]], TState, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T Average[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T ExactlyOne[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T FindBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T Find[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T Get[T](Int32, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T Head[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T Item[T](Int32, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T Last[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T MaxBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T Max[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T Min[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T Sum[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: TResult AverageBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: TResult Pick[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: TResult SumBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: TState Fold2[T1,T2,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TState]]], TState, System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2]) -Microsoft.FSharp.Collections.SeqModule: TState FoldBack2[T1,T2,TState](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[TState,TState]]], System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2], TState) -Microsoft.FSharp.Collections.SeqModule: TState FoldBack[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TState,TState]], System.Collections.Generic.IEnumerable`1[T], TState) -Microsoft.FSharp.Collections.SeqModule: TState Fold[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]], TState, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T[] ToArray[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Void Iterate2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.Unit]], System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2]) -Microsoft.FSharp.Collections.SeqModule: Void IterateIndexed2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.Unit]]], System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2]) -Microsoft.FSharp.Collections.SeqModule: Void IterateIndexed[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit]], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SetModule: Boolean Contains[T](T, Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Boolean Exists[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Boolean ForAll[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Boolean IsEmpty[T](Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Boolean IsProperSubset[T](Microsoft.FSharp.Collections.FSharpSet`1[T], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Boolean IsProperSuperset[T](Microsoft.FSharp.Collections.FSharpSet`1[T], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Boolean IsSubset[T](Microsoft.FSharp.Collections.FSharpSet`1[T], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Boolean IsSuperset[T](Microsoft.FSharp.Collections.FSharpSet`1[T], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Int32 Count[T](Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpList`1[T] ToList[T](Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[TResult] Map[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[T] Add[T](T, Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[T] Difference[T](Microsoft.FSharp.Collections.FSharpSet`1[T], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[T] Empty[T]() -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[T] Filter[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[T] IntersectMany[T](System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Collections.FSharpSet`1[T]]) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[T] Intersect[T](Microsoft.FSharp.Collections.FSharpSet`1[T], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[T] OfArray[T](T[]) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[T] OfList[T](Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[T] OfSeq[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[T] Remove[T](T, Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[T] Singleton[T](T) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[T] UnionMany[T](System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Collections.FSharpSet`1[T]]) -Microsoft.FSharp.Collections.SetModule: Microsoft.FSharp.Collections.FSharpSet`1[T] Union[T](Microsoft.FSharp.Collections.FSharpSet`1[T], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: System.Collections.Generic.IEnumerable`1[T] ToSeq[T](Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: System.Tuple`2[Microsoft.FSharp.Collections.FSharpSet`1[T],Microsoft.FSharp.Collections.FSharpSet`1[T]] Partition[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: T MaxElement[T](Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: T MinElement[T](Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: TState FoldBack[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TState,TState]], Microsoft.FSharp.Collections.FSharpSet`1[T], TState) -Microsoft.FSharp.Collections.SetModule: TState Fold[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]], TState, Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: T[] ToArray[T](Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Collections.SetModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Collections.FSharpSet`1[T]) -Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean IsCancellationRequested -Microsoft.FSharp.Control.AsyncActivation`1[T]: Boolean get_IsCancellationRequested() -Microsoft.FSharp.Control.AsyncActivation`1[T]: Microsoft.FSharp.Control.AsyncReturn OnCancellation() -Microsoft.FSharp.Control.AsyncActivation`1[T]: Microsoft.FSharp.Control.AsyncReturn OnSuccess(T) -Microsoft.FSharp.Control.AsyncActivation`1[T]: Void OnExceptionRaised() -Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn Bind[T,TResult](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[TResult], Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Control.FSharpAsync`1[T]]) -Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn CallThenInvoke[T,TResult](Microsoft.FSharp.Control.AsyncActivation`1[T], TResult, Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Control.FSharpAsync`1[T]]) -Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn Invoke[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Control.AsyncActivation`1[T]) -Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn TryFinally[T](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn TryWith[T](Microsoft.FSharp.Control.AsyncActivation`1[T], Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[System.Exception,Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Control.FSharpAsync`1[T]]]) -Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.FSharpAsync`1[T] MakeAsync[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.AsyncActivation`1[T],Microsoft.FSharp.Control.AsyncReturn]) -Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] AsyncWrite(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[System.Byte[]] AsyncReadBytes(System.IO.Stream, Int32) -Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[System.Int32] AsyncRead(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.CommonExtensions: System.IDisposable SubscribeToObservable[T](System.IObservable`1[T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Control.CommonExtensions: Void AddToObservable[T](System.IObservable`1[T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Control.EventModule: Microsoft.FSharp.Control.IEvent`2[Microsoft.FSharp.Control.FSharpHandler`1[System.Tuple`2[T,T]],System.Tuple`2[T,T]] Pairwise[TDel,T](Microsoft.FSharp.Control.IEvent`2[TDel,T]) -Microsoft.FSharp.Control.EventModule: Microsoft.FSharp.Control.IEvent`2[Microsoft.FSharp.Control.FSharpHandler`1[TResult],TResult] Choose[T,TResult,TDel](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], Microsoft.FSharp.Control.IEvent`2[TDel,T]) -Microsoft.FSharp.Control.EventModule: Microsoft.FSharp.Control.IEvent`2[Microsoft.FSharp.Control.FSharpHandler`1[TResult],TResult] Map[T,TResult,TDel](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Control.IEvent`2[TDel,T]) -Microsoft.FSharp.Control.EventModule: Microsoft.FSharp.Control.IEvent`2[Microsoft.FSharp.Control.FSharpHandler`1[TResult],TResult] Scan[TResult,T,TDel](Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]], TResult, Microsoft.FSharp.Control.IEvent`2[TDel,T]) -Microsoft.FSharp.Control.EventModule: Microsoft.FSharp.Control.IEvent`2[Microsoft.FSharp.Control.FSharpHandler`1[T],T] Filter[T,TDel](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Control.IEvent`2[TDel,T]) -Microsoft.FSharp.Control.EventModule: Microsoft.FSharp.Control.IEvent`2[Microsoft.FSharp.Control.FSharpHandler`1[T],T] Merge[TDel1,T,TDel2](Microsoft.FSharp.Control.IEvent`2[TDel1,T], Microsoft.FSharp.Control.IEvent`2[TDel2,T]) -Microsoft.FSharp.Control.EventModule: System.Tuple`2[Microsoft.FSharp.Control.IEvent`2[Microsoft.FSharp.Control.FSharpHandler`1[TResult1],TResult1],Microsoft.FSharp.Control.IEvent`2[Microsoft.FSharp.Control.FSharpHandler`1[TResult2],TResult2]] Split[T,TResult1,TResult2,TDel](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpChoice`2[TResult1,TResult2]], Microsoft.FSharp.Control.IEvent`2[TDel,T]) -Microsoft.FSharp.Control.EventModule: System.Tuple`2[Microsoft.FSharp.Control.IEvent`2[Microsoft.FSharp.Control.FSharpHandler`1[T],T],Microsoft.FSharp.Control.IEvent`2[Microsoft.FSharp.Control.FSharpHandler`1[T],T]] Partition[T,TDel](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Control.IEvent`2[TDel,T]) -Microsoft.FSharp.Control.EventModule: Void Add[T,TDel](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Control.IEvent`2[TDel,T]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Control.FSharpAsync`1[T]] StartChild[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.FSharpChoice`2[T,System.Exception]] Catch[T](Microsoft.FSharp.Control.FSharpAsync`1[T]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.FSharpOption`1[T]] Choice[T](System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.FSharpOption`1[T]]]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] AwaitTask(System.Threading.Tasks.Task) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] Ignore[T](Microsoft.FSharp.Control.FSharpAsync`1[T]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] Sleep(Int32) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] Sleep(System.TimeSpan) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] SwitchToContext(System.Threading.SynchronizationContext) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] SwitchToNewThread() -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] SwitchToThreadPool() -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[System.Boolean] AwaitIAsyncResult(System.IAsyncResult, Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[System.Boolean] AwaitWaitHandle(System.Threading.WaitHandle, Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[System.IDisposable] OnCancel(Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[System.Threading.CancellationToken] CancellationToken -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[System.Threading.CancellationToken] get_CancellationToken() -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[System.Threading.Tasks.Task`1[T]] StartChildAsTask[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.Tasks.TaskCreationOptions]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[T[]] Parallel[T](System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Control.FSharpAsync`1[T]]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[T[]] Parallel[T](System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Control.FSharpAsync`1[T]], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[T[]] Sequential[T](System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Control.FSharpAsync`1[T]]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[T] AwaitEvent[TDel,T](Microsoft.FSharp.Control.IEvent`2[TDel,T], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[T] AwaitTask[T](System.Threading.Tasks.Task`1[T]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[T] FromBeginEnd[TArg1,TArg2,TArg3,T](TArg1, TArg2, TArg3, Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`5[TArg1,TArg2,TArg3,System.AsyncCallback,System.Object],System.IAsyncResult], Microsoft.FSharp.Core.FSharpFunc`2[System.IAsyncResult,T], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[T] FromBeginEnd[TArg1,TArg2,T](TArg1, TArg2, Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`4[TArg1,TArg2,System.AsyncCallback,System.Object],System.IAsyncResult], Microsoft.FSharp.Core.FSharpFunc`2[System.IAsyncResult,T], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[T] FromBeginEnd[TArg1,T](TArg1, Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`3[TArg1,System.AsyncCallback,System.Object],System.IAsyncResult], Microsoft.FSharp.Core.FSharpFunc`2[System.IAsyncResult,T], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[T] FromBeginEnd[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`2[System.AsyncCallback,System.Object],System.IAsyncResult], Microsoft.FSharp.Core.FSharpFunc`2[System.IAsyncResult,T], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[T] FromContinuations[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`3[Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit],Microsoft.FSharp.Core.FSharpFunc`2[System.Exception,Microsoft.FSharp.Core.Unit],Microsoft.FSharp.Core.FSharpFunc`2[System.OperationCanceledException,Microsoft.FSharp.Core.Unit]],Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Control.FSharpAsync: Microsoft.FSharp.Control.FSharpAsync`1[T] TryCancelled[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[System.OperationCanceledException,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Control.FSharpAsync: System.Threading.CancellationToken DefaultCancellationToken -Microsoft.FSharp.Control.FSharpAsync: System.Threading.CancellationToken get_DefaultCancellationToken() -Microsoft.FSharp.Control.FSharpAsync: System.Threading.Tasks.Task`1[T] StartAsTask[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.Tasks.TaskCreationOptions], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) -Microsoft.FSharp.Control.FSharpAsync: System.Threading.Tasks.Task`1[T] StartImmediateAsTask[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) -Microsoft.FSharp.Control.FSharpAsync: System.Tuple`3[Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`3[TArg,System.AsyncCallback,System.Object],System.IAsyncResult],Microsoft.FSharp.Core.FSharpFunc`2[System.IAsyncResult,T],Microsoft.FSharp.Core.FSharpFunc`2[System.IAsyncResult,Microsoft.FSharp.Core.Unit]] AsBeginEnd[TArg,T](Microsoft.FSharp.Core.FSharpFunc`2[TArg,Microsoft.FSharp.Control.FSharpAsync`1[T]]) -Microsoft.FSharp.Control.FSharpAsync: T RunSynchronously[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) -Microsoft.FSharp.Control.FSharpAsync: Void CancelDefaultToken() -Microsoft.FSharp.Control.FSharpAsync: Void Start(Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) -Microsoft.FSharp.Control.FSharpAsync: Void StartImmediate(Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) -Microsoft.FSharp.Control.FSharpAsync: Void StartWithContinuations[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Core.FSharpFunc`2[System.Exception,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Core.FSharpFunc`2[System.OperationCanceledException,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) -Microsoft.FSharp.Control.FSharpAsyncBuilder: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] For[T](System.Collections.Generic.IEnumerable`1[T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit]]) -Microsoft.FSharp.Control.FSharpAsyncBuilder: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] While(Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Boolean], Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Control.FSharpAsyncBuilder: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] Zero() -Microsoft.FSharp.Control.FSharpAsyncBuilder: Microsoft.FSharp.Control.FSharpAsync`1[TResult] Bind[T,TResult](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Control.FSharpAsync`1[TResult]]) -Microsoft.FSharp.Control.FSharpAsyncBuilder: Microsoft.FSharp.Control.FSharpAsync`1[TResult] Using[T,TResult](T, Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Control.FSharpAsync`1[TResult]]) -Microsoft.FSharp.Control.FSharpAsyncBuilder: Microsoft.FSharp.Control.FSharpAsync`1[T] Combine[T](Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Control.FSharpAsync`1[T]) -Microsoft.FSharp.Control.FSharpAsyncBuilder: Microsoft.FSharp.Control.FSharpAsync`1[T] Delay[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Control.FSharpAsync`1[T]]) -Microsoft.FSharp.Control.FSharpAsyncBuilder: Microsoft.FSharp.Control.FSharpAsync`1[T] ReturnFrom[T](Microsoft.FSharp.Control.FSharpAsync`1[T]) -Microsoft.FSharp.Control.FSharpAsyncBuilder: Microsoft.FSharp.Control.FSharpAsync`1[T] Return[T](T) -Microsoft.FSharp.Control.FSharpAsyncBuilder: Microsoft.FSharp.Control.FSharpAsync`1[T] TryFinally[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Control.FSharpAsyncBuilder: Microsoft.FSharp.Control.FSharpAsync`1[T] TryWith[T](Microsoft.FSharp.Control.FSharpAsync`1[T], Microsoft.FSharp.Core.FSharpFunc`2[System.Exception,Microsoft.FSharp.Control.FSharpAsync`1[T]]) -Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1[TReply]: Void Reply(TReply) -Microsoft.FSharp.Control.FSharpDelegateEvent`1[TDelegate]: Microsoft.FSharp.Control.IDelegateEvent`1[TDelegate] Publish -Microsoft.FSharp.Control.FSharpDelegateEvent`1[TDelegate]: Microsoft.FSharp.Control.IDelegateEvent`1[TDelegate] get_Publish() -Microsoft.FSharp.Control.FSharpDelegateEvent`1[TDelegate]: Void .ctor() -Microsoft.FSharp.Control.FSharpDelegateEvent`1[TDelegate]: Void Trigger(System.Object[]) -Microsoft.FSharp.Control.FSharpEvent`1[T]: Microsoft.FSharp.Control.IEvent`2[Microsoft.FSharp.Control.FSharpHandler`1[T],T] Publish -Microsoft.FSharp.Control.FSharpEvent`1[T]: Microsoft.FSharp.Control.IEvent`2[Microsoft.FSharp.Control.FSharpHandler`1[T],T] get_Publish() -Microsoft.FSharp.Control.FSharpEvent`1[T]: Void .ctor() -Microsoft.FSharp.Control.FSharpEvent`1[T]: Void Trigger(T) -Microsoft.FSharp.Control.FSharpEvent`2[TDelegate,TArgs]: Microsoft.FSharp.Control.IEvent`2[TDelegate,TArgs] Publish -Microsoft.FSharp.Control.FSharpEvent`2[TDelegate,TArgs]: Microsoft.FSharp.Control.IEvent`2[TDelegate,TArgs] get_Publish() -Microsoft.FSharp.Control.FSharpEvent`2[TDelegate,TArgs]: Void .ctor() -Microsoft.FSharp.Control.FSharpEvent`2[TDelegate,TArgs]: Void Trigger(System.Object, TArgs) -Microsoft.FSharp.Control.FSharpHandler`1[T]: System.IAsyncResult BeginInvoke(System.Object, T, System.AsyncCallback, System.Object) -Microsoft.FSharp.Control.FSharpHandler`1[T]: Void .ctor(System.Object, IntPtr) -Microsoft.FSharp.Control.FSharpHandler`1[T]: Void EndInvoke(System.IAsyncResult) -Microsoft.FSharp.Control.FSharpHandler`1[T]: Void Invoke(System.Object, T) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Int32 CurrentQueueLength -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Int32 DefaultTimeout -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Int32 get_CurrentQueueLength() -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Int32 get_DefaultTimeout() -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.FSharpOption`1[TMsg]] TryReceive(Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.FSharpOption`1[TReply]] PostAndTryAsyncReply[TReply](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1[TReply],TMsg], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.FSharpOption`1[T]] TryScan[T](Microsoft.FSharp.Core.FSharpFunc`2[TMsg,Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Control.FSharpAsync`1[T]]], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Microsoft.FSharp.Control.FSharpAsync`1[TMsg] Receive(Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Microsoft.FSharp.Control.FSharpAsync`1[TReply] PostAndAsyncReply[TReply](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1[TReply],TMsg], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Microsoft.FSharp.Control.FSharpAsync`1[T] Scan[T](Microsoft.FSharp.Core.FSharpFunc`2[TMsg,Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Control.FSharpAsync`1[T]]], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Microsoft.FSharp.Control.FSharpHandler`1[System.Exception] Error -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg] Start(Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg],Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit]], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Microsoft.FSharp.Core.FSharpOption`1[TReply] TryPostAndReply[TReply](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1[TReply],TMsg], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: TReply PostAndReply[TReply](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.FSharpAsyncReplyChannel`1[TReply],TMsg], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Void .ctor(Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg],Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit]], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Void Post(TMsg) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Void Start() -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Void add_Error(Microsoft.FSharp.Control.FSharpHandler`1[System.Exception]) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Void remove_Error(Microsoft.FSharp.Control.FSharpHandler`1[System.Exception]) -Microsoft.FSharp.Control.FSharpMailboxProcessor`1[TMsg]: Void set_DefaultTimeout(Int32) -Microsoft.FSharp.Control.IDelegateEvent`1[TDelegate]: Void AddHandler(TDelegate) -Microsoft.FSharp.Control.IDelegateEvent`1[TDelegate]: Void RemoveHandler(TDelegate) -Microsoft.FSharp.Control.LazyExtensions: System.Lazy`1[T] CreateFromValue[T](T) -Microsoft.FSharp.Control.LazyExtensions: System.Lazy`1[T] Create[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T]) -Microsoft.FSharp.Control.LazyExtensions: T Force[T](System.Lazy`1[T]) -Microsoft.FSharp.Control.ObservableModule: System.IDisposable Subscribe[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], System.IObservable`1[T]) -Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[System.Tuple`2[T,T]] Pairwise[T](System.IObservable`1[T]) -Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[TResult] Choose[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], System.IObservable`1[T]) -Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[TResult] Map[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], System.IObservable`1[T]) -Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[TResult] Scan[TResult,T](Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]], TResult, System.IObservable`1[T]) -Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[T] Filter[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.IObservable`1[T]) -Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[T] Merge[T](System.IObservable`1[T], System.IObservable`1[T]) -Microsoft.FSharp.Control.ObservableModule: System.Tuple`2[System.IObservable`1[TResult1],System.IObservable`1[TResult2]] Split[T,TResult1,TResult2](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpChoice`2[TResult1,TResult2]], System.IObservable`1[T]) -Microsoft.FSharp.Control.ObservableModule: System.Tuple`2[System.IObservable`1[T],System.IObservable`1[T]] Partition[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], System.IObservable`1[T]) -Microsoft.FSharp.Control.ObservableModule: Void Add[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], System.IObservable`1[T]) -Microsoft.FSharp.Control.WebExtensions: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] AsyncDownloadFile(System.Net.WebClient, System.Uri, System.String) -Microsoft.FSharp.Control.WebExtensions: Microsoft.FSharp.Control.FSharpAsync`1[System.Byte[]] AsyncDownloadData(System.Net.WebClient, System.Uri) -Microsoft.FSharp.Control.WebExtensions: Microsoft.FSharp.Control.FSharpAsync`1[System.Net.WebResponse] AsyncGetResponse(System.Net.WebRequest) -Microsoft.FSharp.Control.WebExtensions: Microsoft.FSharp.Control.FSharpAsync`1[System.String] AsyncDownloadString(System.Net.WebClient, System.Uri) -Microsoft.FSharp.Core.AbstractClassAttribute: Void .ctor() -Microsoft.FSharp.Core.AllowNullLiteralAttribute: Boolean Value -Microsoft.FSharp.Core.AllowNullLiteralAttribute: Boolean get_Value() -Microsoft.FSharp.Core.AllowNullLiteralAttribute: Void .ctor() -Microsoft.FSharp.Core.AllowNullLiteralAttribute: Void .ctor(Boolean) -Microsoft.FSharp.Core.AutoOpenAttribute: System.String Path -Microsoft.FSharp.Core.AutoOpenAttribute: System.String get_Path() -Microsoft.FSharp.Core.AutoOpenAttribute: Void .ctor() -Microsoft.FSharp.Core.AutoOpenAttribute: Void .ctor(System.String) -Microsoft.FSharp.Core.AutoSerializableAttribute: Boolean Value -Microsoft.FSharp.Core.AutoSerializableAttribute: Boolean get_Value() -Microsoft.FSharp.Core.AutoSerializableAttribute: Void .ctor(Boolean) -Microsoft.FSharp.Core.ByRefKinds: Microsoft.FSharp.Core.ByRefKinds+In -Microsoft.FSharp.Core.ByRefKinds: Microsoft.FSharp.Core.ByRefKinds+InOut -Microsoft.FSharp.Core.ByRefKinds: Microsoft.FSharp.Core.ByRefKinds+Out -Microsoft.FSharp.Core.CLIEventAttribute: Void .ctor() -Microsoft.FSharp.Core.CLIMutableAttribute: Void .ctor() -Microsoft.FSharp.Core.ClassAttribute: Void .ctor() -Microsoft.FSharp.Core.ComparisonConditionalOnAttribute: Void .ctor() -Microsoft.FSharp.Core.CompilationArgumentCountsAttribute: System.Collections.Generic.IEnumerable`1[System.Int32] Counts -Microsoft.FSharp.Core.CompilationArgumentCountsAttribute: System.Collections.Generic.IEnumerable`1[System.Int32] get_Counts() -Microsoft.FSharp.Core.CompilationArgumentCountsAttribute: Void .ctor(Int32[]) -Microsoft.FSharp.Core.CompilationMappingAttribute: Int32 SequenceNumber -Microsoft.FSharp.Core.CompilationMappingAttribute: Int32 VariantNumber -Microsoft.FSharp.Core.CompilationMappingAttribute: Int32 get_SequenceNumber() -Microsoft.FSharp.Core.CompilationMappingAttribute: Int32 get_VariantNumber() -Microsoft.FSharp.Core.CompilationMappingAttribute: Microsoft.FSharp.Core.SourceConstructFlags SourceConstructFlags -Microsoft.FSharp.Core.CompilationMappingAttribute: Microsoft.FSharp.Core.SourceConstructFlags get_SourceConstructFlags() -Microsoft.FSharp.Core.CompilationMappingAttribute: System.String ResourceName -Microsoft.FSharp.Core.CompilationMappingAttribute: System.String get_ResourceName() -Microsoft.FSharp.Core.CompilationMappingAttribute: System.Type[] TypeDefinitions -Microsoft.FSharp.Core.CompilationMappingAttribute: System.Type[] get_TypeDefinitions() -Microsoft.FSharp.Core.CompilationMappingAttribute: Void .ctor(Microsoft.FSharp.Core.SourceConstructFlags) -Microsoft.FSharp.Core.CompilationMappingAttribute: Void .ctor(Microsoft.FSharp.Core.SourceConstructFlags, Int32) -Microsoft.FSharp.Core.CompilationMappingAttribute: Void .ctor(Microsoft.FSharp.Core.SourceConstructFlags, Int32, Int32) -Microsoft.FSharp.Core.CompilationMappingAttribute: Void .ctor(System.String, System.Type[]) -Microsoft.FSharp.Core.CompilationRepresentationAttribute: Microsoft.FSharp.Core.CompilationRepresentationFlags Flags -Microsoft.FSharp.Core.CompilationRepresentationAttribute: Microsoft.FSharp.Core.CompilationRepresentationFlags get_Flags() -Microsoft.FSharp.Core.CompilationRepresentationAttribute: Void .ctor(Microsoft.FSharp.Core.CompilationRepresentationFlags) -Microsoft.FSharp.Core.CompilationRepresentationFlags: Int32 value__ -Microsoft.FSharp.Core.CompilationRepresentationFlags: Microsoft.FSharp.Core.CompilationRepresentationFlags Event -Microsoft.FSharp.Core.CompilationRepresentationFlags: Microsoft.FSharp.Core.CompilationRepresentationFlags Instance -Microsoft.FSharp.Core.CompilationRepresentationFlags: Microsoft.FSharp.Core.CompilationRepresentationFlags ModuleSuffix -Microsoft.FSharp.Core.CompilationRepresentationFlags: Microsoft.FSharp.Core.CompilationRepresentationFlags None -Microsoft.FSharp.Core.CompilationRepresentationFlags: Microsoft.FSharp.Core.CompilationRepresentationFlags Static -Microsoft.FSharp.Core.CompilationRepresentationFlags: Microsoft.FSharp.Core.CompilationRepresentationFlags UseNullAsTrueValue -Microsoft.FSharp.Core.CompilationSourceNameAttribute: System.String SourceName -Microsoft.FSharp.Core.CompilationSourceNameAttribute: System.String get_SourceName() -Microsoft.FSharp.Core.CompilationSourceNameAttribute: Void .ctor(System.String) -Microsoft.FSharp.Core.CompiledNameAttribute: System.String CompiledName -Microsoft.FSharp.Core.CompiledNameAttribute: System.String get_CompiledName() -Microsoft.FSharp.Core.CompiledNameAttribute: Void .ctor(System.String) -Microsoft.FSharp.Core.CompilerMessageAttribute: Boolean IsError -Microsoft.FSharp.Core.CompilerMessageAttribute: Boolean IsHidden -Microsoft.FSharp.Core.CompilerMessageAttribute: Boolean get_IsError() -Microsoft.FSharp.Core.CompilerMessageAttribute: Boolean get_IsHidden() -Microsoft.FSharp.Core.CompilerMessageAttribute: Int32 MessageNumber -Microsoft.FSharp.Core.CompilerMessageAttribute: Int32 get_MessageNumber() -Microsoft.FSharp.Core.CompilerMessageAttribute: System.String Message -Microsoft.FSharp.Core.CompilerMessageAttribute: System.String get_Message() -Microsoft.FSharp.Core.CompilerMessageAttribute: Void .ctor(System.String, Int32) -Microsoft.FSharp.Core.CompilerMessageAttribute: Void set_IsError(Boolean) -Microsoft.FSharp.Core.CompilerMessageAttribute: Void set_IsHidden(Boolean) -Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T]: Boolean CheckClose -Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T]: Boolean get_CheckClose() -Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T]: Int32 GenerateNext(System.Collections.Generic.IEnumerable`1[T] ByRef) -Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T]: System.Collections.Generic.IEnumerator`1[T] GetFreshEnumerator() -Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T]: T LastGenerated -Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T]: T get_LastGenerated() -Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T]: Void .ctor() -Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T]: Void Close() -Microsoft.FSharp.Core.CompilerServices.IProvidedNamespace: Microsoft.FSharp.Core.CompilerServices.IProvidedNamespace[] GetNestedNamespaces() -Microsoft.FSharp.Core.CompilerServices.IProvidedNamespace: System.String NamespaceName -Microsoft.FSharp.Core.CompilerServices.IProvidedNamespace: System.String get_NamespaceName() -Microsoft.FSharp.Core.CompilerServices.IProvidedNamespace: System.Type ResolveTypeName(System.String) -Microsoft.FSharp.Core.CompilerServices.IProvidedNamespace: System.Type[] GetTypes() -Microsoft.FSharp.Core.CompilerServices.ITypeProvider2: System.Reflection.MethodBase ApplyStaticArgumentsForMethod(System.Reflection.MethodBase, System.String, System.Object[]) -Microsoft.FSharp.Core.CompilerServices.ITypeProvider2: System.Reflection.ParameterInfo[] GetStaticParametersForMethod(System.Reflection.MethodBase) -Microsoft.FSharp.Core.CompilerServices.ITypeProvider: Byte[] GetGeneratedAssemblyContents(System.Reflection.Assembly) -Microsoft.FSharp.Core.CompilerServices.ITypeProvider: Microsoft.FSharp.Core.CompilerServices.IProvidedNamespace[] GetNamespaces() -Microsoft.FSharp.Core.CompilerServices.ITypeProvider: Microsoft.FSharp.Quotations.FSharpExpr GetInvokerExpression(System.Reflection.MethodBase, Microsoft.FSharp.Quotations.FSharpExpr[]) -Microsoft.FSharp.Core.CompilerServices.ITypeProvider: System.EventHandler Invalidate -Microsoft.FSharp.Core.CompilerServices.ITypeProvider: System.Reflection.ParameterInfo[] GetStaticParameters(System.Type) -Microsoft.FSharp.Core.CompilerServices.ITypeProvider: System.Type ApplyStaticArguments(System.Type, System.String[], System.Object[]) -Microsoft.FSharp.Core.CompilerServices.ITypeProvider: Void add_Invalidate(System.EventHandler) -Microsoft.FSharp.Core.CompilerServices.ITypeProvider: Void remove_Invalidate(System.EventHandler) -Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers: Microsoft.FSharp.Control.IEvent`2[TDelegate,TArgs] CreateEvent[TDelegate,TArgs](Microsoft.FSharp.Core.FSharpFunc`2[TDelegate,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Core.FSharpFunc`2[TDelegate,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.FSharpFunc`2[System.Object,Microsoft.FSharp.Core.FSharpFunc`2[TArgs,Microsoft.FSharp.Core.Unit]],TDelegate]) -Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers: System.Collections.Generic.IEnumerable`1[TResult] EnumerateFromFunctions[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]) -Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers: System.Collections.Generic.IEnumerable`1[TResult] EnumerateUsing[T,TCollection,TResult](T, Microsoft.FSharp.Core.FSharpFunc`2[T,TCollection]) -Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers: System.Collections.Generic.IEnumerable`1[T] EnumerateThenFinally[T](System.Collections.Generic.IEnumerable`1[T], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers: System.Collections.Generic.IEnumerable`1[T] EnumerateWhile[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Boolean], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute: System.String AssemblyName -Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute: System.String get_AssemblyName() -Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute: Void .ctor() -Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute: Void .ctor(System.String) -Microsoft.FSharp.Core.CompilerServices.TypeProviderAttribute: Void .ctor() -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: Boolean IsHostedExecution -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: Boolean IsInvalidationSupported -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: Boolean SystemRuntimeContainsType(System.String) -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: Boolean get_IsHostedExecution() -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: Boolean get_IsInvalidationSupported() -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: System.String ResolutionFolder -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: System.String RuntimeAssembly -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: System.String TemporaryFolder -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: System.String get_ResolutionFolder() -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: System.String get_RuntimeAssembly() -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: System.String get_TemporaryFolder() -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: System.String[] ReferencedAssemblies -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: System.String[] get_ReferencedAssemblies() -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: System.Version SystemRuntimeAssemblyVersion -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: System.Version get_SystemRuntimeAssemblyVersion() -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: Void .ctor(Microsoft.FSharp.Core.FSharpFunc`2[System.String,System.Boolean]) -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: Void set_IsHostedExecution(Boolean) -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: Void set_IsInvalidationSupported(Boolean) -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: Void set_ReferencedAssemblies(System.String[]) -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: Void set_ResolutionFolder(System.String) -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: Void set_RuntimeAssembly(System.String) -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: Void set_SystemRuntimeAssemblyVersion(System.Version) -Microsoft.FSharp.Core.CompilerServices.TypeProviderConfig: Void set_TemporaryFolder(System.String) -Microsoft.FSharp.Core.CompilerServices.TypeProviderDefinitionLocationAttribute: Int32 Column -Microsoft.FSharp.Core.CompilerServices.TypeProviderDefinitionLocationAttribute: Int32 Line -Microsoft.FSharp.Core.CompilerServices.TypeProviderDefinitionLocationAttribute: Int32 get_Column() -Microsoft.FSharp.Core.CompilerServices.TypeProviderDefinitionLocationAttribute: Int32 get_Line() -Microsoft.FSharp.Core.CompilerServices.TypeProviderDefinitionLocationAttribute: System.String FilePath -Microsoft.FSharp.Core.CompilerServices.TypeProviderDefinitionLocationAttribute: System.String get_FilePath() -Microsoft.FSharp.Core.CompilerServices.TypeProviderDefinitionLocationAttribute: Void .ctor() -Microsoft.FSharp.Core.CompilerServices.TypeProviderDefinitionLocationAttribute: Void set_Column(Int32) -Microsoft.FSharp.Core.CompilerServices.TypeProviderDefinitionLocationAttribute: Void set_FilePath(System.String) -Microsoft.FSharp.Core.CompilerServices.TypeProviderDefinitionLocationAttribute: Void set_Line(Int32) -Microsoft.FSharp.Core.CompilerServices.TypeProviderEditorHideMethodsAttribute: Void .ctor() -Microsoft.FSharp.Core.CompilerServices.TypeProviderTypeAttributes: Int32 value__ -Microsoft.FSharp.Core.CompilerServices.TypeProviderTypeAttributes: Microsoft.FSharp.Core.CompilerServices.TypeProviderTypeAttributes IsErased -Microsoft.FSharp.Core.CompilerServices.TypeProviderTypeAttributes: Microsoft.FSharp.Core.CompilerServices.TypeProviderTypeAttributes SuppressRelocate -Microsoft.FSharp.Core.CompilerServices.TypeProviderXmlDocAttribute: System.String CommentText -Microsoft.FSharp.Core.CompilerServices.TypeProviderXmlDocAttribute: System.String get_CommentText() -Microsoft.FSharp.Core.CompilerServices.TypeProviderXmlDocAttribute: Void .ctor(System.String) -Microsoft.FSharp.Core.CustomComparisonAttribute: Void .ctor() -Microsoft.FSharp.Core.CustomEqualityAttribute: Void .ctor() -Microsoft.FSharp.Core.CustomOperationAttribute: Boolean AllowIntoPattern -Microsoft.FSharp.Core.CustomOperationAttribute: Boolean IsLikeGroupJoin -Microsoft.FSharp.Core.CustomOperationAttribute: Boolean IsLikeJoin -Microsoft.FSharp.Core.CustomOperationAttribute: Boolean IsLikeZip -Microsoft.FSharp.Core.CustomOperationAttribute: Boolean MaintainsVariableSpace -Microsoft.FSharp.Core.CustomOperationAttribute: Boolean MaintainsVariableSpaceUsingBind -Microsoft.FSharp.Core.CustomOperationAttribute: Boolean get_AllowIntoPattern() -Microsoft.FSharp.Core.CustomOperationAttribute: Boolean get_IsLikeGroupJoin() -Microsoft.FSharp.Core.CustomOperationAttribute: Boolean get_IsLikeJoin() -Microsoft.FSharp.Core.CustomOperationAttribute: Boolean get_IsLikeZip() -Microsoft.FSharp.Core.CustomOperationAttribute: Boolean get_MaintainsVariableSpace() -Microsoft.FSharp.Core.CustomOperationAttribute: Boolean get_MaintainsVariableSpaceUsingBind() -Microsoft.FSharp.Core.CustomOperationAttribute: System.String JoinConditionWord -Microsoft.FSharp.Core.CustomOperationAttribute: System.String Name -Microsoft.FSharp.Core.CustomOperationAttribute: System.String get_JoinConditionWord() -Microsoft.FSharp.Core.CustomOperationAttribute: System.String get_Name() -Microsoft.FSharp.Core.CustomOperationAttribute: Void .ctor(System.String) -Microsoft.FSharp.Core.CustomOperationAttribute: Void set_AllowIntoPattern(Boolean) -Microsoft.FSharp.Core.CustomOperationAttribute: Void set_IsLikeGroupJoin(Boolean) -Microsoft.FSharp.Core.CustomOperationAttribute: Void set_IsLikeJoin(Boolean) -Microsoft.FSharp.Core.CustomOperationAttribute: Void set_IsLikeZip(Boolean) -Microsoft.FSharp.Core.CustomOperationAttribute: Void set_JoinConditionWord(System.String) -Microsoft.FSharp.Core.CustomOperationAttribute: Void set_MaintainsVariableSpace(Boolean) -Microsoft.FSharp.Core.CustomOperationAttribute: Void set_MaintainsVariableSpaceUsingBind(Boolean) -Microsoft.FSharp.Core.DefaultAugmentationAttribute: Boolean Value -Microsoft.FSharp.Core.DefaultAugmentationAttribute: Boolean get_Value() -Microsoft.FSharp.Core.DefaultAugmentationAttribute: Void .ctor(Boolean) -Microsoft.FSharp.Core.DefaultValueAttribute: Boolean Check -Microsoft.FSharp.Core.DefaultValueAttribute: Boolean get_Check() -Microsoft.FSharp.Core.DefaultValueAttribute: Void .ctor() -Microsoft.FSharp.Core.DefaultValueAttribute: Void .ctor(Boolean) -Microsoft.FSharp.Core.EntryPointAttribute: Void .ctor() -Microsoft.FSharp.Core.EqualityConditionalOnAttribute: Void .ctor() -Microsoft.FSharp.Core.ExperimentalAttribute: System.String Message -Microsoft.FSharp.Core.ExperimentalAttribute: System.String get_Message() -Microsoft.FSharp.Core.ExperimentalAttribute: Void .ctor(System.String) -Microsoft.FSharp.Core.ExtraTopLevelOperators+Checked: Byte ToByte[T](T) -Microsoft.FSharp.Core.ExtraTopLevelOperators+Checked: SByte ToSByte[T](T) -Microsoft.FSharp.Core.ExtraTopLevelOperators: Byte ToByte[T](T) -Microsoft.FSharp.Core.ExtraTopLevelOperators: Double ToDouble[T](T) -Microsoft.FSharp.Core.ExtraTopLevelOperators: Microsoft.FSharp.Collections.FSharpSet`1[T] CreateSet[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Core.ExtraTopLevelOperators: Microsoft.FSharp.Control.FSharpAsyncBuilder DefaultAsyncBuilder -Microsoft.FSharp.Core.ExtraTopLevelOperators: Microsoft.FSharp.Control.FSharpAsyncBuilder get_DefaultAsyncBuilder() -Microsoft.FSharp.Core.ExtraTopLevelOperators: Microsoft.FSharp.Core.ExtraTopLevelOperators+Checked -Microsoft.FSharp.Core.ExtraTopLevelOperators: Microsoft.FSharp.Linq.QueryBuilder get_query() -Microsoft.FSharp.Core.ExtraTopLevelOperators: Microsoft.FSharp.Linq.QueryBuilder query -Microsoft.FSharp.Core.ExtraTopLevelOperators: SByte ToSByte[T](T) -Microsoft.FSharp.Core.ExtraTopLevelOperators: Single ToSingle[T](T) -Microsoft.FSharp.Core.ExtraTopLevelOperators: System.Collections.Generic.IDictionary`2[TKey,TValue] CreateDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) -Microsoft.FSharp.Core.ExtraTopLevelOperators: System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] CreateReadOnlyDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) -Microsoft.FSharp.Core.ExtraTopLevelOperators: T LazyPattern[T](System.Lazy`1[T]) -Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatLineToError[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatLineToTextWriter[T](System.IO.TextWriter, Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatLine[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToError[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToStringThenFail[T,TResult](Microsoft.FSharp.Core.PrintfFormat`4[T,Microsoft.FSharp.Core.Unit,System.String,TResult]) -Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToString[T](Microsoft.FSharp.Core.PrintfFormat`4[T,Microsoft.FSharp.Core.Unit,System.String,System.String]) -Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormatToTextWriter[T](System.IO.TextWriter, Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.ExtraTopLevelOperators: T PrintFormat[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.ExtraTopLevelOperators: T SpliceExpression[T](Microsoft.FSharp.Quotations.FSharpExpr`1[T]) -Microsoft.FSharp.Core.ExtraTopLevelOperators: T SpliceUntypedExpression[T](Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Core.ExtraTopLevelOperators: T[,] CreateArray2D[?,T](System.Collections.Generic.IEnumerable`1[?]) -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]) -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Boolean IsChoice1Of2 -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Boolean IsChoice2Of2 -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Boolean get_IsChoice1Of2() -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Boolean get_IsChoice2Of2() -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]) -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: T1 Item -Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2]: T1 get_Item() -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]) -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Boolean IsChoice1Of2 -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Boolean IsChoice2Of2 -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Boolean get_IsChoice1Of2() -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Boolean get_IsChoice2Of2() -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]) -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: T2 Item -Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2]: T2 get_Item() -Microsoft.FSharp.Core.FSharpChoice`2+Tags[T1,T2]: Int32 Choice1Of2 -Microsoft.FSharp.Core.FSharpChoice`2+Tags[T1,T2]: Int32 Choice2Of2 -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]) -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Boolean IsChoice1Of2 -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Boolean IsChoice2Of2 -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Boolean get_IsChoice1Of2() -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Boolean get_IsChoice2Of2() -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]) -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Microsoft.FSharp.Core.FSharpChoice`2+Choice1Of2[T1,T2] -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Microsoft.FSharp.Core.FSharpChoice`2+Choice2Of2[T1,T2] -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Microsoft.FSharp.Core.FSharpChoice`2+Tags[T1,T2] -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Microsoft.FSharp.Core.FSharpChoice`2[T1,T2] NewChoice1Of2(T1) -Microsoft.FSharp.Core.FSharpChoice`2[T1,T2]: Microsoft.FSharp.Core.FSharpChoice`2[T1,T2] NewChoice2Of2(T2) -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]) -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Boolean IsChoice1Of3 -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Boolean IsChoice2Of3 -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Boolean IsChoice3Of3 -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Boolean get_IsChoice1Of3() -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Boolean get_IsChoice2Of3() -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Boolean get_IsChoice3Of3() -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]) -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: T1 Item -Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3]: T1 get_Item() -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]) -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Boolean IsChoice1Of3 -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Boolean IsChoice2Of3 -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Boolean IsChoice3Of3 -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Boolean get_IsChoice1Of3() -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Boolean get_IsChoice2Of3() -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Boolean get_IsChoice3Of3() -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]) -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: T2 Item -Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3]: T2 get_Item() -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]) -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Boolean IsChoice1Of3 -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Boolean IsChoice2Of3 -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Boolean IsChoice3Of3 -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Boolean get_IsChoice1Of3() -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Boolean get_IsChoice2Of3() -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Boolean get_IsChoice3Of3() -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]) -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: T3 Item -Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3]: T3 get_Item() -Microsoft.FSharp.Core.FSharpChoice`3+Tags[T1,T2,T3]: Int32 Choice1Of3 -Microsoft.FSharp.Core.FSharpChoice`3+Tags[T1,T2,T3]: Int32 Choice2Of3 -Microsoft.FSharp.Core.FSharpChoice`3+Tags[T1,T2,T3]: Int32 Choice3Of3 -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]) -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Boolean IsChoice1Of3 -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Boolean IsChoice2Of3 -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Boolean IsChoice3Of3 -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Boolean get_IsChoice1Of3() -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Boolean get_IsChoice2Of3() -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Boolean get_IsChoice3Of3() -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]) -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Microsoft.FSharp.Core.FSharpChoice`3+Choice1Of3[T1,T2,T3] -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Microsoft.FSharp.Core.FSharpChoice`3+Choice2Of3[T1,T2,T3] -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Microsoft.FSharp.Core.FSharpChoice`3+Choice3Of3[T1,T2,T3] -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Microsoft.FSharp.Core.FSharpChoice`3+Tags[T1,T2,T3] -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3] NewChoice1Of3(T1) -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3] NewChoice2Of3(T2) -Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3]: Microsoft.FSharp.Core.FSharpChoice`3[T1,T2,T3] NewChoice3Of3(T3) -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Boolean IsChoice1Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Boolean IsChoice2Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Boolean IsChoice3Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Boolean IsChoice4Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Boolean get_IsChoice1Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Boolean get_IsChoice2Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Boolean get_IsChoice3Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Boolean get_IsChoice4Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: T1 Item -Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4]: T1 get_Item() -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Boolean IsChoice1Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Boolean IsChoice2Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Boolean IsChoice3Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Boolean IsChoice4Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Boolean get_IsChoice1Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Boolean get_IsChoice2Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Boolean get_IsChoice3Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Boolean get_IsChoice4Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: T2 Item -Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4]: T2 get_Item() -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Boolean IsChoice1Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Boolean IsChoice2Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Boolean IsChoice3Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Boolean IsChoice4Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Boolean get_IsChoice1Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Boolean get_IsChoice2Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Boolean get_IsChoice3Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Boolean get_IsChoice4Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: T3 Item -Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4]: T3 get_Item() -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Boolean IsChoice1Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Boolean IsChoice2Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Boolean IsChoice3Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Boolean IsChoice4Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Boolean get_IsChoice1Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Boolean get_IsChoice2Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Boolean get_IsChoice3Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Boolean get_IsChoice4Of4() -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: T4 Item -Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4]: T4 get_Item() -Microsoft.FSharp.Core.FSharpChoice`4+Tags[T1,T2,T3,T4]: Int32 Choice1Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Tags[T1,T2,T3,T4]: Int32 Choice2Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Tags[T1,T2,T3,T4]: Int32 Choice3Of4 -Microsoft.FSharp.Core.FSharpChoice`4+Tags[T1,T2,T3,T4]: Int32 Choice4Of4 -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Boolean IsChoice1Of4 -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Boolean IsChoice2Of4 -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Boolean IsChoice3Of4 -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Boolean IsChoice4Of4 -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Boolean get_IsChoice1Of4() -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Boolean get_IsChoice2Of4() -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Boolean get_IsChoice3Of4() -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Boolean get_IsChoice4Of4() -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Microsoft.FSharp.Core.FSharpChoice`4+Choice1Of4[T1,T2,T3,T4] -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Microsoft.FSharp.Core.FSharpChoice`4+Choice2Of4[T1,T2,T3,T4] -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Microsoft.FSharp.Core.FSharpChoice`4+Choice3Of4[T1,T2,T3,T4] -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Microsoft.FSharp.Core.FSharpChoice`4+Choice4Of4[T1,T2,T3,T4] -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Microsoft.FSharp.Core.FSharpChoice`4+Tags[T1,T2,T3,T4] -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4] NewChoice1Of4(T1) -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4] NewChoice2Of4(T2) -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4] NewChoice3Of4(T3) -Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4]: Microsoft.FSharp.Core.FSharpChoice`4[T1,T2,T3,T4] NewChoice4Of4(T4) -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Boolean IsChoice1Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Boolean IsChoice2Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Boolean IsChoice3Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Boolean IsChoice4Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Boolean IsChoice5Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice1Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice2Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice3Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice4Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice5Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: T1 Item -Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5]: T1 get_Item() -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Boolean IsChoice1Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Boolean IsChoice2Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Boolean IsChoice3Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Boolean IsChoice4Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Boolean IsChoice5Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice1Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice2Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice3Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice4Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice5Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: T2 Item -Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5]: T2 get_Item() -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Boolean IsChoice1Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Boolean IsChoice2Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Boolean IsChoice3Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Boolean IsChoice4Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Boolean IsChoice5Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice1Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice2Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice3Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice4Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice5Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: T3 Item -Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5]: T3 get_Item() -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Boolean IsChoice1Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Boolean IsChoice2Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Boolean IsChoice3Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Boolean IsChoice4Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Boolean IsChoice5Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice1Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice2Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice3Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice4Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice5Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: T4 Item -Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5]: T4 get_Item() -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Boolean IsChoice1Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Boolean IsChoice2Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Boolean IsChoice3Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Boolean IsChoice4Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Boolean IsChoice5Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice1Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice2Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice3Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice4Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Boolean get_IsChoice5Of5() -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: T5 Item -Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5]: T5 get_Item() -Microsoft.FSharp.Core.FSharpChoice`5+Tags[T1,T2,T3,T4,T5]: Int32 Choice1Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Tags[T1,T2,T3,T4,T5]: Int32 Choice2Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Tags[T1,T2,T3,T4,T5]: Int32 Choice3Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Tags[T1,T2,T3,T4,T5]: Int32 Choice4Of5 -Microsoft.FSharp.Core.FSharpChoice`5+Tags[T1,T2,T3,T4,T5]: Int32 Choice5Of5 -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Boolean IsChoice1Of5 -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Boolean IsChoice2Of5 -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Boolean IsChoice3Of5 -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Boolean IsChoice4Of5 -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Boolean IsChoice5Of5 -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Boolean get_IsChoice1Of5() -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Boolean get_IsChoice2Of5() -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Boolean get_IsChoice3Of5() -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Boolean get_IsChoice4Of5() -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Boolean get_IsChoice5Of5() -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Microsoft.FSharp.Core.FSharpChoice`5+Choice1Of5[T1,T2,T3,T4,T5] -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Microsoft.FSharp.Core.FSharpChoice`5+Choice2Of5[T1,T2,T3,T4,T5] -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Microsoft.FSharp.Core.FSharpChoice`5+Choice3Of5[T1,T2,T3,T4,T5] -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Microsoft.FSharp.Core.FSharpChoice`5+Choice4Of5[T1,T2,T3,T4,T5] -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Microsoft.FSharp.Core.FSharpChoice`5+Choice5Of5[T1,T2,T3,T4,T5] -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Microsoft.FSharp.Core.FSharpChoice`5+Tags[T1,T2,T3,T4,T5] -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5] NewChoice1Of5(T1) -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5] NewChoice2Of5(T2) -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5] NewChoice3Of5(T3) -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5] NewChoice4Of5(T4) -Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5]: Microsoft.FSharp.Core.FSharpChoice`5[T1,T2,T3,T4,T5] NewChoice5Of5(T5) -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice1Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice2Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice3Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice4Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice5Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice6Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice1Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice2Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice3Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice4Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice5Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice6Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: T1 Item -Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6]: T1 get_Item() -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice1Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice2Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice3Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice4Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice5Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice6Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice1Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice2Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice3Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice4Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice5Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice6Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: T2 Item -Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6]: T2 get_Item() -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice1Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice2Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice3Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice4Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice5Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice6Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice1Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice2Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice3Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice4Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice5Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice6Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: T3 Item -Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6]: T3 get_Item() -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice1Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice2Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice3Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice4Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice5Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice6Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice1Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice2Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice3Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice4Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice5Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice6Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: T4 Item -Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6]: T4 get_Item() -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice1Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice2Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice3Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice4Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice5Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice6Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice1Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice2Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice3Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice4Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice5Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice6Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: T5 Item -Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6]: T5 get_Item() -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice1Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice2Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice3Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice4Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice5Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice6Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice1Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice2Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice3Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice4Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice5Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice6Of6() -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: T6 Item -Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6]: T6 get_Item() -Microsoft.FSharp.Core.FSharpChoice`6+Tags[T1,T2,T3,T4,T5,T6]: Int32 Choice1Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Tags[T1,T2,T3,T4,T5,T6]: Int32 Choice2Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Tags[T1,T2,T3,T4,T5,T6]: Int32 Choice3Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Tags[T1,T2,T3,T4,T5,T6]: Int32 Choice4Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Tags[T1,T2,T3,T4,T5,T6]: Int32 Choice5Of6 -Microsoft.FSharp.Core.FSharpChoice`6+Tags[T1,T2,T3,T4,T5,T6]: Int32 Choice6Of6 -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice1Of6 -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice2Of6 -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice3Of6 -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice4Of6 -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice5Of6 -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean IsChoice6Of6 -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice1Of6() -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice2Of6() -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice3Of6() -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice4Of6() -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice5Of6() -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Boolean get_IsChoice6Of6() -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]) -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Microsoft.FSharp.Core.FSharpChoice`6+Choice1Of6[T1,T2,T3,T4,T5,T6] -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Microsoft.FSharp.Core.FSharpChoice`6+Choice2Of6[T1,T2,T3,T4,T5,T6] -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Microsoft.FSharp.Core.FSharpChoice`6+Choice3Of6[T1,T2,T3,T4,T5,T6] -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Microsoft.FSharp.Core.FSharpChoice`6+Choice4Of6[T1,T2,T3,T4,T5,T6] -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Microsoft.FSharp.Core.FSharpChoice`6+Choice5Of6[T1,T2,T3,T4,T5,T6] -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Microsoft.FSharp.Core.FSharpChoice`6+Choice6Of6[T1,T2,T3,T4,T5,T6] -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Microsoft.FSharp.Core.FSharpChoice`6+Tags[T1,T2,T3,T4,T5,T6] -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6] NewChoice1Of6(T1) -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6] NewChoice2Of6(T2) -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6] NewChoice3Of6(T3) -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6] NewChoice4Of6(T4) -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6] NewChoice5Of6(T5) -Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6]: Microsoft.FSharp.Core.FSharpChoice`6[T1,T2,T3,T4,T5,T6] NewChoice6Of6(T6) -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice1Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice2Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice3Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice4Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice5Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice6Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice7Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice1Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice2Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice3Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice4Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice5Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice6Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice7Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: T1 Item -Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7]: T1 get_Item() -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice1Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice2Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice3Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice4Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice5Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice6Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice7Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice1Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice2Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice3Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice4Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice5Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice6Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice7Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: T2 Item -Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7]: T2 get_Item() -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice1Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice2Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice3Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice4Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice5Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice6Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice7Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice1Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice2Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice3Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice4Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice5Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice6Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice7Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: T3 Item -Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7]: T3 get_Item() -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice1Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice2Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice3Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice4Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice5Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice6Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice7Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice1Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice2Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice3Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice4Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice5Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice6Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice7Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: T4 Item -Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7]: T4 get_Item() -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice1Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice2Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice3Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice4Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice5Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice6Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice7Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice1Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice2Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice3Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice4Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice5Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice6Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice7Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: T5 Item -Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7]: T5 get_Item() -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice1Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice2Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice3Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice4Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice5Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice6Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice7Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice1Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice2Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice3Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice4Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice5Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice6Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice7Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: T6 Item -Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7]: T6 get_Item() -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice1Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice2Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice3Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice4Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice5Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice6Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice7Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice1Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice2Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice3Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice4Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice5Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice6Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice7Of7() -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: T7 Item -Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7]: T7 get_Item() -Microsoft.FSharp.Core.FSharpChoice`7+Tags[T1,T2,T3,T4,T5,T6,T7]: Int32 Choice1Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Tags[T1,T2,T3,T4,T5,T6,T7]: Int32 Choice2Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Tags[T1,T2,T3,T4,T5,T6,T7]: Int32 Choice3Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Tags[T1,T2,T3,T4,T5,T6,T7]: Int32 Choice4Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Tags[T1,T2,T3,T4,T5,T6,T7]: Int32 Choice5Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Tags[T1,T2,T3,T4,T5,T6,T7]: Int32 Choice6Of7 -Microsoft.FSharp.Core.FSharpChoice`7+Tags[T1,T2,T3,T4,T5,T6,T7]: Int32 Choice7Of7 -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice1Of7 -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice2Of7 -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice3Of7 -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice4Of7 -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice5Of7 -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice6Of7 -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean IsChoice7Of7 -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice1Of7() -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice2Of7() -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice3Of7() -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice4Of7() -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice5Of7() -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice6Of7() -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Boolean get_IsChoice7Of7() -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]) -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Int32 Tag -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7+Choice1Of7[T1,T2,T3,T4,T5,T6,T7] -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7+Choice2Of7[T1,T2,T3,T4,T5,T6,T7] -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7+Choice3Of7[T1,T2,T3,T4,T5,T6,T7] -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7+Choice4Of7[T1,T2,T3,T4,T5,T6,T7] -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7+Choice5Of7[T1,T2,T3,T4,T5,T6,T7] -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7+Choice6Of7[T1,T2,T3,T4,T5,T6,T7] -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7+Choice7Of7[T1,T2,T3,T4,T5,T6,T7] -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7+Tags[T1,T2,T3,T4,T5,T6,T7] -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7] NewChoice1Of7(T1) -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7] NewChoice2Of7(T2) -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7] NewChoice3Of7(T3) -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7] NewChoice4Of7(T4) -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7] NewChoice5Of7(T5) -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7] NewChoice6Of7(T6) -Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7]: Microsoft.FSharp.Core.FSharpChoice`7[T1,T2,T3,T4,T5,T6,T7] NewChoice7Of7(T7) -Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]: Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] FromConverter(System.Converter`2[T,TResult]) -Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]: Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] op_Implicit(System.Converter`2[T,TResult]) -Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]: System.Converter`2[T,TResult] ToConverter(Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]) -Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]: System.Converter`2[T,TResult] op_Implicit(Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]) -Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]: TResult Invoke(T) -Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]: V InvokeFast[V](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TResult,V]], T, TResult) -Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]: Void .ctor() -Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]: W InvokeFast[V,W](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[V,W]]], T, TResult, V) -Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]: X InvokeFast[V,W,X](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[V,Microsoft.FSharp.Core.FSharpFunc`2[W,X]]]], T, TResult, V, W) -Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]: Y InvokeFast[V,W,X,Y](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[V,Microsoft.FSharp.Core.FSharpFunc`2[W,Microsoft.FSharp.Core.FSharpFunc`2[X,Y]]]]], T, TResult, V, W, X) -Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute: Int32 Major -Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute: Int32 Minor -Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute: Int32 Release -Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute: Int32 get_Major() -Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute: Int32 get_Minor() -Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute: Int32 get_Release() -Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute: Void .ctor(Int32, Int32, Int32) -Microsoft.FSharp.Core.FSharpOption`1+Tags[T]: Int32 None -Microsoft.FSharp.Core.FSharpOption`1+Tags[T]: Int32 Some -Microsoft.FSharp.Core.FSharpOption`1[T]: Boolean Equals(Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.FSharpOption`1[T]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpOption`1[T]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpOption`1[T]: Boolean IsNone -Microsoft.FSharp.Core.FSharpOption`1[T]: Boolean IsSome -Microsoft.FSharp.Core.FSharpOption`1[T]: Boolean get_IsNone(Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.FSharpOption`1[T]: Boolean get_IsSome(Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.FSharpOption`1[T]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.FSharpOption`1[T]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpOption`1[T]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpOption`1[T]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpOption`1[T]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpOption`1[T]: Int32 GetTag(Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.FSharpOption`1[T]: Microsoft.FSharp.Core.FSharpOption`1+Tags[T] -Microsoft.FSharp.Core.FSharpOption`1[T]: Microsoft.FSharp.Core.FSharpOption`1[T] None -Microsoft.FSharp.Core.FSharpOption`1[T]: Microsoft.FSharp.Core.FSharpOption`1[T] Some(T) -Microsoft.FSharp.Core.FSharpOption`1[T]: Microsoft.FSharp.Core.FSharpOption`1[T] get_None() -Microsoft.FSharp.Core.FSharpOption`1[T]: Microsoft.FSharp.Core.FSharpOption`1[T] op_Implicit(T) -Microsoft.FSharp.Core.FSharpOption`1[T]: System.String ToString() -Microsoft.FSharp.Core.FSharpOption`1[T]: T Value -Microsoft.FSharp.Core.FSharpOption`1[T]: T get_Value() -Microsoft.FSharp.Core.FSharpOption`1[T]: Void .ctor(T) -Microsoft.FSharp.Core.FSharpRef`1[T]: Boolean Equals(Microsoft.FSharp.Core.FSharpRef`1[T]) -Microsoft.FSharp.Core.FSharpRef`1[T]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpRef`1[T]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpRef`1[T]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpRef`1[T]) -Microsoft.FSharp.Core.FSharpRef`1[T]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpRef`1[T]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpRef`1[T]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpRef`1[T]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpRef`1[T]: T Value -Microsoft.FSharp.Core.FSharpRef`1[T]: T contents -Microsoft.FSharp.Core.FSharpRef`1[T]: T contents@ -Microsoft.FSharp.Core.FSharpRef`1[T]: T get_Value() -Microsoft.FSharp.Core.FSharpRef`1[T]: T get_contents() -Microsoft.FSharp.Core.FSharpRef`1[T]: Void .ctor(T) -Microsoft.FSharp.Core.FSharpRef`1[T]: Void set_Value(T) -Microsoft.FSharp.Core.FSharpRef`1[T]: Void set_contents(T) -Microsoft.FSharp.Core.FSharpResult`2+Tags[T,TError]: Int32 Error -Microsoft.FSharp.Core.FSharpResult`2+Tags[T,TError]: Int32 Ok -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Boolean Equals(Microsoft.FSharp.Core.FSharpResult`2[T,TError]) -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Boolean IsError -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Boolean IsOk -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Boolean get_IsError() -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Boolean get_IsOk() -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpResult`2[T,TError]) -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Int32 Tag -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Microsoft.FSharp.Core.FSharpResult`2+Tags[T,TError] -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Microsoft.FSharp.Core.FSharpResult`2[T,TError] NewError(TError) -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: Microsoft.FSharp.Core.FSharpResult`2[T,TError] NewOk(T) -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T ResultValue -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T get_ResultValue() -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError ErrorValue -Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError get_ErrorValue() -Microsoft.FSharp.Core.FSharpTypeFunc: System.Object Specialize[T]() -Microsoft.FSharp.Core.FSharpTypeFunc: Void .ctor() -Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueNone -Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueSome -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object) -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsNone -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsSome -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueNone -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueSome -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsNone() -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsSome() -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueNone() -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueSome() -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object) -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object, System.Collections.IComparer) -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode() -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 Tag -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 get_Tag() -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T] -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] NewValueSome(T) -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] None -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] Some(T) -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] ValueNone -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] get_None() -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] get_ValueNone() -Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] op_Implicit(T) -Microsoft.FSharp.Core.FSharpValueOption`1[T]: System.String ToString() -Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Item -Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Value -Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Item() -Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Value() -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit] FromAction(System.Action) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T] FromFunc[T](System.Func`1[T]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit] FromAction[T](System.Action`1[T]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit] ToFSharpFunc[T](System.Action`1[T]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] FromFunc[T,TResult](System.Func`2[T,TResult]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] ToFSharpFunc[T,TResult](System.Converter`2[T,TResult]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,Microsoft.FSharp.Core.FSharpFunc`2[T5,Microsoft.FSharp.Core.Unit]]]]] FromAction[T1,T2,T3,T4,T5](System.Action`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,Microsoft.FSharp.Core.FSharpFunc`2[T5,TResult]]]]] FromFunc[T1,T2,T3,T4,T5,TResult](System.Func`6[T1,T2,T3,T4,T5,TResult]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,Microsoft.FSharp.Core.FSharpFunc`2[T5,TResult]]]]] FuncFromTupled[T1,T2,T3,T4,T5,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`5[T1,T2,T3,T4,T5],TResult]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,Microsoft.FSharp.Core.Unit]]]] FromAction[T1,T2,T3,T4](System.Action`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,TResult]]]] FromFunc[T1,T2,T3,T4,TResult](System.Func`5[T1,T2,T3,T4,TResult]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,TResult]]]] FuncFromTupled[T1,T2,T3,T4,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`4[T1,T2,T3,T4],TResult]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.Unit]]] FromAction[T1,T2,T3](System.Action`3[T1,T2,T3]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]] FromFunc[T1,T2,T3,TResult](System.Func`4[T1,T2,T3,TResult]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]] FuncFromTupled[T1,T2,T3,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`3[T1,T2,T3],TResult]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.Unit]] FromAction[T1,T2](System.Action`2[T1,T2]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]] FromFunc[T1,T2,TResult](System.Func`3[T1,T2,TResult]) -Microsoft.FSharp.Core.FuncConvert: Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]] FuncFromTupled[T1,T2,TResult](Microsoft.FSharp.Core.FSharpFunc`2[System.Tuple`2[T1,T2],TResult]) -Microsoft.FSharp.Core.GeneralizableValueAttribute: Void .ctor() -Microsoft.FSharp.Core.InterfaceAttribute: Void .ctor() -Microsoft.FSharp.Core.LanguagePrimitives+ErrorStrings: System.String AddressOpNotFirstClassString -Microsoft.FSharp.Core.LanguagePrimitives+ErrorStrings: System.String InputArrayEmptyString -Microsoft.FSharp.Core.LanguagePrimitives+ErrorStrings: System.String InputMustBeNonNegativeString -Microsoft.FSharp.Core.LanguagePrimitives+ErrorStrings: System.String InputSequenceEmptyString -Microsoft.FSharp.Core.LanguagePrimitives+ErrorStrings: System.String NoNegateMinValueString -Microsoft.FSharp.Core.LanguagePrimitives+ErrorStrings: System.String get_AddressOpNotFirstClassString() -Microsoft.FSharp.Core.LanguagePrimitives+ErrorStrings: System.String get_InputArrayEmptyString() -Microsoft.FSharp.Core.LanguagePrimitives+ErrorStrings: System.String get_InputMustBeNonNegativeString() -Microsoft.FSharp.Core.LanguagePrimitives+ErrorStrings: System.String get_InputSequenceEmptyString() -Microsoft.FSharp.Core.LanguagePrimitives+ErrorStrings: System.String get_NoNegateMinValueString() -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Boolean FastEqualsTuple2[T1,T2](System.Collections.IEqualityComparer, System.Tuple`2[T1,T2], System.Tuple`2[T1,T2]) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Boolean FastEqualsTuple3[T1,T2,T3](System.Collections.IEqualityComparer, System.Tuple`3[T1,T2,T3], System.Tuple`3[T1,T2,T3]) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Boolean FastEqualsTuple4[T1,T2,T3,T4](System.Collections.IEqualityComparer, System.Tuple`4[T1,T2,T3,T4], System.Tuple`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Boolean FastEqualsTuple5[T1,T2,T3,T4,T5](System.Collections.IEqualityComparer, System.Tuple`5[T1,T2,T3,T4,T5], System.Tuple`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Boolean GenericEqualityERIntrinsic[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Boolean GenericEqualityIntrinsic[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Boolean GenericEqualityWithComparerIntrinsic[T](System.Collections.IEqualityComparer, T, T) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Boolean GenericGreaterOrEqualIntrinsic[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Boolean GenericGreaterThanIntrinsic[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Boolean GenericLessOrEqualIntrinsic[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Boolean GenericLessThanIntrinsic[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Boolean PhysicalEqualityIntrinsic[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 FastCompareTuple2[T1,T2](System.Collections.IComparer, System.Tuple`2[T1,T2], System.Tuple`2[T1,T2]) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 FastCompareTuple3[T1,T2,T3](System.Collections.IComparer, System.Tuple`3[T1,T2,T3], System.Tuple`3[T1,T2,T3]) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 FastCompareTuple4[T1,T2,T3,T4](System.Collections.IComparer, System.Tuple`4[T1,T2,T3,T4], System.Tuple`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 FastCompareTuple5[T1,T2,T3,T4,T5](System.Collections.IComparer, System.Tuple`5[T1,T2,T3,T4,T5], System.Tuple`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 FastHashTuple2[T1,T2](System.Collections.IEqualityComparer, System.Tuple`2[T1,T2]) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 FastHashTuple3[T1,T2,T3](System.Collections.IEqualityComparer, System.Tuple`3[T1,T2,T3]) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 FastHashTuple4[T1,T2,T3,T4](System.Collections.IEqualityComparer, System.Tuple`4[T1,T2,T3,T4]) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 FastHashTuple5[T1,T2,T3,T4,T5](System.Collections.IEqualityComparer, System.Tuple`5[T1,T2,T3,T4,T5]) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 GenericComparisonIntrinsic[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 GenericComparisonWithComparerIntrinsic[T](System.Collections.IComparer, T, T) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 GenericHashIntrinsic[T](T) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 GenericHashWithComparerIntrinsic[T](System.Collections.IEqualityComparer, T) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 LimitedGenericHashIntrinsic[T](Int32, T) -Microsoft.FSharp.Core.LanguagePrimitives+HashCompare: Int32 PhysicalHashIntrinsic[T](T) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: Boolean TypeTestFast[T](System.Object) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: Boolean TypeTestGeneric[T](System.Object) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: Char GetString(System.String, Int32) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: System.Decimal MakeDecimal(Int32, Int32, Int32, Boolean, Byte) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: T CheckThis[T](T) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: T CreateInstance[T]() -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: T GetArray2D[T](T[,], Int32, Int32) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: T GetArray3D[T](T[,,], Int32, Int32, Int32) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: T GetArray4D[T](T[,,,], Int32, Int32, Int32, Int32) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: T GetArray[T](T[], Int32) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: T UnboxFast[T](System.Object) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: T UnboxGeneric[T](System.Object) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: Void Dispose[T](T) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: Void FailInit() -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: Void FailStaticInit() -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: Void SetArray2D[T](T[,], Int32, Int32, T) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: Void SetArray3D[T](T[,,], Int32, Int32, Int32, T) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: Void SetArray4D[T](T[,,,], Int32, Int32, Int32, Int32, T) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions: Void SetArray[T](T[], Int32, T) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicOperators: Boolean Or(Boolean, Boolean) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicOperators: Boolean op_Amp(Boolean, Boolean) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicOperators: Boolean op_BooleanAnd(Boolean, Boolean) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicOperators: Boolean op_BooleanOr(Boolean, Boolean) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicOperators: IntPtr op_IntegerAddressOf[T](T) -Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicOperators: T& op_AddressOf[T](T) -Microsoft.FSharp.Core.LanguagePrimitives: Boolean GenericEqualityER[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives: Boolean GenericEqualityWithComparer[T](System.Collections.IEqualityComparer, T, T) -Microsoft.FSharp.Core.LanguagePrimitives: Boolean GenericEquality[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives: Boolean GenericGreaterOrEqual[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives: Boolean GenericGreaterThan[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives: Boolean GenericLessOrEqual[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives: Boolean GenericLessThan[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives: Boolean PhysicalEquality[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives: Double FloatWithMeasure(Double) -Microsoft.FSharp.Core.LanguagePrimitives: Int16 Int16WithMeasure(Int16) -Microsoft.FSharp.Core.LanguagePrimitives: Int32 GenericComparisonWithComparer[T](System.Collections.IComparer, T, T) -Microsoft.FSharp.Core.LanguagePrimitives: Int32 GenericComparison[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives: Int32 GenericHashWithComparer[T](System.Collections.IEqualityComparer, T) -Microsoft.FSharp.Core.LanguagePrimitives: Int32 GenericHash[T](T) -Microsoft.FSharp.Core.LanguagePrimitives: Int32 GenericLimitedHash[T](Int32, T) -Microsoft.FSharp.Core.LanguagePrimitives: Int32 Int32WithMeasure(Int32) -Microsoft.FSharp.Core.LanguagePrimitives: Int32 ParseInt32(System.String) -Microsoft.FSharp.Core.LanguagePrimitives: Int32 PhysicalHash[T](T) -Microsoft.FSharp.Core.LanguagePrimitives: Int64 Int64WithMeasure(Int64) -Microsoft.FSharp.Core.LanguagePrimitives: Int64 ParseInt64(System.String) -Microsoft.FSharp.Core.LanguagePrimitives: Microsoft.FSharp.Core.LanguagePrimitives+ErrorStrings -Microsoft.FSharp.Core.LanguagePrimitives: Microsoft.FSharp.Core.LanguagePrimitives+HashCompare -Microsoft.FSharp.Core.LanguagePrimitives: Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions -Microsoft.FSharp.Core.LanguagePrimitives: Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicOperators -Microsoft.FSharp.Core.LanguagePrimitives: SByte SByteWithMeasure(SByte) -Microsoft.FSharp.Core.LanguagePrimitives: Single Float32WithMeasure(Single) -Microsoft.FSharp.Core.LanguagePrimitives: System.Collections.Generic.IComparer`1[T] FastGenericComparerFromTable[T]() -Microsoft.FSharp.Core.LanguagePrimitives: System.Collections.Generic.IComparer`1[T] FastGenericComparer[T]() -Microsoft.FSharp.Core.LanguagePrimitives: System.Collections.Generic.IEqualityComparer`1[T] FastGenericEqualityComparerFromTable[T]() -Microsoft.FSharp.Core.LanguagePrimitives: System.Collections.Generic.IEqualityComparer`1[T] FastGenericEqualityComparer[T]() -Microsoft.FSharp.Core.LanguagePrimitives: System.Collections.Generic.IEqualityComparer`1[T] FastLimitedGenericEqualityComparer[T](Int32) -Microsoft.FSharp.Core.LanguagePrimitives: System.Collections.IComparer GenericComparer -Microsoft.FSharp.Core.LanguagePrimitives: System.Collections.IComparer get_GenericComparer() -Microsoft.FSharp.Core.LanguagePrimitives: System.Collections.IEqualityComparer GenericEqualityComparer -Microsoft.FSharp.Core.LanguagePrimitives: System.Collections.IEqualityComparer GenericEqualityERComparer -Microsoft.FSharp.Core.LanguagePrimitives: System.Collections.IEqualityComparer get_GenericEqualityComparer() -Microsoft.FSharp.Core.LanguagePrimitives: System.Collections.IEqualityComparer get_GenericEqualityERComparer() -Microsoft.FSharp.Core.LanguagePrimitives: System.Decimal DecimalWithMeasure(System.Decimal) -Microsoft.FSharp.Core.LanguagePrimitives: T DivideByIntDynamic[T](T, Int32) -Microsoft.FSharp.Core.LanguagePrimitives: T DivideByInt[T](T, Int32) -Microsoft.FSharp.Core.LanguagePrimitives: T EnumToValue[TEnum,T](TEnum) -Microsoft.FSharp.Core.LanguagePrimitives: T GenericMaximum[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives: T GenericMinimum[T](T, T) -Microsoft.FSharp.Core.LanguagePrimitives: T GenericOneDynamic[T]() -Microsoft.FSharp.Core.LanguagePrimitives: T GenericOne[T]() -Microsoft.FSharp.Core.LanguagePrimitives: T GenericZeroDynamic[T]() -Microsoft.FSharp.Core.LanguagePrimitives: T GenericZero[T]() -Microsoft.FSharp.Core.LanguagePrimitives: TEnum EnumOfValue[T,TEnum](T) -Microsoft.FSharp.Core.LanguagePrimitives: TResult AdditionDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult CheckedAdditionDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult CheckedMultiplyDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult MultiplyDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: UInt32 ParseUInt32(System.String) -Microsoft.FSharp.Core.LanguagePrimitives: UInt64 ParseUInt64(System.String) -Microsoft.FSharp.Core.LiteralAttribute: Void .ctor() -Microsoft.FSharp.Core.MatchFailureException: Boolean Equals(System.Object) -Microsoft.FSharp.Core.MatchFailureException: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.MatchFailureException: Int32 Data1 -Microsoft.FSharp.Core.MatchFailureException: Int32 Data2 -Microsoft.FSharp.Core.MatchFailureException: Int32 GetHashCode() -Microsoft.FSharp.Core.MatchFailureException: Int32 GetHashCode(System.Collections.IEqualityComparer) -Microsoft.FSharp.Core.MatchFailureException: Int32 get_Data1() -Microsoft.FSharp.Core.MatchFailureException: Int32 get_Data2() -Microsoft.FSharp.Core.MatchFailureException: System.String Data0 -Microsoft.FSharp.Core.MatchFailureException: System.String Message -Microsoft.FSharp.Core.MatchFailureException: System.String get_Data0() -Microsoft.FSharp.Core.MatchFailureException: System.String get_Message() -Microsoft.FSharp.Core.MatchFailureException: Void .ctor() -Microsoft.FSharp.Core.MatchFailureException: Void .ctor(System.String, Int32, Int32) -Microsoft.FSharp.Core.MeasureAnnotatedAbbreviationAttribute: Void .ctor() -Microsoft.FSharp.Core.MeasureAttribute: Void .ctor() -Microsoft.FSharp.Core.NoComparisonAttribute: Void .ctor() -Microsoft.FSharp.Core.NoDynamicInvocationAttribute: Void .ctor() -Microsoft.FSharp.Core.NoEqualityAttribute: Void .ctor() -Microsoft.FSharp.Core.NumericLiterals+NumericLiteralI: System.Object FromInt64Dynamic(Int64) -Microsoft.FSharp.Core.NumericLiterals+NumericLiteralI: System.Object FromStringDynamic(System.String) -Microsoft.FSharp.Core.NumericLiterals+NumericLiteralI: T FromInt32[T](Int32) -Microsoft.FSharp.Core.NumericLiterals+NumericLiteralI: T FromInt64[T](Int64) -Microsoft.FSharp.Core.NumericLiterals+NumericLiteralI: T FromOne[T]() -Microsoft.FSharp.Core.NumericLiterals+NumericLiteralI: T FromString[T](System.String) -Microsoft.FSharp.Core.NumericLiterals+NumericLiteralI: T FromZero[T]() -Microsoft.FSharp.Core.NumericLiterals: Microsoft.FSharp.Core.NumericLiterals+NumericLiteralI -Microsoft.FSharp.Core.Operators+ArrayExtensions: Int32 String.GetReverseIndex(System.String, Int32, Int32) -Microsoft.FSharp.Core.Operators+ArrayExtensions: Int32 [,,,]`1.GetReverseIndex[T](T[,,,], Int32, Int32) -Microsoft.FSharp.Core.Operators+ArrayExtensions: Int32 [,,]`1.GetReverseIndex[T](T[,,], Int32, Int32) -Microsoft.FSharp.Core.Operators+ArrayExtensions: Int32 [,]`1.GetReverseIndex[T](T[,], Int32, Int32) -Microsoft.FSharp.Core.Operators+ArrayExtensions: Int32 []`1.GetReverseIndex[T](T[], Int32, Int32) -Microsoft.FSharp.Core.Operators+Checked: Byte ToByte[T](T) -Microsoft.FSharp.Core.Operators+Checked: Char ToChar[T](T) -Microsoft.FSharp.Core.Operators+Checked: Int16 ToInt16[T](T) -Microsoft.FSharp.Core.Operators+Checked: Int32 ToInt32[T](T) -Microsoft.FSharp.Core.Operators+Checked: Int32 ToInt[T](T) -Microsoft.FSharp.Core.Operators+Checked: Int64 ToInt64[T](T) -Microsoft.FSharp.Core.Operators+Checked: IntPtr ToIntPtr[T](T) -Microsoft.FSharp.Core.Operators+Checked: SByte ToSByte[T](T) -Microsoft.FSharp.Core.Operators+Checked: T op_UnaryNegation[T](T) -Microsoft.FSharp.Core.Operators+Checked: T3 op_Addition[T1,T2,T3](T1, T2) -Microsoft.FSharp.Core.Operators+Checked: T3 op_Multiply[T1,T2,T3](T1, T2) -Microsoft.FSharp.Core.Operators+Checked: T3 op_Subtraction[T1,T2,T3](T1, T2) -Microsoft.FSharp.Core.Operators+Checked: UInt16 ToUInt16[T](T) -Microsoft.FSharp.Core.Operators+Checked: UInt32 ToUInt32[T](T) -Microsoft.FSharp.Core.Operators+Checked: UInt64 ToUInt64[T](T) -Microsoft.FSharp.Core.Operators+Checked: UIntPtr ToUIntPtr[T](T) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Boolean op_Equality[T](T, T) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Boolean op_GreaterThanOrEqual[T,TResult](T, TResult) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Boolean op_GreaterThan[T,TResult](T, TResult) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Boolean op_Inequality[T](T, T) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Boolean op_LessThanOrEqual[T,TResult](T, TResult) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Boolean op_LessThan[T,TResult](T, TResult) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Int32 Compare[T](T, T) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Int32 Hash[T](T) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: T Max[T](T, T) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: T Min[T](T, T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Byte PowByte(Byte, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Double PowDouble(Double, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Int16 PowInt16(Int16, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Int32 PowInt32(Int32, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Int32 SignDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Int64 PowInt64(Int64, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: IntPtr PowIntPtr(IntPtr, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: SByte PowSByte(SByte, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Single PowSingle(Single, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[System.Byte] RangeByte(Byte, Byte, Byte) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[System.Char] RangeChar(Char, Char) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[System.Double] RangeDouble(Double, Double, Double) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[System.Int16] RangeInt16(Int16, Int16, Int16) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[System.Int32] RangeInt32(Int32, Int32, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[System.Int64] RangeInt64(Int64, Int64, Int64) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[System.IntPtr] RangeIntPtr(IntPtr, IntPtr, IntPtr) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[System.SByte] RangeSByte(SByte, SByte, SByte) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[System.Single] RangeSingle(Single, Single, Single) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[System.UInt16] RangeUInt16(UInt16, UInt16, UInt16) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[System.UInt32] RangeUInt32(UInt32, UInt32, UInt32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[System.UInt64] RangeUInt64(UInt64, UInt64, UInt64) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[System.UIntPtr] RangeUIntPtr(UIntPtr, UIntPtr, UIntPtr) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[T] RangeGeneric[T](T, Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T, T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Collections.Generic.IEnumerable`1[T] RangeStepGeneric[TStep,T](TStep, Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TStep,T]], T, TStep, T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.Decimal PowDecimal(System.Decimal, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: System.String GetStringSlice(System.String, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T AbsDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T AcosDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T AsinDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T AtanDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T CeilingDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T CosDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T CoshDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T ExpDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T FloorDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T Log10Dynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T LogDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T PowDynamic[T,TResult](T, TResult) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T PowGeneric[T](T, Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T RoundDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T SinDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T SinhDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T TanDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T TanhDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T TruncateDynamic[T](T) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T2 Atan2Dynamic[T1,T2](T1, T1) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T2 SqrtDynamic[T1,T2](T1) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,,,] GetArraySlice4D[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,,] GetArraySlice3D[T](T[,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,] GetArraySlice3DFixedSingle1[T](T[,,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,] GetArraySlice3DFixedSingle2[T](T[,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,] GetArraySlice3DFixedSingle3[T](T[,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[] GetArraySlice3DFixedDouble1[T](T[,,], Int32, Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[] GetArraySlice3DFixedDouble2[T](T[,,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[] GetArraySlice3DFixedDouble3[T](T[,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,] GetArraySlice2D[T](T[,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[] GetArraySlice2DFixed1[T](T[,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[] GetArraySlice2DFixed2[T](T[,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[] GetArraySlice[T](T[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: UInt16 PowUInt16(UInt16, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: UInt32 PowUInt32(UInt32, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: UInt64 PowUInt64(UInt64, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: UIntPtr PowUIntPtr(UIntPtr, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice2DFixed1[T](T[,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice2DFixed2[T](T[,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, T[]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice2D[T](T[,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice3D[T](T[,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[,,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice3DFixedDouble1[T](T[,,], Int32, Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice3DFixedDouble2[T](T[,,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, T[]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice3DFixedDouble3[T](T[,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Int32, T[]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice3DFixedSingle1[T](T[,,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice3DFixedSingle2[T](T[,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice3DFixedSingle3[T](T[,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, T[,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4D[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[,,,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,,] GetArraySlice4DFixedSingle1[T](T[,,,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,,] GetArraySlice4DFixedSingle2[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,,] GetArraySlice4DFixedSingle3[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,,] GetArraySlice4DFixedSingle4[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,] GetArraySlice4DFixedDouble1[T](T[,,,], Int32, Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,] GetArraySlice4DFixedDouble2[T](T[,,,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,] GetArraySlice4DFixedDouble3[T](T[,,,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,] GetArraySlice4DFixedDouble4[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,] GetArraySlice4DFixedDouble5[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[,] GetArraySlice4DFixedDouble6[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[] GetArraySlice4DFixedTriple1[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Int32, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[] GetArraySlice4DFixedTriple2[T](T[,,,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[] GetArraySlice4DFixedTriple3[T](T[,,,], Int32, Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: T[] GetArraySlice4DFixedTriple4[T](T[,,,], Int32, Int32, Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedDouble1[T](T[,,,], Int32, Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedDouble2[T](T[,,,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedDouble3[T](T[,,,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, T[,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedDouble4[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedDouble5[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, T[,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedDouble6[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Int32, T[,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedSingle1[T](T[,,,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[,,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedSingle2[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[,,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedSingle3[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[,,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedSingle4[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, T[,,]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedTriple1[T](T[,,,], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Int32, Int32, T[]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedTriple2[T](T[,,,], Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, Int32, T[]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedTriple3[T](T[,,,], Int32, Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Int32, T[]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice4DFixedTriple4[T](T[,,,], Int32, Int32, Int32, Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[]) -Microsoft.FSharp.Core.Operators+OperatorIntrinsics: Void SetArraySlice[T](T[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], T[]) -Microsoft.FSharp.Core.Operators+Unchecked: Boolean Equals[T](T, T) -Microsoft.FSharp.Core.Operators+Unchecked: Int32 Compare[T](T, T) -Microsoft.FSharp.Core.Operators+Unchecked: Int32 Hash[T](T) -Microsoft.FSharp.Core.Operators+Unchecked: T DefaultOf[T]() -Microsoft.FSharp.Core.Operators+Unchecked: T Unbox[T](System.Object) -Microsoft.FSharp.Core.Operators: Boolean IsNull[T](T) -Microsoft.FSharp.Core.Operators: Boolean Not(Boolean) -Microsoft.FSharp.Core.Operators: Boolean op_Equality[T](T, T) -Microsoft.FSharp.Core.Operators: Boolean op_GreaterThanOrEqual[T](T, T) -Microsoft.FSharp.Core.Operators: Boolean op_GreaterThan[T](T, T) -Microsoft.FSharp.Core.Operators: Boolean op_Inequality[T](T, T) -Microsoft.FSharp.Core.Operators: Boolean op_LessThanOrEqual[T](T, T) -Microsoft.FSharp.Core.Operators: Boolean op_LessThan[T](T, T) -Microsoft.FSharp.Core.Operators: Byte ToByte[T](T) -Microsoft.FSharp.Core.Operators: Char ToChar[T](T) -Microsoft.FSharp.Core.Operators: Double Infinity -Microsoft.FSharp.Core.Operators: Double NaN -Microsoft.FSharp.Core.Operators: Double ToDouble[T](T) -Microsoft.FSharp.Core.Operators: Double get_Infinity() -Microsoft.FSharp.Core.Operators: Double get_NaN() -Microsoft.FSharp.Core.Operators: Int16 ToInt16[T](T) -Microsoft.FSharp.Core.Operators: Int32 Compare[T](T, T) -Microsoft.FSharp.Core.Operators: Int32 Hash[T](T) -Microsoft.FSharp.Core.Operators: Int32 Sign[T](T) -Microsoft.FSharp.Core.Operators: Int32 SizeOf[T]() -Microsoft.FSharp.Core.Operators: Int32 ToInt32[T](T) -Microsoft.FSharp.Core.Operators: Int32 ToInt[T](T) -Microsoft.FSharp.Core.Operators: UInt32 ToUInt[T](T) -Microsoft.FSharp.Core.Operators: Int32 limitedHash[T](Int32, T) -Microsoft.FSharp.Core.Operators: Int64 ToInt64[T](T) -Microsoft.FSharp.Core.Operators: IntPtr ToIntPtr[T](T) -Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Collections.FSharpList`1[T] op_Append[T](Microsoft.FSharp.Collections.FSharpList`1[T], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.FSharpFunc`2[T1,T3] op_ComposeLeft[T2,T3,T1](Microsoft.FSharp.Core.FSharpFunc`2[T2,T3], Microsoft.FSharp.Core.FSharpFunc`2[T1,T2]) -Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.FSharpFunc`2[T1,T3] op_ComposeRight[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,T2], Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]) -Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.FSharpOption`1[System.String] FailurePattern(System.Exception) -Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.FSharpOption`1[T] TryUnbox[T](System.Object) -Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.FSharpRef`1[T] Ref[T](T) -Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+ArrayExtensions -Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+Checked -Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+NonStructuralComparison -Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+OperatorIntrinsics -Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+Unchecked -Microsoft.FSharp.Core.Operators: SByte ToSByte[T](T) -Microsoft.FSharp.Core.Operators: Single InfinitySingle -Microsoft.FSharp.Core.Operators: Single NaNSingle -Microsoft.FSharp.Core.Operators: Single ToSingle[T](T) -Microsoft.FSharp.Core.Operators: Single get_InfinitySingle() -Microsoft.FSharp.Core.Operators: Single get_NaNSingle() -Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] CreateSequence[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_RangeStep[T,TStep](T, TStep, T) -Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_Range[T](T, T) -Microsoft.FSharp.Core.Operators: System.Decimal ToDecimal[T](T) -Microsoft.FSharp.Core.Operators: System.Exception Failure(System.String) -Microsoft.FSharp.Core.Operators: System.IO.TextReader ConsoleIn[T]() -Microsoft.FSharp.Core.Operators: System.IO.TextWriter ConsoleError[T]() -Microsoft.FSharp.Core.Operators: System.IO.TextWriter ConsoleOut[T]() -Microsoft.FSharp.Core.Operators: System.Object Box[T](T) -Microsoft.FSharp.Core.Operators: System.String NameOf[T](T) -Microsoft.FSharp.Core.Operators: System.String ToString[T](T) -Microsoft.FSharp.Core.Operators: System.String op_Concatenate(System.String, System.String) -Microsoft.FSharp.Core.Operators: System.Tuple`2[TKey,TValue] KeyValuePattern[TKey,TValue](System.Collections.Generic.KeyValuePair`2[TKey,TValue]) -Microsoft.FSharp.Core.Operators: System.Type TypeDefOf[T]() -Microsoft.FSharp.Core.Operators: System.Type TypeOf[T]() -Microsoft.FSharp.Core.Operators: T Abs[T](T) -Microsoft.FSharp.Core.Operators: T Acos[T](T) -Microsoft.FSharp.Core.Operators: T Asin[T](T) -Microsoft.FSharp.Core.Operators: T Atan[T](T) -Microsoft.FSharp.Core.Operators: T Ceiling[T](T) -Microsoft.FSharp.Core.Operators: T Cos[T](T) -Microsoft.FSharp.Core.Operators: T Cosh[T](T) -Microsoft.FSharp.Core.Operators: T DefaultArg[T](Microsoft.FSharp.Core.FSharpOption`1[T], T) -Microsoft.FSharp.Core.Operators: T DefaultValueArg[T](Microsoft.FSharp.Core.FSharpValueOption`1[T], T) -Microsoft.FSharp.Core.Operators: T Exit[T](Int32) -Microsoft.FSharp.Core.Operators: T Exp[T](T) -Microsoft.FSharp.Core.Operators: T FailWith[T](System.String) -Microsoft.FSharp.Core.Operators: T Floor[T](T) -Microsoft.FSharp.Core.Operators: T Identity[T](T) -Microsoft.FSharp.Core.Operators: T InvalidArg[T](System.String, System.String) -Microsoft.FSharp.Core.Operators: T InvalidOp[T](System.String) -Microsoft.FSharp.Core.Operators: T Lock[TLock,T](TLock, Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T]) -Microsoft.FSharp.Core.Operators: T Log10[T](T) -Microsoft.FSharp.Core.Operators: T Log[T](T) -Microsoft.FSharp.Core.Operators: T Max[T](T, T) -Microsoft.FSharp.Core.Operators: T Min[T](T, T) -Microsoft.FSharp.Core.Operators: T NullArg[T](System.String) -Microsoft.FSharp.Core.Operators: T PowInteger[T](T, Int32) -Microsoft.FSharp.Core.Operators: T Raise[T](System.Exception) -Microsoft.FSharp.Core.Operators: T Reraise[T]() -Microsoft.FSharp.Core.Operators: T Rethrow[T]() -Microsoft.FSharp.Core.Operators: T Round[T](T) -Microsoft.FSharp.Core.Operators: T Sin[T](T) -Microsoft.FSharp.Core.Operators: T Sinh[T](T) -Microsoft.FSharp.Core.Operators: T Tan[T](T) -Microsoft.FSharp.Core.Operators: T Tanh[T](T) -Microsoft.FSharp.Core.Operators: T Truncate[T](T) -Microsoft.FSharp.Core.Operators: T Unbox[T](System.Object) -Microsoft.FSharp.Core.Operators: T op_BitwiseAnd[T](T, T) -Microsoft.FSharp.Core.Operators: T op_BitwiseOr[T](T, T) -Microsoft.FSharp.Core.Operators: T op_Dereference[T](Microsoft.FSharp.Core.FSharpRef`1[T]) -Microsoft.FSharp.Core.Operators: T op_ExclusiveOr[T](T, T) -Microsoft.FSharp.Core.Operators: T op_Exponentiation[T,TResult](T, TResult) -Microsoft.FSharp.Core.Operators: T op_LeftShift[T](T, Int32) -Microsoft.FSharp.Core.Operators: T op_LogicalNot[T](T) -Microsoft.FSharp.Core.Operators: T op_RightShift[T](T, Int32) -Microsoft.FSharp.Core.Operators: T op_UnaryNegation[T](T) -Microsoft.FSharp.Core.Operators: T op_UnaryPlus[T](T) -Microsoft.FSharp.Core.Operators: T1 Fst[T1,T2](System.Tuple`2[T1,T2]) -Microsoft.FSharp.Core.Operators: T2 Atan2[T1,T2](T1, T1) -Microsoft.FSharp.Core.Operators: T2 Snd[T1,T2](System.Tuple`2[T1,T2]) -Microsoft.FSharp.Core.Operators: T3 op_Addition[T1,T2,T3](T1, T2) -Microsoft.FSharp.Core.Operators: T3 op_Division[T1,T2,T3](T1, T2) -Microsoft.FSharp.Core.Operators: T3 op_Modulus[T1,T2,T3](T1, T2) -Microsoft.FSharp.Core.Operators: T3 op_Multiply[T1,T2,T3](T1, T2) -Microsoft.FSharp.Core.Operators: T3 op_Subtraction[T1,T2,T3](T1, T2) -Microsoft.FSharp.Core.Operators: TResult Sqrt[T,TResult](T) -Microsoft.FSharp.Core.Operators: TResult ToEnum[TResult](Int32) -Microsoft.FSharp.Core.Operators: TResult Using[T,TResult](T, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]) -Microsoft.FSharp.Core.Operators: TResult op_PipeLeft2[T1,T2,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]], T1, T2) -Microsoft.FSharp.Core.Operators: TResult op_PipeLeft3[T1,T2,T3,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]], T1, T2, T3) -Microsoft.FSharp.Core.Operators: TResult op_PipeLeft[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T) -Microsoft.FSharp.Core.Operators: TResult op_PipeRight2[T1,T2,TResult](T1, T2, Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]]) -Microsoft.FSharp.Core.Operators: TResult op_PipeRight3[T1,T2,T3,TResult](T1, T2, T3, Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]]) -Microsoft.FSharp.Core.Operators: TResult op_PipeRight[T1,TResult](T1, Microsoft.FSharp.Core.FSharpFunc`2[T1,TResult]) -Microsoft.FSharp.Core.Operators: UInt16 ToUInt16[T](T) -Microsoft.FSharp.Core.Operators: UInt32 ToUInt32[T](T) -Microsoft.FSharp.Core.Operators: UInt64 ToUInt64[T](T) -Microsoft.FSharp.Core.Operators: UIntPtr ToUIntPtr[T](T) -Microsoft.FSharp.Core.Operators: Void Decrement(Microsoft.FSharp.Core.FSharpRef`1[System.Int32]) -Microsoft.FSharp.Core.Operators: Void Ignore[T](T) -Microsoft.FSharp.Core.Operators: Void Increment(Microsoft.FSharp.Core.FSharpRef`1[System.Int32]) -Microsoft.FSharp.Core.Operators: Void op_ColonEquals[T](Microsoft.FSharp.Core.FSharpRef`1[T], T) -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`3[T1,T2,TResult]: FSharpFunc`3 Adapt(Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]]) -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`3[T1,T2,TResult]: Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult] Invoke(T1) -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`3[T1,T2,TResult]: TResult Invoke(T1, T2) -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`3[T1,T2,TResult]: Void .ctor() -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`4[T1,T2,T3,TResult]: FSharpFunc`4 Adapt(Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]]) -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`4[T1,T2,T3,TResult]: Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]] Invoke(T1) -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`4[T1,T2,T3,TResult]: TResult Invoke(T1, T2, T3) -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`4[T1,T2,T3,TResult]: Void .ctor() -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`5[T1,T2,T3,T4,TResult]: FSharpFunc`5 Adapt(Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,TResult]]]]) -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`5[T1,T2,T3,T4,TResult]: Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,TResult]]] Invoke(T1) -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`5[T1,T2,T3,T4,TResult]: TResult Invoke(T1, T2, T3, T4) -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`5[T1,T2,T3,T4,TResult]: Void .ctor() -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`6[T1,T2,T3,T4,T5,TResult]: FSharpFunc`6 Adapt(Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,Microsoft.FSharp.Core.FSharpFunc`2[T5,TResult]]]]]) -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`6[T1,T2,T3,T4,T5,TResult]: Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,Microsoft.FSharp.Core.FSharpFunc`2[T4,Microsoft.FSharp.Core.FSharpFunc`2[T5,TResult]]]] Invoke(T1) -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`6[T1,T2,T3,T4,T5,TResult]: TResult Invoke(T1, T2, T3, T4, T5) -Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`6[T1,T2,T3,T4,T5,TResult]: Void .ctor() -Microsoft.FSharp.Core.OptimizedClosures: Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`3[T1,T2,TResult] -Microsoft.FSharp.Core.OptimizedClosures: Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`4[T1,T2,T3,TResult] -Microsoft.FSharp.Core.OptimizedClosures: Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`5[T1,T2,T3,T4,TResult] -Microsoft.FSharp.Core.OptimizedClosures: Microsoft.FSharp.Core.OptimizedClosures+FSharpFunc`6[T1,T2,T3,T4,T5,TResult] -Microsoft.FSharp.Core.OptionModule: Boolean Contains[T](T, Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: Boolean Exists[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: Boolean ForAll[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: Boolean IsNone[T](Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: Boolean IsSome[T](Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: Int32 Count[T](Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Collections.FSharpList`1[T] ToList[T](Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[TResult] Bind[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[TResult] Map2[T1,T2,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]], Microsoft.FSharp.Core.FSharpOption`1[T1], Microsoft.FSharp.Core.FSharpOption`1[T2]) -Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[TResult] Map3[T1,T2,T3,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]], Microsoft.FSharp.Core.FSharpOption`1[T1], Microsoft.FSharp.Core.FSharpOption`1[T2], Microsoft.FSharp.Core.FSharpOption`1[T3]) -Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[TResult] Map[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] Filter[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] Flatten[T](Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.FSharpOption`1[T]]) -Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OfNullable[T](System.Nullable`1[T]) -Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OfObj[T](T) -Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OrElseWith[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.FSharpOption`1[T]], Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: Microsoft.FSharp.Core.FSharpOption`1[T] OrElse[T](Microsoft.FSharp.Core.FSharpOption`1[T], Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: System.Nullable`1[T] ToNullable[T](Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: T DefaultValue[T](T, Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: T DefaultWith[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: T GetValue[T](Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: T ToObj[T](Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: TState FoldBack[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TState,TState]], Microsoft.FSharp.Core.FSharpOption`1[T], TState) -Microsoft.FSharp.Core.OptionModule: TState Fold[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]], TState, Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: T[] ToArray[T](Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Core.FSharpOption`1[T]) -Microsoft.FSharp.Core.OptionalArgumentAttribute: Void .ctor() -Microsoft.FSharp.Core.PrintfFormat`4[TPrinter,TState,TResidue,TResult]: System.String ToString() -Microsoft.FSharp.Core.PrintfFormat`4[TPrinter,TState,TResidue,TResult]: System.String Value -Microsoft.FSharp.Core.PrintfFormat`4[TPrinter,TState,TResidue,TResult]: System.String get_Value() -Microsoft.FSharp.Core.PrintfFormat`4[TPrinter,TState,TResidue,TResult]: Void .ctor(System.String) -Microsoft.FSharp.Core.PrintfFormat`5[TPrinter,TState,TResidue,TResult,TTuple]: System.String ToString() -Microsoft.FSharp.Core.PrintfFormat`5[TPrinter,TState,TResidue,TResult,TTuple]: System.String Value -Microsoft.FSharp.Core.PrintfFormat`5[TPrinter,TState,TResidue,TResult,TTuple]: System.String get_Value() -Microsoft.FSharp.Core.PrintfFormat`5[TPrinter,TState,TResidue,TResult,TTuple]: Void .ctor(System.String) -Microsoft.FSharp.Core.PrintfModule: T PrintFormatLineToError[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.PrintfModule: T PrintFormatLineToTextWriter[T](System.IO.TextWriter, Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.PrintfModule: T PrintFormatLine[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.PrintfModule: T PrintFormatThen[TResult,T](Microsoft.FSharp.Core.FSharpFunc`2[System.String,TResult], Microsoft.FSharp.Core.PrintfFormat`4[T,Microsoft.FSharp.Core.Unit,System.String,TResult]) -Microsoft.FSharp.Core.PrintfModule: T PrintFormatToError[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.PrintfModule: T PrintFormatToStringBuilderThen[TResult,T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TResult], System.Text.StringBuilder, Microsoft.FSharp.Core.PrintfFormat`4[T,System.Text.StringBuilder,Microsoft.FSharp.Core.Unit,TResult]) -Microsoft.FSharp.Core.PrintfModule: T PrintFormatToStringBuilder[T](System.Text.StringBuilder, Microsoft.FSharp.Core.PrintfFormat`4[T,System.Text.StringBuilder,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.PrintfModule: T PrintFormatToStringThenFail[T,TResult](Microsoft.FSharp.Core.PrintfFormat`4[T,Microsoft.FSharp.Core.Unit,System.String,TResult]) -Microsoft.FSharp.Core.PrintfModule: T PrintFormatToStringThen[TResult,T](Microsoft.FSharp.Core.FSharpFunc`2[System.String,TResult], Microsoft.FSharp.Core.PrintfFormat`4[T,Microsoft.FSharp.Core.Unit,System.String,TResult]) -Microsoft.FSharp.Core.PrintfModule: T PrintFormatToStringThen[T](Microsoft.FSharp.Core.PrintfFormat`4[T,Microsoft.FSharp.Core.Unit,System.String,System.String]) -Microsoft.FSharp.Core.PrintfModule: T PrintFormatToTextWriterThen[TResult,T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TResult], System.IO.TextWriter, Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,TResult]) -Microsoft.FSharp.Core.PrintfModule: T PrintFormatToTextWriter[T](System.IO.TextWriter, Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.PrintfModule: T PrintFormat[T](Microsoft.FSharp.Core.PrintfFormat`4[T,System.IO.TextWriter,Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) -Microsoft.FSharp.Core.ProjectionParameterAttribute: Void .ctor() -Microsoft.FSharp.Core.ReferenceEqualityAttribute: Void .ctor() -Microsoft.FSharp.Core.ReflectedDefinitionAttribute: Boolean IncludeValue -Microsoft.FSharp.Core.ReflectedDefinitionAttribute: Boolean get_IncludeValue() -Microsoft.FSharp.Core.ReflectedDefinitionAttribute: Void .ctor() -Microsoft.FSharp.Core.ReflectedDefinitionAttribute: Void .ctor(Boolean) -Microsoft.FSharp.Core.RequireQualifiedAccessAttribute: Void .ctor() -Microsoft.FSharp.Core.RequiresExplicitTypeArgumentsAttribute: Void .ctor() -Microsoft.FSharp.Core.ResultModule: Microsoft.FSharp.Core.FSharpResult`2[T,TResult] MapError[TError,TResult,T](Microsoft.FSharp.Core.FSharpFunc`2[TError,TResult], Microsoft.FSharp.Core.FSharpResult`2[T,TError]) -Microsoft.FSharp.Core.ResultModule: Microsoft.FSharp.Core.FSharpResult`2[TResult,TError] Bind[T,TResult,TError](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpResult`2[TResult,TError]], Microsoft.FSharp.Core.FSharpResult`2[T,TError]) -Microsoft.FSharp.Core.ResultModule: Microsoft.FSharp.Core.FSharpResult`2[TResult,TError] Map[T,TResult,TError](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Core.FSharpResult`2[T,TError]) -Microsoft.FSharp.Core.SealedAttribute: Boolean Value -Microsoft.FSharp.Core.SealedAttribute: Boolean get_Value() -Microsoft.FSharp.Core.SealedAttribute: Void .ctor() -Microsoft.FSharp.Core.SealedAttribute: Void .ctor(Boolean) -Microsoft.FSharp.Core.SourceConstructFlags: Int32 value__ -Microsoft.FSharp.Core.SourceConstructFlags: Microsoft.FSharp.Core.SourceConstructFlags Closure -Microsoft.FSharp.Core.SourceConstructFlags: Microsoft.FSharp.Core.SourceConstructFlags Exception -Microsoft.FSharp.Core.SourceConstructFlags: Microsoft.FSharp.Core.SourceConstructFlags Field -Microsoft.FSharp.Core.SourceConstructFlags: Microsoft.FSharp.Core.SourceConstructFlags KindMask -Microsoft.FSharp.Core.SourceConstructFlags: Microsoft.FSharp.Core.SourceConstructFlags Module -Microsoft.FSharp.Core.SourceConstructFlags: Microsoft.FSharp.Core.SourceConstructFlags NonPublicRepresentation -Microsoft.FSharp.Core.SourceConstructFlags: Microsoft.FSharp.Core.SourceConstructFlags None -Microsoft.FSharp.Core.SourceConstructFlags: Microsoft.FSharp.Core.SourceConstructFlags ObjectType -Microsoft.FSharp.Core.SourceConstructFlags: Microsoft.FSharp.Core.SourceConstructFlags RecordType -Microsoft.FSharp.Core.SourceConstructFlags: Microsoft.FSharp.Core.SourceConstructFlags SumType -Microsoft.FSharp.Core.SourceConstructFlags: Microsoft.FSharp.Core.SourceConstructFlags UnionCase -Microsoft.FSharp.Core.SourceConstructFlags: Microsoft.FSharp.Core.SourceConstructFlags Value -Microsoft.FSharp.Core.StringModule: Boolean Exists(Microsoft.FSharp.Core.FSharpFunc`2[System.Char,System.Boolean], System.String) -Microsoft.FSharp.Core.StringModule: Boolean ForAll(Microsoft.FSharp.Core.FSharpFunc`2[System.Char,System.Boolean], System.String) -Microsoft.FSharp.Core.StringModule: Int32 Length(System.String) -Microsoft.FSharp.Core.StringModule: System.String Collect(Microsoft.FSharp.Core.FSharpFunc`2[System.Char,System.String], System.String) -Microsoft.FSharp.Core.StringModule: System.String Concat(System.String, System.Collections.Generic.IEnumerable`1[System.String]) -Microsoft.FSharp.Core.StringModule: System.String Filter(Microsoft.FSharp.Core.FSharpFunc`2[System.Char,System.Boolean], System.String) -Microsoft.FSharp.Core.StringModule: System.String Initialize(Int32, Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.String]) -Microsoft.FSharp.Core.StringModule: System.String Map(Microsoft.FSharp.Core.FSharpFunc`2[System.Char,System.Char], System.String) -Microsoft.FSharp.Core.StringModule: System.String MapIndexed(Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Char,System.Char]], System.String) -Microsoft.FSharp.Core.StringModule: System.String Replicate(Int32, System.String) -Microsoft.FSharp.Core.StringModule: Void Iterate(Microsoft.FSharp.Core.FSharpFunc`2[System.Char,Microsoft.FSharp.Core.Unit], System.String) -Microsoft.FSharp.Core.StringModule: Void IterateIndexed(Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[System.Char,Microsoft.FSharp.Core.Unit]], System.String) -Microsoft.FSharp.Core.StructAttribute: Void .ctor() -Microsoft.FSharp.Core.StructuralComparisonAttribute: Void .ctor() -Microsoft.FSharp.Core.StructuralEqualityAttribute: Void .ctor() -Microsoft.FSharp.Core.StructuredFormatDisplayAttribute: System.String Value -Microsoft.FSharp.Core.StructuredFormatDisplayAttribute: System.String get_Value() -Microsoft.FSharp.Core.StructuredFormatDisplayAttribute: Void .ctor(System.String) -Microsoft.FSharp.Core.Unit: Boolean Equals(System.Object) -Microsoft.FSharp.Core.Unit: Int32 GetHashCode() -Microsoft.FSharp.Core.UnverifiableAttribute: Void .ctor() -Microsoft.FSharp.Core.ValueOption: Boolean Contains[T](T, Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: Boolean Exists[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: Boolean ForAll[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: Boolean IsNone[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: Boolean IsSome[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: Int32 Count[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Collections.FSharpList`1[T] ToList[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[TResult] Bind[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpValueOption`1[TResult]], Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[TResult] Map2[T1,T2,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,TResult]], Microsoft.FSharp.Core.FSharpValueOption`1[T1], Microsoft.FSharp.Core.FSharpValueOption`1[T2]) -Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[TResult] Map3[T1,T2,T3,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.FSharpFunc`2[T3,TResult]]], Microsoft.FSharp.Core.FSharpValueOption`1[T1], Microsoft.FSharp.Core.FSharpValueOption`1[T2], Microsoft.FSharp.Core.FSharpValueOption`1[T3]) -Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[TResult] Map[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] Filter[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean], Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] Flatten[T](Microsoft.FSharp.Core.FSharpValueOption`1[Microsoft.FSharp.Core.FSharpValueOption`1[T]]) -Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OfNullable[T](System.Nullable`1[T]) -Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OfObj[T](T) -Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OrElseWith[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.FSharpValueOption`1[T]], Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: Microsoft.FSharp.Core.FSharpValueOption`1[T] OrElse[T](Microsoft.FSharp.Core.FSharpValueOption`1[T], Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: System.Nullable`1[T] ToNullable[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: T DefaultValue[T](T, Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: T DefaultWith[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: T GetValue[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: T ToObj[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: TState FoldBack[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TState,TState]], Microsoft.FSharp.Core.FSharpValueOption`1[T], TState) -Microsoft.FSharp.Core.ValueOption: TState Fold[T,TState](Microsoft.FSharp.Core.FSharpFunc`2[TState,Microsoft.FSharp.Core.FSharpFunc`2[T,TState]], TState, Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: T[] ToArray[T](Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.ValueOption: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Core.FSharpValueOption`1[T]) -Microsoft.FSharp.Core.VolatileFieldAttribute: Void .ctor() -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Byte] ToByte[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Byte] ToUInt8[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Char] ToChar[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Decimal] ToDecimal[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Double] ToDouble[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Double] ToFloat[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Int16] ToInt16[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Int32] ToInt32[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Int32] ToInt[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Int64] ToInt64[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.IntPtr] ToIntPtr[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.SByte] ToInt8[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.SByte] ToSByte[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Single] ToFloat32[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Single] ToSingle[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.UInt16] ToUInt16[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.UInt32] ToUInt32[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.UInt32] ToUInt[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.UInt64] ToUInt64[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.UIntPtr] ToUIntPtr[T](System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[TResult] ToEnum[TResult](System.Nullable`1[System.Int32]) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_EqualsQmark[T](T, System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_GreaterEqualsQmark[T](T, System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_GreaterQmark[T](T, System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_LessEqualsQmark[T](T, System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_LessGreaterQmark[T](T, System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_LessQmark[T](T, System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_QmarkEqualsQmark[T](System.Nullable`1[T], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_QmarkEquals[T](System.Nullable`1[T], T) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_QmarkGreaterEqualsQmark[T](System.Nullable`1[T], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_QmarkGreaterEquals[T](System.Nullable`1[T], T) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_QmarkGreaterQmark[T](System.Nullable`1[T], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_QmarkGreater[T](System.Nullable`1[T], T) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_QmarkLessEqualsQmark[T](System.Nullable`1[T], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_QmarkLessEquals[T](System.Nullable`1[T], T) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_QmarkLessGreaterQmark[T](System.Nullable`1[T], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_QmarkLessGreater[T](System.Nullable`1[T], T) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_QmarkLessQmark[T](System.Nullable`1[T], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableOperators: Boolean op_QmarkLess[T](System.Nullable`1[T], T) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_DivideQmark[T1,T2,T3](T1, System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_MinusQmark[T1,T2,T3](T1, System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_MultiplyQmark[T1,T2,T3](T1, System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_PercentQmark[T1,T2,T3](T1, System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_PlusQmark[T1,T2,T3](T1, System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkDivideQmark[T1,T2,T3](System.Nullable`1[T1], System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkDivide[T1,T2,T3](System.Nullable`1[T1], T2) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkMinusQmark[T1,T2,T3](System.Nullable`1[T1], System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkMinus[T1,T2,T3](System.Nullable`1[T1], T2) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkMultiplyQmark[T1,T2,T3](System.Nullable`1[T1], System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkMultiply[T1,T2,T3](System.Nullable`1[T1], T2) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkPercentQmark[T1,T2,T3](System.Nullable`1[T1], System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkPercent[T1,T2,T3](System.Nullable`1[T1], T2) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkPlusQmark[T1,T2,T3](System.Nullable`1[T1], System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkPlus[T1,T2,T3](System.Nullable`1[T1], T2) -Microsoft.FSharp.Linq.QueryBuilder: Boolean All[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]) -Microsoft.FSharp.Linq.QueryBuilder: Boolean Contains[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q], T) -Microsoft.FSharp.Linq.QueryBuilder: Boolean Exists[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]) -Microsoft.FSharp.Linq.QueryBuilder: Int32 Count[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[System.Linq.IGrouping`2[TKey,TValue],Q] GroupValBy[T,TKey,TValue,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,TValue], Microsoft.FSharp.Core.FSharpFunc`2[T,TKey]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[System.Linq.IGrouping`2[TKey,T],Q] GroupBy[T,Q,TKey](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,TKey]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] Distinct[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] SkipWhile[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] Skip[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Int32) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] SortByDescending[T,Q,TKey](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,TKey]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] SortByNullableDescending[T,Q,TKey](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Nullable`1[TKey]]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] SortByNullable[T,Q,TKey](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Nullable`1[TKey]]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] SortBy[T,Q,TKey](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,TKey]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] Source[T,Q](System.Linq.IQueryable`1[T]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] TakeWhile[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] Take[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Int32) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] ThenByDescending[T,Q,TKey](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,TKey]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] ThenByNullableDescending[T,Q,TKey](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Nullable`1[TKey]]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] ThenByNullable[T,Q,TKey](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Nullable`1[TKey]]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] ThenBy[T,Q,TKey](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,TKey]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] Where[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] YieldFrom[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] Yield[T,Q](T) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,Q] Zero[T,Q]() -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[T,System.Collections.IEnumerable] Source[T](System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[TResult,Q] For[T,Q,TResult,Q2](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Linq.QuerySource`2[TResult,Q2]]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[TResult,Q] GroupJoin[TOuter,Q,TInner,TKey,TResult](Microsoft.FSharp.Linq.QuerySource`2[TOuter,Q], Microsoft.FSharp.Linq.QuerySource`2[TInner,Q], Microsoft.FSharp.Core.FSharpFunc`2[TOuter,TKey], Microsoft.FSharp.Core.FSharpFunc`2[TInner,TKey], Microsoft.FSharp.Core.FSharpFunc`2[TOuter,Microsoft.FSharp.Core.FSharpFunc`2[System.Collections.Generic.IEnumerable`1[TInner],TResult]]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[TResult,Q] Join[TOuter,Q,TInner,TKey,TResult](Microsoft.FSharp.Linq.QuerySource`2[TOuter,Q], Microsoft.FSharp.Linq.QuerySource`2[TInner,Q], Microsoft.FSharp.Core.FSharpFunc`2[TOuter,TKey], Microsoft.FSharp.Core.FSharpFunc`2[TInner,TKey], Microsoft.FSharp.Core.FSharpFunc`2[TOuter,Microsoft.FSharp.Core.FSharpFunc`2[TInner,TResult]]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[TResult,Q] LeftOuterJoin[TOuter,Q,TInner,TKey,TResult](Microsoft.FSharp.Linq.QuerySource`2[TOuter,Q], Microsoft.FSharp.Linq.QuerySource`2[TInner,Q], Microsoft.FSharp.Core.FSharpFunc`2[TOuter,TKey], Microsoft.FSharp.Core.FSharpFunc`2[TInner,TKey], Microsoft.FSharp.Core.FSharpFunc`2[TOuter,Microsoft.FSharp.Core.FSharpFunc`2[System.Collections.Generic.IEnumerable`1[TInner],TResult]]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Linq.QuerySource`2[TResult,Q] Select[T,Q,TResult](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,TResult]) -Microsoft.FSharp.Linq.QueryBuilder: Microsoft.FSharp.Quotations.FSharpExpr`1[T] Quote[T](Microsoft.FSharp.Quotations.FSharpExpr`1[T]) -Microsoft.FSharp.Linq.QueryBuilder: System.Linq.IQueryable`1[T] Run[T](Microsoft.FSharp.Quotations.FSharpExpr`1[Microsoft.FSharp.Linq.QuerySource`2[T,System.Linq.IQueryable]]) -Microsoft.FSharp.Linq.QueryBuilder: System.Nullable`1[TValue] AverageByNullable[T,Q,TValue](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Nullable`1[TValue]]) -Microsoft.FSharp.Linq.QueryBuilder: System.Nullable`1[TValue] MaxByNullable[T,Q,TValue](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Nullable`1[TValue]]) -Microsoft.FSharp.Linq.QueryBuilder: System.Nullable`1[TValue] MinByNullable[T,Q,TValue](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Nullable`1[TValue]]) -Microsoft.FSharp.Linq.QueryBuilder: System.Nullable`1[TValue] SumByNullable[T,Q,TValue](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Nullable`1[TValue]]) -Microsoft.FSharp.Linq.QueryBuilder: T ExactlyOneOrDefault[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q]) -Microsoft.FSharp.Linq.QueryBuilder: T ExactlyOne[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q]) -Microsoft.FSharp.Linq.QueryBuilder: T Find[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]) -Microsoft.FSharp.Linq.QueryBuilder: T HeadOrDefault[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q]) -Microsoft.FSharp.Linq.QueryBuilder: T Head[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q]) -Microsoft.FSharp.Linq.QueryBuilder: T LastOrDefault[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q]) -Microsoft.FSharp.Linq.QueryBuilder: T Last[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q]) -Microsoft.FSharp.Linq.QueryBuilder: T Nth[T,Q](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Int32) -Microsoft.FSharp.Linq.QueryBuilder: TValue AverageBy[T,Q,TValue](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,TValue]) -Microsoft.FSharp.Linq.QueryBuilder: TValue MaxBy[T,Q,TValue](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,TValue]) -Microsoft.FSharp.Linq.QueryBuilder: TValue MinBy[T,Q,TValue](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,TValue]) -Microsoft.FSharp.Linq.QueryBuilder: TValue SumBy[T,Q,TValue](Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,TValue]) -Microsoft.FSharp.Linq.QueryBuilder: Void .ctor() -Microsoft.FSharp.Linq.QueryRunExtensions.HighPriority: System.Collections.Generic.IEnumerable`1[T] RunQueryAsEnumerable[T](Microsoft.FSharp.Linq.QueryBuilder, Microsoft.FSharp.Quotations.FSharpExpr`1[Microsoft.FSharp.Linq.QuerySource`2[T,System.Collections.IEnumerable]]) -Microsoft.FSharp.Linq.QueryRunExtensions.LowPriority: T RunQueryAsValue[T](Microsoft.FSharp.Linq.QueryBuilder, Microsoft.FSharp.Quotations.FSharpExpr`1[T]) -Microsoft.FSharp.Linq.QuerySource`2[T,Q]: System.Collections.Generic.IEnumerable`1[T] Source -Microsoft.FSharp.Linq.QuerySource`2[T,Q]: System.Collections.Generic.IEnumerable`1[T] get_Source() -Microsoft.FSharp.Linq.QuerySource`2[T,Q]: Void .ctor(System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`1[T1]: T1 Item1 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`1[T1]: T1 get_Item1() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`1[T1]: Void .ctor(T1) -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`2[T1,T2]: T1 Item1 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`2[T1,T2]: T1 get_Item1() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`2[T1,T2]: T2 Item2 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`2[T1,T2]: T2 get_Item2() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`2[T1,T2]: Void .ctor(T1, T2) -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`3[T1,T2,T3]: T1 Item1 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`3[T1,T2,T3]: T1 get_Item1() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`3[T1,T2,T3]: T2 Item2 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`3[T1,T2,T3]: T2 get_Item2() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`3[T1,T2,T3]: T3 Item3 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`3[T1,T2,T3]: T3 get_Item3() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`3[T1,T2,T3]: Void .ctor(T1, T2, T3) -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`4[T1,T2,T3,T4]: T1 Item1 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`4[T1,T2,T3,T4]: T1 get_Item1() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`4[T1,T2,T3,T4]: T2 Item2 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`4[T1,T2,T3,T4]: T2 get_Item2() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`4[T1,T2,T3,T4]: T3 Item3 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`4[T1,T2,T3,T4]: T3 get_Item3() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`4[T1,T2,T3,T4]: T4 Item4 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`4[T1,T2,T3,T4]: T4 get_Item4() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`4[T1,T2,T3,T4]: Void .ctor(T1, T2, T3, T4) -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`5[T1,T2,T3,T4,T5]: T1 Item1 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`5[T1,T2,T3,T4,T5]: T1 get_Item1() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`5[T1,T2,T3,T4,T5]: T2 Item2 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`5[T1,T2,T3,T4,T5]: T2 get_Item2() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`5[T1,T2,T3,T4,T5]: T3 Item3 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`5[T1,T2,T3,T4,T5]: T3 get_Item3() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`5[T1,T2,T3,T4,T5]: T4 Item4 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`5[T1,T2,T3,T4,T5]: T4 get_Item4() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`5[T1,T2,T3,T4,T5]: T5 Item5 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`5[T1,T2,T3,T4,T5]: T5 get_Item5() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`5[T1,T2,T3,T4,T5]: Void .ctor(T1, T2, T3, T4, T5) -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`6[T1,T2,T3,T4,T5,T6]: T1 Item1 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`6[T1,T2,T3,T4,T5,T6]: T1 get_Item1() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`6[T1,T2,T3,T4,T5,T6]: T2 Item2 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`6[T1,T2,T3,T4,T5,T6]: T2 get_Item2() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`6[T1,T2,T3,T4,T5,T6]: T3 Item3 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`6[T1,T2,T3,T4,T5,T6]: T3 get_Item3() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`6[T1,T2,T3,T4,T5,T6]: T4 Item4 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`6[T1,T2,T3,T4,T5,T6]: T4 get_Item4() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`6[T1,T2,T3,T4,T5,T6]: T5 Item5 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`6[T1,T2,T3,T4,T5,T6]: T5 get_Item5() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`6[T1,T2,T3,T4,T5,T6]: T6 Item6 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`6[T1,T2,T3,T4,T5,T6]: T6 get_Item6() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`6[T1,T2,T3,T4,T5,T6]: Void .ctor(T1, T2, T3, T4, T5, T6) -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T1 Item1 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T1 get_Item1() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T2 Item2 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T2 get_Item2() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T3 Item3 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T3 get_Item3() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T4 Item4 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T4 get_Item4() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T5 Item5 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T5 get_Item5() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T6 Item6 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T6 get_Item6() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T7 Item7 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: T7 get_Item7() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`7[T1,T2,T3,T4,T5,T6,T7]: Void .ctor(T1, T2, T3, T4, T5, T6, T7) -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T1 Item1 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T1 get_Item1() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T2 Item2 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T2 get_Item2() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T3 Item3 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T3 get_Item3() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T4 Item4 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T4 get_Item4() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T5 Item5 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T5 get_Item5() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T6 Item6 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T6 get_Item6() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T7 Item7 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T7 get_Item7() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T8 Item8 -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: T8 get_Item8() -Microsoft.FSharp.Linq.RuntimeHelpers.AnonymousObject`8[T1,T2,T3,T4,T5,T6,T7,T8]: Void .ctor(T1, T2, T3, T4, T5, T6, T7, T8) -Microsoft.FSharp.Linq.RuntimeHelpers.Grouping`2[K,T]: Void .ctor(K, System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: Microsoft.FSharp.Quotations.FSharpExpr SubstHelperRaw(Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpVar[], System.Object[]) -Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: Microsoft.FSharp.Quotations.FSharpExpr`1[T] SubstHelper[T](Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpVar[], System.Object[]) -Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: System.Linq.Expressions.Expression QuotationToExpression(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: System.Linq.Expressions.Expression`1[T] ImplicitExpressionConversionHelper[T](T) -Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: System.Linq.Expressions.Expression`1[T] QuotationToLambdaExpression[T](Microsoft.FSharp.Quotations.FSharpExpr`1[T]) -Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: System.Object EvaluateQuotation(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: T MemberInitializationHelper[T](T) -Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter: T NewAnonymousObjectHelper[T](T) -Microsoft.FSharp.NativeInterop.NativePtrModule: IntPtr AddPointerInlined[T](IntPtr, Int32) -Microsoft.FSharp.NativeInterop.NativePtrModule: IntPtr OfNativeIntInlined[T](IntPtr) -Microsoft.FSharp.NativeInterop.NativePtrModule: IntPtr OfVoidPtrInlined[T](Void*) -Microsoft.FSharp.NativeInterop.NativePtrModule: IntPtr StackAllocate[T](Int32) -Microsoft.FSharp.NativeInterop.NativePtrModule: IntPtr ToNativeIntInlined[T](IntPtr) -Microsoft.FSharp.NativeInterop.NativePtrModule: T GetPointerInlined[T](IntPtr, Int32) -Microsoft.FSharp.NativeInterop.NativePtrModule: T ReadPointerInlined[T](IntPtr) -Microsoft.FSharp.NativeInterop.NativePtrModule: T& ToByRefInlined[T](IntPtr) -Microsoft.FSharp.NativeInterop.NativePtrModule: Void SetPointerInlined[T](IntPtr, Int32, T) -Microsoft.FSharp.NativeInterop.NativePtrModule: Void WritePointerInlined[T](IntPtr, T) -Microsoft.FSharp.NativeInterop.NativePtrModule: Void* ToVoidPtrInlined[T](IntPtr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr],Microsoft.FSharp.Collections.FSharpList`1[System.Type],Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]]] SpecificCallPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Core.Unit] UnitPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr] MethodWithReflectedDefinitionPattern(System.Reflection.MethodBase) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr] PropertyGetterWithReflectedDefinitionPattern(System.Reflection.PropertyInfo) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr] PropertySetterWithReflectedDefinitionPattern(System.Reflection.PropertyInfo) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Boolean] BoolPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Byte] BytePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Char] CharPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Decimal] DecimalPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Double] DoublePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Int16] Int16Pattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Int32] Int32Pattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Int64] Int64Pattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.SByte] SBytePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Single] SinglePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.String] StringPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpVar]],Microsoft.FSharp.Quotations.FSharpExpr]] LambdasPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]]] ApplicationsPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpExpr]] AndAlsoPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpExpr]] OrElsePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.UInt16] UInt16Pattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.UInt32] UInt32Pattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.DerivedPatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.UInt64] UInt64Pattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.ExprShapeModule: Microsoft.FSharp.Core.FSharpChoice`3[Microsoft.FSharp.Quotations.FSharpVar,System.Tuple`2[Microsoft.FSharp.Quotations.FSharpVar,Microsoft.FSharp.Quotations.FSharpExpr],System.Tuple`2[System.Object,Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]] ShapePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.ExprShapeModule: Microsoft.FSharp.Quotations.FSharpExpr RebuildShapeCombination(System.Object, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) -Microsoft.FSharp.Quotations.FSharpExpr: Boolean Equals(System.Object) -Microsoft.FSharp.Quotations.FSharpExpr: Int32 GetHashCode() -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr] CustomAttributes -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr] get_CustomAttributes() -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr] TryGetReflectedDefinition(System.Reflection.MethodBase) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr AddressOf(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr AddressSet(Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Application(Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Applications(Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Call(Microsoft.FSharp.Quotations.FSharpExpr, System.Reflection.MethodInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Call(System.Reflection.MethodInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Coerce(Microsoft.FSharp.Quotations.FSharpExpr, System.Type) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr DefaultValue(System.Type) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Deserialize(System.Type, Microsoft.FSharp.Collections.FSharpList`1[System.Type], Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr], Byte[]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Deserialize40(System.Type, System.Type[], System.Type[], Microsoft.FSharp.Quotations.FSharpExpr[], Byte[]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr FieldGet(Microsoft.FSharp.Quotations.FSharpExpr, System.Reflection.FieldInfo) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr FieldGet(System.Reflection.FieldInfo) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr FieldSet(Microsoft.FSharp.Quotations.FSharpExpr, System.Reflection.FieldInfo, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr FieldSet(System.Reflection.FieldInfo, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr ForIntegerRangeLoop(Microsoft.FSharp.Quotations.FSharpVar, Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr IfThenElse(Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Lambda(Microsoft.FSharp.Quotations.FSharpVar, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Let(Microsoft.FSharp.Quotations.FSharpVar, Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr LetRecursive(Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpVar,Microsoft.FSharp.Quotations.FSharpExpr]], Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewArray(System.Type, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewDelegate(System.Type, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpVar], Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewObject(System.Reflection.ConstructorInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewRecord(System.Type, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewStructTuple(System.Reflection.Assembly, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewTuple(Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr NewUnionCase(Microsoft.FSharp.Reflection.UnionCaseInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr PropertyGet(Microsoft.FSharp.Quotations.FSharpExpr, System.Reflection.PropertyInfo, Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr PropertyGet(System.Reflection.PropertyInfo, Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr PropertySet(Microsoft.FSharp.Quotations.FSharpExpr, System.Reflection.PropertyInfo, Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr PropertySet(System.Reflection.PropertyInfo, Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Quote(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr QuoteRaw(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr QuoteTyped(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Sequential(Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Substitute(Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Quotations.FSharpVar,Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr]]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr TryFinally(Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr TryWith(Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpVar, Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpVar, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr TupleGet(Microsoft.FSharp.Quotations.FSharpExpr, Int32) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr TypeTest(Microsoft.FSharp.Quotations.FSharpExpr, System.Type) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr UnionCaseTest(Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Reflection.UnionCaseInfo) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Value(System.Object, System.Type) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr ValueWithName(System.Object, System.Type, System.String) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr ValueWithName[T](T, System.String) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Value[T](T) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr Var(Microsoft.FSharp.Quotations.FSharpVar) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr VarSet(Microsoft.FSharp.Quotations.FSharpVar, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr WhileLoop(Microsoft.FSharp.Quotations.FSharpExpr, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr WithValue(System.Object, System.Type, Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr`1[T] Cast[T](Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr`1[T] GlobalVar[T](System.String) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr`1[T] WithValue[T](T, Microsoft.FSharp.Quotations.FSharpExpr`1[T]) -Microsoft.FSharp.Quotations.FSharpExpr: System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Quotations.FSharpVar] GetFreeVars() -Microsoft.FSharp.Quotations.FSharpExpr: System.String ToString() -Microsoft.FSharp.Quotations.FSharpExpr: System.String ToString(Boolean) -Microsoft.FSharp.Quotations.FSharpExpr: System.Type Type -Microsoft.FSharp.Quotations.FSharpExpr: System.Type get_Type() -Microsoft.FSharp.Quotations.FSharpExpr: Void RegisterReflectedDefinitions(System.Reflection.Assembly, System.String, Byte[]) -Microsoft.FSharp.Quotations.FSharpExpr: Void RegisterReflectedDefinitions(System.Reflection.Assembly, System.String, Byte[], System.Type[]) -Microsoft.FSharp.Quotations.FSharpExpr`1[T]: Boolean Equals(System.Object) -Microsoft.FSharp.Quotations.FSharpExpr`1[T]: Int32 GetHashCode() -Microsoft.FSharp.Quotations.FSharpExpr`1[T]: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr] CustomAttributes -Microsoft.FSharp.Quotations.FSharpExpr`1[T]: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr] get_CustomAttributes() -Microsoft.FSharp.Quotations.FSharpExpr`1[T]: Microsoft.FSharp.Quotations.FSharpExpr Raw -Microsoft.FSharp.Quotations.FSharpExpr`1[T]: Microsoft.FSharp.Quotations.FSharpExpr Substitute(Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Quotations.FSharpVar,Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr]]) -Microsoft.FSharp.Quotations.FSharpExpr`1[T]: Microsoft.FSharp.Quotations.FSharpExpr get_Raw() -Microsoft.FSharp.Quotations.FSharpExpr`1[T]: System.Collections.Generic.IEnumerable`1[Microsoft.FSharp.Quotations.FSharpVar] GetFreeVars() -Microsoft.FSharp.Quotations.FSharpExpr`1[T]: System.String ToString() -Microsoft.FSharp.Quotations.FSharpExpr`1[T]: System.String ToString(Boolean) -Microsoft.FSharp.Quotations.FSharpExpr`1[T]: System.Type Type -Microsoft.FSharp.Quotations.FSharpExpr`1[T]: System.Type get_Type() -Microsoft.FSharp.Quotations.FSharpVar: Boolean Equals(System.Object) -Microsoft.FSharp.Quotations.FSharpVar: Boolean IsMutable -Microsoft.FSharp.Quotations.FSharpVar: Boolean get_IsMutable() -Microsoft.FSharp.Quotations.FSharpVar: Int32 GetHashCode() -Microsoft.FSharp.Quotations.FSharpVar: Microsoft.FSharp.Quotations.FSharpVar Global(System.String, System.Type) -Microsoft.FSharp.Quotations.FSharpVar: System.String Name -Microsoft.FSharp.Quotations.FSharpVar: System.String ToString() -Microsoft.FSharp.Quotations.FSharpVar: System.String get_Name() -Microsoft.FSharp.Quotations.FSharpVar: System.Type Type -Microsoft.FSharp.Quotations.FSharpVar: System.Type get_Type() -Microsoft.FSharp.Quotations.FSharpVar: Void .ctor(System.String, System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]] NewStructTuplePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]] NewTuplePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr] AddressOfPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr] QuotePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr] QuoteRawPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr] QuoteTypedPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpVar] VarPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpVar,Microsoft.FSharp.Quotations.FSharpExpr]],Microsoft.FSharp.Quotations.FSharpExpr]] LetRecursivePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr],System.Reflection.FieldInfo]] FieldGetPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpExpr]] AddressSetPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpExpr]] ApplicationPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpExpr]] SequentialPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpExpr]] TryFinallyPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpExpr]] WhileLoopPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Reflection.UnionCaseInfo]] UnionCaseTestPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpExpr,System.Int32]] TupleGetPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpExpr,System.Type]] CoercePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpExpr,System.Type]] TypeTestPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpVar,Microsoft.FSharp.Quotations.FSharpExpr]] LambdaPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Quotations.FSharpVar,Microsoft.FSharp.Quotations.FSharpExpr]] VarSetPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Reflection.UnionCaseInfo,Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]] NewUnionCasePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[System.Object,System.Type]] ValuePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[System.Reflection.ConstructorInfo,Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]] NewObjectPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[System.Type,Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]] NewArrayPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[System.Type,Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]] NewRecordPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr],System.Reflection.FieldInfo,Microsoft.FSharp.Quotations.FSharpExpr]] FieldSetPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr],System.Reflection.MethodInfo,Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]] CallPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr],System.Reflection.PropertyInfo,Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]] PropertyGetPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpExpr]] IfThenElsePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[Microsoft.FSharp.Quotations.FSharpVar,Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpExpr]] LetPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[System.Object,System.Type,Microsoft.FSharp.Quotations.FSharpExpr]] WithValuePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[System.Object,System.Type,System.String]] ValueWithNamePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[System.Type,Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpVar],Microsoft.FSharp.Quotations.FSharpExpr]] NewDelegatePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`4[Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr],System.Reflection.PropertyInfo,Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr],Microsoft.FSharp.Quotations.FSharpExpr]] PropertySetPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`4[Microsoft.FSharp.Quotations.FSharpVar,Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpExpr]] ForIntegerRangeLoopPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`5[Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpVar,Microsoft.FSharp.Quotations.FSharpExpr,Microsoft.FSharp.Quotations.FSharpVar,Microsoft.FSharp.Quotations.FSharpExpr]] TryWithPattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Type] DefaultValuePattern(Microsoft.FSharp.Quotations.FSharpExpr) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: Boolean FSharpType.IsExceptionRepresentation.Static(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: Boolean FSharpType.IsRecord.Static(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: Boolean FSharpType.IsUnion.Static(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: Microsoft.FSharp.Core.FSharpFunc`2[System.Object,System.Int32] FSharpValue.PreComputeUnionTagReader.Static(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: Microsoft.FSharp.Core.FSharpFunc`2[System.Object,System.Object[]] FSharpValue.PreComputeRecordReader.Static(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: Microsoft.FSharp.Core.FSharpFunc`2[System.Object,System.Object[]] FSharpValue.PreComputeUnionReader.Static(Microsoft.FSharp.Reflection.UnionCaseInfo, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: Microsoft.FSharp.Core.FSharpFunc`2[System.Object[],System.Object] FSharpValue.PreComputeRecordConstructor.Static(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: Microsoft.FSharp.Core.FSharpFunc`2[System.Object[],System.Object] FSharpValue.PreComputeUnionConstructor.Static(Microsoft.FSharp.Reflection.UnionCaseInfo, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: Microsoft.FSharp.Reflection.UnionCaseInfo[] FSharpType.GetUnionCases.Static(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: System.Object FSharpValue.MakeRecord.Static(System.Type, System.Object[], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: System.Object FSharpValue.MakeUnion.Static(Microsoft.FSharp.Reflection.UnionCaseInfo, System.Object[], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: System.Object[] FSharpValue.GetExceptionFields.Static(System.Object, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: System.Object[] FSharpValue.GetRecordFields.Static(System.Object, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: System.Reflection.ConstructorInfo FSharpValue.PreComputeRecordConstructorInfo.Static(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: System.Reflection.MemberInfo FSharpValue.PreComputeUnionTagMemberInfo.Static(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: System.Reflection.MethodInfo FSharpValue.PreComputeUnionConstructorInfo.Static(Microsoft.FSharp.Reflection.UnionCaseInfo, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: System.Reflection.PropertyInfo[] FSharpType.GetExceptionFields.Static(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: System.Reflection.PropertyInfo[] FSharpType.GetRecordFields.Static(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpReflectionExtensions: System.Tuple`2[Microsoft.FSharp.Reflection.UnionCaseInfo,System.Object[]] FSharpValue.GetUnionFields.Static(System.Object, System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Boolean]) -Microsoft.FSharp.Reflection.FSharpType: Boolean IsExceptionRepresentation(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpType: Boolean IsFunction(System.Type) -Microsoft.FSharp.Reflection.FSharpType: Boolean IsModule(System.Type) -Microsoft.FSharp.Reflection.FSharpType: Boolean IsRecord(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpType: Boolean IsTuple(System.Type) -Microsoft.FSharp.Reflection.FSharpType: Boolean IsUnion(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpType: Microsoft.FSharp.Reflection.UnionCaseInfo[] GetUnionCases(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpType: System.Reflection.PropertyInfo[] GetExceptionFields(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpType: System.Reflection.PropertyInfo[] GetRecordFields(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpType: System.Tuple`2[System.Type,System.Type] GetFunctionElements(System.Type) -Microsoft.FSharp.Reflection.FSharpType: System.Type MakeFunctionType(System.Type, System.Type) -Microsoft.FSharp.Reflection.FSharpType: System.Type MakeStructTupleType(System.Reflection.Assembly, System.Type[]) -Microsoft.FSharp.Reflection.FSharpType: System.Type MakeTupleType(System.Reflection.Assembly, System.Type[]) -Microsoft.FSharp.Reflection.FSharpType: System.Type MakeTupleType(System.Type[]) -Microsoft.FSharp.Reflection.FSharpType: System.Type[] GetTupleElements(System.Type) -Microsoft.FSharp.Reflection.FSharpValue: Microsoft.FSharp.Core.FSharpFunc`2[System.Object,System.Int32] PreComputeUnionTagReader(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpValue: Microsoft.FSharp.Core.FSharpFunc`2[System.Object,System.Object[]] PreComputeRecordReader(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpValue: Microsoft.FSharp.Core.FSharpFunc`2[System.Object,System.Object[]] PreComputeTupleReader(System.Type) -Microsoft.FSharp.Reflection.FSharpValue: Microsoft.FSharp.Core.FSharpFunc`2[System.Object,System.Object[]] PreComputeUnionReader(Microsoft.FSharp.Reflection.UnionCaseInfo, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpValue: Microsoft.FSharp.Core.FSharpFunc`2[System.Object,System.Object] PreComputeRecordFieldReader(System.Reflection.PropertyInfo) -Microsoft.FSharp.Reflection.FSharpValue: Microsoft.FSharp.Core.FSharpFunc`2[System.Object[],System.Object] PreComputeRecordConstructor(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpValue: Microsoft.FSharp.Core.FSharpFunc`2[System.Object[],System.Object] PreComputeTupleConstructor(System.Type) -Microsoft.FSharp.Reflection.FSharpValue: Microsoft.FSharp.Core.FSharpFunc`2[System.Object[],System.Object] PreComputeUnionConstructor(Microsoft.FSharp.Reflection.UnionCaseInfo, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpValue: System.Object GetRecordField(System.Object, System.Reflection.PropertyInfo) -Microsoft.FSharp.Reflection.FSharpValue: System.Object GetTupleField(System.Object, Int32) -Microsoft.FSharp.Reflection.FSharpValue: System.Object MakeFunction(System.Type, Microsoft.FSharp.Core.FSharpFunc`2[System.Object,System.Object]) -Microsoft.FSharp.Reflection.FSharpValue: System.Object MakeRecord(System.Type, System.Object[], Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpValue: System.Object MakeTuple(System.Object[], System.Type) -Microsoft.FSharp.Reflection.FSharpValue: System.Object MakeUnion(Microsoft.FSharp.Reflection.UnionCaseInfo, System.Object[], Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpValue: System.Object[] GetExceptionFields(System.Object, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpValue: System.Object[] GetRecordFields(System.Object, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpValue: System.Object[] GetTupleFields(System.Object) -Microsoft.FSharp.Reflection.FSharpValue: System.Reflection.ConstructorInfo PreComputeRecordConstructorInfo(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpValue: System.Reflection.MemberInfo PreComputeUnionTagMemberInfo(System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpValue: System.Reflection.MethodInfo PreComputeUnionConstructorInfo(Microsoft.FSharp.Reflection.UnionCaseInfo, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpValue: System.Tuple`2[Microsoft.FSharp.Reflection.UnionCaseInfo,System.Object[]] GetUnionFields(System.Object, System.Type, Microsoft.FSharp.Core.FSharpOption`1[System.Reflection.BindingFlags]) -Microsoft.FSharp.Reflection.FSharpValue: System.Tuple`2[System.Reflection.ConstructorInfo,Microsoft.FSharp.Core.FSharpOption`1[System.Type]] PreComputeTupleConstructorInfo(System.Type) -Microsoft.FSharp.Reflection.FSharpValue: System.Tuple`2[System.Reflection.PropertyInfo,Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[System.Type,System.Int32]]] PreComputeTuplePropertyInfo(System.Type, Int32) -Microsoft.FSharp.Reflection.UnionCaseInfo: Boolean Equals(System.Object) -Microsoft.FSharp.Reflection.UnionCaseInfo: Int32 GetHashCode() -Microsoft.FSharp.Reflection.UnionCaseInfo: Int32 Tag -Microsoft.FSharp.Reflection.UnionCaseInfo: Int32 get_Tag() -Microsoft.FSharp.Reflection.UnionCaseInfo: System.Collections.Generic.IList`1[System.Reflection.CustomAttributeData] GetCustomAttributesData() -Microsoft.FSharp.Reflection.UnionCaseInfo: System.Object[] GetCustomAttributes() -Microsoft.FSharp.Reflection.UnionCaseInfo: System.Object[] GetCustomAttributes(System.Type) -Microsoft.FSharp.Reflection.UnionCaseInfo: System.Reflection.PropertyInfo[] GetFields() -Microsoft.FSharp.Reflection.UnionCaseInfo: System.String Name -Microsoft.FSharp.Reflection.UnionCaseInfo: System.String ToString() -Microsoft.FSharp.Reflection.UnionCaseInfo: System.String get_Name() -Microsoft.FSharp.Reflection.UnionCaseInfo: System.Type DeclaringType -Microsoft.FSharp.Reflection.UnionCaseInfo: System.Type get_DeclaringType() -Microsoft.FSharp.Collections.ArrayModule: T Average$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) -Microsoft.FSharp.Collections.ArrayModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) -Microsoft.FSharp.Collections.ArrayModule: TResult AverageBy$W[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,TResult]], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TResult], Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[TResult,TResult]], Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[]) -Microsoft.FSharp.Collections.ArrayModule: TResult SumBy$W[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TResult], Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[TResult,TResult]], Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[]) -Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] NonStructural$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]]) -Microsoft.FSharp.Collections.HashIdentity: System.Collections.Generic.IEqualityComparer`1[T] NonStructural$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]]) -Microsoft.FSharp.Collections.ListModule: T Average$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: TResult AverageBy$W[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,TResult]], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TResult], Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[TResult,TResult]], Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.ListModule: TResult SumBy$W[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TResult], Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[TResult,TResult]], Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Collections.FSharpList`1[T]) -Microsoft.FSharp.Collections.SeqModule: T Average$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: TResult AverageBy$W[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,TResult]], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TResult], Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[TResult,TResult]], Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Collections.SeqModule: TResult SumBy$W[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TResult], Microsoft.FSharp.Core.FSharpFunc`2[TResult,Microsoft.FSharp.Core.FSharpFunc`2[TResult,TResult]], Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], System.Collections.Generic.IEnumerable`1[T]) -Microsoft.FSharp.Core.ExtraTopLevelOperators+Checked: Byte ToByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) -Microsoft.FSharp.Core.ExtraTopLevelOperators+Checked: SByte ToSByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) -Microsoft.FSharp.Core.ExtraTopLevelOperators: Byte ToByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) -Microsoft.FSharp.Core.ExtraTopLevelOperators: Double ToDouble$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Double], T) -Microsoft.FSharp.Core.ExtraTopLevelOperators: SByte ToSByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) -Microsoft.FSharp.Core.ExtraTopLevelOperators: Single ToSingle$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Single], T) -Microsoft.FSharp.Core.LanguagePrimitives: T DivideByInt$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]], T, Int32) -Microsoft.FSharp.Core.LanguagePrimitives: T GenericOne$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T]) -Microsoft.FSharp.Core.LanguagePrimitives: T GenericZero$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T]) -Microsoft.FSharp.Core.LanguagePrimitives: TResult CheckedSubtractionDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult CheckedUnaryNegationDynamic[T,TResult](T) -Microsoft.FSharp.Core.LanguagePrimitives: TResult DivisionDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult ModulusDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult BitwiseAndDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult ExclusiveOrDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult BitwiseOrDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult EqualityDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult ExplicitDynamic[T,TResult](T) -Microsoft.FSharp.Core.LanguagePrimitives: TResult GreaterThanDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult GreaterThanOrEqualDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult InequalityDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult LeftShiftDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult LessThanDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult LessThanOrEqualDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult LogicalNotDynamic[T,TResult](T) -Microsoft.FSharp.Core.LanguagePrimitives: TResult RightShiftDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult SubtractionDynamic[T1,T2,TResult](T1, T2) -Microsoft.FSharp.Core.LanguagePrimitives: TResult UnaryNegationDynamic[T,TResult](T) -Microsoft.FSharp.Core.Operators+Checked: Byte ToByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) -Microsoft.FSharp.Core.Operators+Checked: Char ToChar$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Char], T) -Microsoft.FSharp.Core.Operators+Checked: Int16 ToInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int16], T) -Microsoft.FSharp.Core.Operators+Checked: Int32 ToInt32$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32], T) -Microsoft.FSharp.Core.Operators+Checked: Int32 ToInt$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32], T) -Microsoft.FSharp.Core.Operators+Checked: Int64 ToInt64$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int64], T) -Microsoft.FSharp.Core.Operators+Checked: IntPtr ToIntPtr$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.IntPtr], T) -Microsoft.FSharp.Core.Operators+Checked: SByte ToSByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) -Microsoft.FSharp.Core.Operators+Checked: T op_UnaryNegation$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators+Checked: T3 op_Addition$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], T1, T2) -Microsoft.FSharp.Core.Operators+Checked: T3 op_Multiply$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], T1, T2) -Microsoft.FSharp.Core.Operators+Checked: T3 op_Subtraction$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], T1, T2) -Microsoft.FSharp.Core.Operators+Checked: UInt16 ToUInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UInt16], T) -Microsoft.FSharp.Core.Operators+Checked: UInt32 ToUInt32$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UInt32], T) -Microsoft.FSharp.Core.Operators+Checked: UInt64 ToUInt64$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UInt64], T) -Microsoft.FSharp.Core.Operators+Checked: UIntPtr ToUIntPtr$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UIntPtr], T) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Boolean op_Equality$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], T, T) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Boolean op_GreaterThanOrEqual$W[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TResult,System.Boolean]], T, TResult) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Boolean op_GreaterThan$W[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TResult,System.Boolean]], T, TResult) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Boolean op_Inequality$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], T, T) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Boolean op_LessThanOrEqual$W[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TResult,System.Boolean]], T, TResult) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Boolean op_LessThan$W[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TResult,System.Boolean]], T, TResult) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: Int32 Compare$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], T, T) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: T Max$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], T, T) -Microsoft.FSharp.Core.Operators+NonStructuralComparison: T Min$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], T, T) -Microsoft.FSharp.Core.Operators: Byte ToByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) -Microsoft.FSharp.Core.Operators: Char ToChar$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Char], T) -Microsoft.FSharp.Core.Operators: Double ToDouble$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Double], T) -Microsoft.FSharp.Core.Operators: Int16 ToInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int16], T) -Microsoft.FSharp.Core.Operators: Int32 Sign$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32], T) -Microsoft.FSharp.Core.Operators: Int32 ToInt32$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32], T) -Microsoft.FSharp.Core.Operators: Int32 ToInt$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32], T) -Microsoft.FSharp.Core.Operators: Int64 ToInt64$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int64], T) -Microsoft.FSharp.Core.Operators: IntPtr ToIntPtr$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.IntPtr], T) -Microsoft.FSharp.Core.Operators: SByte ToSByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) -Microsoft.FSharp.Core.Operators: Single ToSingle$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Single], T) -Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_RangeStep$W[T,TStep](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TStep], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TStep,T]], T, TStep, T) -Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_Range$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T, T) -Microsoft.FSharp.Core.Operators: System.Decimal ToDecimal$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Decimal], T) -Microsoft.FSharp.Core.Operators: T Abs$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Acos$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Asin$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Atan$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Ceiling$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Cos$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Cosh$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Exp$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Floor$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Log10$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Log$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T PowInteger$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T, Int32) -Microsoft.FSharp.Core.Operators: T Round$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Sin$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Sinh$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Tan$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Tanh$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T Truncate$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T op_BitwiseAnd$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T, T) -Microsoft.FSharp.Core.Operators: T op_BitwiseOr$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T, T) -Microsoft.FSharp.Core.Operators: T op_ExclusiveOr$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T, T) -Microsoft.FSharp.Core.Operators: T op_Exponentiation$W[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TResult,T]], T, TResult) -Microsoft.FSharp.Core.Operators: T op_LeftShift$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]], T, Int32) -Microsoft.FSharp.Core.Operators: T op_LogicalNot$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T op_RightShift$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,T]], T, Int32) -Microsoft.FSharp.Core.Operators: T op_UnaryNegation$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T op_UnaryPlus$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) -Microsoft.FSharp.Core.Operators: T2 Atan2$W[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T1,T2]], T1, T1) -Microsoft.FSharp.Core.Operators: T3 op_Addition$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], T1, T2) -Microsoft.FSharp.Core.Operators: T3 op_Division$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], T1, T2) -Microsoft.FSharp.Core.Operators: T3 op_Modulus$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], T1, T2) -Microsoft.FSharp.Core.Operators: T3 op_Multiply$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], T1, T2) -Microsoft.FSharp.Core.Operators: T3 op_Subtraction$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], T1, T2) -Microsoft.FSharp.Core.Operators: TResult Sqrt$W[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T) -Microsoft.FSharp.Core.Operators: UInt32 ToUInt$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UInt32], T) -Microsoft.FSharp.Core.Operators: UInt16 ToUInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UInt16], T) -Microsoft.FSharp.Core.Operators: UInt32 ToUInt32$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UInt32], T) -Microsoft.FSharp.Core.Operators: UInt64 ToUInt64$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UInt64], T) -Microsoft.FSharp.Core.Operators: UIntPtr ToUIntPtr$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UIntPtr], T) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Byte] ToByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Byte] ToUInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Char] ToChar$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Char], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Decimal] ToDecimal$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Decimal], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Double] ToDouble$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Double], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Double] ToFloat$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Double], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Int16] ToInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int16], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Int32] ToInt32$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Int32] ToInt$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Int64] ToInt64$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int64], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.IntPtr] ToIntPtr$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.IntPtr], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.SByte] ToInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.SByte] ToSByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Single] ToFloat32$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Single], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.Single] ToSingle$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Single], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.UInt16] ToUInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UInt16], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.UInt32] ToUInt32$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UInt32], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.UInt32] ToUInt$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UInt32], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.UInt64] ToUInt64$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UInt64], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableModule: System.Nullable`1[System.UIntPtr] ToUIntPtr$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.UIntPtr], System.Nullable`1[T]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_DivideQmark$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], T1, System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_MinusQmark$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], T1, System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_MultiplyQmark$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], T1, System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_PercentQmark$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], T1, System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_PlusQmark$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], T1, System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkDivideQmark$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], System.Nullable`1[T1], System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkDivide$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], System.Nullable`1[T1], T2) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkMinusQmark$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], System.Nullable`1[T1], System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkMinus$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], System.Nullable`1[T1], T2) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkMultiplyQmark$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], System.Nullable`1[T1], System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkMultiply$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], System.Nullable`1[T1], T2) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkPercentQmark$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], System.Nullable`1[T1], System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkPercent$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], System.Nullable`1[T1], T2) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkPlusQmark$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], System.Nullable`1[T1], System.Nullable`1[T2]) -Microsoft.FSharp.Linq.NullableOperators: System.Nullable`1[T3] op_QmarkPlus$W[T1,T2,T3](Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,T3]], System.Nullable`1[T1], T2) -Microsoft.FSharp.Linq.QueryBuilder: System.Nullable`1[TValue] AverageByNullable$W[T,Q,TValue](Microsoft.FSharp.Core.FSharpFunc`2[TValue,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,TValue]], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TValue], Microsoft.FSharp.Core.FSharpFunc`2[TValue,Microsoft.FSharp.Core.FSharpFunc`2[TValue,TValue]], Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Nullable`1[TValue]]) -Microsoft.FSharp.Linq.QueryBuilder: System.Nullable`1[TValue] SumByNullable$W[T,Q,TValue](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TValue], Microsoft.FSharp.Core.FSharpFunc`2[TValue,Microsoft.FSharp.Core.FSharpFunc`2[TValue,TValue]], Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,System.Nullable`1[TValue]]) -Microsoft.FSharp.Linq.QueryBuilder: TValue AverageBy$W[T,Q,TValue](Microsoft.FSharp.Core.FSharpFunc`2[TValue,Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,TValue]], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TValue], Microsoft.FSharp.Core.FSharpFunc`2[TValue,Microsoft.FSharp.Core.FSharpFunc`2[TValue,TValue]], Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,TValue]) -Microsoft.FSharp.Linq.QueryBuilder: TValue SumBy$W[T,Q,TValue](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TValue], Microsoft.FSharp.Core.FSharpFunc`2[TValue,Microsoft.FSharp.Core.FSharpFunc`2[TValue,TValue]], Microsoft.FSharp.Linq.QuerySource`2[T,Q], Microsoft.FSharp.Core.FSharpFunc`2[T,TValue]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr CallWithWitnesses(Microsoft.FSharp.Quotations.FSharpExpr, System.Reflection.MethodInfo, System.Reflection.MethodInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr], Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) -Microsoft.FSharp.Quotations.FSharpExpr: Microsoft.FSharp.Quotations.FSharpExpr CallWithWitnesses(System.Reflection.MethodInfo, System.Reflection.MethodInfo, Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr], Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]) -Microsoft.FSharp.Quotations.PatternsModule: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`5[Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Quotations.FSharpExpr],System.Reflection.MethodInfo,System.Reflection.MethodInfo,Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr],Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Quotations.FSharpExpr]]] CallWithWitnessesPattern(Microsoft.FSharp.Quotations.FSharpExpr) -" -#if DEBUG - let expected = - expected + - @"Microsoft.FSharp.Core.Operators: System.RuntimeMethodHandle MethodHandleOf[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult])" -#endif -#if CROSS_PLATFORM_COMPILER - () - // disabled because of slight order and GetMember discrepencies -#else - SurfaceArea.verify expected "net40" (System.IO.Path.Combine(__SOURCE_DIRECTORY__,__SOURCE_FILE__)) -#endif diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs index 6c6c51b10d..b8d4db8a79 100644 --- a/tests/FSharp.Test.Utilities/Compiler.fs +++ b/tests/FSharp.Test.Utilities/Compiler.fs @@ -61,13 +61,20 @@ module rec Compiler = Range: Range Message: string } - type Output = - { OutputPath: string option - Adjust: int - Errors: ErrorInfo list - Warnings: ErrorInfo list } + type ExecutionOutput = + { ExitCode: int + StdOut: string + StdErr: string } - type CompilationResult = + type Output = + { OutputPath: string option + Dependencies: string list + Adjust: int + Errors: ErrorInfo list + Warnings: ErrorInfo list + Output: ExecutionOutput option } + + type TestResult = | Success of Output | Failure of Output @@ -98,7 +105,7 @@ module rec Compiler = | _ -> { Source = Text source LangVersion = CSharpLanguageVersion.CSharp8 - TargetFramework = TargetFramework.NetCoreApp30 + TargetFramework = TargetFramework.NetCoreApp31 Name = None References = [] } @@ -166,9 +173,14 @@ module rec Compiler = let withOptions (options: string list) (cUnit: CompilationUnit) : CompilationUnit = match cUnit with - | FS fs -> FS { fs with Options = options } + | FS fs -> FS { fs with Options = fs.Options @ options } | _ -> failwith "withOptions is only supported n F#" + let withPreview (cUnit: CompilationUnit) : CompilationUnit = + match cUnit with + | FS fs -> FS { fs with Options = fs.Options @ [ "--langversion:preview" ] } + | _ -> failwith "withPreview is only supported in F#" + let asLibrary (cUnit: CompilationUnit) : CompilationUnit = match cUnit with | FS fs -> FS { fs with OutputType = CompileOutput.Library } @@ -190,11 +202,11 @@ module rec Compiler = let result = compileFSharpCompilation cmpl false match result with | Failure f -> - let message = sprintf "Compilation failed (expected to succeed).\n All errors:\n%A" (f.Errors @ f.Warnings) + let message = sprintf "Operation failed (expected to succeed).\n All errors:\n%A" (f.Errors @ f.Warnings) failwith message | Success s -> match s.OutputPath with - | None -> failwith "Compilation didn't produce any output!" + | None -> failwith "Operation didn't produce any output!" | Some p -> p |> MetadataReference.CreateFromFile | _ -> failwith "Conversion isn't possible" @@ -220,17 +232,19 @@ module rec Compiler = | IL _ -> failwith "TODO: Process references for IL" loop [] references - let private compileFSharpCompilation compilation ignoreWarnings : CompilationResult = + let private compileFSharpCompilation compilation ignoreWarnings : TestResult = - let ((err: FSharpErrorInfo[], outputFilePath: string), _) = CompilerAssert.CompileRaw(compilation) + let ((err: FSharpErrorInfo[], outputFilePath: string), deps) = CompilerAssert.CompileRaw(compilation) let (errors, warnings) = err |> fromFSharpErrorInfo let result = - { OutputPath = None - Adjust = 0 - Warnings = warnings - Errors = errors } + { OutputPath = None + Dependencies = deps + Adjust = 0 + Warnings = warnings + Errors = errors + Output = None } // Treat warnings as errors if "IgnoreWarnings" is false if errors.Length > 0 || (warnings.Length > 0 && not ignoreWarnings) then @@ -240,7 +254,7 @@ module rec Compiler = Success { result with Warnings = warnings OutputPath = Some outputFilePath } - let private compileFSharp (fsSource: FSharpCompilationSource) : CompilationResult = + let private compileFSharp (fsSource: FSharpCompilationSource) : TestResult = let source = getSource fsSource.Source let sourceKind = fsSource.SourceKind @@ -253,29 +267,32 @@ module rec Compiler = compileFSharpCompilation compilation fsSource.IgnoreWarnings - let private compileCSharpCompilation (compilation: CSharpCompilation) : CompilationResult = + let private compileCSharpCompilation (compilation: CSharpCompilation) : TestResult = let outputPath = Path.Combine(Path.GetTempPath(), "FSharpCompilerTests", Path.GetRandomFileName()) Directory.CreateDirectory(outputPath) |> ignore let filename = compilation.AssemblyName + let output = Path.Combine(outputPath, Path.ChangeExtension(filename, ".dll")) let cmplResult = compilation.Emit (output) let result = - { OutputPath = None - Adjust = 0 - Warnings = [] - Errors = [] } + { OutputPath = None + Dependencies = [] + Adjust = 0 + Warnings = [] + Errors = [] + Output = None } if cmplResult.Success then Success { result with OutputPath = Some output } else Failure result - let private compileCSharp (csSource: CSharpCompilationSource) : CompilationResult = + let private compileCSharp (csSource: CSharpCompilationSource) : TestResult = let source = getSource csSource.Source let name = defaultArg csSource.Name (Guid.NewGuid().ToString ()) @@ -301,24 +318,51 @@ module rec Compiler = cmpl |> compileCSharpCompilation - let compile (cUnit: CompilationUnit) : CompilationResult = + let compile (cUnit: CompilationUnit) : TestResult = match cUnit with | FS fs -> compileFSharp fs | CS cs -> compileCSharp cs | _ -> failwith "TODO" - let private typecheckFSharpWithBaseline (options: string list) (dir: string) (file: string) : CompilationResult = + let private parseFSharp (fsSource: FSharpCompilationSource) : TestResult = + let source = getSource fsSource.Source + let parseResults = CompilerAssert.Parse source + let failed = parseResults.ParseHadErrors + + let (errors, warnings) = parseResults.Errors |> fromFSharpErrorInfo + + let result = + { OutputPath = None + Dependencies = [] + Adjust = 0 + Warnings = errors + Errors = warnings + Output = None } + + if failed then + Failure result + else + Success result + + let parse (cUnit: CompilationUnit) : TestResult = + match cUnit with + | FS fs -> parseFSharp fs + | _ -> failwith "Parsing only supported for F#." + + let private typecheckFSharpWithBaseline (options: string list) (dir: string) (file: string) : TestResult = // Since TypecheckWithErrorsAndOptionsAgainsBaseLine throws if doesn't match expected baseline, - // We return a successfull CompilationResult if it succeeds. + // We return a successfull TestResult if it succeeds. CompilerAssert.TypeCheckWithErrorsAndOptionsAgainstBaseLine (Array.ofList options) dir file Success - { OutputPath = None - Adjust = 0 - Warnings = [] - Errors = [] } - - let private typecheckFSharpSource (fsSource: FSharpCompilationSource) : CompilationResult = + { OutputPath = None + Dependencies = [] + Adjust = 0 + Warnings = [] + Errors = [] + Output = None } + + let private typecheckFSharpSource (fsSource: FSharpCompilationSource) : TestResult = let source = getSource fsSource.Source let options = fsSource.Options |> Array.ofList @@ -327,10 +371,12 @@ module rec Compiler = let (errors, warnings) = err |> fromFSharpErrorInfo let result = - { OutputPath = None - Adjust = 0 - Warnings = warnings - Errors = errors } + { OutputPath = None + Dependencies = [] + Adjust = 0 + Warnings = warnings + Errors = errors + Output = None } // Treat warnings as errors if "IgnoreWarnings" is false; if errors.Length > 0 || (warnings.Length > 0 && not fsSource.IgnoreWarnings) then @@ -339,23 +385,29 @@ module rec Compiler = else Success { result with Warnings = warnings } - let private typecheckFSharp (fsSource: FSharpCompilationSource) : CompilationResult = + let private typecheckFSharp (fsSource: FSharpCompilationSource) : TestResult = match fsSource.Source with | Baseline (f, d) -> typecheckFSharpWithBaseline fsSource.Options f d | _ -> typecheckFSharpSource fsSource - let typecheck (cUnit: CompilationUnit) : CompilationResult = + let typecheck (cUnit: CompilationUnit) : TestResult = match cUnit with | FS fs -> typecheckFSharp fs | _ -> failwith "Typecheck only supports F#" - let run (cResult: CompilationResult ) : unit = - match cResult with - | Failure o -> failwith (sprintf "Compilation should be successfull in order to run.\n Errors: %A" (o.Errors @ o.Warnings)) + let run (result: TestResult) : TestResult = + match result with + | Failure f -> failwith (sprintf "Compilation should be successfull in order to run.\n Errors: %A" (f.Errors @ f.Warnings)) | Success s -> match s.OutputPath with | None -> failwith "Compilation didn't produce any output. Unable to run. (did you forget to set output type to Exe?)" - | Some p -> CompilerAssert.Run p + | Some p -> + let (exitCode, output, errors) = CompilerAssert.ExecuteAndReturnResult (p, s.Dependencies, false) + let executionResult = { s with Output = Some { ExitCode = exitCode; StdOut = output; StdErr = errors } } + if exitCode = 0 then + Success executionResult + else + Failure executionResult let compileAndRun = compile >> run @@ -406,36 +458,36 @@ module rec Compiler = checkEqual "Message" expectedMessage actualMessage) () - let adjust (adjust: int) (result: CompilationResult) : CompilationResult = + let adjust (adjust: int) (result: TestResult) : TestResult = match result with | Success s -> Success { s with Adjust = adjust } | Failure f -> Failure { f with Adjust = adjust } - let shouldSucceed (result: CompilationResult) : CompilationResult = + let shouldSucceed (result: TestResult) : TestResult = match result with | Success _ -> result | Failure r -> - let message = sprintf "Compilation failed (expected to succeed).\n All errors:\n%A" (r.Errors @ r.Warnings) + let message = sprintf "Operation failed (expected to succeed).\n All errors:\n%A" (r.Errors @ r.Warnings) failwith message - let shouldFail (result: CompilationResult) : CompilationResult = + let shouldFail (result: TestResult) : TestResult = match result with - | Success _ -> failwith "Compilation was \"Success\" (expected: \"Failure\")." + | Success _ -> failwith "Operation was succeeded (expected to fail)." | Failure _ -> result - let private assertResultsCategory (what: string) (selector: Output -> ErrorInfo list) (expected: ErrorInfo list) (result: CompilationResult) : CompilationResult = + let private assertResultsCategory (what: string) (selector: Output -> ErrorInfo list) (expected: ErrorInfo list) (result: TestResult) : TestResult = match result with | Success r | Failure r -> assertErrors what r.Adjust (selector r) expected result - let withResults (expectedResults: ErrorInfo list) result : CompilationResult = + let withResults (expectedResults: ErrorInfo list) result : TestResult = assertResultsCategory "Results" (fun r -> r.Warnings @ r.Errors) expectedResults result - let withResult (expectedResult: ErrorInfo ) (result: CompilationResult) : CompilationResult = + let withResult (expectedResult: ErrorInfo ) (result: TestResult) : TestResult = withResults [expectedResult] result - let withDiagnostics (expected: (ErrorType * Line * Col * Line * Col * string) list) (result: CompilationResult) : CompilationResult = + let withDiagnostics (expected: (ErrorType * Line * Col * Line * Col * string) list) (result: TestResult) : TestResult = let (expectedResults: ErrorInfo list) = expected |> List.map( @@ -450,58 +502,86 @@ module rec Compiler = Message = message }) withResults expectedResults result - let withSingleDiagnostic (expected: (ErrorType * Line * Col * Line * Col * string)) (result: CompilationResult) : CompilationResult = + let withSingleDiagnostic (expected: (ErrorType * Line * Col * Line * Col * string)) (result: TestResult) : TestResult = withDiagnostics [expected] result - let withErrors (expectedErrors: ErrorInfo list) (result: CompilationResult) : CompilationResult = + let withErrors (expectedErrors: ErrorInfo list) (result: TestResult) : TestResult = assertResultsCategory "Errors" (fun r -> r.Errors) expectedErrors result - let withError (expectedError: ErrorInfo) (result: CompilationResult) : CompilationResult = + let withError (expectedError: ErrorInfo) (result: TestResult) : TestResult = withErrors [expectedError] result - let checkCodes (expected: int list) (selector: Output -> ErrorInfo list) (result: CompilationResult) : CompilationResult = + let checkCodes (expected: int list) (selector: Output -> ErrorInfo list) (result: TestResult) : TestResult = match result with | Success r | Failure r -> assertErrorNumbers (selector r) expected result - let withErrorCodes (expectedCodes: int list) (result: CompilationResult) : CompilationResult = + let withErrorCodes (expectedCodes: int list) (result: TestResult) : TestResult = checkCodes expectedCodes (fun r -> r.Errors) result - let withErrorCode (expectedCode: int) (result: CompilationResult) : CompilationResult = + let withErrorCode (expectedCode: int) (result: TestResult) : TestResult = withErrorCodes [expectedCode] result - let withWarnings (expectedWarnings: ErrorInfo list) (result: CompilationResult) : CompilationResult = + let withWarnings (expectedWarnings: ErrorInfo list) (result: TestResult) : TestResult = assertResultsCategory "Warnings" (fun r -> r.Warnings) expectedWarnings result - let withWarning (expectedWarning: ErrorInfo) (result: CompilationResult) : CompilationResult = + let withWarning (expectedWarning: ErrorInfo) (result: TestResult) : TestResult = withWarnings [expectedWarning] result - let withWarningCodes (expectedCodes: int list) (result: CompilationResult) : CompilationResult = + let withWarningCodes (expectedCodes: int list) (result: TestResult) : TestResult = checkCodes expectedCodes (fun r -> r.Warnings) result - let withWarningCode (expectedCode: int) (result: CompilationResult) : CompilationResult = + let withWarningCode (expectedCode: int) (result: TestResult) : TestResult = withWarningCodes [expectedCode] result - let private checkErrorMessages (messages: string list) (selector: Output -> ErrorInfo list) (result: CompilationResult) : CompilationResult = + let private checkErrorMessages (messages: string list) (selector: Output -> ErrorInfo list) (result: TestResult) : TestResult = match result with | Success r | Failure r -> assertErrorMessages (selector r) messages result - let withMessages (messages: string list) (result: CompilationResult) : CompilationResult = + let withMessages (messages: string list) (result: TestResult) : TestResult = checkErrorMessages messages (fun r -> r.Warnings @ r.Errors) result - let withMessage (message: string) (result: CompilationResult) : CompilationResult = + let withMessage (message: string) (result: TestResult) : TestResult = withMessages [message] result - let withErrorMessages (messages: string list) (result: CompilationResult) : CompilationResult = + let withErrorMessages (messages: string list) (result: TestResult) : TestResult = checkErrorMessages messages (fun r -> r.Errors) result - let withErrorMessage (message: string) (result: CompilationResult) : CompilationResult = + let withErrorMessage (message: string) (result: TestResult) : TestResult = withErrorMessages [message] result - let withWarningMessages (messages: string list) (result: CompilationResult) : CompilationResult = + let withWarningMessages (messages: string list) (result: TestResult) : TestResult = checkErrorMessages messages (fun r -> r.Warnings) result - let withWarningMessage (message: string) (result: CompilationResult) : CompilationResult = + let withWarningMessage (message: string) (result: TestResult) : TestResult = withWarningMessages [message] result + + let withExitCode (expectedExitCode: int) (result: TestResult) : TestResult = + match result with + | Success r | Failure r -> + match r.Output with + | None -> failwith "Execution output is missing, cannot check exit code." + | Some o -> Assert.AreEqual(o.ExitCode, expectedExitCode, sprintf "Exit code was expected to be: %A, but got %A." expectedExitCode o.ExitCode) + result + + let private checkOutput (category: string) (substring: string) (selector: ExecutionOutput -> string) (result: TestResult) : TestResult = + match result with + | Success r | Failure r -> + match r.Output with + | None -> failwith (sprintf "Execution output is missing cannot check \"%A\"" category) + | Some o -> + let where = selector o + if not (where.Contains(substring)) then + failwith (sprintf "\nThe following substring:\n %A\nwas not found in the %A\nOutput:\n %A" substring category where) + result + + let withOutputContains (substring: string) (result: TestResult) : TestResult = + checkOutput "STDERR/STDOUT" substring (fun o -> o.StdOut + "\n" + o.StdErr) result + + let withStdOutContains (substring: string) (result: TestResult) : TestResult = + checkOutput "STDOUT" substring (fun o -> o.StdOut) result + + let withStdErrContains (substring: string) (result: TestResult) : TestResult = + checkOutput "STDERR" substring (fun o -> o.StdErr) result diff --git a/tests/FSharp.Test.Utilities/CompilerAssert.fs b/tests/FSharp.Test.Utilities/CompilerAssert.fs index 4956b3e203..1365979200 100644 --- a/tests/FSharp.Test.Utilities/CompilerAssert.fs +++ b/tests/FSharp.Test.Utilities/CompilerAssert.fs @@ -83,19 +83,33 @@ type CompilerAssert private () = static let _ = config |> ignore -// Do a one time dotnet sdk build to compute the proper set of reference assemblies to pass to the compiler -#if NETCOREAPP + // Do a one time dotnet sdk build to compute the proper set of reference assemblies to pass to the compiler static let projectFile = """ Exe - netcoreapp3.1 + $TARGETFRAMEWORK true true + + + + + + + + + + + + + + + @@ -114,14 +128,18 @@ let main argv = 0""" let mutable errors = "" let mutable cleanUp = true let projectDirectory = Path.Combine(Path.GetTempPath(), "CompilerAssert", Path.GetRandomFileName()) + let pathToFSharpCore = typeof.Assembly.Location try try Directory.CreateDirectory(projectDirectory) |> ignore let projectFileName = Path.Combine(projectDirectory, "ProjectFile.fsproj") let programFsFileName = Path.Combine(projectDirectory, "Program.fs") let frameworkReferencesFileName = Path.Combine(projectDirectory, "FrameworkReferences.txt") - - File.WriteAllText(projectFileName, projectFile) +#if NETCOREAPP + File.WriteAllText(projectFileName, projectFile.Replace("$TARGETFRAMEWORK", "netcoreapp3.1").Replace("$FSHARPCORELOCATION", pathToFSharpCore)) +#else + File.WriteAllText(projectFileName, projectFile.Replace("$TARGETFRAMEWORK", "net472").Replace("$FSHARPCORELOCATION", pathToFSharpCore)) +#endif File.WriteAllText(programFsFileName, programFs) let pInfo = ProcessStartInfo () @@ -133,13 +151,13 @@ let main argv = 0""" pInfo.UseShellExecute <- false let p = Process.Start(pInfo) - p.WaitForExit() + let succeeded = p.WaitForExit(10000) output <- p.StandardOutput.ReadToEnd () errors <- p.StandardError.ReadToEnd () if not (String.IsNullOrWhiteSpace errors) then Assert.Fail errors - if p.ExitCode <> 0 then Assert.Fail(sprintf "Program exited with exit code %d" p.ExitCode) + if p.ExitCode <> 0 || not succeeded then Assert.Fail(sprintf "Program exited with exit code %d" p.ExitCode) File.ReadLines(frameworkReferencesFileName) |> Seq.toArray with | e -> @@ -150,7 +168,6 @@ let main argv = 0""" finally if cleanUp then try Directory.Delete(projectDirectory) with | _ -> () -#endif #if FX_NO_APP_DOMAINS static let executeBuiltApp assembly deps = @@ -186,12 +203,12 @@ let main argv = 0""" ProjectFileName = "Z:\\test.fsproj" ProjectId = None SourceFiles = [|"test.fs"|] -#if NETCOREAPP OtherOptions = let assemblies = getNetCoreAppReferences |> Array.map (fun x -> sprintf "-r:%s" x) - Array.append [|"--preferreduilang:en-US"; "--targetprofile:netcore"; "--noframework";"--warn:5"|] assemblies +#if NETCOREAPP + Array.append [|"--preferreduilang:en-US"; "--targetprofile:netcore"; "--noframework"; "--simpleresolution"; "--warn:5"|] assemblies #else - OtherOptions = [|"--preferreduilang:en-US";"--warn:5"|] + Array.append [|"--preferreduilang:en-US"; "--targetprofile:mscorlib"; "--noframework"; "--warn:5"|] assemblies #endif ReferencedProjects = [||] IsIncompleteTypeCheckEnvironment = false @@ -210,7 +227,6 @@ let main argv = 0""" |> Array.append defaultProjectOptions.OtherOptions |> Array.append [| "fsc.exe"; inputFilePath; "-o:" + outputFilePath; (if isExe then "--target:exe" else "--target:library"); "--nowin32manifest" |] let errors, _ = checker.Compile args |> Async.RunSynchronously - errors, outputFilePath static let compileAux isExe options source f : unit = @@ -260,8 +276,10 @@ let main argv = 0""" Array.zip errors expectedErrors |> Array.iter (fun (actualError, expectedError) -> - let (expectedSeverity, expectedErrorNumber, expectedErrorRange, expectedErrorMsg) = expectedError - let (actualSeverity, actualErrorNumber, actualErrorRange, actualErrorMsg) = actualError + let (expectedSeverity, expectedErrorNumber, expectedErrorRange, expectedErrorMsg: string) = expectedError + let (actualSeverity, actualErrorNumber, actualErrorRange, actualErrorMsg: string) = actualError + let expectedErrorMsg = expectedErrorMsg.Replace("\r\n", "\n") + let actualErrorMsg = actualErrorMsg.Replace("\r\n", "\n") checkEqual "Severity" expectedSeverity actualSeverity checkEqual "ErrorNumber" expectedErrorNumber actualErrorNumber checkEqual "ErrorRange" expectedErrorRange actualErrorRange @@ -370,6 +388,74 @@ let main argv = 0""" Directory.CreateDirectory(compileDirectory) |> ignore compileCompilationAux compileDirectory (ResizeArray()) false cmpl + static let executeBuiltAppAndReturnResult (outputFilePath: string) (deps: string list) : (int * string * string) = + let out = Console.Out + let err = Console.Error + + let stdout = StringBuilder () + let stderr = StringBuilder () + + let outWriter = new StringWriter (stdout) + let errWriter = new StringWriter (stderr) + + let mutable exitCode = 0 + + try + try + Console.SetOut(outWriter) + Console.SetError(errWriter) + (executeBuiltApp outputFilePath deps) |> ignore + with e -> + let errorMessage = if e.InnerException <> null then (e.InnerException.ToString()) else (e.ToString()) + stderr.Append (errorMessage) |> ignore + exitCode <- -1 + finally + Console.SetOut(out) + Console.SetError(err) + outWriter.Close() + errWriter.Close() + + (exitCode, stdout.ToString(), stderr.ToString()) + + static let executeBuiltAppNewProcessAndReturnResult (outputFilePath: string) : (int * string * string) = + let mutable pinfo = ProcessStartInfo() + pinfo.RedirectStandardError <- true + pinfo.RedirectStandardOutput <- true +#if !NETCOREAPP + pinfo.FileName <- outputFilePath +#else + pinfo.FileName <- "dotnet" + pinfo.Arguments <- outputFilePath + + let runtimeconfig = """ +{ + "runtimeOptions": { + "tfm": "netcoreapp3.1", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "3.1.0" + } + } +}""" + let runtimeconfigPath = Path.ChangeExtension(outputFilePath, ".runtimeconfig.json") + File.WriteAllText(runtimeconfigPath, runtimeconfig) + use _disposal = + { new IDisposable with + member _.Dispose() = try File.Delete runtimeconfigPath with | _ -> () } +#endif + pinfo.UseShellExecute <- false + let p = Process.Start pinfo + + let output = p.StandardOutput.ReadToEnd() + let errors = p.StandardError.ReadToEnd() + + let exited = p.WaitForExit(120000) + + let exitCode = if not exited then -2 else p.ExitCode + + (exitCode, output, errors) + + static member CompileWithErrors(cmpl: Compilation, expectedErrors, ?ignoreWarnings) = let ignoreWarnings = defaultArg ignoreWarnings false lock gate (fun () -> @@ -382,6 +468,13 @@ let main argv = 0""" static member CompileRaw(cmpl: Compilation) = lock gate (fun () -> returnCompilation cmpl) + static member ExecuteAndReturnResult (outputFilePath: string, deps: string list, newProcess: bool) = + // If we execute in-process (true by default), then the only way of getting STDOUT is to redirect it to SB, and STDERR is from catching an exception. + if not newProcess then + executeBuiltAppAndReturnResult outputFilePath deps + else + executeBuiltAppNewProcessAndReturnResult outputFilePath + static member Execute(cmpl: Compilation, ?ignoreWarnings, ?beforeExecute, ?newProcess, ?onOutput) = let ignoreWarnings = defaultArg ignoreWarnings false let beforeExecute = defaultArg beforeExecute (fun _ _ -> ()) @@ -392,40 +485,8 @@ let main argv = 0""" assertErrors 0 ignoreWarnings errors [||] beforeExecute outputFilePath deps if newProcess then - let mutable pinfo = ProcessStartInfo() - pinfo.RedirectStandardError <- true - pinfo.RedirectStandardOutput <- true -#if !NETCOREAPP - pinfo.FileName <- outputFilePath -#else - pinfo.FileName <- "dotnet" - pinfo.Arguments <- outputFilePath - - let runtimeconfig = - """ -{ - "runtimeOptions": { - "tfm": "netcoreapp3.1", - "framework": { - "name": "Microsoft.NETCore.App", - "version": "3.1.0" - } - } -} - """ - - let runtimeconfigPath = Path.ChangeExtension(outputFilePath, ".runtimeconfig.json") - File.WriteAllText(runtimeconfigPath, runtimeconfig) - use _disposal = - { new IDisposable with - member _.Dispose() = try File.Delete runtimeconfigPath with | _ -> () } -#endif - pinfo.UseShellExecute <- false - let p = Process.Start pinfo - let errors = p.StandardError.ReadToEnd() - let output = p.StandardOutput.ReadToEnd() - Assert.True(p.WaitForExit(120000)) - if p.ExitCode <> 0 then + let (exitCode, output, errors) = executeBuiltAppNewProcessAndReturnResult outputFilePath + if exitCode <> 0 then Assert.Fail errors onOutput output else @@ -592,7 +653,7 @@ let main argv = 0""" #if NETCOREAPP let args = Array.append argv [|"--noninteractive"; "--targetprofile:netcore"|] #else - let args = Array.append argv [|"--noninteractive"|] + let args = Array.append argv [|"--noninteractive"; "--targetprofile:mscorlib"|] #endif let allArgs = Array.append args options @@ -620,13 +681,13 @@ let main argv = 0""" static member RunScript source expectedErrorMessages = CompilerAssert.RunScriptWithOptions [||] source expectedErrorMessages - static member Run (exe: string) = - executeBuiltApp exe [] - - static member ParseWithErrors (source: string) expectedParseErrors = + static member Parse (source: string) = let sourceFileName = "test.fs" let parsingOptions = { FSharpParsingOptions.Default with SourceFiles = [| sourceFileName |] } - let parseResults = checker.ParseFile(sourceFileName, SourceText.ofString source, parsingOptions) |> Async.RunSynchronously + checker.ParseFile(sourceFileName, SourceText.ofString source, parsingOptions) |> Async.RunSynchronously + + static member ParseWithErrors (source: string) expectedParseErrors = + let parseResults = CompilerAssert.Parse source Assert.True(parseResults.ParseHadErrors) diff --git a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj index 3d97f8aea6..d0f3798bbc 100644 --- a/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj +++ b/tests/FSharp.Test.Utilities/FSharp.Test.Utilities.fsproj @@ -25,6 +25,8 @@ + + @@ -35,17 +37,43 @@ - - - - - - - - - - + + + + + + + + + + + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + diff --git a/tests/FSharp.Test.Utilities/TestFramework.fs b/tests/FSharp.Test.Utilities/TestFramework.fs index 7650ee3816..1bb9dcdb45 100644 --- a/tests/FSharp.Test.Utilities/TestFramework.fs +++ b/tests/FSharp.Test.Utilities/TestFramework.fs @@ -94,10 +94,10 @@ module Commands = #endif let csc exec cscExe flags srcFiles = - exec cscExe (sprintf "%s %s" flags (srcFiles |> Seq.ofList |> String.concat " ")) + exec cscExe (sprintf "%s %s /reference:netstandard.dll" flags (srcFiles |> Seq.ofList |> String.concat " ")) let vbc exec vbcExe flags srcFiles = - exec vbcExe (sprintf "%s %s" flags (srcFiles |> Seq.ofList |> String.concat " ")) + exec vbcExe (sprintf "%s %s /reference:netstandard.dll" flags (srcFiles |> Seq.ofList |> String.concat " ")) let fsi exec fsiExe flags sources = exec fsiExe (sprintf "%s %s" flags (sources |> Seq.ofList |> String.concat " ")) @@ -202,7 +202,7 @@ let config configurationName envVars = #if NET472 let fscArchitecture = "net472" let fsiArchitecture = "net472" - let fsharpCoreArchitecture = "net45" + let fsharpCoreArchitecture = "netstandard2.0" let fsharpBuildArchitecture = "net472" let fsharpCompilerInteractiveSettingsArchitecture = "net472" let peverifyArchitecture = "net472" diff --git a/tests/FSharp.Test.Utilities/Utilities.fs b/tests/FSharp.Test.Utilities/Utilities.fs index 9db412a136..fe192cce0e 100644 --- a/tests/FSharp.Test.Utilities/Utilities.fs +++ b/tests/FSharp.Test.Utilities/Utilities.fs @@ -18,7 +18,28 @@ module Utilities = [] type TargetFramework = | NetStandard20 - | NetCoreApp30 + | NetCoreApp31 + + let private getResourceStream name = + let assembly = typeof.GetTypeInfo().Assembly + + let stream = assembly.GetManifestResourceStream(name); + + match stream with + | null -> failwith (sprintf "Resource '%s' not found in %s." name assembly.FullName) + | _ -> stream + + let private getResourceBlob name = + use stream = getResourceStream name + let (bytes: byte[]) = Array.zeroCreate (int stream.Length) + use memoryStream = new MemoryStream (bytes) + stream.CopyTo(memoryStream) + bytes + + let private getOrCreateResource (resource: byref) (name: string) = + match resource with + | null -> getResourceBlob name + | _ -> resource module private TestReferences = [] @@ -29,15 +50,29 @@ module Utilities = let systemCoreRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netstandard20.System_Core).GetReference(display = "System.Core.dll (netstandard 2.0 ref)") let systemDynamicRuntimeRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netstandard20.System_Dynamic_Runtime).GetReference(display = "System.Dynamic.Runtime.dll (netstandard 2.0 ref)") - [] - module NetCoreApp30 = - let netStandard = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netcoreapp30.netstandard).GetReference(display = "netstandard.dll (netcoreapp 3.0 ref)") - let mscorlibRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netcoreapp30.mscorlib).GetReference(display = "mscorlib.dll (netcoreapp 3.0 ref)") - let systemRuntimeRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netcoreapp30.System_Runtime).GetReference(display = "System.Runtime.dll (netcoreapp 3.0 ref)") - let systemCoreRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netcoreapp30.System_Core).GetReference(display = "System.Core.dll (netcoreapp 3.0 ref)") - let systemDynamicRuntimeRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netcoreapp30.System_Dynamic_Runtime).GetReference(display = "System.Dynamic.Runtime.dll (netcoreapp 3.0 ref)") - let systemConsoleRef = lazy AssemblyMetadata.CreateFromImage(TestResources.NetFX.netcoreapp30.System_Console).GetReference(display = "System.Console.dll (netcoreapp 3.0 ref)") + module private NetCoreApp31Refs = + let mutable (_mscorlib: byte[]) = Unchecked.defaultof + let mutable (_netstandard: byte[]) = Unchecked.defaultof + let mutable (_System_Console: byte[]) = Unchecked.defaultof + let mutable (_System_Core: byte[]) = Unchecked.defaultof + let mutable (_System_Dynamic_Runtime: byte[]) = Unchecked.defaultof + let mutable (_System_Runtime: byte[]) = Unchecked.defaultof + let mscorlib () = getOrCreateResource &_mscorlib "mscorlib.dll" + let netstandard () = getOrCreateResource &_netstandard "netstandard.dll" + let System_Core () = getOrCreateResource &_System_Core "System.Core.dll" + let System_Console () = getOrCreateResource &_System_Console "System.Console.dll" + let System_Runtime () = getOrCreateResource &_System_Runtime "System.Runtime.dll" + let System_Dynamic_Runtime () = getOrCreateResource &_System_Dynamic_Runtime "System.Dynamic.Runtime.dll" + + [] + module NetCoreApp31 = + let netStandard = lazy AssemblyMetadata.CreateFromImage(NetCoreApp31Refs.netstandard ()).GetReference(display = "netstandard.dll (netcoreapp 3.1 ref)") + let mscorlibRef = lazy AssemblyMetadata.CreateFromImage(NetCoreApp31Refs.mscorlib ()).GetReference(display = "mscorlib.dll (netcoreapp 3.1 ref)") + let systemRuntimeRef = lazy AssemblyMetadata.CreateFromImage(NetCoreApp31Refs.System_Runtime ()).GetReference(display = "System.Runtime.dll (netcoreapp 3.1 ref)") + let systemCoreRef = lazy AssemblyMetadata.CreateFromImage(NetCoreApp31Refs.System_Core ()).GetReference(display = "System.Core.dll (netcoreapp 3.1 ref)") + let systemDynamicRuntimeRef = lazy AssemblyMetadata.CreateFromImage(NetCoreApp31Refs.System_Dynamic_Runtime ()).GetReference(display = "System.Dynamic.Runtime.dll (netcoreapp 3.1 ref)") + let systemConsoleRef = lazy AssemblyMetadata.CreateFromImage(NetCoreApp31Refs.System_Console ()).GetReference(display = "System.Console.dll (netcoreapp 3.1 ref)") [] module internal TargetFrameworkUtil = @@ -46,13 +81,13 @@ module Utilities = let private netStandard20References = lazy ImmutableArray.Create(NetStandard20.netStandard.Value, NetStandard20.mscorlibRef.Value, NetStandard20.systemRuntimeRef.Value, NetStandard20.systemCoreRef.Value, NetStandard20.systemDynamicRuntimeRef.Value) - let private netCoreApp30References = - lazy ImmutableArray.Create(NetCoreApp30.netStandard.Value, NetCoreApp30.mscorlibRef.Value, NetCoreApp30.systemRuntimeRef.Value, NetCoreApp30.systemCoreRef.Value, NetCoreApp30.systemDynamicRuntimeRef.Value, NetCoreApp30.systemConsoleRef.Value) + let private netCoreApp31References = + lazy ImmutableArray.Create(NetCoreApp31.netStandard.Value, NetCoreApp31.mscorlibRef.Value, NetCoreApp31.systemRuntimeRef.Value, NetCoreApp31.systemCoreRef.Value, NetCoreApp31.systemDynamicRuntimeRef.Value, NetCoreApp31.systemConsoleRef.Value) let internal getReferences tf = match tf with | TargetFramework.NetStandard20 -> netStandard20References.Value - | TargetFramework.NetCoreApp30 -> netCoreApp30References.Value + | TargetFramework.NetCoreApp31 -> netCoreApp31References.Value type RoslynLanguageVersion = LanguageVersion diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticLinkTests.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticLinkTests.fs index b4c1140922..b2a43d8a3f 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticLinkTests.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/StaticLinkTests.fs @@ -236,9 +236,7 @@ let _ = List.iter (fun s -> eprintf "%s" s) ["hello"; " "; "world"] let _ = eprintfn "%s" "." let _ = exit 0 """ - let module1 = Compilation.Create(source, Fsx, Exe, [|"--standalone"|]) - CompilerAssert.Execute(module1, newProcess=true) [] diff --git a/tests/fsharp/Compiler/Language/ByrefTests.fs b/tests/fsharp/Compiler/Language/ByrefTests.fs index 92a45f3a0b..4340517710 100644 --- a/tests/fsharp/Compiler/Language/ByrefTests.fs +++ b/tests/fsharp/Compiler/Language/ByrefTests.fs @@ -224,19 +224,19 @@ open Example type MyClass() = interface IMessageReader with - member this.TryParseMessage(input: inref): bool = + member this.TryParseMessage(input: inref): bool = failwith "Not Implemented" """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(cs, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(cs, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = Compilation.Create(fs, Fsx, Library, cmplRefs = [csCmpl]) CompilerAssert.Compile fsCmpl - + #endif [] diff --git a/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs b/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs index d64067ddfa..791fd89213 100644 --- a/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs +++ b/tests/fsharp/Compiler/Language/DefaultInterfaceMemberTests.fs @@ -129,7 +129,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -169,7 +169,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -217,7 +217,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -259,7 +259,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -308,7 +308,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -356,7 +356,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -406,7 +406,7 @@ let f () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -457,7 +457,7 @@ let f () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -494,7 +494,7 @@ let f () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -531,7 +531,7 @@ let f () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -572,7 +572,7 @@ let f1 () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -622,7 +622,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -677,7 +677,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -758,7 +758,7 @@ let main _ = // Explicitly implementing a protected DIM is allowed in F# 4.6. let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -857,7 +857,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -933,7 +933,7 @@ type Test2 () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1071,7 +1071,7 @@ let f () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1121,7 +1121,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1171,7 +1171,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1221,7 +1221,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1295,7 +1295,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1358,7 +1358,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1433,7 +1433,7 @@ let f () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1513,7 +1513,7 @@ type Test2 () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1566,7 +1566,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1615,7 +1615,7 @@ let f () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1665,7 +1665,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1722,7 +1722,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1761,7 +1761,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1804,7 +1804,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1843,7 +1843,7 @@ let test = { new ITest } """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1898,7 +1898,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -1946,7 +1946,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -2006,7 +2006,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -2074,7 +2074,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -2157,7 +2157,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -2235,7 +2235,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -2313,7 +2313,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -2385,7 +2385,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -2451,7 +2451,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -2540,7 +2540,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -2610,7 +2610,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -2689,7 +2689,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -2751,7 +2751,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -2840,7 +2840,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -2965,7 +2965,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -3076,7 +3076,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -3188,7 +3188,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -3304,7 +3304,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -3410,7 +3410,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -3513,7 +3513,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -3612,7 +3612,7 @@ type Test2 () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -3659,7 +3659,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -3706,7 +3706,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -3769,7 +3769,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -3836,7 +3836,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -3884,7 +3884,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -3939,7 +3939,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4004,7 +4004,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4094,7 +4094,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4172,7 +4172,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4269,7 +4269,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4364,7 +4364,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4451,7 +4451,7 @@ type Test () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4501,7 +4501,7 @@ let test = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4564,7 +4564,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4620,7 +4620,7 @@ let main _ = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4684,7 +4684,7 @@ f () """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4744,7 +4744,7 @@ f3 () """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4789,7 +4789,7 @@ let f () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4839,7 +4839,7 @@ let f () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4889,7 +4889,7 @@ let f () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -4942,7 +4942,7 @@ let f () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = @@ -5038,7 +5038,7 @@ let f () = """ let csCmpl = - CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(csharpSource, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create let fsCmpl = diff --git a/tests/fsharp/Compiler/Language/InterfaceTests.fs b/tests/fsharp/Compiler/Language/InterfaceTests.fs index 7f5136e3e8..f3601ebe0a 100644 --- a/tests/fsharp/Compiler/Language/InterfaceTests.fs +++ b/tests/fsharp/Compiler/Language/InterfaceTests.fs @@ -18,11 +18,11 @@ module InterfaceTests = CompilerAssert.Pass """ type IGet<'T> = abstract member Get : unit -> 'T - + type GetTuple() = interface IGet with member x.Get() = 1, 2 - + type GetFunction() = interface IGetint> with member x.Get() = fun () -> 1 @@ -73,7 +73,7 @@ type AStructRecord = { Forename:string; Surname:string } type AClass = val value: int - + new(value) = { value = value } type IInterface<'a> = @@ -170,7 +170,7 @@ assertion (fun (x:float) -> x * 3.0) (fun v -> #if NETSTANDARD let csCmpl = - CompilationUtil.CreateCSharpCompilation(``C# base with dim``, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp30) + CompilationUtil.CreateCSharpCompilation(``C# base with dim``, CSharpLanguageVersion.CSharp8, TargetFramework.NetCoreApp31) |> CompilationReference.Create #endif @@ -178,7 +178,7 @@ assertion (fun (x:float) -> x * 3.0) (fun v -> Compilation.Create( ``Many Instantiations of the same interface - SetUp`` + ``Many Instantiations of the same interface - Asserts``, - Fs, Library, + Fs, Library, options = [| "--langversion:preview"; #if !NETSTANDARD @@ -210,7 +210,7 @@ assertion (fun (x:float) -> x * 3.0) (fun v -> let MultipleTypedInterfacesFSharp50VerifyIl() = CompilerAssert.CompileLibraryAndVerifyILWithOptions [| - "--langversion:preview"; + "--langversion:preview"; "--deterministic+"; "--define:NO_ANONYMOUS"; #if NETSTANDARD diff --git a/tests/fsharp/Compiler/Language/StringInterpolation.fs b/tests/fsharp/Compiler/Language/StringInterpolation.fs new file mode 100644 index 0000000000..83ea5c1407 --- /dev/null +++ b/tests/fsharp/Compiler/Language/StringInterpolation.fs @@ -0,0 +1,846 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.UnitTests + +open NUnit.Framework +open FSharp.Compiler.SourceCodeServices +open FSharp.Test.Utilities + +[] +module StringInterpolationTests = + + let SimpleCheckTest text = + CompilerAssert.CompileExeAndRunWithOptions [| "--langversion:preview" |] (""" +let check msg a b = + if a = b then printfn "test case '%s' succeeded" msg else failwithf "test case '%s' failed, expected %A, got %A" msg b a + +""" + text) + + [] + let ``Basic string interpolation`` () = + SimpleCheckTest + """ +check "basic-string-interp1" $"this is 2" "this is 2" + +check "basic-string-interp2" $"this is {1} + 1 = 2" "this is 1 + 1 = 2" + +check "basic-string-interp3" $"this is {1} + {1+1} = 3" "this is 1 + 2 = 3" + +check "basic-string-interp4" $"this is {1} + {1+1}" "this is 1 + 2" + +check "basic-string-interp5" $"this is {1}" "this is 1" + +check "basic-string-interp6" $"123{456}789{012}345" "12345678912345" + +check "basic-string-interp7" $"this is {1} {2} {3} {4} {5} {6} {7}" "this is 1 2 3 4 5 6 7" + +check "basic-string-interp8" $"this is {7} {6} {5} {4} {3} {2} {1}" "this is 7 6 5 4 3 2 1" + +check "basic-string-interp9" $"{1} +{2}" "1 +2" + """ + + [] + let ``Neighbouring specifiers for string interpolation`` () = + SimpleCheckTest + """ +check "nbr-interp71" $"this is {1} {2} {3} {4} {5} {6} {7}" "this is 1 2 3 4 5 6 7" +check "nbr-interp7b2" $"this is {1}{2}{3}{4}{5}{6}{7}" "this is 1234567" +check "nbr-interp7c3" $"this is {1}{2}{3}{4}{5}{6}" "this is 123456" +check "nbr-interp7c4" $"this is {1}{2}{3}{4}{5}" "this is 12345" +check "nbr-interp7c5" $"this is {1}{2}{3}{4}" "this is 1234" +check "nbr-interp7c6" $"this is {1}{2}{3} {4}" "this is 123 4" +check "nbr-interp7c7" $"this is {1}{2} {3} {4}" "this is 12 3 4" +check "nbr-interp7c8" $"this is {1}{2} {3}{4}" "this is 12 34" +check "nbr-interp7c9" $"this is {1}{2}{3}" "this is 123" +check "nbr-interp7cq" $"this is {1} {2}{3}" "this is 1 23" +check "nbr-interp7cw" $"this is {1}{2} {3}" "this is 12 3" +check "nbr-interp7ce" $"this is {1}{2}" "this is 12" + +check "nbr-interp7r" $"this is %d{1} {2} {3} {4} {5} {6} {7}" "this is 1 2 3 4 5 6 7" +check "nbr-interp7bt" $"this is %d{1}{2}{3}{4}{5}{6}{7}" "this is 1234567" +check "nbr-interp7cy" $"this is %d{1}{2}{3}{4}{5}{6}" "this is 123456" +check "nbr-interp7cu" $"this is %d{1}{2}{3}{4}{5}" "this is 12345" +check "nbr-interp7ci" $"this is %d{1}{2}{3}{4}" "this is 1234" +check "nbr-interp7co" $"this is %d{1}{2}{3} {4}" "this is 123 4" +check "nbr-interp7cp" $"this is %d{1}{2} {3} {4}" "this is 12 3 4" +check "nbr-interp7ca" $"this is %d{1}{2} {3}{4}" "this is 12 34" +check "nbr-interp7cs" $"this is %d{1}{2}{3}" "this is 123" +check "nbr-interp7cd" $"this is %d{1} {2}{3}" "this is 1 23" +check "nbr-interp7cf" $"this is %d{1}{2} {3}" "this is 12 3" +check "nbr-interp7cg" $"this is %d{1}{2}" "this is 12" + +check "nbr-interp7h" $"this is %d{1} %d{2} {3} {4} {5} {6} {7}" "this is 1 2 3 4 5 6 7" +check "nbr-interp7bj" $"this is %d{1}%d{2}{3}{4}{5}{6}{7}" "this is 1234567" +check "nbr-interp7ck" $"this is %d{1}%d{2}{3}{4}{5}{6}" "this is 123456" +check "nbr-interp7cl" $"this is %d{1}%d{2}{3}{4}{5}" "this is 12345" +check "nbr-interp7cz" $"this is %d{1}%d{2}{3}{4}" "this is 1234" +check "nbr-interp7cx" $"this is %d{1}%d{2}{3} {4}" "this is 123 4" +check "nbr-interp7cc" $"this is %d{1}%d{2} {3} {4}" "this is 12 3 4" +check "nbr-interp7cv" $"this is %d{1}%d{2} {3}{4}" "this is 12 34" +check "nbr-interp7cb" $"this is %d{1}%d{2}{3}" "this is 123" +check "nbr-interp7cn" $"this is %d{1} %d{2}{3}" "this is 1 23" +check "nbr-interp7cm" $"this is %d{1}%d{2} {3}" "this is 12 3" +check "nbr-interp7cp" $"this is %d{1}%d{2}" "this is 12" + +check "nbr-interp7" $"this is %d{1} %d{2} %d{3} {4} {5} {6} {7}" "this is 1 2 3 4 5 6 7" +check "nbr-interp7b" $"this is %d{1}%d{2}%d{3}{4}{5}{6}{7}" "this is 1234567" +check "nbr-interp7c" $"this is %d{1}%d{2}%d{3}{4}{5}{6}" "this is 123456" +check "nbr-interp7c" $"this is %d{1}%d{2}%d{3}{4}{5}" "this is 12345" +check "nbr-interp7c" $"this is %d{1}%d{2}%d{3}{4}" "this is 1234" +check "nbr-interp7c" $"this is %d{1}%d{2}%d{3} {4}" "this is 123 4" +check "nbr-interp7c" $"this is %d{1}%d{2} %d{3} {4}" "this is 12 3 4" +check "nbr-interp7c" $"this is %d{1}%d{2} %d{3}{4}" "this is 12 34" +check "nbr-interp7c" $"this is %d{1}%d{2}%d{3}" "this is 123" +check "nbr-interp7c" $"this is %d{1} %d{2}%d{3}" "this is 1 23" +check "nbr-interp7c" $"this is %d{1}%d{2} %d{3}" "this is 12 3" +check "nbr-interp7c" $"this is %d{1}%d{2}" "this is 12" + """ + + [] + let ``Basic string interpolation verbatim strings`` () = + SimpleCheckTest + """ +check "basic-string-interp-triple1" @$"this is 2" "this is 2" + +check "basic-string-interp-verbatim2" @$"this is {1} + 1 = 2" "this is 1 + 1 = 2" + +check "basic-string-interp-verbatim3" @$"this is {1} + {1+1} = 3" "this is 1 + 2 = 3" + +check "basic-string-interp-verbatim4" @$"this is {1} + {1+1}" "this is 1 + 2" + +check "basic-string-interp-verbatim5" @$"this is {1}" "this is 1" + +check "basic-string-interp-verbatim6" @$"this i\s {1}" "this i\s 1" + +check "basic-string-interp-verbatim1b" $@"this is 2" "this is 2" + +check "basic-string-interp-verbatim2b" $@"this is {1} + 1 = 2" "this is 1 + 1 = 2" + +check "basic-string-interp-verbatim3b" $@"this is {1} + {1+1} = 3" "this is 1 + 2 = 3" + +check "basic-string-interp-verbatim4b" $@"this is {1} + {1+1}" "this is 1 + 2" + +check "basic-string-interp-verbatim5b" $@"this is {1}" "this is 1" + +check "basic-string-interp-verbatim6b" $@"this i\s {1}" "this i\s 1" + + """ + + [] + let ``Basic string interpolation triple quote strings`` () = + SimpleCheckTest + " +check \"basic-string-interp-triple1\" $\"\"\"this is 2\"\"\" \"this is 2\" + +check \"basic-string-interp-triple2\" $\"\"\"this is {1} + 1 = 2\"\"\" \"this is 1 + 1 = 2\" + +check \"basic-string-interp-triple3\" $\"\"\"this is {1} + {1+1} = 3\"\"\" \"this is 1 + 2 = 3\" + +check \"basic-string-interp-triple4\" $\"\"\"this is {1} + {1+1}\"\"\" \"this is 1 + 2\" + +check \"basic-string-interp-triple5\" $\"\"\"this is {1}\"\"\" \"this is 1\" + +check \"basic-string-interp-triple6\" $\"\"\"this i\s {1}\"\"\" \"this i\s 1\" + +// check nested string with %s +check \"basic-string-interp-triple7\" $\"\"\"x = %s{\"1\"}\"\"\" \"x = 1\" + +// multiline +check \"basic-string-interp-triple8\" + $\"\"\"this +is {1+1}\"\"\" + \"\"\"this +is 2\"\"\" + " + + [] + let ``String interpolation using atomic expression forms`` () = + SimpleCheckTest + """ +let x = 12 +let s = "sixsix" + +check "vcewwei4" $"this is %d{1} + {1+1+3} = 6" "this is 1 + 5 = 6" + +check "vcewwei5" $"this is 0x%08x{x} + {1+1} = 14" "this is 0x0000000c + 2 = 14" + +// Check dot notation +check "vcewwei6" $"this is {s.Length} + {1+1} = 8" "this is 6 + 2 = 8" + +// Check null expression +check "vcewwei8" $"abc{null}def" "abcdef" + +// Check mod operator +check "vcewwei8" $"abc{4%3}def" "abc1def" + + """ + + + [] + let ``String interpolation using nested control flow expressions`` () = + SimpleCheckTest + """ +let x = 12 +let s = "sixsix" + +// Check let expression +check "string-interp-nested7" $"abc {let x = 3 in x + x} def" "abc 6 def" + +// Check if expression (parenthesized) +check "string-interp-nested9" $"abc{(if true then 3 else 4)}def" "abc3def" + +// Check if-then-else expression (un-parenthesized) +check "string-interp-nested10" $"abc{if true then 3 else 4}def" "abc3def" + +// Check two if-then-else expression (un-parenthesized) +check "string-interp-nested11" $"abc{if true then 3 else 4}def{if false then 3 else 4}xyz" "abc3def4xyz" + +// Check two if-then-else expression (un-parenthesized, first split) +check "string-interp-nested12" + $"abc{if true then 3 + else 4}def{if false then 3 else 4}xyz" "abc3def4xyz" + +// Check two if-then-else expression (un-parenthesized, second split) +check "string-interp-nested13" + $"abc{if true then 3 else 4}def{if false then 3 + else 4}xyz" "abc3def4xyz" + +// Check two if-then-else expression (un-parenthesized, both split) +check "string-interp-nested14" + $"abc{if true then 3 + else 4}def{if false then 3 + else 4}xyz" "abc3def4xyz" + +// Check if-then expression (un-parenthesized) +check "string-interp-nested15" $"abc{if true then ()}def" "abcdef" + +// Check two if-then expression (un-parenthesized) +check "string-interp-nested16" $"abc{if true then ()}def{if true then ()}xyz" "abcdefxyz" + +// Check multi-line let with parentheses +check "string-interp-nested17" + $"abc {(let x = 3 + x + x)} def" + "abc 6 def" + +// Check multi-line let without parentheses +check "string-interp-nested18" + $"abc {let x = 3 + x + x} def" + "abc 6 def" + +// Check multi-line let without parentheses (two) +check "string-interp-nested19" + $"abc {let x = 3 + x + x} def {let x = 3 + x + x} xyz" + "abc 6 def 6 xyz" + +// Check while expression (un-parenthesized) +check "vcewweh17" $"abc{while false do ()}def" "abcdef" + + """ + + + + [] + let ``String interpolation using nested string`` () = + SimpleCheckTest + " +// check nested string +check \"vcewweh22m1\" $\"\"\"x = {\"1\"} \"\"\" \"x = 1 \" + +check \"vcewweh22m2\" $\"\"\"x = {$\"\"} \"\"\" \"x = \" + +do + let genreSpecified = true + let getGenre() = \"comedy\" + check \"vcewweh22m6\" $\"\"\"/api/movie/{if not genreSpecified then \"\" else $\"q?genre={getGenre()}\"}\"\"\" \"/api/movie/q?genre=comedy\" + +" + + [] + let ``Triple quote string interpolation using nested string`` () = + SimpleCheckTest + " +do + let itvar=\"i\" + let iterfrom=\"0\" + let iterto=\"100\" + let block= $\"\"\"printf(\"%%d\", {itvar}); + do({itvar});\"\"\" + check \"vcewweh22m7\" $\"\"\" +for({itvar}={iterfrom};{itvar}<{iterto};++{itvar}) {{ + {block} +}}\"\"\" \"\"\" +for(i=0;i<100;++i) { + printf(\"%d\", i); + do(i); +}\"\"\" +" + + [] + let ``Mixed quote string interpolation using nested string`` () = + SimpleCheckTest + " + +check \"vcewweh22n1\" + $\"\"\" + PROCEDURE SEARCH; + BEGIN + END;\"\"\" + \"\"\" + PROCEDURE SEARCH; + BEGIN + END;\"\"\" + +check \"vcewweh22n2\" + $\"\"\" + PROCEDURE SEARCH; + BEGIN + WRITELN({ $\"{21+21}\" }); + END;\"\"\" + \"\"\" + PROCEDURE SEARCH; + BEGIN + WRITELN(42); + END;\"\"\" +" + + [] + let ``String interpolation to FormattableString`` () = + SimpleCheckTest + """ +open System +open System.Globalization + +let fmt (x: FormattableString) = x.ToString() +let fmt_us (x: FormattableString) = x.ToString(CultureInfo("en-US")) +let fmt_de (x: FormattableString) = x.ToString(CultureInfo("de-DE")) + +check "fwejwflpej1" (fmt $"") "" +check "fwejwflpej2" (fmt $"abc") "abc" +check "fwejwflpej3" (fmt $"abc{1}") "abc1" +check "fwejwflpej6" (fmt_us $"abc {30000} def") "abc 30000 def" +check "fwejwflpej7" (fmt_de $"abc {30000} def") "abc 30000 def" +check "fwejwflpej8" (fmt_us $"abc {30000:N} def") "abc 30,000.00 def" +check "fwejwflpej9" (fmt_de $"abc {30000:N} def") "abc 30.000,00 def" +check "fwejwflpej10" (fmt_us $"abc {30000} def {40000} hij") "abc 30000 def 40000 hij" +check "fwejwflpej11" (fmt_us $"abc {30000,-10} def {40000} hij") "abc 30000 def 40000 hij" +check "fwejwflpej12" (fmt_us $"abc {30000,10} def {40000} hij") "abc 30000 def 40000 hij" +check "fwejwflpej13" (fmt_de $"abc {30000} def {40000} hij") "abc 30000 def 40000 hij" +check "fwejwflpej14" (fmt_us $"abc {30000:N} def {40000:N} hij") "abc 30,000.00 def 40,000.00 hij" +check "fwejwflpej15" (fmt_de $"abc {30000:N} def {40000:N} hij") "abc 30.000,00 def 40.000,00 hij" +check "fwejwflpej16" (fmt_de $"abc {30000,10:N} def {40000:N} hij") "abc 30.000,00 def 40.000,00 hij" +check "fwejwflpej17" (fmt_de $"abc {30000,-10:N} def {40000:N} hij") "abc 30.000,00 def 40.000,00 hij" + + """ + + [] + let ``String interpolation to IFormattable`` () = + SimpleCheckTest + """ +open System +open System.Globalization + +let fmt (x: IFormattable) = x.ToString() +let fmt_us (x: IFormattable) = x.ToString("", CultureInfo("en-US")) +let fmt_de (x: IFormattable) = x.ToString("", CultureInfo("de-DE")) + +check "fwejwflpej1" (fmt $"") "" +check "fwejwflpej2" (fmt $"abc") "abc" +check "fwejwflpej3" (fmt $"abc{1}") "abc1" +check "fwejwflpej6" (fmt_us $"abc {30000} def") "abc 30000 def" +check "fwejwflpej7" (fmt_de $"abc {30000} def") "abc 30000 def" +check "fwejwflpej8" (fmt_us $"abc {30000:N} def") "abc 30,000.00 def" +check "fwejwflpej9" (fmt_de $"abc {30000:N} def") "abc 30.000,00 def" +check "fwejwflpej10" (fmt_us $"abc {30000} def {40000} hij") "abc 30000 def 40000 hij" +check "fwejwflpej11" (fmt_us $"abc {30000,-10} def {40000} hij") "abc 30000 def 40000 hij" +check "fwejwflpej12" (fmt_us $"abc {30000,10} def {40000} hij") "abc 30000 def 40000 hij" +check "fwejwflpej13" (fmt_de $"abc {30000} def {40000} hij") "abc 30000 def 40000 hij" +check "fwejwflpej14" (fmt_us $"abc {30000:N} def {40000:N} hij") "abc 30,000.00 def 40,000.00 hij" +check "fwejwflpej15" (fmt_de $"abc {30000:N} def {40000:N} hij") "abc 30.000,00 def 40.000,00 hij" +check "fwejwflpej16" (fmt_de $"abc {30000,10:N} def {40000:N} hij") "abc 30.000,00 def 40.000,00 hij" +check "fwejwflpej17" (fmt_de $"abc {30000,-10:N} def {40000:N} hij") "abc 30.000,00 def 40.000,00 hij" + + """ + + [] + let ``String interpolation to PrintFormat`` () = + SimpleCheckTest + """ +open System.Text +open Printf + +check "fwejwflpej1" (sprintf $"") "" +check "fwejwflpej2" (sprintf $"abc") "abc" +check "fwejwflpej3" (sprintf $"abc{1}") "abc1" + +let sb = StringBuilder() +bprintf sb $"{0}" +bprintf sb $"abc" +bprintf sb $"abc{1}" +check "fwejwflpej4" (sb.ToString()) "0abcabc1" + + """ + + + [] + let ``String interpolation using .NET Formats`` () = + SimpleCheckTest + """ +check "vcewweh221q" $"abc {1}" "abc 1" +check "vcewweh222w" $"abc {1:N3}" "abc 1.000" +check "vcewweh223e" $"abc {1,10}" "abc 1" +check "vcewweh223r" $"abc {1,-10}" "abc 1 " +check "vcewweh224t" $"abc {1,10:N3}" "abc 1.000" +check "vcewweh224y" $"abc {1,-10:N3}" "abc 1.000 " +check "vcewweh225u" $"abc %d{1}" "abc 1" +check "vcewweh225u" $"abc %5d{1}" "abc 1" +check "vcewweh225u" $"abc %-5d{1}" "abc 1 " + """ + + [] + let ``String interpolation of null`` () = + SimpleCheckTest + """ + +check "vcewweh221q1" $"{null}" "" +check "vcewweh221q2" $"%s{null}" "" +check "vcewweh221q3" $"abc %s{null}" "abc " +check "vcewweh221q4" $"abc %s{null} def" "abc def" + """ + + [] + let ``String interpolation of basic types`` () = + SimpleCheckTest + """ +check "vcewweh221q11" $"{1y}" "1" +check "vcewweh221q12" $"{1uy}" "1" +check "vcewweh221q13" $"{1s}" "1" +check "vcewweh221q14" $"{1us}" "1" +check "vcewweh221q15" $"{1u}" "1" +check "vcewweh221q16" $"{1}" "1" +check "vcewweh221q17" $"{-1}" "-1" +check "vcewweh221q18" $"{1L}" "1" +check "vcewweh221q19" $"{1UL}" "1" +check "vcewweh221q1q" $"{1n}" "1" +check "vcewweh221q1w" $"{1un}" "1" +check "vcewweh221q1e" $"{1.0}" "1" +check "vcewweh221q1r" $"{1.01}" "1.01" +check "vcewweh221q1t" $"{-1.01}" "-1.01" +check "vcewweh221q1y" $"{1I}" "1" +check "vcewweh221q1i" $"{1M}" "1" + +check "vcewweh221q1o" $"%d{1y}" "1" +check "vcewweh221q1p" $"%d{1uy}" "1" +check "vcewweh221q1a" $"%d{1s}" "1" +check "vcewweh221q1s" $"%d{1us}" "1" +check "vcewweh221q1d" $"%d{1u}" "1" +check "vcewweh221q1f" $"%d{1}" "1" +check "vcewweh221q1g" $"%d{-1}" "-1" +check "vcewweh221q1h" $"%d{1L}" "1" +check "vcewweh221q1j" $"%d{1UL}" "1" +check "vcewweh221q1k" $"%d{1n}" "1" +check "vcewweh221q1l" $"%d{1un}" "1" + +check "vcewweh221q1" $"%f{1.0}" "1.000000" + """ + [] + let ``String interpolation using escaped braces`` () = + SimpleCheckTest + """ +check "vcewweh226i" $"{{" "{" +check "vcewweh226o" $"{{{{" "{{" +check "vcewweh226p" $"{{{1}}}" "{1}" +check "vcewweh227a" $"}}" "}" +check "vcewweh227s" $"}}}}" "}}" +check "vcewweh228d" "{{" "{{" +check "vcewweh229f" "}}" "}}" + """ + + [] + let ``String interpolation using verbatim strings`` () = + SimpleCheckTest + """ +check "vcewweh226i" $"{{" "{" +check "vcewweh226o" $"{{{{" "{{" +check "vcewweh226p" $"{{{1}}}" "{1}" +check "vcewweh227a" $"}}" "}" +check "vcewweh227s" $"}}}}" "}}" +check "vcewweh228d" "{{" "{{" +check "vcewweh229f" "}}" "}}" + """ + + + [] + let ``String interpolation using record data`` () = + SimpleCheckTest + """ +type R = { X : int } +type R2 = { X : int ; Y: int } + +// Check record expression (parenthesized) +check "vcewweh18" $"abc{({contents=1}.contents)}def" "abc1def" + +// Check record expression (unparenthesized, spaced) +check "vcewweh19a" $"abc{ {X=1} }def" "abc{ X = 1 }def" + +check "vcewweh19b" $"abc{ {X=1} }def" "abc{ X = 1 }def" + +// Check record expression (unparenthesized, spaced ending in token brace then string hole brace) +check "vcewweh19v" $"abc{ {X=1}}def" "abc{ X = 1 }def" + +// Check thing that is not really a record expression (braces are escaped) +check "vcewweh20" $"abc{{X=1}}def" "abc{X=1}def" + +// Check thing that is not really a record expression (braces are escaped) +check "vcewweh20b" $"abc{{quack=1}}def" "abc{quack=1}def" + +// Check thing that is not really a record expression (braces are escaped) +check "vcewweh21" $"abc{{X=1; Y=2}}def" "abc{X=1; Y=2}def" + + """ + + + [] + let ``String interpolation using printf formats`` () = + SimpleCheckTest + """ +let x = 12 +let s = "sixsix" + +// check %A +check "vcewweh22" $"x = %A{1}" "x = 1" + +// check %d +check "vcewweh22b" $"x = %d{1}" "x = 1" + +// check %x +check "vcewweh22c" $"x = %x{1}" "x = 1" + +// check %o (octal) +check "vcewweh22d" $"x = %o{15}" "x = 17" + +// check %b +check "vcewweh22e" $"x = %b{true}" "x = true" + +// check %s +check "vcewweh22f" $"x = %s{s}" "x = sixsix" + +// check %A of string +check "vcewweh22g" $"x = %A{s}" "x = \"sixsix\"" + +check "vcewweh20" $"x = %A{1}" "x = 1" + + """ + + + [] + let ``String interpolation using list and array data`` () = + SimpleCheckTest + """ +// check unannotated of list +check "vcewweh22i" $"x = {[0..100]} " "x = [0; 1; 2; ... ] " + +let xs = [0..100] +// check unannotated of list +check "vcewweh22i" $"x = {xs} " "x = [0; 1; 2; ... ] " + +// check %A of list +check "vcewweh22h" $"x = %0A{[0..100]} " "x = [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; 99; ...] " + +// check unannotated of array +check "vcewweh22j" $"x = {[|0..100|]} " "x = System.Int32[] " + +let arr = [|0..100|] +// check unannotated of array +check "vcewweh22j" $"x = {arr} " "x = System.Int32[] " + +// check %0A of array +check "vcewweh22k" $"x = %0A{[|0..100|]} " "x = [|0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; 99; ...|] " + + """ + + + [] + let ``Quotations of interpolation`` () = + SimpleCheckTest + """ +check "vcewweh1" + ((<@ $"this {1} is 2" @>).ToString().Replace("\r","").Replace("\n","").Replace("\"","")) + "Call (None, PrintFormatToString, [NewObject (PrintfFormat`5, Value (this %P() is 2), NewArray (Object, Call (None, Box, [Value (1)])), Value ())])" + """ + + [] + let ``Quotations in interpolation`` () = + SimpleCheckTest + """ +check "check-quotation1" $"this {<@ 1 @>} is 2" "this Value (1) is 2" + """ + + [] + let ``Object expression in interpolation`` () = + SimpleCheckTest + """ +check "check-object-expression-in-interpolation1" + (let s = "AA" in $"this { {new System.Object() with member x.ToString() = s } } is 2") + "this AA is 2" + """ + + [] + let ``Exception handling in interpolation`` () = + SimpleCheckTest + """ +check "check-object-expression-in-interpolation1" + (let s = "AA" in $"this { try failwith s with _ -> s } is 2") + "this AA is 2" + """ + + [] + let ``String interpolation using anonymous records`` () = + SimpleCheckTest + """ +// Check anonymous record expression (parenthesized) +check "vcewweh23" $"abc{({| A=1 |})}def" "abc{ A = 1 }def" + + """ + + + [] + let ``Basic string interpolation (no preview)`` () = + CompilerAssert.TypeCheckWithErrorsAndOptions [| |] + """ +let x = $"one" + """ + [|(FSharpErrorSeverity.Error, 3350, (2, 9, 2, 15), + "Feature 'string interpolation' is not available in F# 4.7. Please use language version 'preview' or greater.")|] + + + [] + let ``Basic string interpolation negative`` () = + let code = """ +let x1 = $"one %d{System.String.Empty}" // mismatched types +let x2 = $"one %s{1}" // mismatched types +let x3 = $"one %s" // naked percent in interpolated +let x4 = $"one %d" // naked percent in interpolated +let x5 = $"one %A" // naked percent in interpolated +let x6 = $"one %P" // interpolation hole marker in interploation +let x7 = $"one %P()" // interpolation hole marker in interploation +let x8 = $"one %P(){1}" // interpolation hole marker in interploation +let x9 = $"one %f" // naked percent in interpolated +let xa = $"one %d{3:N}" // mix of formats +let xc = $"5%6" // bad F# format specifier +let xe = $"%A{{1}}" // fake expression (delimiters escaped) +""" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Error, 1, (2, 19, 2, 38), + "The type 'string' is not compatible with any of the types byte,int16,int32,int64,sbyte,uint16,uint32,uint64,nativeint,unativeint, arising from the use of a printf-style format string"); + (FSharpErrorSeverity.Error, 1, (3, 19, 3, 20), + """This expression was expected to have type + 'string' +but here has type + 'int' """); + (FSharpErrorSeverity.Error, 3376, (4, 10, 4, 19), + "Invalid interpolated string. Interpolated strings may not use '%' format specifiers unless each is given an expression, e.g. '%d{1+1}'."); + (FSharpErrorSeverity.Error, 3376, (5, 10, 5, 19), + "Invalid interpolated string. Interpolated strings may not use '%' format specifiers unless each is given an expression, e.g. '%d{1+1}'."); + (FSharpErrorSeverity.Error, 3376, (6, 10, 6, 19), + "Invalid interpolated string. Interpolated strings may not use '%' format specifiers unless each is given an expression, e.g. '%d{1+1}'."); + (FSharpErrorSeverity.Error, 3376, (7, 10, 7, 19), + "Invalid interpolated string. The '%P' specifier may not be used explicitly."); + (FSharpErrorSeverity.Error, 3371, (8, 10, 8, 21), + "Mismatch in interpolated string. Interpolated strings may not use '%' format specifiers unless each is given an expression, e.g. '%d{1+1}'"); + (FSharpErrorSeverity.Error, 3371, (9, 10, 9, 24), + "Mismatch in interpolated string. Interpolated strings may not use '%' format specifiers unless each is given an expression, e.g. '%d{1+1}'"); + (FSharpErrorSeverity.Error, 3376, (10, 10, 10, 19), + "Invalid interpolated string. Interpolated strings may not use '%' format specifiers unless each is given an expression, e.g. '%d{1+1}'."); + (FSharpErrorSeverity.Error, 3376, (11, 10, 11, 24), + "Invalid interpolated string. .NET-style format specifiers such as '{x,3}' or '{x:N5}' may not be mixed with '%' format specifiers.") + (FSharpErrorSeverity.Error, 3376, (12, 10, 12, 16), + "Invalid interpolated string. Bad precision in format specifier") + (FSharpErrorSeverity.Error, 3376, (13, 10, 13, 20), + "Invalid interpolated string. Interpolated strings may not use '%' format specifiers unless each is given an expression, e.g. '%d{1+1}'.") + |] + + let code = """ +let xb = $"{%5d{1:N3}}" // inner error that looks like format specifiers +""" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Error, 1156, (2, 14, 2, 16), + "This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0o1, 0b1, 1l (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1uy (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger)."); + (FSharpErrorSeverity.Error, 10, (2, 18, 2, 19), + "Unexpected symbol ':' in expression. Expected '}' or other token."); + (FSharpErrorSeverity.Error, 604, (2, 16, 2, 17), "Unmatched '{'") + |] + + let code = """ +let xd = $"%A{}" // empty expression +""" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Error, 10, (2, 15, 2, 17), + "Unexpected interpolated string (final part) in binding") + |] + + [] + let ``String interpolation FormattableString negative`` () = + let code = """ + +open System +let x1 : FormattableString = $"one %d{100}" // no %d in FormattableString +let x2 : FormattableString = $"one %s{String.Empty}" // no %s in FormattableString +let x3 : FormattableString = $"one %10s{String.Empty}" // no %10s in FormattableString +""" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Error, 3376, (4, 30, 4, 44), + "Invalid interpolated string. 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."); + (FSharpErrorSeverity.Error, 3376, (5, 30, 5, 53), + "Invalid interpolated string. 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."); + (FSharpErrorSeverity.Error, 3376, (6, 30, 6, 55), + "Invalid interpolated string. 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.")|] + + + [] + let ``String interpolation negative nested in single`` () = + let code = """ + +open System +let s1 = $"123{456}789{"012"}345" +let s2 = $"123{456}789{@"012"}345" +let s3 = $"123{456}789{$"012"}345" +let s4 = $@"123{456}789{"012"}345" +let s5 = @$"123{456}789{"012"}345" +let s6 = $@"123{456}789{@"012"}345" +let s7 = @$"123{456}789{$"012"}345" +let s8 = $@"123{456}789{@$"012"}345" +let s9 = @$"123{456}789{$@"012"}345" +""" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Error, 3373, (4, 24, 4, 25), + "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."); + (FSharpErrorSeverity.Error, 3373, (5, 24, 5, 26), + "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."); + (FSharpErrorSeverity.Error, 3373, (6, 24, 6, 26), + "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."); + (FSharpErrorSeverity.Error, 3373, (7, 25, 7, 26), + "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."); + (FSharpErrorSeverity.Error, 3373, (8, 25, 8, 26), + "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."); + (FSharpErrorSeverity.Error, 3373, (9, 25, 9, 27), + "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."); + (FSharpErrorSeverity.Error, 3373, (10, 25, 10, 27), + "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."); + (FSharpErrorSeverity.Error, 3373, (11, 25, 11, 28), + "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."); + (FSharpErrorSeverity.Error, 3373, (12, 25, 12, 28), + "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.")|] + + [] + let ``String interpolation negative nested in triple`` () = + let code = " + +open System +let TripleInTripleInterpolated = $\"\"\"123{456}789{\"\"\"012\"\"\"}345\"\"\" +let TripleInSingleInterpolated = $\"123{456}789{\"\"\"012\"\"\"}345\" +let TripleInVerbatimInterpolated = $\"123{456}789{\"\"\"012\"\"\"}345\" +let TripleInterpolatedInTripleInterpolated = $\"\"\"123{456}789{$\"\"\"012\"\"\"}345\"\"\" +let TripleInterpolatedInSingleInterpolated = $\"123{456}789{$\"\"\"012\"\"\"}345\" +let TripleInterpolatedInVerbatimInterpolated = $\"123{456}789{$\"\"\"012\"\"\"}345\" +" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Error, 3374, (4, 52, 4, 55), + "Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression."); + (FSharpErrorSeverity.Error, 3374, (5, 50, 5, 53), + "Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression."); + (FSharpErrorSeverity.Error, 3374, (6, 50, 6, 53), + "Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression."); + (FSharpErrorSeverity.Error, 3374, (7, 64, 7, 68), + "Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression."); + (FSharpErrorSeverity.Error, 3374, (8, 62, 8, 66), + "Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression."); + (FSharpErrorSeverity.Error, 3374, (9, 62, 9, 66), + "Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression.")|] + + [] + let ``String interpolation negative incomplete string`` () = + let code = """let x1 = $"one %d{System.String.Empty}""" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Error, 10, (1, 1, 1, 39), + "Incomplete structured construct at or before this point in binding. Expected interpolated string (final part), interpolated string (part) or other token."); + (FSharpErrorSeverity.Error, 3379, (1, 38, 1, 39), + "Incomplete interpolated string begun at or before here")|] + + [] + let ``String interpolation negative incomplete string fill`` () = + let code = """let x1 = $"one %d{System.String.Empty""" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Error, 10, (1, 1, 1, 38), + "Incomplete structured construct at or before this point in binding. Expected interpolated string (final part), interpolated string (part) or other token."); + (FSharpErrorSeverity.Error, 3378, (1, 18, 1, 19), + "Incomplete interpolated string expression fill begun at or before here")|] + + [] + let ``String interpolation negative incomplete verbatim string`` () = + let code = """let x1 = @$"one %d{System.String.Empty} """ + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Error, 10, (1, 1, 1, 41), + "Incomplete structured construct at or before this point in binding. Expected interpolated string (final part), interpolated string (part) or other token."); + (FSharpErrorSeverity.Error, 3380, (1, 39, 1, 40), + "Incomplete interpolated verbatim string begun at or before here")|] + + [] + let ``String interpolation negative incomplete triple quote string`` () = + let code = "let x1 = $\"\"\"one" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Warning, 58, (1, 1, 1, 17), + "Possible incorrect indentation: this token is offside of context started at position (1:1). Try indenting this token further or using standard formatting conventions."); + (FSharpErrorSeverity.Warning, 58, (1, 17, 1, 17), + "Possible incorrect indentation: this token is offside of context started at position (1:1). Try indenting this token further or using standard formatting conventions."); + (FSharpErrorSeverity.Error, 10, (1, 1, 1, 17), + "Incomplete structured construct at or before this point in binding"); + (FSharpErrorSeverity.Error, 3381, (1, 10, 1, 14), + "Incomplete interpolated triple-quote string begun at or before here")|] + + [] + let ``String interpolation extra right brace single quote`` () = + let code = "let x1 = $\"}\"" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Error, 3382, (1, 10, 1, 14), + "A '}' character must be escaped (by doubling) in an interpolated string.")|] + + [] + let ``String interpolation extra right brace verbatim`` () = + let code = "let x1 = @$\"}\"" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Error, 3382, (1, 10, 1, 15), + "A '}' character must be escaped (by doubling) in an interpolated string.")|] + + [] + let ``String interpolation extra right brace triple`` () = + let code = "let x1 = $\"\"\"}\"\"\"" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Error, 3382, (1, 10, 1, 18), + "A '}' character must be escaped (by doubling) in an interpolated string.")|] + + [] + let ``String interpolation extra right brace single quote with hole`` () = + let code = "let x1 = $\"{0}}\"" + CompilerAssert.TypeCheckWithErrorsAndOptions [| "--langversion:preview" |] + code + [|(FSharpErrorSeverity.Error, 3382, (1, 14, 1, 17), + "A '}' character must be escaped (by doubling) in an interpolated string.")|] diff --git a/tests/fsharp/Compiler/Language/WitnessTests.fs b/tests/fsharp/Compiler/Language/WitnessTests.fs index 67f383c782..f5f94eb975 100644 --- a/tests/fsharp/Compiler/Language/WitnessTests.fs +++ b/tests/fsharp/Compiler/Language/WitnessTests.fs @@ -19,7 +19,7 @@ module WitnessTests = """ (dir ++ "provider.fsx")) |> asExe |> ignoreWarnings - |> withOptions ["--langversion:preview"] + |> withPreview |> compile |> shouldSucceed |> ignore diff --git a/tests/fsharp/FSharpSuite.Tests.fsproj b/tests/fsharp/FSharpSuite.Tests.fsproj index 1c4f337025..3e1c1918e7 100644 --- a/tests/fsharp/FSharpSuite.Tests.fsproj +++ b/tests/fsharp/FSharpSuite.Tests.fsproj @@ -36,13 +36,11 @@ - - @@ -53,6 +51,7 @@ + @@ -84,7 +83,6 @@ - diff --git a/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsNotPreviewSdk.proj b/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsNotPreviewSdk.proj new file mode 100644 index 0000000000..8dc457f7bb --- /dev/null +++ b/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsNotPreviewSdk.proj @@ -0,0 +1,20 @@ + + + + + + <_NETCoreSdkIsPreview>false + + + + + + false + true + true + $(FSCorePackageVersion) + + + + + diff --git a/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsNotPreviewSdkDisablePreviewCheck.proj b/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsNotPreviewSdkDisablePreviewCheck.proj new file mode 100644 index 0000000000..002ab3b54a --- /dev/null +++ b/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsNotPreviewSdkDisablePreviewCheck.proj @@ -0,0 +1,21 @@ + + + + + + <_NETCoreSdkIsPreview>false + + + + + + false + true + true + true + $(FSCorePackageVersion) + + + + + diff --git a/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsNotPreviewSdkEnablePreviewCheck.proj b/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsNotPreviewSdkEnablePreviewCheck.proj new file mode 100644 index 0000000000..fe7c040074 --- /dev/null +++ b/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsNotPreviewSdkEnablePreviewCheck.proj @@ -0,0 +1,21 @@ + + + + + + <_NETCoreSdkIsPreview>false + + + + + + false + true + false + true + $(FSCorePackageVersion) + + + + + diff --git a/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsPreviewSdk.proj b/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsPreviewSdk.proj new file mode 100644 index 0000000000..2a676575e2 --- /dev/null +++ b/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsPreviewSdk.proj @@ -0,0 +1,20 @@ + + + + + + <_NETCoreSdkIsPreview>true + + + + + + false + true + true + $(FSharpCorePreviewPackageVersion) + + + + + diff --git a/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsPreviewSdkDisablePreviewCheck.proj b/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsPreviewSdkDisablePreviewCheck.proj new file mode 100644 index 0000000000..247cf56d6e --- /dev/null +++ b/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsPreviewSdkDisablePreviewCheck.proj @@ -0,0 +1,21 @@ + + + + + + <_NETCoreSdkIsPreview>true + + + + + + false + true + true + true + $(FSharpCoreShippedPackageVersion) + + + + + diff --git a/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsPreviewSdkEnablePreviewCheck.proj b/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsPreviewSdkEnablePreviewCheck.proj new file mode 100644 index 0000000000..f8a76401cc --- /dev/null +++ b/tests/fsharp/SDKTests/tests/DefaultFSharpCore - IsPreviewSdkEnablePreviewCheck.proj @@ -0,0 +1,21 @@ + + + + + + <_NETCoreSdkIsPreview>true + + + + + + false + true + false + true + $(FSharpCorePreviewPackageVersion) + + + + + diff --git a/tests/fsharp/SDKTests/tests/DefaultImplicitReferenceTest.proj b/tests/fsharp/SDKTests/tests/DefaultImplicitReferenceTest.proj deleted file mode 100644 index beabbba8a2..0000000000 --- a/tests/fsharp/SDKTests/tests/DefaultImplicitReferenceTest.proj +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - true - $(DefaultFSharpCorePackageVersion) - - true - $(DefaultValueTuplePackageVersion) - - - - - - diff --git a/tests/fsharp/SDKTests/tests/Test.props b/tests/fsharp/SDKTests/tests/Test.props index 8d29b210bf..ee01022ecc 100644 --- a/tests/fsharp/SDKTests/tests/Test.props +++ b/tests/fsharp/SDKTests/tests/Test.props @@ -1,7 +1,8 @@ - + + net472 <_TargetFrameworkVersionWithoutV Condition="'$(_TargetFrameworkVersionWithoutV)' == ''">4.7.2 .NETFramework diff --git a/tests/fsharp/SDKTests/tests/Test.targets b/tests/fsharp/SDKTests/tests/Test.targets index 6f1638051d..c018aa9a32 100644 --- a/tests/fsharp/SDKTests/tests/Test.targets +++ b/tests/fsharp/SDKTests/tests/Test.targets @@ -32,6 +32,7 @@ + diff --git a/tests/fsharp/TypeProviderTests.fs b/tests/fsharp/TypeProviderTests.fs index e2975635f4..4b26147b5e 100644 --- a/tests/fsharp/TypeProviderTests.fs +++ b/tests/fsharp/TypeProviderTests.fs @@ -74,7 +74,7 @@ let diamondAssembly () = let globalNamespace () = let cfg = testConfig' "typeProviders/globalNamespace" - csc cfg """/out:globalNamespaceTP.dll /debug+ /target:library /r:"%s" """ cfg.FSCOREDLLPATH ["globalNamespaceTP.cs"] + csc cfg """/out:globalNamespaceTP.dll /debug+ /target:library /r:netstandard.dll /r:"%s" """ cfg.FSCOREDLLPATH ["globalNamespaceTP.cs"] fsc cfg "%s /debug+ /r:globalNamespaceTP.dll /optimize-" cfg.fsc_flags ["test.fsx"] @@ -162,7 +162,7 @@ let helloWorldCSharp () = rm cfg "provider.dll" - csc cfg """/out:provider.dll /target:library "/r:%s" /r:magic.dll""" cfg.FSCOREDLLPATH ["provider.cs"] + csc cfg """/out:provider.dll /target:library "/r:%s" /r:netstandard.dll /r:magic.dll""" cfg.FSCOREDLLPATH ["provider.cs"] fsc cfg "%s /debug+ /r:provider.dll /optimize-" cfg.fsc_flags ["test.fsx"] diff --git a/tests/fsharp/core/nameof/preview/test.fsx b/tests/fsharp/core/nameof/preview/test.fsx index 6b6da1a17b..3f69e973cf 100644 --- a/tests/fsharp/core/nameof/preview/test.fsx +++ b/tests/fsharp/core/nameof/preview/test.fsx @@ -240,11 +240,17 @@ type OperatorNameOfTests() = member this.``lookup name of + operator`` () = let b = nameof(+) - Assert.AreEqual("op_Addition",b) + Assert.AreEqual("+",b) + let b2 = nameof(op_Addition) + Assert.AreEqual("op_Addition",b2) + let b3 = nameof(FSharp.Core.Operators.(+)) + Assert.AreEqual("+",b3) + let b4 = nameof(FSharp.Core.Operators.op_Addition) + Assert.AreEqual("op_Addition",b4) member this.``lookup name of |> operator`` () = let a = nameof(|>) - let result = Assert.AreEqual("op_PipeRight",a) + let result = Assert.AreEqual("|>",a) let b = nameof(op_PipeRight) result || Assert.AreEqual("op_PipeRight",b) @@ -294,6 +300,30 @@ type Person = | x when x = nameof __.Age -> { __ with Age = value :?> int } | _ -> __ +type GenericClassNameOfTests<'TTT>() = + + static member ``can get name of class type parameter`` () = + let b = nameof<'TTT> + Assert.AreEqual("TTT", b) + +type GenericClassNameOfTests2<[] 'TTT>() = + + static member ``can get name of class unit of measure type parameter`` () = + let b = nameof<'TTT> + Assert.AreEqual("TTT", b) + +module RecTest = + let rec [] two = 2 + and twoName = nameof(two) + let ``can get name of recursive literal`` () = + Assert.AreEqual("two", twoName) + +module rec RecTest2 = + let [] two = 2 + let twoName = nameof(two) + let ``can get name of literal in recursive module`` () = + Assert.AreEqual("two", twoName) + do test "local variable name lookup" (BasicNameOfTests.``local variable name lookup`` ()) do test "local int function name" (BasicNameOfTests.``local int function name`` ()) do test "local curried function name" (BasicNameOfTests.``local curried function name`` ()) @@ -343,6 +373,41 @@ do test "lookup name of a generic class" ((NameOfOperatorForGener do test "user defined nameof should shadow the operator"(UserDefinedNameOfTests.``user defined nameof should shadow the operator`` ()) +do test "can get name of class type parameter"(GenericClassNameOfTests.``can get name of class type parameter`` ()) +do test "can get name of class type parameter"(GenericClassNameOfTests2.``can get name of class unit of measure type parameter`` ()) +do test "can get name of recursive literal"(RecTest.``can get name of recursive literal`` ()) +do test "can get name of literal in recursive module"(RecTest2.``can get name of literal in recursive module`` ()) + +module PatternMatchingWithNameof = + /// Simplified version of EventStore's API + type RecordedEvent = { EventType: string; Data: string } + + /// My concrete type: + type MyEvent = + | A of string + | B of string + + let deserialize (e: RecordedEvent) : MyEvent = + match e.EventType with + | nameof A -> A e.Data + | nameof B -> B e.Data + | t -> failwithf "Invalid EventType: %s" t + + let getData event = + match event with + | A amsg -> amsg + | B bmsg -> bmsg + + let re1 = { EventType = nameof A; Data = "hello" } + let re2 = { EventType = nameof B; Data = "world" } + + let a = deserialize re1 + let b = deserialize re2 + + check "fklwveoihwq1" (getData a) re1.Data + check "fklwveoihwq2" (getData b) re2.Data + + #if TESTS_AS_APP let RUN() = match !failures with diff --git a/tests/fsharp/core/printf-interpolated/test.fsx b/tests/fsharp/core/printf-interpolated/test.fsx new file mode 100644 index 0000000000..64e08fec66 --- /dev/null +++ b/tests/fsharp/core/printf-interpolated/test.fsx @@ -0,0 +1,280 @@ +// #Conformance #Printing + +#if TESTS_AS_APP +module Core_printf_interp +#endif + +open Printf + +let failures = ref [] + +let report_failure (s : string) = + stderr.Write" NO: " + stderr.WriteLine s + failures := !failures @ [s] + +// change this to true to run every test case +// leave as false to randomly execute a subset of cases (this is a very expensive test area) +let runEveryTest = true + +let test t (s1:Lazy) s2 = + stdout.WriteLine ("running test "+t+"...") + let s1 = s1.Force() + if s1 <> s2 then + report_failure ("test "+t+": expected \n\t'"+s2+"' but produced \n\t'"+s1+"'") + else + stdout.WriteLine ("test "+t+": correctly produced '"+s1+"'") + +let verify actual expected = test expected actual expected + +let adjust1 obj n1 = unbox ((unbox obj) n1) + +let _ = test "cewoui20" (lazy(sprintf $"")) "" +let _ = test "cewoui21" (lazy(sprintf $"abc")) "abc" +let _ = test "cewoui22" (lazy(sprintf $"%d{3}")) "3" +let _ = test "cewoui2a" (lazy(sprintf $"%o{0}")) "0" +let _ = test "cewoui2b" (lazy(sprintf $"%o{0}")) "0" +let _ = test "cewoui2c" (lazy(sprintf $"%o{5}")) "5" +let _ = test "cewoui2q" (lazy(sprintf $"%o{8}")) "10" +let _ = test "cewoui2w" (lazy(sprintf $"%o{15}")) "17" +let _ = test "cewoui2e" (lazy(sprintf $"%o{System.Int32.MinValue}" )) "20000000000" +let _ = test "cewoui2r" (lazy(sprintf $"%o{0xffffffff}" )) "37777777777" +let _ = test "cewoui2t" (lazy(sprintf $"%o{System.Int32.MinValue+1}")) "20000000001" +let _ = test "cewoui2y" (lazy(sprintf $"%o{System.Int32.MaxValue}")) "17777777777" + +let _ = test "cewoui2u" (lazy(sprintf $"%o{-1}" )) "37777777777" + +let f z = sprintf $"%o{z}" + +let _ = test "cewoui2a" (lazy(f 0)) "0" +let _ = test "cewoui2s" (lazy(f 0)) "0" +let _ = test "cewoui2d" (lazy(f 5)) "5" +let _ = test "cewoui2f" (lazy(f 8)) "10" +let _ = test "cewoui2g" (lazy(f 15)) "17" +let _ = test "cewoui2h" (lazy(f System.Int32.MinValue)) "20000000000" +let _ = test "cewoui2j" (lazy(f 0xffffffff)) "37777777777" +let _ = test "cewoui2lk" (lazy(f (System.Int32.MinValue+1))) "20000000001" +let _ = test "cewoui2l" (lazy(f System.Int32.MaxValue)) "17777777777" + +let _ = test "cewoui212" (lazy(f (-1))) "37777777777" + +// check bprintf +let _ = test "csd3oui2!" (lazy(let buf = new System.Text.StringBuilder() in ignore (bprintf buf $"%x{0}%x{1}"); buf.ToString())) "01" + +// check kbprintf +let _ = test "csd3oui2!1" (lazy(let buf = new System.Text.StringBuilder() in kbprintf (fun () -> buf.ToString()) buf $"%x{0}%x{1}")) "01" + +let _ = test "cewoui2!" (lazy(sprintf $"%x{0}")) "0" +let _ = test "cewoui26" (lazy(sprintf $"%x{5}")) "5" +let _ = test "cewoui2f" (lazy(sprintf $"%x{8}")) "8" +let _ = test "cewoui29" (lazy(sprintf $"%x{15}")) "f" +let _ = test "cewoui2Z" (lazy(sprintf $"%x{System.Int32.MinValue}" )) "80000000" +let _ = test "cewoui2X" (lazy(sprintf $"%x{0xffffffff}" )) "ffffffff" +let _ = test "cewoui2A" (lazy(sprintf $"%x{System.Int32.MinValue+1}" )) "80000001" +let _ = test "cewoui2Q" (lazy(sprintf $"%x{System.Int32.MaxValue}" )) "7fffffff" + +let fx z = sprintf $"%x{z}" +let _ = test "cewoui2W" (lazy(fx 0)) "0" +let _ = test "cewoui2E" (lazy(fx 5)) "5" +let _ = test "cewoui2R" (lazy(fx 8)) "8" +let _ = test "cewoui2T" (lazy(fx 15)) "f" +let _ = test "cewoui2Y" (lazy(fx System.Int32.MinValue)) "80000000" +let _ = test "cewoui2U" (lazy(fx 0xffffffff)) "ffffffff" +let _ = test "cewoui2I" (lazy(fx (System.Int32.MinValue+1))) "80000001" +let _ = test "cewoui2O" (lazy(fx System.Int32.MaxValue)) "7fffffff" + +let _ = test "cewoui2Z" (lazy(sprintf $"%X{0}")) "0" +let _ = test "cewoui2X" (lazy(sprintf $"%X{5}")) "5" +let _ = test "cewoui2C" (lazy(sprintf $"%X{8}")) "8" +let _ = test "cewoui2V" (lazy(sprintf $"%X{15}")) "F" +let _ = test "cewoui2v" (lazy(sprintf $"%X{System.Int32.MinValue}" )) "80000000" +let _ = test "cewoui2B" (lazy(sprintf $"%X{0xffffffff}" )) "FFFFFFFF" +let _ = test "cewoui2N" (lazy(sprintf $"%X{System.Int32.MinValue+1}")) "80000001" +let _ = test "cewoui2M" (lazy(sprintf $"%X{System.Int32.MaxValue}" )) "7FFFFFFF" + +let _ = test "cewou44a" (lazy(sprintf $"%u{0}")) "0" +let _ = test "cewou44b" (lazy(sprintf $"%u{5}" )) "5" +let _ = test "cewou44c" (lazy(sprintf $"%u{8}" )) "8" +let _ = test "cewou44d" (lazy(sprintf $"%u{15}" )) "15" +let _ = test "cewou44e" (lazy(sprintf $"%u{System.Int32.MinValue}" )) "2147483648" +let _ = test "cewou44f" (lazy(sprintf $"%u{0xffffffff}" )) "4294967295" +let _ = test "cewou44g" (lazy(sprintf $"%u{System.Int32.MinValue+1}" )) "2147483649" +let _ = test "cewou44h" (lazy(sprintf $"%u{System.Int32.MaxValue}" )) "2147483647" + +let _ = test "cewou45a" (lazy(sprintf $"%d{0ul}" )) "0" +let _ = test "cewou45b" (lazy(sprintf $"%d{5ul}" )) "5" +let _ = test "cewou45c" (lazy(sprintf $"%d{8ul}" )) "8" +let _ = test "cewou45d" (lazy(sprintf $"%d{15ul}" )) "15" +let _ = test "cewou45e" (lazy(sprintf $"%d{2147483648ul}" )) "2147483648" +let _ = test "cewou45f" (lazy(sprintf $"%d{4294967295ul}" )) "4294967295" +let _ = test "cewou45g" (lazy(sprintf $"%d{2147483649ul}" )) "2147483649" +let _ = test "cewou45h" (lazy(sprintf $"%d{2147483647ul}" )) "2147483647" + +let _ = test "cewou46a" (lazy(sprintf $"%d{0ul}" )) "0" +let _ = test "cewou46b" (lazy(sprintf $"%d{5ul}" )) "5" +let _ = test "cewou46c" (lazy(sprintf $"%d{8ul}" )) "8" +let _ = test "cewou46d" (lazy(sprintf $"%d{15ul}" )) "15" +let _ = test "cewou46e" (lazy(sprintf $"%d{2147483648ul}" )) "2147483648" +let _ = test "cewou46f" (lazy(sprintf $"%d{4294967295ul}" )) "4294967295" +let _ = test "cewou46g" (lazy(sprintf $"%d{2147483649ul}" )) "2147483649" +let _ = test "cewou46h" (lazy(sprintf $"%d{2147483647ul}" )) "2147483647" + +let _ = test "ceew903" (lazy(sprintf $"%u{System.Int64.MaxValue}" )) "9223372036854775807" +let _ = test "ceew903" (lazy(sprintf $"%u{System.Int64.MinValue}" )) "9223372036854775808" +let _ = test "ceew903" (lazy(sprintf $"%d{System.Int64.MaxValue}" )) "9223372036854775807" +let _ = test "ceew903" (lazy(sprintf $"%d{System.Int64.MinValue}" )) "-9223372036854775808" + +let _ = test "ceew903" (lazy(sprintf $"%u{System.Int64.MaxValue}" )) "9223372036854775807" +let _ = test "ceew903" (lazy(sprintf $"%u{System.Int64.MinValue}" )) "9223372036854775808" +let _ = test "ceew903" (lazy(sprintf $"%d{System.Int64.MaxValue}" )) "9223372036854775807" +let _ = test "ceew903" (lazy(sprintf $"%d{System.Int64.MinValue}" )) "-9223372036854775808" + +let _ = test "cewou47a" (lazy(sprintf $"%d{0n}" )) "0" +let _ = test "cewou47b" (lazy(sprintf $"%d{5n}" )) "5" +let _ = test "cewou47c" (lazy(sprintf $"%d{8n}" )) "8" +let _ = test "cewou47d" (lazy(sprintf $"%d{15n}" )) "15" +let _ = test "cewou47e" (lazy(sprintf $"%u{2147483648n}" )) "2147483648" +let _ = test "cewou47f" (lazy(sprintf $"%u{4294967295n}" )) "4294967295" +let _ = test "cewou47g" (lazy(sprintf $"%u{2147483649n}" )) "2147483649" +let _ = test "cewou47h" (lazy(sprintf $"%u{2147483647n}" )) "2147483647" + +let _ = test "cewou47a" (lazy(sprintf $"%d{0n}" )) "0" +let _ = test "cewou47b" (lazy(sprintf $"%d{5n}" )) "5" +let _ = test "cewou47c" (lazy(sprintf $"%d{8n}" )) "8" +let _ = test "cewou47d" (lazy(sprintf $"%d{15n}" )) "15" +let _ = test "cewou47e" (lazy(sprintf $"%u{2147483648n}" )) "2147483648" +let _ = test "cewou47f" (lazy(sprintf $"%u{4294967295n}" )) "4294967295" +let _ = test "cewou47g" (lazy(sprintf $"%u{2147483649n}" )) "2147483649" +let _ = test "cewou47h" (lazy(sprintf $"%u{2147483647n}" )) "2147483647" + +let _ = test "cewou48a" (lazy(sprintf $"%d{0un}" )) "0" +let _ = test "cewou48b" (lazy(sprintf $"%d{5un}" )) "5" +let _ = test "cewou48c" (lazy(sprintf $"%d{8un}" )) "8" +let _ = test "cewou48d" (lazy(sprintf $"%d{15un}" )) "15" +let _ = test "cewou48e" (lazy(sprintf $"%u{2147483648un}" )) "2147483648" +let _ = test "cewou48f" (lazy(sprintf $"%u{4294967295un}" )) "4294967295" +let _ = test "cewou48g" (lazy(sprintf $"%u{2147483649un}" )) "2147483649" +let _ = test "cewou48h" (lazy(sprintf $"%u{2147483647un}" )) "2147483647" + +let _ = test "cewou49c" (lazy(sprintf $"%+d{5}" )) "+5" +let _ = test "cewou49d" (lazy(sprintf $"% d{5}" )) " 5" +let _ = test "cewou49e" (lazy(sprintf $"%+4d{5}" )) " +5" +let _ = test "cewou49f" (lazy(sprintf $"%-+4d{5}" )) "+5 " +let _ = test "cewou49g" (lazy(sprintf $"%-4d{5}" )) "5 " +let _ = test "cewou49h" (lazy(sprintf $"%- 4d{5}" )) " 5 " +let _ = test "cewou49i" (lazy(sprintf $"%- d{5}" )) " 5" +let _ = test "cewou49j" (lazy(sprintf $"% d{5}" )) " 5" +let _ = test "weioj31" (lazy(sprintf $"%3d{5}")) " 5" +let _ = test "weioj32" (lazy(sprintf $"%1d{5}")) "5" +let _ = test "weioj33" (lazy(sprintf $"%2d{500}")) "500" + +let _ = + test "test8535" (lazy(sprintf $"""%t{(fun _ -> "???")}""" )) "???" + test "test8536" (lazy(sprintf $"A%d{0}B")) "A0B" + test "test8537" (lazy(sprintf $"A%d{0}B%d{1}C")) "A0B1C" + test "test8538" (lazy(sprintf $"A%d{0}B%d{1}C%d{2}D")) "A0B1C2D" + test "test8539" (lazy(sprintf $"A%d{0}B%d{1}C%d{2}D%d{3}E")) "A0B1C2D3E" + test "test8540" (lazy(sprintf $"A%d{0}B%d{1}C%d{2}D%d{3}E%d{4}F")) "A0B1C2D3E4F" + test "test8541" (lazy(sprintf $"A%d{0}B%d{1}C%d{2}D%d{3}E%d{4}F%d{5}G")) "A0B1C2D3E4F5G" + test "test8542" (lazy(sprintf $"A%d{0}B%d{1}C%d{2}D%d{3}E%d{4}F%d{5}G%d{6}H")) "A0B1C2D3E4F5G6H" + test "test8543" (lazy(sprintf $"A%d{0}B%d{1}C%d{2}D%d{3}E%d{4}F%d{5}G%d{6}H%d{7}I")) "A0B1C2D3E4F5G6H7I" + + +let _ = + test "test8361" (lazy(sprintf $"""%A{"abc"}""")) "\"abc\"" + test "test8362" (lazy(sprintf $"""%5A{"abc"}""")) "\"abc\"" + test "test8363" (lazy(sprintf $"""%1A{"abc"}""")) "\"abc\"" + test "test8365" (lazy(sprintf $"""%.5A{"abc"}""")) "\"abc\"" + test "test8368" (lazy(sprintf $"""%-A{"abc"}""")) "\"abc\"" + test "test8369" (lazy(sprintf $"""%-5A{"abc"}""")) "\"abc\"" + test "test8370" (lazy(sprintf $"""%-1A{"abc"}""")) "\"abc\"" + test "test8372" (lazy(sprintf $"""%-.5A{"abc"}""")) "\"abc\"" + test "test8375" (lazy(sprintf $"""%+A{"abc"}""")) "\"abc\"" + test "test8376" (lazy(sprintf $"""%+5A{"abc"}""")) "\"abc\"" + test "test8377" (lazy(sprintf $"""%+1A{"abc"}""")) "\"abc\"" + test "test8379" (lazy(sprintf $"""%+.5A{"abc"}""")) "\"abc\"" + test "test8382" (lazy(sprintf $"""%-+A{"abc"}""")) "\"abc\"" + test "test8383" (lazy(sprintf $"""%-+5A{"abc"}""")) "\"abc\"" + test "test8384" (lazy(sprintf $"""%-+1A{"abc"}""")) "\"abc\"" + test "test8386" (lazy(sprintf $"""%-+.5A{"abc"}""")) "\"abc\"" + test "test8389" (lazy(sprintf $"""%A{15}""")) "15" + test "test8390" (lazy(sprintf $"""%5A{15}""")) "15" + test "test8391" (lazy(sprintf $"""%1A{15}""")) "15" + test "test8393" (lazy(sprintf $"""%.5A{15}""")) "15" + test "test8396" (lazy(sprintf $"""%-A{15}""")) "15" + test "test8397" (lazy(sprintf $"""%-5A{15}""")) "15" + test "test8398" (lazy(sprintf $"""%-1A{15}""")) "15" + test "test8400" (lazy(sprintf $"""%-.5A{15}""")) "15" + test "test8403" (lazy(sprintf $"""%+A{15}""")) "15" + test "test8404" (lazy(sprintf $"""%+5A{15}""")) "15" + test "test8405" (lazy(sprintf $"""%+1A{15}""")) "15" + test "test8407" (lazy(sprintf $"""%+.5A{15}""")) "15" + test "test8410" (lazy(sprintf $"""%-+A{15}""")) "15" + test "test8411" (lazy(sprintf $"""%-+5A{15}""")) "15" + test "test8412" (lazy(sprintf $"""%-+1A{15}""")) "15" + test "test8414" (lazy(sprintf $"""%-+.5A{15}""")) "15" + + test "test8417" (lazy(sprintf $"""%A{-10}""")) "-10" + test "test8418" (lazy(sprintf $"""%5A{-10}""")) "-10" + test "test8419" (lazy(sprintf $"""%1A{-10}""")) "-10" + test "test8421" (lazy(sprintf $"""%.5A{-10}""")) "-10" + test "test8424" (lazy(sprintf $"""%-A{-10}""")) "-10" + test "test8425" (lazy(sprintf $"""%-5A{-10}""")) "-10" + test "test8426" (lazy(sprintf $"""%-1A{-10}""")) "-10" + test "test8428" (lazy(sprintf $"""%-.5A{-10}""")) "-10" + test "test8431" (lazy(sprintf $"""%+A{-10}""")) "-10" + test "test8432" (lazy(sprintf $"""%+5A{-10}""")) "-10" + test "test8433" (lazy(sprintf $"""%+1A{-10}""")) "-10" + test "test8435" (lazy(sprintf $"""%+.5A{-10}""")) "-10" + test "test8438" (lazy(sprintf $"""%-+A{-10}""")) "-10" + test "test8439" (lazy(sprintf $"""%-+5A{-10}""")) "-10" + test "test8440" (lazy(sprintf $"""%-+1A{-10}""")) "-10" + test "test8442" (lazy(sprintf $"""%-+.5A{-10}""")) "-10" + + // Check the static type matters for %A holes + test "test8445b1" (lazy(sprintf $"""%A{(Unchecked.defaultof)}""")) "None" + test "test8445b2" (lazy(sprintf $"""%A{box (None: int option)}""")) "" + test "test8445b3" (lazy(sprintf $"""%A{(None: int option)}""")) "None" + test "test8445b4" (lazy(sprintf $"""%A{(None: string option)}""")) "None" + test "test8445b5" (lazy(sprintf $"""%A{(None: obj option)}""")) "None" + test "test8445b6" (lazy($"""%A{(Unchecked.defaultof)}""")) "None" + test "test8445b7a" (lazy($"""{null}""")) "" + test "test8445b7b" (lazy($"""%O{null}""")) "" + test "test8445b8" (lazy($"""%A{null}""")) "" + test "test8445b9" (lazy($"""%A{box (None: int option)}""")) "" + test "test8445b10" (lazy($"""%A{(None: int option)}""")) "None" + test "test8445b11" (lazy($"""%A{(None: string option)}""")) "None" + test "test8445b12" (lazy($"""%A{(None: obj option)}""")) "None" + + test "test8445" (lazy(sprintf $"""%A{null}""")) "" + test "test8446" (lazy(sprintf $"""%5A{null}""")) "" + test "test8447" (lazy(sprintf $"""%1A{null}""")) "" + test "test8449" (lazy(sprintf $"""%.5A{null}""")) "" + test "test8452" (lazy(sprintf $"""%-A{null}""")) "" + test "test8453" (lazy(sprintf $"""%-5A{null}""")) "" + test "test8454" (lazy(sprintf $"""%-1A{null}""")) "" + test "test8456" (lazy(sprintf $"""%-.5A{null}""")) "" + test "test8459" (lazy(sprintf $"""%+A{null}""")) "" + test "test8460" (lazy(sprintf $"""%+5A{null}""")) "" + test "test8461" (lazy(sprintf $"""%+1A{null}""")) "" + test "test8463" (lazy(sprintf $"""%+.5A{null}""")) "" + test "test8466" (lazy(sprintf $"""%-+A{null}""")) "" + test "test8467" (lazy(sprintf $"""%-+5A{null}""")) "" + test "test8468" (lazy(sprintf $"""%-+1A{null}""")) "" + test "test8470" (lazy(sprintf $"""%-+.5A{null}""")) "" + + +#if TESTS_AS_APP +let RUN() = !failures +#else +let aa = + match !failures with + | [] -> + stdout.WriteLine "Test Passed" + System.IO.File.WriteAllText("test.ok","ok") + exit 0 + | _ -> + stdout.WriteLine "Test Failed" + exit 1 +#endif + diff --git a/tests/fsharp/core/printf/test.fsx b/tests/fsharp/core/printf/test.fsx index fe48744f84..af5673500f 100644 --- a/tests/fsharp/core/printf/test.fsx +++ b/tests/fsharp/core/printf/test.fsx @@ -25,6 +25,7 @@ let rnd = System.Random() let test t (s1:Lazy) s2 = if runEveryTest || (rnd.Next() % 10) = 0 then + stdout.WriteLine ("running test "+t+"...") let s1 = s1.Force() if s1 <> s2 then report_failure ("test "+t+": expected \n\t'"+s2+"' but produced \n\t'"+s1+"'") diff --git a/tests/fsharp/single-test.fs b/tests/fsharp/single-test.fs index 1110fc00c6..f49281339b 100644 --- a/tests/fsharp/single-test.fs +++ b/tests/fsharp/single-test.fs @@ -105,12 +105,7 @@ let generateProjectArtifacts (pc:ProjectConfiguration) outputType (targetFramewo "fsi" else "FSharp.Core" - let targetCore = - if targetFramework.StartsWith("netstandard", StringComparison.InvariantCultureIgnoreCase) || targetFramework.StartsWith("netcoreapp", StringComparison.InvariantCultureIgnoreCase) then - "netstandard2.0" - else - "net45" - (Path.GetFullPath(__SOURCE_DIRECTORY__) + "/../../artifacts/bin/" + compiler + "/" + configuration + "/" + targetCore + "/FSharp.Core.dll") + (Path.GetFullPath(__SOURCE_DIRECTORY__) + "/../../artifacts/bin/" + compiler + "/" + configuration + "/netstandard2.0/FSharp.Core.dll") let computeSourceItems addDirectory addCondition (compileItem:CompileItem) sources = let computeInclude src = diff --git a/tests/fsharp/tests.fs b/tests/fsharp/tests.fs index adcb5fd743..a7e6fdfa37 100644 --- a/tests/fsharp/tests.fs +++ b/tests/fsharp/tests.fs @@ -196,7 +196,10 @@ module CoreTests = let ``letrec (mutrec variations part two) FSI_BASIC`` () = singleTestBuildAndRun' "core/letrec-mutrec2" FSI_BASIC [] - let ``printf-FSC_BASIC`` () = singleTestBuildAndRun' "core/printf" FSC_BASIC + let ``printf`` () = singleTestBuildAndRun' "core/printf" FSC_BASIC + + [] + let ``printf-interpolated`` () = singleTestBuildAndRunVersion' "core/printf-interpolated" FSC_BASIC "preview" [] let ``tlr-FSC_BASIC`` () = singleTestBuildAndRun' "core/tlr" FSC_BASIC @@ -689,7 +692,7 @@ module CoreTests = exec cfg ("." ++ "test.exe") "" // Same without the reference to lib.dll - testing an incomplete reference set, but only compiling a subset of the code - fsc cfg "%s -r:System.Runtime.dll --noframework --define:NO_LIB_REFERENCE -r:lib3.dll -r:lib2.dll -o:test.exe -g --define:LANGVERSION_PREVIEW --langversion:preview" cfg.fsc_flags ["test.fsx"] + fsc cfg "%s --define:NO_LIB_REFERENCE -r:lib3.dll -r:lib2.dll -o:test.exe -g --define:LANGVERSION_PREVIEW --langversion:preview" cfg.fsc_flags ["test.fsx"] peverify cfg "test.exe" @@ -758,8 +761,6 @@ module CoreTests = testOkFile.CheckExists() - - [] let ``genericmeasures-AS_DLL`` () = singleTestBuildAndRun' "core/genericmeasures" AS_DLL diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl index d4e75ea07e..6fa27f19cb 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly Decimal01 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.Decimal01 { - // Offset: 0x00000000 Length: 0x0000013F + // Offset: 0x00000000 Length: 0x00000139 } .mresource public FSharpOptimizationData.Decimal01 { - // Offset: 0x00000148 Length: 0x00000050 + // Offset: 0x00000140 Length: 0x00000050 } .module Decimal01.exe -// MVID: {59B19213-F150-FA46-A745-03831392B159} +// MVID: {5F1F9A50-F150-FA46-A745-0383509A1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x002E0000 +// Image base: 0x06840000 // =============== CLASS MEMBERS DECLARATION =================== @@ -66,17 +71,17 @@ // Code size 13 (0xd) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 9,13 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\Misc\\Decimal01.fs' + .line 6,6 : 9,13 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\Decimal01.fs' IL_0000: ldc.i4.s 12 IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 IL_0004: ldc.i4.0 IL_0005: ldc.i4.1 - IL_0006: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) + IL_0006: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) IL_000b: pop IL_000c: ret } // end of method $Decimal01::main@ diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Lock01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Lock01.il.bsl index 641008a218..95e5d67c43 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Lock01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Lock01.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly Lock01 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.Lock01 { - // Offset: 0x00000000 Length: 0x00000184 + // Offset: 0x00000000 Length: 0x0000017E } .mresource public FSharpOptimizationData.Lock01 { // Offset: 0x00000188 Length: 0x00000064 } .module Lock01.exe -// MVID: {59B19213-2BCA-B308-A745-03831392B159} +// MVID: {5F1F9A50-2BCA-B308-A745-0383509A1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x02FB0000 +// Image base: 0x06970000 // =============== CLASS MEMBERS DECLARATION =================== @@ -72,7 +77,7 @@ // Code size 2 (0x2) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 20,20 : 19,21 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\Misc\\Lock01.fs' + .line 20,20 : 19,21 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\Lock01.fs' IL_0000: ldnull IL_0001: ret } // end of method clo@20::Invoke @@ -130,8 +135,8 @@ { IL_001a: ldloc.1 IL_001b: ldloca.s V_3 - IL_001d: call void [mscorlib]System.Threading.Monitor::Enter(object, - bool&) + IL_001d: call void [netstandard]System.Threading.Monitor::Enter(object, + bool&) IL_0022: ldloc.2 IL_0023: ldnull IL_0024: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) @@ -150,7 +155,7 @@ .line 100001,100001 : 0,0 '' IL_0034: ldloc.1 - IL_0035: call void [mscorlib]System.Threading.Monitor::Exit(object) + IL_0035: call void [netstandard]System.Threading.Monitor::Exit(object) IL_003a: ldnull IL_003b: pop IL_003c: endfinally diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline.il.bsl index 9a2538f734..aae557b86c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly MethodImplNoInline { @@ -25,20 +30,20 @@ } .mresource public FSharpSignatureData.MethodImplNoInline { - // Offset: 0x00000000 Length: 0x000002FF + // Offset: 0x00000000 Length: 0x000002F9 } .mresource public FSharpOptimizationData.MethodImplNoInline { - // Offset: 0x00000308 Length: 0x000000F5 + // Offset: 0x00000300 Length: 0x000000F5 } .module MethodImplNoInline.exe -// MVID: {59B19213-4480-09E2-A745-03831392B159} +// MVID: {5F1F9A50-4480-09E2-A745-0383509A1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00D80000 +// Image base: 0x054F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -55,7 +60,7 @@ IL_0000: ldstr "Hey!" IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_000a: stloc.0 - IL_000b: call class [mscorlib]System.IO.TextWriter [mscorlib]System.Console::get_Out() + IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() IL_0010: ldloc.0 IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline02.il.bsl index 784e3d51a3..6f291d6931 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline02.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly MethodImplNoInline02 { @@ -25,20 +30,20 @@ } .mresource public FSharpSignatureData.MethodImplNoInline02 { - // Offset: 0x00000000 Length: 0x00000305 + // Offset: 0x00000000 Length: 0x000002FF } .mresource public FSharpOptimizationData.MethodImplNoInline02 { - // Offset: 0x00000310 Length: 0x000000F9 + // Offset: 0x00000308 Length: 0x000000F9 } .module MethodImplNoInline02.exe -// MVID: {59B19213-084F-1A8E-A745-03831392B159} +// MVID: {5F1F9A50-084F-1A8E-A745-0383509A1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x012C0000 +// Image base: 0x04E70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -55,7 +60,7 @@ IL_0000: ldstr "Hey!" IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_000a: stloc.0 - IL_000b: call class [mscorlib]System.IO.TextWriter [mscorlib]System.Console::get_Out() + IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() IL_0010: ldloc.0 IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl index a30c4a069b..fefd5e583b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly comparison_decimal01 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.comparison_decimal01 { - // Offset: 0x00000000 Length: 0x00000176 + // Offset: 0x00000000 Length: 0x00000170 } .mresource public FSharpOptimizationData.comparison_decimal01 { - // Offset: 0x00000180 Length: 0x0000005B + // Offset: 0x00000178 Length: 0x0000005B } .module comparison_decimal01.exe -// MVID: {59B19240-76D8-7EE3-A745-03834092B159} +// MVID: {5F1FA087-76D8-7EE3-A745-038387A01F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x02980000 +// Image base: 0x06BE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -66,29 +71,29 @@ // Code size 228 (0xe4) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 4,4 : 9,20 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\Operators\\comparison_decimal01.fs' + .line 4,4 : 9,20 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Operators\\comparison_decimal01.fs' IL_0000: ldc.i4.s 10 IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 IL_0004: ldc.i4.0 IL_0005: ldc.i4.1 - IL_0006: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) + IL_0006: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) IL_000b: ldc.i4.s 20 IL_000d: ldc.i4.0 IL_000e: ldc.i4.0 IL_000f: ldc.i4.0 IL_0010: ldc.i4.1 - IL_0011: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_0016: call bool [mscorlib]System.Decimal::op_LessThan(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_0011: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0016: call bool [netstandard]System.Decimal::op_LessThan(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_001b: pop .line 5,5 : 9,21 '' IL_001c: ldc.i4.s 10 @@ -96,23 +101,23 @@ IL_001f: ldc.i4.0 IL_0020: ldc.i4.0 IL_0021: ldc.i4.1 - IL_0022: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) + IL_0022: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) IL_0027: ldc.i4.s 20 IL_0029: ldc.i4.0 IL_002a: ldc.i4.0 IL_002b: ldc.i4.0 IL_002c: ldc.i4.1 - IL_002d: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_0032: call bool [mscorlib]System.Decimal::op_LessThanOrEqual(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_002d: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0032: call bool [netstandard]System.Decimal::op_LessThanOrEqual(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_0037: pop .line 6,6 : 9,20 '' IL_0038: ldc.i4.s 10 @@ -120,23 +125,23 @@ IL_003b: ldc.i4.0 IL_003c: ldc.i4.0 IL_003d: ldc.i4.1 - IL_003e: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) + IL_003e: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) IL_0043: ldc.i4.s 20 IL_0045: ldc.i4.0 IL_0046: ldc.i4.0 IL_0047: ldc.i4.0 IL_0048: ldc.i4.1 - IL_0049: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_004e: call bool [mscorlib]System.Decimal::op_GreaterThan(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_0049: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_004e: call bool [netstandard]System.Decimal::op_GreaterThan(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_0053: pop .line 7,7 : 9,21 '' IL_0054: ldc.i4.s 10 @@ -144,23 +149,23 @@ IL_0057: ldc.i4.0 IL_0058: ldc.i4.0 IL_0059: ldc.i4.1 - IL_005a: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) + IL_005a: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) IL_005f: ldc.i4.s 20 IL_0061: ldc.i4.0 IL_0062: ldc.i4.0 IL_0063: ldc.i4.0 IL_0064: ldc.i4.1 - IL_0065: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_006a: call bool [mscorlib]System.Decimal::op_GreaterThanOrEqual(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_0065: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_006a: call bool [netstandard]System.Decimal::op_GreaterThanOrEqual(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_006f: pop .line 8,8 : 9,20 '' IL_0070: ldc.i4.s 10 @@ -168,23 +173,23 @@ IL_0073: ldc.i4.0 IL_0074: ldc.i4.0 IL_0075: ldc.i4.1 - IL_0076: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) + IL_0076: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) IL_007b: ldc.i4.s 20 IL_007d: ldc.i4.0 IL_007e: ldc.i4.0 IL_007f: ldc.i4.0 IL_0080: ldc.i4.1 - IL_0081: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_0086: call bool [mscorlib]System.Decimal::op_Equality(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_0081: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0086: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_008b: pop .line 9,9 : 9,21 '' IL_008c: ldc.i4.s 10 @@ -192,23 +197,23 @@ IL_008f: ldc.i4.0 IL_0090: ldc.i4.0 IL_0091: ldc.i4.1 - IL_0092: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) + IL_0092: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) IL_0097: ldc.i4.s 20 IL_0099: ldc.i4.0 IL_009a: ldc.i4.0 IL_009b: ldc.i4.0 IL_009c: ldc.i4.1 - IL_009d: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_00a2: call bool [mscorlib]System.Decimal::op_Equality(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_009d: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_00a2: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_00a7: ldc.i4.0 IL_00a8: ceq IL_00aa: pop @@ -218,23 +223,23 @@ IL_00ae: ldc.i4.0 IL_00af: ldc.i4.0 IL_00b0: ldc.i4.1 - IL_00b1: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) + IL_00b1: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) IL_00b6: ldc.i4.s 20 IL_00b8: ldc.i4.0 IL_00b9: ldc.i4.0 IL_00ba: ldc.i4.0 IL_00bb: ldc.i4.1 - IL_00bc: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_00c1: call bool [mscorlib]System.Decimal::op_Equality(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_00bc: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_00c1: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_00c6: pop .line 11,11 : 9,26 '' IL_00c7: ldc.i4.s 10 @@ -242,23 +247,23 @@ IL_00ca: ldc.i4.0 IL_00cb: ldc.i4.0 IL_00cc: ldc.i4.1 - IL_00cd: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) + IL_00cd: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) IL_00d2: ldc.i4.s 20 IL_00d4: ldc.i4.0 IL_00d5: ldc.i4.0 IL_00d6: ldc.i4.0 IL_00d7: ldc.i4.1 - IL_00d8: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_00dd: call int32 [mscorlib]System.Decimal::Compare(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_00d8: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_00dd: call int32 [netstandard]System.Decimal::Compare(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_00e2: pop IL_00e3: ret } // end of method $Comparison_decimal01::main@ diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl index 92eca39579..00f792aa63 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:7:0:0 + .ver 5:0:0:0 } .assembly extern Utils { @@ -24,6 +24,11 @@ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} .assembly Linq101Aggregates01 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -38,20 +43,20 @@ } .mresource public FSharpSignatureData.Linq101Aggregates01 { - // Offset: 0x00000000 Length: 0x000005F6 + // Offset: 0x00000000 Length: 0x00000606 } .mresource public FSharpOptimizationData.Linq101Aggregates01 { - // Offset: 0x00000600 Length: 0x00000211 + // Offset: 0x00000610 Length: 0x00000211 } .module Linq101Aggregates01.exe -// MVID: {5EAD3E37-D281-4783-A745-0383373EAD5E} +// MVID: {5F1FA088-D281-4783-A745-038388A01F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04D10000 +// Image base: 0x052A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -105,7 +110,7 @@ .locals init ([0] int32 V_0, [1] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\dev\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Aggregates01.fs' + .line 100001,100001 : 0,0 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Aggregates01.fs' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Aggregates01/uniqueFactors@12::pc IL_0006: ldc.i4.1 @@ -1633,21 +1638,21 @@ IL_0023: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() IL_0028: stloc.s V_6 IL_002a: ldloc.s V_6 - IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_002c: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0031: stloc.s V_7 .try { IL_0033: ldc.i4.0 IL_0034: stloc.s V_9 IL_0036: ldloc.s V_7 - IL_0038: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0038: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() IL_003d: brfalse.s IL_0055 .line 43,43 : 13,33 '' IL_003f: ldloc.s V_9 IL_0041: ldloc.s V_5 IL_0043: ldloc.s V_7 - IL_0045: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0045: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() IL_004a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_004f: add.ovf IL_0050: stloc.s V_9 @@ -1674,7 +1679,7 @@ .line 100001,100001 : 0,0 '' IL_006c: ldloc.s V_10 - IL_006e: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_006e: callvirt instance void [netstandard]System.IDisposable::Dispose() IL_0073: ldnull IL_0074: pop IL_0075: endfinally @@ -3505,8 +3510,8 @@ IL_0001: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() IL_0006: ldarg.0 IL_0007: ldfld valuetype [mscorlib]System.Decimal Linq101Aggregates01/'cheapestProducts@69-1'::min - IL_000c: call bool [mscorlib]System.Decimal::op_Equality(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_000c: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_0011: ret } // end of method 'cheapestProducts@69-1'::Invoke @@ -5749,8 +5754,8 @@ IL_0001: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() IL_0006: ldarg.0 IL_0007: ldfld valuetype [mscorlib]System.Decimal Linq101Aggregates01/'mostExpensiveProducts@94-1'::maxPrice - IL_000c: call bool [mscorlib]System.Decimal::op_Equality(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_000c: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_0011: ret } // end of method 'mostExpensiveProducts@94-1'::Invoke @@ -6864,13 +6869,13 @@ .line 100001,100001 : 0,0 '' IL_0035: ldstr "source" - IL_003a: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string) + IL_003a: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) IL_003f: throw .line 100001,100001 : 0,0 '' IL_0040: nop IL_0041: ldloc.s V_6 - IL_0043: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0043: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0048: stloc.s V_7 .try { @@ -6879,25 +6884,25 @@ IL_004c: ldc.i4.0 IL_004d: ldc.i4.0 IL_004e: ldc.i4.0 - IL_004f: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) + IL_004f: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) IL_0054: stloc.s V_9 IL_0056: ldc.i4.0 IL_0057: stloc.s V_10 IL_0059: ldloc.s V_7 - IL_005b: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_005b: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() IL_0060: brfalse.s IL_0082 IL_0062: ldloc.s V_9 IL_0064: ldloc.s V_5 IL_0066: ldloc.s V_7 - IL_0068: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0068: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() IL_006d: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0072: call valuetype [mscorlib]System.Decimal [mscorlib]System.Decimal::op_Addition(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_0072: call valuetype [netstandard]System.Decimal [netstandard]System.Decimal::op_Addition(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_0077: stloc.s V_9 .line 115,115 : 50,71 '' IL_0079: ldloc.s V_10 @@ -6917,7 +6922,7 @@ .line 100001,100001 : 0,0 '' IL_008a: ldstr "source" - IL_008f: newobj instance void [mscorlib]System.InvalidOperationException::.ctor(string) + IL_008f: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) IL_0094: throw .line 100001,100001 : 0,0 '' @@ -6928,9 +6933,9 @@ IL_009c: stloc.s V_12 IL_009e: ldloc.s V_11 IL_00a0: ldloc.s V_12 - IL_00a2: call valuetype [mscorlib]System.Decimal [mscorlib]System.Convert::ToDecimal(int32) - IL_00a7: call valuetype [mscorlib]System.Decimal [mscorlib]System.Decimal::Divide(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_00a2: call valuetype [netstandard]System.Decimal [netstandard]System.Convert::ToDecimal(int32) + IL_00a7: call valuetype [netstandard]System.Decimal [netstandard]System.Decimal::Divide(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_00ac: stloc.s V_8 IL_00ae: leave.s IL_00ce @@ -6949,7 +6954,7 @@ .line 100001,100001 : 0,0 '' IL_00c1: ldloc.s V_13 - IL_00c3: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_00c3: callvirt instance void [netstandard]System.IDisposable::Dispose() IL_00c8: ldnull IL_00c9: pop IL_00ca: endfinally @@ -7519,21 +7524,21 @@ IL_00c2: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() IL_00c7: stloc.s V_25 IL_00c9: ldloc.s V_25 - IL_00cb: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_00cb: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_00d0: stloc.s V_26 .try { IL_00d2: ldc.i4.0 IL_00d3: stloc.s V_28 IL_00d5: ldloc.s V_26 - IL_00d7: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_00d7: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() IL_00dc: brfalse.s IL_00f4 .line 22,22 : 9,16 '' IL_00de: ldloc.s V_28 IL_00e0: ldloc.s V_24 IL_00e2: ldloc.s V_26 - IL_00e4: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_00e4: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() IL_00e9: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_00ee: add.ovf IL_00ef: stloc.s V_28 @@ -7560,7 +7565,7 @@ .line 100001,100001 : 0,0 '' IL_010b: ldloc.s V_29 - IL_010d: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_010d: callvirt instance void [netstandard]System.IDisposable::Dispose() IL_0112: ldnull IL_0113: pop IL_0114: endfinally @@ -7606,21 +7611,21 @@ IL_016f: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() IL_0174: stloc.s V_34 IL_0176: ldloc.s V_34 - IL_0178: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0178: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_017d: stloc.s V_35 .try { IL_017f: ldc.i4.0 IL_0180: stloc.s V_37 IL_0182: ldloc.s V_35 - IL_0184: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0184: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() IL_0189: brfalse.s IL_01a1 .line 31,31 : 9,25 '' IL_018b: ldloc.s V_37 IL_018d: ldloc.s V_33 IL_018f: ldloc.s V_35 - IL_0191: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0191: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() IL_0196: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_019b: add.ovf IL_019c: stloc.s V_37 @@ -7647,7 +7652,7 @@ .line 100001,100001 : 0,0 '' IL_01b8: ldloc.s V_38 - IL_01ba: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_01ba: callvirt instance void [netstandard]System.IDisposable::Dispose() IL_01bf: ldnull IL_01c0: pop IL_01c1: endfinally @@ -7937,13 +7942,13 @@ .line 100001,100001 : 0,0 '' IL_0518: ldstr "source" - IL_051d: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string) + IL_051d: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) IL_0522: throw .line 100001,100001 : 0,0 '' IL_0523: nop IL_0524: ldloc.s V_48 - IL_0526: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0526: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_052b: stloc.s V_49 .try { @@ -7952,13 +7957,13 @@ IL_0538: ldc.i4.0 IL_0539: stloc.s V_52 IL_053b: ldloc.s V_49 - IL_053d: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_053d: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() IL_0542: brfalse.s IL_0560 IL_0544: ldloc.s V_51 IL_0546: ldloc.s V_47 IL_0548: ldloc.s V_49 - IL_054a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_054a: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() IL_054f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0554: add IL_0555: stloc.s V_51 @@ -7980,7 +7985,7 @@ .line 100001,100001 : 0,0 '' IL_0568: ldstr "source" - IL_056d: newobj instance void [mscorlib]System.InvalidOperationException::.ctor(string) + IL_056d: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) IL_0572: throw .line 100001,100001 : 0,0 '' @@ -8011,7 +8016,7 @@ .line 100001,100001 : 0,0 '' IL_0597: ldloc.s V_55 - IL_0599: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_0599: callvirt instance void [netstandard]System.IDisposable::Dispose() IL_059e: ldnull IL_059f: pop IL_05a0: endfinally @@ -8051,13 +8056,13 @@ .line 100001,100001 : 0,0 '' IL_05f0: ldstr "source" - IL_05f5: newobj instance void [mscorlib]System.ArgumentNullException::.ctor(string) + IL_05f5: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) IL_05fa: throw .line 100001,100001 : 0,0 '' IL_05fb: nop IL_05fc: ldloc.s V_60 - IL_05fe: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1>::GetEnumerator() + IL_05fe: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1>::GetEnumerator() IL_0603: stloc.s V_61 .try { @@ -8066,13 +8071,13 @@ IL_0610: ldc.i4.0 IL_0611: stloc.s V_64 IL_0613: ldloc.s V_61 - IL_0615: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0615: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() IL_061a: brfalse.s IL_0638 IL_061c: ldloc.s V_63 IL_061e: ldloc.s V_59 IL_0620: ldloc.s V_61 - IL_0622: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1>::get_Current() + IL_0622: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1>::get_Current() IL_0627: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,float64>::Invoke(!0) IL_062c: add IL_062d: stloc.s V_63 @@ -8094,7 +8099,7 @@ .line 100001,100001 : 0,0 '' IL_0640: ldstr "source" - IL_0645: newobj instance void [mscorlib]System.InvalidOperationException::.ctor(string) + IL_0645: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) IL_064a: throw .line 100001,100001 : 0,0 '' @@ -8125,7 +8130,7 @@ .line 100001,100001 : 0,0 '' IL_066f: ldloc.s V_67 - IL_0671: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_0671: callvirt instance void [netstandard]System.IDisposable::Dispose() IL_0676: ldnull IL_0677: pop IL_0678: endfinally diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl index b0aa6e961a..9fc12e794f 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,12 +13,17 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:5:0:0 + .ver 5:0:0:0 } .assembly extern Utils { .ver 0:0:0:0 } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} .assembly Linq101ElementOperators01 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -33,20 +38,20 @@ } .mresource public FSharpSignatureData.Linq101ElementOperators01 { - // Offset: 0x00000000 Length: 0x0000038A + // Offset: 0x00000000 Length: 0x0000037C } .mresource public FSharpOptimizationData.Linq101ElementOperators01 { - // Offset: 0x00000390 Length: 0x00000127 + // Offset: 0x00000380 Length: 0x00000127 } .module Linq101ElementOperators01.exe -// MVID: {5B9A632A-19D7-C20D-A745-03832A639A5B} +// MVID: {5F1FA088-19D7-C20D-A745-038388A01F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x028F0000 +// Image base: 0x05260000 // =============== CLASS MEMBERS DECLARATION =================== @@ -100,7 +105,7 @@ .locals init ([0] class [Utils]Utils/Product V_0, [1] class [Utils]Utils/Product p) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101ElementOperators01.fs' + .line 100001,100001 : 0,0 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101ElementOperators01.fs' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101ElementOperators01/products12@12::pc IL_0006: ldc.i4.1 @@ -769,7 +774,7 @@ .line 23,23 : 16,27 '' IL_0000: ldarg.1 IL_0001: ldc.i4.0 - IL_0002: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_0002: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0007: ldc.i4.s 111 IL_0009: ceq IL_000b: ret @@ -1471,7 +1476,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::'products@8-2' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::products@8 IL_0005: ret } // end of method Linq101ElementOperators01::get_products @@ -1527,7 +1532,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::'numbers2@48-2' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::numbers2@48 IL_0005: ret } // end of method Linq101ElementOperators01::get_numbers2 @@ -1588,7 +1593,7 @@ .class private abstract auto ansi sealed ''.$Linq101ElementOperators01 extends [mscorlib]System.Object { - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'products@8-2' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products@8 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [Utils]Utils/Product products12@10 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -1598,7 +1603,7 @@ .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 firstNumOrDefault@29 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'numbers2@48-2' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers2@48 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 fourthLowNum@50 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -1625,7 +1630,7 @@ .line 8,8 : 1,32 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() IL_0005: dup - IL_0006: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::'products@8-2' + IL_0006: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::products@8 IL_000b: stloc.0 IL_000c: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0011: stloc.s V_8 @@ -1746,7 +1751,7 @@ IL_013b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0140: dup - IL_0141: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::'numbers2@48-2' + IL_0141: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::numbers2@48 IL_0146: stloc.s numbers2 IL_0148: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_014d: stloc.s V_10 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl index 050bdf1cc6..2119db86d7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:5:0:0 + .ver 5:0:0:0 } .assembly extern System.Core { @@ -24,6 +24,11 @@ { .ver 0:0:0:0 } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} .assembly Linq101Grouping01 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -38,20 +43,20 @@ } .mresource public FSharpSignatureData.Linq101Grouping01 { - // Offset: 0x00000000 Length: 0x0000040F + // Offset: 0x00000000 Length: 0x00000401 } .mresource public FSharpOptimizationData.Linq101Grouping01 { - // Offset: 0x00000418 Length: 0x00000129 + // Offset: 0x00000408 Length: 0x00000129 } .module Linq101Grouping01.exe -// MVID: {5B9A68C1-FB79-E5BF-A745-0383C1689A5B} +// MVID: {5F1FA088-FB79-E5BF-A745-038388A01F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x025F0000 +// Image base: 0x06480000 // =============== CLASS MEMBERS DECLARATION =================== @@ -89,7 +94,7 @@ .maxstack 6 .locals init ([0] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 14,14 : 9,28 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Grouping01.fs' + .line 14,14 : 9,28 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Grouping01.fs' IL_0000: ldarg.1 IL_0001: stloc.0 .line 15,15 : 9,29 '' @@ -324,7 +329,7 @@ .line 25,25 : 24,25 '' IL_0000: ldarg.1 IL_0001: ldc.i4.0 - IL_0002: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_0002: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0007: ret } // end of method 'wordGroups@25-2'::Invoke @@ -1095,7 +1100,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::'numbers@10-3' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::numbers@10 IL_0005: ret } // end of method Linq101Grouping01::get_numbers @@ -1113,7 +1118,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::'words@20-2' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::words@20 IL_0005: ret } // end of method Linq101Grouping01::get_words @@ -1131,7 +1136,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::'products@30-4' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::products@30 IL_0005: ret } // end of method Linq101Grouping01::get_products @@ -1223,15 +1228,15 @@ { .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 digits@7 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'numbers@10-3' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers@10 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [mscorlib]System.Tuple`2[] numberGroups@12 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'words@20-2' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words@20 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [mscorlib]System.Tuple`2[] wordGroups@22 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'products@30-4' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products@30 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [mscorlib]System.Tuple`2[] orderGroups@32 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -1329,7 +1334,7 @@ IL_00ad: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_00b2: dup - IL_00b3: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::'numbers@10-3' + IL_00b3: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::numbers@10 IL_00b8: stloc.1 .line 12,17 : 1,21 '' IL_00b9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() @@ -1383,7 +1388,7 @@ IL_0152: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0157: dup - IL_0158: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::'words@20-2' + IL_0158: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::words@20 IL_015d: stloc.3 .line 22,27 : 1,21 '' IL_015e: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() @@ -1419,7 +1424,7 @@ .line 30,30 : 1,32 '' IL_01bc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() IL_01c1: dup - IL_01c2: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::'products@30-4' + IL_01c2: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::products@30 IL_01c7: stloc.s products .line 32,37 : 1,21 '' IL_01c9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl index b210d7f3c9..f192b5ba5d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,12 +13,17 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:5:0:0 + .ver 5:0:0:0 } .assembly extern Utils { .ver 0:0:0:0 } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} .assembly Linq101Partitioning01 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -33,20 +38,20 @@ } .mresource public FSharpSignatureData.Linq101Partitioning01 { - // Offset: 0x00000000 Length: 0x000003DE + // Offset: 0x00000000 Length: 0x000003D0 } .mresource public FSharpOptimizationData.Linq101Partitioning01 { - // Offset: 0x000003E8 Length: 0x00000138 + // Offset: 0x000003D8 Length: 0x00000138 } .module Linq101Partitioning01.exe -// MVID: {5B9A632A-B280-A6A2-A745-03832A639A5B} +// MVID: {5F1FA088-B280-A6A2-A745-038388A01F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00AF0000 +// Image base: 0x04B00000 // =============== CLASS MEMBERS DECLARATION =================== @@ -100,7 +105,7 @@ .locals init ([0] int32 V_0, [1] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Partitioning01.fs' + .line 100001,100001 : 0,0 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Partitioning01.fs' IL_0000: ldarg.0 IL_0001: ldfld int32 Linq101Partitioning01/first3Numbers@12::pc IL_0006: ldc.i4.1 @@ -522,8 +527,8 @@ IL_000e: ldloc.0 IL_000f: callvirt instance string [Utils]Utils/Customer::get_Region() IL_0014: ldstr "WA" - IL_0019: call bool [mscorlib]System.String::Equals(string, - string) + IL_0019: call bool [netstandard]System.String::Equals(string, + string) IL_001e: ret } // end of method 'WAOrders@22-2'::Invoke @@ -1039,8 +1044,8 @@ IL_000e: ldloc.0 IL_000f: callvirt instance string [Utils]Utils/Customer::get_Region() IL_0014: ldstr "WA" - IL_0019: call bool [mscorlib]System.String::Equals(string, - string) + IL_0019: call bool [netstandard]System.String::Equals(string, + string) IL_001e: ret } // end of method 'WAOrders2@38-2'::Invoke @@ -1817,7 +1822,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::'numbers@7-5' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::numbers@7 IL_0005: ret } // end of method Linq101Partitioning01::get_numbers @@ -1835,7 +1840,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::'customers@17-2' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::customers@17 IL_0005: ret } // end of method Linq101Partitioning01::get_customers @@ -1937,11 +1942,11 @@ .class private abstract auto ansi sealed ''.$Linq101Partitioning01 extends [mscorlib]System.Object { - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'numbers@7-5' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers@7 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 first3Numbers@10 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'customers@17-2' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 customers@17 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [mscorlib]System.Tuple`3[] WAOrders@18 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -2009,7 +2014,7 @@ IL_003d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0042: dup - IL_0043: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::'numbers@7-5' + IL_0043: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::numbers@7 IL_0048: stloc.0 .line 10,14 : 1,20 '' IL_0049: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() @@ -2033,7 +2038,7 @@ .line 17,17 : 1,34 '' IL_0076: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() IL_007b: dup - IL_007c: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::'customers@17-2' + IL_007c: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::customers@17 IL_0081: stloc.2 .line 18,24 : 1,21 '' IL_0082: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl index 09112a769f..3117657f2d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl @@ -13,12 +13,17 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:7:0:0 + .ver 5:0:0:0 } .assembly extern Utils { .ver 0:0:0:0 } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} .assembly Linq101Select01 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -40,13 +45,13 @@ // Offset: 0x00000660 Length: 0x00000204 } .module Linq101Select01.exe -// MVID: {5ECD8279-6057-8F80-A745-03837982CD5E} +// MVID: {5F1FA088-6057-8F80-A745-038388A01F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x058D0000 +// Image base: 0x05950000 // =============== CLASS MEMBERS DECLARATION =================== @@ -2675,13 +2680,13 @@ IL_001a: ldc.i4.0 IL_001b: ldc.i4.0 IL_001c: ldc.i4.2 - IL_001d: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_0022: call bool [mscorlib]System.Decimal::op_LessThan(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_001d: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0022: call bool [netstandard]System.Decimal::op_LessThan(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_0027: ret } // end of method 'orders@84-2'::Invoke @@ -2878,8 +2883,8 @@ IL_0021: stloc.3 IL_0022: ldloc.2 IL_0023: ldloc.3 - IL_0024: call int32 [mscorlib]System.DateTime::Compare(valuetype [mscorlib]System.DateTime, - valuetype [mscorlib]System.DateTime) + IL_0024: call int32 [netstandard]System.DateTime::Compare(valuetype [netstandard]System.DateTime, + valuetype [netstandard]System.DateTime) IL_0029: ldc.i4.0 IL_002a: clt IL_002c: ldc.i4.0 @@ -3073,13 +3078,13 @@ IL_001a: ldc.i4.0 IL_001b: ldc.i4.0 IL_001c: ldc.i4.1 - IL_001d: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_0022: call bool [mscorlib]System.Decimal::op_GreaterThanOrEqual(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_001d: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0022: call bool [netstandard]System.Decimal::op_GreaterThanOrEqual(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_0027: ret } // end of method 'orders3@102-2'::Invoke @@ -3195,8 +3200,8 @@ IL_0000: ldarg.1 IL_0001: callvirt instance string [Utils]Utils/Customer::get_Region() IL_0006: ldstr "WA" - IL_000b: call bool [mscorlib]System.String::Equals(string, - string) + IL_000b: call bool [netstandard]System.String::Equals(string, + string) IL_0010: ret } // end of method 'orders4@112-1'::Invoke @@ -3343,8 +3348,8 @@ IL_001a: stloc.3 IL_001b: ldloc.2 IL_001c: ldloc.3 - IL_001d: call int32 [mscorlib]System.DateTime::Compare(valuetype [mscorlib]System.DateTime, - valuetype [mscorlib]System.DateTime) + IL_001d: call int32 [netstandard]System.DateTime::Compare(valuetype [netstandard]System.DateTime, + valuetype [netstandard]System.DateTime) IL_0022: ldc.i4.0 IL_0023: clt IL_0025: ldc.i4.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl index 7b308ef661..b46991dcbe 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,12 +13,17 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:5:0:0 + .ver 5:0:0:0 } .assembly extern Utils { .ver 0:0:0:0 } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} .assembly Linq101SetOperators01 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -33,20 +38,20 @@ } .mresource public FSharpSignatureData.Linq101SetOperators01 { - // Offset: 0x00000000 Length: 0x00000398 + // Offset: 0x00000000 Length: 0x0000038A } .mresource public FSharpOptimizationData.Linq101SetOperators01 { - // Offset: 0x000003A0 Length: 0x0000011E + // Offset: 0x00000390 Length: 0x0000011E } .module Linq101SetOperators01.exe -// MVID: {5B9A632A-4EE5-349F-A745-03832A639A5B} +// MVID: {5F1FA088-4EE5-349F-A745-038388A01F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x026A0000 +// Image base: 0x053D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -55,7 +60,7 @@ extends [mscorlib]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto autochar serializable sealed nested assembly beforefieldinit specialname 'uniqueFactors@13-1' + .class auto autochar serializable sealed nested assembly beforefieldinit specialname uniqueFactors@13 extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) @@ -80,17 +85,17 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 - IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_0002: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/uniqueFactors@13::'enum' IL_0007: ldarg.0 IL_0008: ldarg.2 - IL_0009: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_0009: stfld int32 Linq101SetOperators01/uniqueFactors@13::pc IL_000e: ldarg.0 IL_000f: ldarg.3 - IL_0010: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::current + IL_0010: stfld int32 Linq101SetOperators01/uniqueFactors@13::current IL_0015: ldarg.0 IL_0016: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1::.ctor() IL_001b: ret - } // end of method 'uniqueFactors@13-1'::.ctor + } // end of method uniqueFactors@13::.ctor .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed @@ -100,9 +105,9 @@ .locals init ([0] int32 V_0, [1] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101SetOperators01.fs' + .line 100001,100001 : 0,0 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101SetOperators01.fs' IL_0000: ldarg.0 - IL_0001: ldfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_0001: ldfld int32 Linq101SetOperators01/uniqueFactors@13::pc IL_0006: ldc.i4.1 IL_0007: sub IL_0008: switch ( @@ -135,18 +140,18 @@ IL_002b: ldarg.0 IL_002c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_factorsOf300() IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_0036: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/uniqueFactors@13::'enum' IL_003b: ldarg.0 IL_003c: ldc.i4.1 - IL_003d: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_003d: stfld int32 Linq101SetOperators01/uniqueFactors@13::pc .line 13,13 : 9,33 '' IL_0042: ldarg.0 - IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_0043: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/uniqueFactors@13::'enum' IL_0048: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() IL_004d: brfalse.s IL_0070 IL_004f: ldarg.0 - IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_0050: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/uniqueFactors@13::'enum' IL_0055: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_005a: stloc.0 .line 13,13 : 9,33 '' @@ -154,11 +159,11 @@ IL_005c: stloc.1 IL_005d: ldarg.0 IL_005e: ldc.i4.2 - IL_005f: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_005f: stfld int32 Linq101SetOperators01/uniqueFactors@13::pc .line 14,14 : 9,17 '' IL_0064: ldarg.0 IL_0065: ldloc.1 - IL_0066: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::current + IL_0066: stfld int32 Linq101SetOperators01/uniqueFactors@13::current IL_006b: ldc.i4.1 IL_006c: ret @@ -168,24 +173,24 @@ IL_0070: ldarg.0 IL_0071: ldc.i4.3 - IL_0072: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_0072: stfld int32 Linq101SetOperators01/uniqueFactors@13::pc .line 13,13 : 9,33 '' IL_0077: ldarg.0 - IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_0078: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/uniqueFactors@13::'enum' IL_007d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) IL_0082: nop IL_0083: ldarg.0 IL_0084: ldnull - IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_0085: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/uniqueFactors@13::'enum' IL_008a: ldarg.0 IL_008b: ldc.i4.3 - IL_008c: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_008c: stfld int32 Linq101SetOperators01/uniqueFactors@13::pc IL_0091: ldarg.0 IL_0092: ldc.i4.0 - IL_0093: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::current + IL_0093: stfld int32 Linq101SetOperators01/uniqueFactors@13::current IL_0098: ldc.i4.0 IL_0099: ret - } // end of method 'uniqueFactors@13-1'::GenerateNext + } // end of method uniqueFactors@13::GenerateNext .method public strict virtual instance void Close() cil managed @@ -197,7 +202,7 @@ [2] class [mscorlib]System.Exception e) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_0001: ldfld int32 Linq101SetOperators01/uniqueFactors@13::pc IL_0006: ldc.i4.3 IL_0007: sub IL_0008: switch ( @@ -213,7 +218,7 @@ .try { IL_001a: ldarg.0 - IL_001b: ldfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_001b: ldfld int32 Linq101SetOperators01/uniqueFactors@13::pc IL_0020: switch ( IL_0037, IL_0039, @@ -251,19 +256,19 @@ IL_004c: nop IL_004d: ldarg.0 IL_004e: ldc.i4.3 - IL_004f: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_004f: stfld int32 Linq101SetOperators01/uniqueFactors@13::pc IL_0054: ldarg.0 - IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'uniqueFactors@13-1'::'enum' + IL_0055: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/uniqueFactors@13::'enum' IL_005a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) IL_005f: nop .line 100001,100001 : 0,0 '' IL_0060: nop IL_0061: ldarg.0 IL_0062: ldc.i4.3 - IL_0063: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_0063: stfld int32 Linq101SetOperators01/uniqueFactors@13::pc IL_0068: ldarg.0 IL_0069: ldc.i4.0 - IL_006a: stfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::current + IL_006a: stfld int32 Linq101SetOperators01/uniqueFactors@13::current IL_006f: ldnull IL_0070: stloc.1 IL_0071: leave.s IL_007f @@ -303,7 +308,7 @@ .line 100001,100001 : 0,0 '' IL_0093: ret - } // end of method 'uniqueFactors@13-1'::Close + } // end of method uniqueFactors@13::Close .method public strict virtual instance bool get_CheckClose() cil managed @@ -312,7 +317,7 @@ .maxstack 8 .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::pc + IL_0001: ldfld int32 Linq101SetOperators01/uniqueFactors@13::pc IL_0006: switch ( IL_001d, IL_001f, @@ -354,7 +359,7 @@ IL_0036: ldc.i4.0 IL_0037: ret - } // end of method 'uniqueFactors@13-1'::get_CheckClose + } // end of method uniqueFactors@13::get_CheckClose .method public strict virtual instance int32 get_LastGenerated() cil managed @@ -364,9 +369,9 @@ // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldfld int32 Linq101SetOperators01/'uniqueFactors@13-1'::current + IL_0001: ldfld int32 Linq101SetOperators01/uniqueFactors@13::current IL_0006: ret - } // end of method 'uniqueFactors@13-1'::get_LastGenerated + } // end of method uniqueFactors@13::get_LastGenerated .method public strict virtual instance class [mscorlib]System.Collections.Generic.IEnumerator`1 GetFreshEnumerator() cil managed @@ -378,13 +383,13 @@ IL_0000: ldnull IL_0001: ldc.i4.0 IL_0002: ldc.i4.0 - IL_0003: newobj instance void Linq101SetOperators01/'uniqueFactors@13-1'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, - int32, - int32) + IL_0003: newobj instance void Linq101SetOperators01/uniqueFactors@13::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) IL_0008: ret - } // end of method 'uniqueFactors@13-1'::GetFreshEnumerator + } // end of method uniqueFactors@13::GetFreshEnumerator - } // end of class 'uniqueFactors@13-1' + } // end of class uniqueFactors@13 .class auto ansi serializable sealed nested assembly beforefieldinit 'categoryNames@22-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> @@ -885,7 +890,7 @@ IL_0070: ldloc.0 IL_0071: callvirt instance string [Utils]Utils/Product::get_ProductName() IL_0076: ldc.i4.0 - IL_0077: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_0077: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_007c: stfld char Linq101SetOperators01/productFirstChars@33::current IL_0081: ldc.i4.1 IL_0082: ret @@ -1250,7 +1255,7 @@ IL_0070: ldloc.0 IL_0071: callvirt instance string [Utils]Utils/Customer::get_CompanyName() IL_0076: ldc.i4.0 - IL_0077: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_0077: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_007c: stfld char Linq101SetOperators01/customerFirstChars@39::current IL_0081: ldc.i4.1 IL_0082: ret @@ -1484,7 +1489,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'factorsOf300@9-2' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::factorsOf300@9 IL_0005: ret } // end of method Linq101SetOperators01::get_factorsOf300 @@ -1493,7 +1498,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'uniqueFactors@11-2' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::uniqueFactors@11 IL_0005: ret } // end of method Linq101SetOperators01::get_uniqueFactors @@ -1502,7 +1507,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'products@18-14' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::products@18 IL_0005: ret } // end of method Linq101SetOperators01::get_products @@ -1520,7 +1525,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'customers@28-6' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::customers@28 IL_0005: ret } // end of method Linq101SetOperators01::get_customers @@ -1589,15 +1594,15 @@ .class private abstract auto ansi sealed ''.$Linq101SetOperators01 extends [mscorlib]System.Object { - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'factorsOf300@9-2' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 factorsOf300@9 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'uniqueFactors@11-2' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 uniqueFactors@11 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'products@18-14' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products@18 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 categoryNames@20 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'customers@28-6' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 customers@28 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1 productFirstChars@30 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -1641,7 +1646,7 @@ IL_001e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0023: dup - IL_0024: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'factorsOf300@9-2' + IL_0024: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::factorsOf300@9 IL_0029: stloc.0 .line 11,15 : 1,20 '' IL_002a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() @@ -1650,20 +1655,20 @@ IL_0033: ldnull IL_0034: ldc.i4.0 IL_0035: ldc.i4.0 - IL_0036: newobj instance void Linq101SetOperators01/'uniqueFactors@13-1'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, - int32, - int32) + IL_0036: newobj instance void Linq101SetOperators01/uniqueFactors@13::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + int32, + int32) IL_003b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0040: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Distinct(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) IL_0045: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() IL_004a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_004f: dup - IL_0050: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'uniqueFactors@11-2' + IL_0050: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::uniqueFactors@11 IL_0055: stloc.1 .line 18,18 : 1,32 '' IL_0056: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() IL_005b: dup - IL_005c: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'products@18-14' + IL_005c: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::products@18 IL_0061: stloc.2 .line 20,25 : 1,20 '' IL_0062: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() @@ -1685,7 +1690,7 @@ .line 28,28 : 1,34 '' IL_008e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() IL_0093: dup - IL_0094: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::'customers@28-6' + IL_0094: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::customers@28 IL_0099: stloc.s customers IL_009b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00a0: stloc.s V_9 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl index b673d1193c..944337789b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,12 +13,17 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:5:0:0 + .ver 5:0:0:0 } .assembly extern Utils { .ver 0:0:0:0 } +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 +} .assembly Linq101Where01 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -33,20 +38,20 @@ } .mresource public FSharpSignatureData.Linq101Where01 { - // Offset: 0x00000000 Length: 0x000003D6 + // Offset: 0x00000000 Length: 0x000003C8 } .mresource public FSharpOptimizationData.Linq101Where01 { - // Offset: 0x000003E0 Length: 0x0000012E + // Offset: 0x000003D0 Length: 0x0000012E } .module Linq101Where01.exe -// MVID: {5B9A632A-FF23-CD21-A745-03832A639A5B} +// MVID: {5F1FA088-FF23-CD21-A745-038388A01F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x009E0000 +// Image base: 0x04BD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -55,7 +60,7 @@ extends [mscorlib]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'lowNums@14-3' + .class auto ansi serializable sealed nested assembly beforefieldinit lowNums@14 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder builder@ @@ -73,9 +78,9 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Where01/'lowNums@14-3'::builder@ + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Where01/lowNums@14::builder@ IL_000d: ret - } // end of method 'lowNums@14-3'::.ctor + } // end of method lowNums@14::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 Invoke(int32 _arg1) cil managed @@ -84,21 +89,21 @@ .maxstack 6 .locals init ([0] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 14,14 : 9,28 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Where01.fs' + .line 14,14 : 9,28 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Where01.fs' IL_0000: ldarg.1 IL_0001: stloc.0 .line 15,15 : 9,22 '' IL_0002: ldarg.0 - IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Where01/'lowNums@14-3'::builder@ + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Where01/lowNums@14::builder@ IL_0008: ldloc.0 IL_0009: tail. IL_000b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield(!!0) IL_0010: ret - } // end of method 'lowNums@14-3'::Invoke + } // end of method lowNums@14::Invoke - } // end of class 'lowNums@14-3' + } // end of class lowNums@14 - .class auto ansi serializable sealed nested assembly beforefieldinit 'lowNums@15-4' + .class auto ansi serializable sealed nested assembly beforefieldinit 'lowNums@15-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .method assembly specialname rtspecialname @@ -111,7 +116,7 @@ IL_0000: ldarg.0 IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ret - } // end of method 'lowNums@15-4'::.ctor + } // end of method 'lowNums@15-1'::.ctor .method public strict virtual instance bool Invoke(int32 n) cil managed @@ -123,11 +128,11 @@ IL_0001: ldc.i4.5 IL_0002: clt IL_0004: ret - } // end of method 'lowNums@15-4'::Invoke + } // end of method 'lowNums@15-1'::Invoke - } // end of class 'lowNums@15-4' + } // end of class 'lowNums@15-1' - .class auto ansi serializable sealed nested assembly beforefieldinit 'lowNums@16-5' + .class auto ansi serializable sealed nested assembly beforefieldinit 'lowNums@16-2' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { .method assembly specialname rtspecialname @@ -140,7 +145,7 @@ IL_0000: ldarg.0 IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ret - } // end of method 'lowNums@16-5'::.ctor + } // end of method 'lowNums@16-2'::.ctor .method public strict virtual instance int32 Invoke(int32 n) cil managed @@ -150,9 +155,9 @@ .line 16,16 : 16,17 '' IL_0000: ldarg.1 IL_0001: ret - } // end of method 'lowNums@16-5'::Invoke + } // end of method 'lowNums@16-2'::Invoke - } // end of class 'lowNums@16-5' + } // end of class 'lowNums@16-2' .class auto ansi serializable sealed nested assembly beforefieldinit soldOutProducts@24 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> @@ -333,13 +338,13 @@ IL_0019: ldc.i4.0 IL_001a: ldc.i4.0 IL_001b: ldc.i4.2 - IL_001c: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_0021: call bool [mscorlib]System.Decimal::op_GreaterThan(valuetype [mscorlib]System.Decimal, - valuetype [mscorlib]System.Decimal) + IL_001c: newobj instance void [netstandard]System.Decimal::.ctor(int32, + int32, + int32, + bool, + uint8) + IL_0021: call bool [netstandard]System.Decimal::op_GreaterThan(valuetype [netstandard]System.Decimal, + valuetype [netstandard]System.Decimal) IL_0026: ret .line 100001,100001 : 0,0 '' @@ -442,8 +447,8 @@ IL_0000: ldarg.1 IL_0001: callvirt instance string [Utils]Utils/Customer::get_Region() IL_0006: ldstr "WA" - IL_000b: call bool [mscorlib]System.String::Equals(string, - string) + IL_000b: call bool [netstandard]System.String::Equals(string, + string) IL_0010: ret } // end of method 'waCustomers@43-1'::Invoke @@ -915,7 +920,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::'numbers@9-11' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::numbers@9 IL_0005: ret } // end of method Linq101Where01::get_numbers @@ -924,7 +929,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::'lowNums@12-2' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::lowNums@12 IL_0005: ret } // end of method Linq101Where01::get_lowNums @@ -933,7 +938,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::'products@20-16' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::products@20 IL_0005: ret } // end of method Linq101Where01::get_products @@ -960,7 +965,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::'customers@38-8' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::customers@38 IL_0005: ret } // end of method Linq101Where01::get_customers @@ -978,7 +983,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::'digits@48-6' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::digits@48 IL_0005: ret } // end of method Linq101Where01::get_digits @@ -1050,21 +1055,21 @@ .class private abstract auto ansi sealed ''.$Linq101Where01 extends [mscorlib]System.Object { - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'numbers@9-11' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers@9 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'lowNums@12-2' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 lowNums@12 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'products@20-16' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products@20 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1 soldOutProducts@22 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1 expensiveInStockProducts@30 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'customers@38-8' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 customers@38 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [Utils]Utils/Customer[] waCustomers@40 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'digits@48-6' + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 digits@48 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [mscorlib]System.Collections.Generic.IEnumerable`1 shortDigits@49 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -1124,7 +1129,7 @@ IL_003d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0042: dup - IL_0043: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::'numbers@9-11' + IL_0043: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::numbers@9 IL_0048: stloc.0 .line 12,17 : 1,20 '' IL_0049: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() @@ -1136,24 +1141,24 @@ IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_numbers() IL_005d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0062: ldloc.s V_9 - IL_0064: newobj instance void Linq101Where01/'lowNums@14-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0064: newobj instance void Linq101Where01/lowNums@14::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) IL_0069: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_006e: newobj instance void Linq101Where01/'lowNums@15-4'::.ctor() + IL_006e: newobj instance void Linq101Where01/'lowNums@15-1'::.ctor() IL_0073: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0078: newobj instance void Linq101Where01/'lowNums@16-5'::.ctor() + IL_0078: newobj instance void Linq101Where01/'lowNums@16-2'::.ctor() IL_007d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) IL_0082: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() IL_0087: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::OfSeq(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_008c: dup - IL_008d: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::'lowNums@12-2' + IL_008d: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::lowNums@12 IL_0092: stloc.1 .line 20,20 : 1,32 '' IL_0093: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() IL_0098: dup - IL_0099: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::'products@20-16' + IL_0099: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::products@20 IL_009e: stloc.2 IL_009f: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00a4: stloc.s V_10 @@ -1202,7 +1207,7 @@ .line 38,38 : 1,34 '' IL_012a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() IL_012f: dup - IL_0130: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::'customers@38-8' + IL_0130: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::customers@38 IL_0135: stloc.s customers .line 40,45 : 1,21 '' IL_0137: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() @@ -1261,7 +1266,7 @@ IL_01e6: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_01eb: dup - IL_01ec: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::'digits@48-6' + IL_01ec: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::digits@48 IL_01f1: stloc.s digits .line 49,55 : 1,21 '' IL_01f3: newobj instance void Linq101Where01/shortDigits@55::.ctor() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl index 08d87803ee..0ddd515921 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:7:0:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly StaticInit_Struct01 { @@ -36,13 +41,13 @@ // Offset: 0x000007A8 Length: 0x0000021F } .module StaticInit_Struct01.dll -// MVID: {5ECD86B3-05F6-D6CB-A745-0383B386CD5E} +// MVID: {5F1FA087-05F6-D6CB-A745-038387A01F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06E50000 +// Image base: 0x053B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -81,8 +86,8 @@ IL_000a: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s IL_000f: ldloc.0 IL_0010: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s - IL_0015: call int32 [mscorlib]System.DateTime::Compare(valuetype [mscorlib]System.DateTime, - valuetype [mscorlib]System.DateTime) + IL_0015: call int32 [netstandard]System.DateTime::Compare(valuetype [netstandard]System.DateTime, + valuetype [netstandard]System.DateTime) IL_001a: ret } // end of method C::CompareTo @@ -122,8 +127,8 @@ IL_000d: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s IL_0012: ldloc.1 IL_0013: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s - IL_0018: call int32 [mscorlib]System.DateTime::Compare(valuetype [mscorlib]System.DateTime, - valuetype [mscorlib]System.DateTime) + IL_0018: call int32 [netstandard]System.DateTime::Compare(valuetype [netstandard]System.DateTime, + valuetype [netstandard]System.DateTime) IL_001d: ret } // end of method C::CompareTo @@ -199,8 +204,8 @@ IL_0017: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s IL_001c: ldloc.1 IL_001d: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s - IL_0022: call bool [mscorlib]System.DateTime::Equals(valuetype [mscorlib]System.DateTime, - valuetype [mscorlib]System.DateTime) + IL_0022: call bool [netstandard]System.DateTime::Equals(valuetype [netstandard]System.DateTime, + valuetype [netstandard]System.DateTime) IL_0027: ret .line 100001,100001 : 0,0 '' @@ -266,8 +271,8 @@ IL_0004: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s IL_0009: ldloc.0 IL_000a: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s - IL_000f: call bool [mscorlib]System.DateTime::Equals(valuetype [mscorlib]System.DateTime, - valuetype [mscorlib]System.DateTime) + IL_000f: call bool [netstandard]System.DateTime::Equals(valuetype [netstandard]System.DateTime, + valuetype [netstandard]System.DateTime) IL_0014: ret } // end of method C::Equals diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.il.bsl index dc790e1200..25c89fbbc8 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly TestFunction3c { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.TestFunction3c { - // Offset: 0x00000000 Length: 0x00000200 + // Offset: 0x00000000 Length: 0x000001FA } .mresource public FSharpOptimizationData.TestFunction3c { - // Offset: 0x00000208 Length: 0x0000008A + // Offset: 0x00000200 Length: 0x0000008A } .module TestFunction3c.exe -// MVID: {59B19208-A662-4FAC-A745-03830892B159} +// MVID: {5F1FA088-A662-4FAC-A745-038388A01F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x02B20000 +// Image base: 0x06AD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -56,7 +61,7 @@ // Code size 36 (0x24) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 5,20 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction3c.fs' + .line 5,5 : 5,20 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction3c.fs' IL_0000: ldstr "Hello" IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) @@ -113,8 +118,8 @@ IL_002c: stloc.s msg IL_002e: ldloc.s msg IL_0030: ldstr "hello" - IL_0035: call bool [mscorlib]System.String::Equals(string, - string) + IL_0035: call bool [netstandard]System.String::Equals(string, + string) IL_003a: brfalse.s IL_003e IL_003c: br.s IL_0040 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22f.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22f.il.bsl index 2dd07a07bb..a3761172da 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22f.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22f.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly Testfunction22f { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.Testfunction22f { - // Offset: 0x00000000 Length: 0x0000015D + // Offset: 0x00000000 Length: 0x00000157 } .mresource public FSharpOptimizationData.Testfunction22f { - // Offset: 0x00000168 Length: 0x00000056 + // Offset: 0x00000160 Length: 0x00000056 } .module Testfunction22f.exe -// MVID: {59B19208-C040-2523-A745-03830892B159} +// MVID: {5F1FA088-C040-2523-A745-038388A01F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x012C0000 +// Image base: 0x067F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -67,13 +72,13 @@ .maxstack 4 .locals init ([0] string V_0) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 3,3 : 1,15 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22f.fs' + .line 3,3 : 1,15 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22f.fs' IL_0000: ldstr "A" IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldstr "A" - IL_000c: call bool [mscorlib]System.String::Equals(string, - string) + IL_000c: call bool [netstandard]System.String::Equals(string, + string) IL_0011: brfalse.s IL_0015 IL_0013: br.s IL_0017 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl index 8feaefd480..40147b5627 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:3:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly TupleElimination { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.TupleElimination { - // Offset: 0x00000000 Length: 0x00000236 + // Offset: 0x00000000 Length: 0x00000228 } .mresource public FSharpOptimizationData.TupleElimination { - // Offset: 0x00000240 Length: 0x0000007B + // Offset: 0x00000230 Length: 0x0000007B } .module TupleElimination.exe -// MVID: {5B17FC67-DFDD-92DF-A745-038367FC175B} +// MVID: {5F1FA088-DFDD-92DF-A745-038388A01F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x02760000 +// Image base: 0x07100000 // =============== CLASS MEMBERS DECLARATION =================== @@ -57,11 +62,11 @@ .maxstack 4 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_0) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 15,27 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\Tuples\\TupleElimination.fs' + .line 5,5 : 15,27 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\TupleElimination.fs' IL_0000: ldstr "%A" IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,!!a>::.ctor(string) IL_000a: stloc.0 - IL_000b: call class [mscorlib]System.IO.TextWriter [mscorlib]System.Console::get_Out() + IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() IL_0010: ldloc.0 IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/CompilerOptions/fsc/noframework/env.lst b/tests/fsharpqa/Source/CompilerOptions/fsc/noframework/env.lst index 10a5d4db36..949ec08bea 100644 --- a/tests/fsharpqa/Source/CompilerOptions/fsc/noframework/env.lst +++ b/tests/fsharpqa/Source/CompilerOptions/fsc/noframework/env.lst @@ -1,7 +1,7 @@ # Functional: the option does what it is meant to do - SOURCE=noframework01.fs # noframework01.fs - SOURCE=noframework01.fsx COMPILE_ONLY=1 FSIMODE=PIPE # noframework01.fsx + SOURCE=noframework01.fs # noframework01.fs + SOURCE=noframework01.fsx COMPILE_ONLY=1 FSIMODE=PIPE # noframework01.fsx - SOURCE=noframework02.fs COMPILE_ONLY=1 SCFLAGS="--noframework" # noframework02.fs + SOURCE=noframework02.fs COMPILE_ONLY=1 SCFLAGS="--noframework" # noframework02.fs SOURCE=noframework02.fsx COMPILE_ONLY=1 SCFLAGS="--noframework" FSIMODE=FEED # noframework02.fsx diff --git a/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/E_NameOfAdditionExpr.fs b/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/E_NameOfAdditionExpr.fs deleted file mode 100644 index 2fd34fa161..0000000000 --- a/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/E_NameOfAdditionExpr.fs +++ /dev/null @@ -1,7 +0,0 @@ -// #Regression #Conformance #DataExpressions -// Verify that nameof doesn't work on const string -//Expression does not have a name. - -let x = nameof(1+2) - -exit 0 diff --git a/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/env.lst b/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/env.lst index 9d473234e6..2d918a0ca1 100644 --- a/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/env.lst +++ b/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/NameOf/env.lst @@ -4,7 +4,6 @@ SOURCE=E_NameOfIntegerAppliedFunction.fs SCFLAGS="--langversion:preview" # E_NameOfIntegerAppliedFunction.fs SOURCE=E_NameOfPartiallyAppliedFunction.fs SCFLAGS="--langversion:preview" # E_NameOfPartiallyAppliedFunction.fs SOURCE=E_NameOfDictLookup.fs SCFLAGS="--langversion:preview" # E_NameOfDictLookup.fs - SOURCE=E_NameOfAdditionExpr.fs SCFLAGS="--langversion:preview" # E_NameOfAdditionExpr.fs SOURCE=E_NameOfParameterAppliedFunction.fs SCFLAGS="--langversion:preview" # E_NameOfParameterAppliedFunction.fs SOURCE=E_NameOfAsAFunction.fs SCFLAGS="--langversion:preview" # E_NameOfAsAFunction.fs SOURCE=E_NameOfWithPipe.fs SCFLAGS="--langversion:preview" # E_NameOfWithPipe.fs diff --git a/tests/fsharpqa/Source/Conformance/LexicalAnalysis/ConditionalCompilation/E_MustBeIdent02.fs b/tests/fsharpqa/Source/Conformance/LexicalAnalysis/ConditionalCompilation/E_MustBeIdent02.fs index 8e20494713..09dee4fbf5 100644 --- a/tests/fsharpqa/Source/Conformance/LexicalAnalysis/ConditionalCompilation/E_MustBeIdent02.fs +++ b/tests/fsharpqa/Source/Conformance/LexicalAnalysis/ConditionalCompilation/E_MustBeIdent02.fs @@ -1,10 +1,9 @@ -// #Regression #Conformance #LexicalAnalysis +// #Regression #Conformance #LexicalAnalysis // Regression test for FSHARP1.0:1419 -//#if directive should be immediately followed by an identifier -//#endif has no matching #if in pattern -//Unmatched '\(' +//The type 'if_' is not defined. +//The type 'endif_' is not defined. #light let t8 (x : #if_) = () let t7 (x : #endif_) = () -exit 1 +exit 1 \ No newline at end of file diff --git a/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/ClassTypes/StaticLetDoDeclarations/E_RecMutable01.fs b/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/ClassTypes/StaticLetDoDeclarations/E_RecMutable01.fs index 7adf9a2e1d..547b14724c 100644 --- a/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/ClassTypes/StaticLetDoDeclarations/E_RecMutable01.fs +++ b/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/ClassTypes/StaticLetDoDeclarations/E_RecMutable01.fs @@ -2,7 +2,7 @@ // rec (mutable) // See FSHARP1.0:2329 -//Only record fields and simple, non-recursive 'let' bindings may be marked mutable +//Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces type C() = class static let rec mutable m = 0 // only record fields and simple 'let' bindings may be marked mutable. end diff --git a/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/TypeExtensions/basic/env.lst b/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/TypeExtensions/basic/env.lst index 6f56022cdb..2c69e75950 100644 --- a/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/TypeExtensions/basic/env.lst +++ b/tests/fsharpqa/Source/Conformance/ObjectOrientedTypeDefinitions/TypeExtensions/basic/env.lst @@ -30,4 +30,4 @@ NOMONO SOURCE=E_ProtectedMemberInExtentionMember01.fs SCFLAGS="--test:ErrorRange # These tests have a dependency on NetFx3.5 (i.e. CSC_PIPE must be 3.5 or better) # For this reason, we exclude it from MT NoMT SOURCE=FSUsingExtendedTypes.fs SCFLAGS="--test:ErrorRanges -r:fslib.dll -r:CSLibExtendingFS.dll" PRECMD="\$CSC_PIPE /t:library /r:fslib.dll CSLibExtendingFS.cs" # FSUsingExtendedTypes.fs -NoMT SOURCE="GenericExtensions.fs" SCFLAGS="--reference:GenericExtensionsCSLib.dll" PRECMD="\$CSC_PIPE /r:\"%FSCOREDLLPATH%\" /t:library /reference:System.Core.dll GenericExtensionsCSLib.cs" # GenericExtensions.fs \ No newline at end of file +NoMT SOURCE="GenericExtensions.fs" SCFLAGS="--reference:GenericExtensionsCSLib.dll" PRECMD="\$CSC_PIPE /r:\"%FSCOREDLLPATH%\" /t:library /reference:System.Core.dll /reference:netstandard.dll GenericExtensionsCSLib.cs" # GenericExtensions.fs \ No newline at end of file diff --git a/tests/fsharpqa/Source/Conformance/TypesAndTypeConstraints/TypeParameterDefinitions/HashConstraint02.fs b/tests/fsharpqa/Source/Conformance/TypesAndTypeConstraints/TypeParameterDefinitions/HashConstraint02.fs index 24f94f08d3..fe215d60f9 100644 --- a/tests/fsharpqa/Source/Conformance/TypesAndTypeConstraints/TypeParameterDefinitions/HashConstraint02.fs +++ b/tests/fsharpqa/Source/Conformance/TypesAndTypeConstraints/TypeParameterDefinitions/HashConstraint02.fs @@ -1,8 +1,7 @@ // #Regression #Conformance #TypeConstraints // Regression test for FSHARP1.0:1419 // Tokens beginning with # should not match greedily with directives -// The only case where we are still a bit confused is #light: for this reason the code -// below compiles just fine (it would not work if I replace #light with #r for example) +//The type 'float' is not compatible with the type 'light_' #light type light_() = class diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl index 14d6a85496..47eb327248 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly ForEachOnList01 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.ForEachOnList01 { - // Offset: 0x00000000 Length: 0x000002ED + // Offset: 0x00000000 Length: 0x000002E7 } .mresource public FSharpOptimizationData.ForEachOnList01 { - // Offset: 0x000002F8 Length: 0x000000DB + // Offset: 0x000002F0 Length: 0x000000DB } .module ForEachOnList01.dll -// MVID: {59B18AEE-56DF-F74F-A745-0383EE8AB159} +// MVID: {5F1FBE49-56DF-F74F-A745-038349BE1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x002D0000 +// Image base: 0x04F10000 // =============== CLASS MEMBERS DECLARATION =================== @@ -72,7 +77,7 @@ // Code size 4 (0x4) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 39,39 : 21,26 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\Optimizations\\ForLoop\\ForEachOnList01.fs' + .line 39,39 : 21,26 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\ForEachOnList01.fs' IL_0000: ldarg.1 IL_0001: ldc.i4.1 IL_0002: add @@ -362,7 +367,7 @@ IL_002e: ldstr "%A" IL_0033: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) IL_0038: stloc.s V_4 - IL_003a: call class [mscorlib]System.IO.TextWriter [mscorlib]System.Console::get_Out() + IL_003a: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() IL_003f: ldloc.s V_4 IL_0041: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) @@ -424,7 +429,7 @@ IL_003c: ldstr "%O" IL_0041: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) IL_0046: stloc.3 - IL_0047: call class [mscorlib]System.IO.TextWriter [mscorlib]System.Console::get_Out() + IL_0047: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() IL_004c: ldloc.3 IL_004d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) @@ -493,7 +498,7 @@ IL_0040: ldstr "%O" IL_0045: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) IL_004a: stloc.s V_4 - IL_004c: call class [mscorlib]System.IO.TextWriter [mscorlib]System.Console::get_Out() + IL_004c: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() IL_0051: ldloc.s V_4 IL_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnString01.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnString01.il.bsl index 0db8de85fc..ed520ccff4 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnString01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnString01.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly ForEachOnString01 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.ForEachOnString01 { - // Offset: 0x00000000 Length: 0x00000354 + // Offset: 0x00000000 Length: 0x0000034E } .mresource public FSharpOptimizationData.ForEachOnString01 { // Offset: 0x00000358 Length: 0x000000FF } .module ForEachOnString01.dll -// MVID: {59B18AEE-105C-852B-A745-0383EE8AB159} +// MVID: {5F1FBE49-105C-852B-A745-038349BE1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x002D0000 +// Image base: 0x06CB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -72,7 +77,7 @@ // Code size 6 (0x6) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 55,55 : 21,39 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\Optimizations\\ForLoop\\ForEachOnString01.fs' + .line 55,55 : 21,39 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\ForEachOnString01.fs' IL_0000: ldarg.1 IL_0001: conv.i4 IL_0002: ldc.i4.1 @@ -140,7 +145,7 @@ .line 9,9 : 6,21 '' IL_0011: ldarg.0 IL_0012: ldloc.2 - IL_0013: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_0013: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0018: stloc.3 IL_0019: ldloc.0 IL_001a: ldloc.3 @@ -187,7 +192,7 @@ .line 14,14 : 6,23 '' IL_0015: ldstr "123" IL_001a: ldloc.2 - IL_001b: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_001b: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0020: stloc.3 IL_0021: ldloc.0 IL_0022: ldloc.3 @@ -234,7 +239,7 @@ .line 20,20 : 6,20 '' IL_0015: ldstr "123" IL_001a: ldloc.2 - IL_001b: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_001b: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0020: stloc.3 IL_0021: ldloc.0 IL_0022: ldloc.3 @@ -281,7 +286,7 @@ .line 26,26 : 6,20 '' IL_0015: ldstr "123" IL_001a: ldloc.2 - IL_001b: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_001b: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0020: stloc.3 IL_0021: ldloc.0 IL_0022: ldloc.3 @@ -325,12 +330,12 @@ .line 31,31 : 6,20 '' IL_0013: ldstr "123" IL_0018: ldloc.1 - IL_0019: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_0019: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_001e: stloc.2 IL_001f: ldstr "%A" IL_0024: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,char>::.ctor(string) IL_0029: stloc.3 - IL_002a: call class [mscorlib]System.IO.TextWriter [mscorlib]System.Console::get_Out() + IL_002a: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() IL_002f: ldloc.3 IL_0030: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) @@ -377,7 +382,7 @@ .line 41,41 : 6,21 '' IL_0011: ldarg.0 IL_0012: ldloc.2 - IL_0013: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_0013: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0018: stloc.3 IL_0019: ldloc.0 IL_001a: ldloc.3 @@ -424,7 +429,7 @@ .line 47,47 : 6,20 '' IL_0015: ldstr "123" IL_001a: ldloc.2 - IL_001b: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_001b: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0020: stloc.3 IL_0021: ldloc.0 IL_0022: ldloc.3 @@ -475,12 +480,12 @@ .line 52,56 : 5,21 '' IL_001f: ldloc.0 IL_0020: ldloc.2 - IL_0021: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_0021: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0026: stloc.3 IL_0027: ldstr "%O" IL_002c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,char>::.ctor(string) IL_0031: stloc.s V_4 - IL_0033: call class [mscorlib]System.IO.TextWriter [mscorlib]System.Console::get_Out() + IL_0033: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() IL_0038: ldloc.s V_4 IL_003a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) @@ -532,7 +537,7 @@ .line 61,65 : 5,21 '' IL_001f: ldloc.0 IL_0020: ldloc.2 - IL_0021: callvirt instance char [mscorlib]System.String::get_Chars(int32) + IL_0021: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0026: stloc.3 .line 66,66 : 9,53 '' IL_0027: ldstr "{0} foo" @@ -545,7 +550,7 @@ IL_0039: ldstr "%O" IL_003e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string>::.ctor(string) IL_0043: stloc.s V_5 - IL_0045: call class [mscorlib]System.IO.TextWriter [mscorlib]System.Console::get_Out() + IL_0045: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() IL_004a: ldloc.s V_5 IL_004c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable01.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable01.il.bsl index 41dcfaf2ed..a56c18506e 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable01.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly NoIEnumerable01 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.NoIEnumerable01 { - // Offset: 0x00000000 Length: 0x000001D1 + // Offset: 0x00000000 Length: 0x000001CB } .mresource public FSharpOptimizationData.NoIEnumerable01 { - // Offset: 0x000001D8 Length: 0x0000006C + // Offset: 0x000001D0 Length: 0x0000006C } .module NoIEnumerable01.dll -// MVID: {59B18AEE-31A1-8DCB-A745-0383EE8AB159} +// MVID: {5F1FBE49-31A1-8DCB-A745-038349BE1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x013E0000 +// Image base: 0x07010000 // =============== CLASS MEMBERS DECLARATION =================== @@ -59,7 +64,7 @@ [1] int32 i, [2] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_2) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 7,7 : 4,22 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\Optimizations\\ForLoop\\NoIEnumerable01.fsx' + .line 7,7 : 4,22 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\NoIEnumerable01.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.1 IL_0002: ldarg.0 @@ -72,7 +77,7 @@ IL_0008: ldstr "aaa" IL_000d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_0012: stloc.2 - IL_0013: call class [mscorlib]System.IO.TextWriter [mscorlib]System.Console::get_Out() + IL_0013: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() IL_0018: ldloc.2 IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable02.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable02.il.bsl index 12424f0aa9..80a2f8d02d 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable02.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable02.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly NoIEnumerable02 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.NoIEnumerable02 { - // Offset: 0x00000000 Length: 0x000001D1 + // Offset: 0x00000000 Length: 0x000001CB } .mresource public FSharpOptimizationData.NoIEnumerable02 { - // Offset: 0x000001D8 Length: 0x0000006C + // Offset: 0x000001D0 Length: 0x0000006C } .module NoIEnumerable02.dll -// MVID: {59B18AEE-5066-4012-A745-0383EE8AB159} +// MVID: {5F1FBE49-5066-4012-A745-038349BE1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00720000 +// Image base: 0x07280000 // =============== CLASS MEMBERS DECLARATION =================== @@ -59,7 +64,7 @@ [1] int32 i, [2] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_2) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 7,7 : 4,24 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\Optimizations\\ForLoop\\NoIEnumerable02.fsx' + .line 7,7 : 4,24 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\NoIEnumerable02.fsx' IL_0000: ldc.i4.s 100 IL_0002: stloc.1 IL_0003: ldarg.0 @@ -72,7 +77,7 @@ IL_0009: ldstr "aaa" IL_000e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_0013: stloc.2 - IL_0014: call class [mscorlib]System.IO.TextWriter [mscorlib]System.Console::get_Out() + IL_0014: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() IL_0019: ldloc.2 IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable03.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable03.il.bsl index 7223d4a04b..7e4eeb1fcb 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable03.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable03.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly NoIEnumerable03 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.NoIEnumerable03 { - // Offset: 0x00000000 Length: 0x000001DF + // Offset: 0x00000000 Length: 0x000001D9 } .mresource public FSharpOptimizationData.NoIEnumerable03 { - // Offset: 0x000001E8 Length: 0x0000006C + // Offset: 0x000001E0 Length: 0x0000006C } .module NoIEnumerable03.dll -// MVID: {59B18AEE-7903-6020-A745-0383EE8AB159} +// MVID: {5F1FBE49-7903-6020-A745-038349BE1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x01970000 +// Image base: 0x070D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -61,7 +66,7 @@ [1] int32 i, [2] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_2) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 7,7 : 4,22 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\Optimizations\\ForLoop\\NoIEnumerable03.fsx' + .line 7,7 : 4,22 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\NoIEnumerable03.fsx' IL_0000: ldarg.0 IL_0001: stloc.1 IL_0002: ldarg.1 @@ -74,7 +79,7 @@ IL_0008: ldstr "aaa" IL_000d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_0012: stloc.2 - IL_0013: call class [mscorlib]System.IO.TextWriter [mscorlib]System.Console::get_Out() + IL_0013: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() IL_0018: ldloc.2 IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.il.bsl index c31f8088d2..6bc3566d45 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly Compare03 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.Compare03 { - // Offset: 0x00000000 Length: 0x00000237 + // Offset: 0x00000000 Length: 0x00000231 } .mresource public FSharpOptimizationData.Compare03 { - // Offset: 0x00000240 Length: 0x000000B9 + // Offset: 0x00000238 Length: 0x000000B9 } .module Compare03.dll -// MVID: {59B18AEE-0562-F88E-A745-0383EE8AB159} +// MVID: {5F1FBE49-0562-F88E-A745-038349BE1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x002E0000 +// Image base: 0x06C20000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,7 +70,7 @@ [3] int32 V_3, [4] int32 V_4) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\Optimizations\\GenericComparison\\Compare03.fsx' + .line 5,5 : 8,25 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare03.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 .line 8,8 : 8,32 '' @@ -118,8 +123,8 @@ .line 16707566,16707566 : 0,0 '' IL_002d: ldstr "five" IL_0032: ldstr "5" - IL_0037: call int32 [mscorlib]System.String::CompareOrdinal(string, - string) + IL_0037: call int32 [netstandard]System.String::CompareOrdinal(string, + string) .line 16707566,16707566 : 0,0 '' IL_003c: nop .line 16707566,16707566 : 0,0 '' diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.il.bsl index 0a5d7ed4b4..a48aceacf7 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly Compare04 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.Compare04 { - // Offset: 0x00000000 Length: 0x00000237 + // Offset: 0x00000000 Length: 0x00000231 } .mresource public FSharpOptimizationData.Compare04 { - // Offset: 0x00000240 Length: 0x000000B9 + // Offset: 0x00000238 Length: 0x000000B9 } .module Compare04.dll -// MVID: {59B18AEE-053B-F88E-A745-0383EE8AB159} +// MVID: {5F1FBE49-053B-F88E-A745-038349BE1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x013E0000 +// Image base: 0x06750000 // =============== CLASS MEMBERS DECLARATION =================== @@ -66,7 +71,7 @@ [4] int32 V_4, [5] int32 V_5) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\Optimizations\\GenericComparison\\Compare04.fsx' + .line 5,5 : 8,25 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare04.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 .line 8,8 : 8,32 '' @@ -119,8 +124,8 @@ .line 16707566,16707566 : 0,0 '' IL_0039: ldstr "5" IL_003e: ldstr "5" - IL_0043: call int32 [mscorlib]System.String::CompareOrdinal(string, - string) + IL_0043: call int32 [netstandard]System.String::CompareOrdinal(string, + string) IL_0048: stloc.s V_5 IL_004a: ldloc.s V_5 IL_004c: brfalse.s IL_0053 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl index aa7bbc68da..93aa98ffb9 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:3:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly Equals02 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.Equals02 { - // Offset: 0x00000000 Length: 0x0000023C + // Offset: 0x00000000 Length: 0x0000022E } .mresource public FSharpOptimizationData.Equals02 { - // Offset: 0x00000240 Length: 0x000000B6 + // Offset: 0x00000238 Length: 0x000000B6 } .module Equals02.dll -// MVID: {5B18753B-0759-B6D8-A745-03833B75185B} +// MVID: {5F1FBE49-0759-B6D8-A745-038349BE1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00F20000 +// Image base: 0x054B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -57,23 +62,24 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) .method public static bool f4_tuple4() cil managed { - // Code size 44 (0x2c) + // Code size 36 (0x24) .maxstack 4 .locals init ([0] bool x, [1] int32 i) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 8,29 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\Optimizations\\GenericComparison\\Equals02.fsx' + .line 5,5 : 8,29 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals02.fsx' IL_0000: ldc.i4.0 IL_0001: stloc.0 .line 8,8 : 8,32 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_001a + .line 9,9 : 12,26 '' IL_0006: ldstr "five" IL_000b: ldstr "5" - IL_0010: call bool [mscorlib]System.String::Equals(string, - string) + IL_0010: call bool [netstandard]System.String::Equals(string, + string) IL_0015: stloc.0 IL_0016: ldloc.1 IL_0017: ldc.i4.1 @@ -83,17 +89,22 @@ IL_001a: ldloc.1 IL_001b: ldc.i4 0x989681 IL_0020: blt.s IL_0006 + .line 10,10 : 8,9 '' IL_0022: ldloc.0 IL_0023: ret } // end of method EqualsMicroPerfAndCodeGenerationTests::f4_tuple4 + } // end of class EqualsMicroPerfAndCodeGenerationTests + } // end of class Equals02 + .class private abstract auto ansi sealed ''.$Equals02$fsx extends [mscorlib]System.Object { } // end of class ''.$Equals02$fsx + // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl index e222d31482..84da5e6eb5 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:3:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly Equals03 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.Equals03 { - // Offset: 0x00000000 Length: 0x0000023C + // Offset: 0x00000000 Length: 0x0000022E } .mresource public FSharpOptimizationData.Equals03 { - // Offset: 0x00000240 Length: 0x000000B6 + // Offset: 0x00000238 Length: 0x000000B6 } .module Equals03.dll -// MVID: {5B18753B-0759-3313-A745-03833B75185B} +// MVID: {5F1FBE49-0759-3313-A745-038349BE1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x02630000 +// Image base: 0x071F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,7 +67,7 @@ .locals init ([0] bool x, [1] int32 i) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 8,29 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\Optimizations\\GenericComparison\\Equals03.fsx' + .line 5,5 : 8,29 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals03.fsx' IL_0000: ldc.i4.0 IL_0001: stloc.0 .line 8,8 : 8,32 '' @@ -73,8 +78,8 @@ .line 9,9 : 12,26 '' IL_0006: ldstr "5" IL_000b: ldstr "5" - IL_0010: call bool [mscorlib]System.String::Equals(string, - string) + IL_0010: call bool [netstandard]System.String::Equals(string, + string) IL_0015: brfalse.s IL_002e .line 16707566,16707566 : 0,0 '' diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash03.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash03.il.bsl index 4a2c0b76fb..e9e9c2049d 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash03.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash03.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly Hash03 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.Hash03 { - // Offset: 0x00000000 Length: 0x00000220 + // Offset: 0x00000000 Length: 0x0000021A } .mresource public FSharpOptimizationData.Hash03 { - // Offset: 0x00000228 Length: 0x000000B0 + // Offset: 0x00000220 Length: 0x000000B0 } .module Hash03.dll -// MVID: {59B18AEE-9642-788D-A745-0383EE8AB159} +// MVID: {5F1FBE49-9642-788D-A745-038349BE1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x02DA0000 +// Image base: 0x05560000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,7 +67,7 @@ .locals init ([0] int32 x, [1] int32 i) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\Optimizations\\GenericComparison\\Hash03.fsx' + .line 5,5 : 8,25 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash03.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 .line 7,7 : 8,32 '' @@ -74,7 +79,7 @@ IL_0006: ldc.i4 0x483 IL_000b: ldc.i4.s 99 IL_000d: ldstr "5" - IL_0012: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0012: callvirt instance int32 [netstandard]System.Object::GetHashCode() IL_0017: xor IL_0018: xor IL_0019: stloc.0 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash04.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash04.il.bsl index 550faa686b..5c6850db0a 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash04.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash04.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly Hash04 { @@ -29,20 +34,20 @@ } .mresource public FSharpSignatureData.Hash04 { - // Offset: 0x00000000 Length: 0x00000220 + // Offset: 0x00000000 Length: 0x0000021A } .mresource public FSharpOptimizationData.Hash04 { - // Offset: 0x00000228 Length: 0x000000B0 + // Offset: 0x00000220 Length: 0x000000B0 } .module Hash04.dll -// MVID: {59B18AEE-9642-7838-A745-0383EE8AB159} +// MVID: {5F1FBE49-9642-7838-A745-038349BE1F5F} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x012B0000 +// Image base: 0x06790000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,7 +67,7 @@ .locals init ([0] int32 x, [1] int32 i) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\Optimizations\\GenericComparison\\Hash04.fsx' + .line 5,5 : 8,25 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash04.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 .line 7,7 : 8,32 '' @@ -74,7 +79,7 @@ IL_0006: ldc.i4 0x483 IL_000b: ldc.i4.s 99 IL_000d: ldstr "5" - IL_0012: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0012: callvirt instance int32 [netstandard]System.Object::GetHashCode() IL_0017: xor IL_0018: xor IL_0019: stloc.0 diff --git a/tests/fsharpqa/testenv/src/ILComparer/ILComparer.fsproj b/tests/fsharpqa/testenv/src/ILComparer/ILComparer.fsproj index c530b623a4..80b7af8303 100644 --- a/tests/fsharpqa/testenv/src/ILComparer/ILComparer.fsproj +++ b/tests/fsharpqa/testenv/src/ILComparer/ILComparer.fsproj @@ -2,7 +2,7 @@ - net45 + net472 Exe true true diff --git a/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj b/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj index 5581f3419b..926080b65b 100644 --- a/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj +++ b/tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj @@ -1,8 +1,6 @@ netstandard2.0 - 4.6.* - 4.5.* diff --git a/tests/service/Common.fs b/tests/service/Common.fs index 5b48e637d9..520b54ad3f 100644 --- a/tests/service/Common.fs +++ b/tests/service/Common.fs @@ -168,7 +168,7 @@ let parseAndCheckFile fileName source options = | parseResults, FSharpCheckFileAnswer.Succeeded(checkResults) -> parseResults, checkResults | _ -> failwithf "Parsing aborted unexpectedly..." -let parseAndCheckScript (file, input) = +let parseAndCheckScriptWithOptions (file, input, opts) = #if NETCOREAPP let dllName = Path.ChangeExtension(file, ".dll") @@ -179,9 +179,10 @@ let parseAndCheckScript (file, input) = #else let projectOptions, _diagnostics = checker.GetProjectOptionsFromScript(file, FSharp.Compiler.Text.SourceText.ofString input) |> Async.RunSynchronously - printfn "projectOptions = %A" projectOptions + //printfn "projectOptions = %A" projectOptions #endif + let projectOptions = { projectOptions with OtherOptions = Array.append opts projectOptions.OtherOptions } let parseResult, typedRes = checker.ParseAndCheckFileInProject(file, 0, FSharp.Compiler.Text.SourceText.ofString input, projectOptions) |> Async.RunSynchronously // if parseResult.Errors.Length > 0 then @@ -192,6 +193,8 @@ let parseAndCheckScript (file, input) = | FSharpCheckFileAnswer.Succeeded(res) -> parseResult, res | res -> failwithf "Parsing did not finish... (%A)" res +let parseAndCheckScript (file, input) = parseAndCheckScriptWithOptions (file, input, [| |]) + let parseSourceCode (name: string, code: string) = let location = Path.Combine(Path.GetTempPath(),"test"+string(hash (name, code))) try Directory.CreateDirectory(location) |> ignore with _ -> () @@ -202,6 +205,16 @@ let parseSourceCode (name: string, code: string) = let parseResults = checker.ParseFile(filePath, FSharp.Compiler.Text.SourceText.ofString code, options) |> Async.RunSynchronously parseResults.ParseTree +let matchBraces (name: string, code: string) = + let location = Path.Combine(Path.GetTempPath(),"test"+string(hash (name, code))) + try Directory.CreateDirectory(location) |> ignore with _ -> () + let filePath = Path.Combine(location, name + ".fs") + let dllPath = Path.Combine(location, name + ".dll") + let args = mkProjectCommandLineArgs(dllPath, [filePath]) + let options, errors = checker.GetParsingOptionsFromCommandLineArgs(List.ofArray args) + let braces = checker.MatchBraces(filePath, FSharp.Compiler.Text.SourceText.ofString code, options) |> Async.RunSynchronously + braces + let parseSourceCodeAndGetModule (source: string) = match parseSourceCode ("test", source) with | Some (ParsedInput.ImplFile (ParsedImplFileInput (_, _, _, _, _, [ moduleOrNamespace ], _))) -> moduleOrNamespace diff --git a/tests/service/EditorTests.fs b/tests/service/EditorTests.fs index ca0ce605d0..6c50d1e890 100644 --- a/tests/service/EditorTests.fs +++ b/tests/service/EditorTests.fs @@ -545,6 +545,62 @@ let _ = debug "[LanguageService] Type checking fails for '%s' with content=%A an (4, 82, 4, 84, 1); (4, 108, 4, 110, 1)|] +#if ASSUME_PREVIEW_FSHARP_CORE +[] +let ``Printf specifiers for regular and verbatim interpolated strings`` () = + let input = + """let os = System.Text.StringBuilder() // line 1 +let _ = $"{0}" // line 2 +let _ = $"%A{0}" // line 3 +let _ = $"%7.1f{1.0}" // line 4 +let _ = $"%-8.1e{1.0}+567" // line 5 +let s = "value" // line 6 +let _ = $@"%-5s{s}" // line 7 +let _ = $@"%-A{-10}" // line 8 +let _ = @$" + %-O{-10}" // line 10 +let _ = $" + + %-O{-10}" // line 13 +let _ = List.map (fun x -> sprintf $@"%A{x} + ") // line 15 +let _ = $"\n%-8.1e{1.0}+567" // line 16 +let _ = $@"%O{1}\n%-5s{s}" // line 17 +let _ = $"%%" // line 18 +let s2 = $"abc %d{s.Length} and %d{s.Length}def" // line 19 +let s3 = $"abc %d{s.Length} + and %d{s.Length}def" // line 21 +""" + + let file = "/home/user/Test.fsx" + let parseResult, typeCheckResults = parseAndCheckScriptWithOptions(file, input, [| "/langversion:preview" |]) + + typeCheckResults.Errors |> shouldEqual [||] + typeCheckResults.GetFormatSpecifierLocationsAndArity() + |> Array.map (fun (range,numArgs) -> range.StartLine, range.StartColumn, range.EndLine, range.EndColumn, numArgs) + |> shouldEqual + [|(3, 10, 3, 12, 1); (4, 10, 4, 15, 1); (5, 10, 5, 16, 1); (7, 11, 7, 15, 1); + (8, 11, 8, 14, 1); (10, 12, 10, 15, 1); (13, 12, 13, 15, 1); + (14, 38, 14, 40, 1); (16, 12, 16, 18, 1); (17, 11, 17, 13, 1); + (17, 18, 17, 22, 1); (18, 10, 18, 12, 0); (19, 15, 19, 17, 1); + (19, 32, 19, 34, 1); (20, 15, 20, 17, 1); (21, 20, 21, 22, 1)|] + +[] +let ``Printf specifiers for triple quote interpolated strings`` () = + let input = + "let _ = $\"\"\"abc %d{1} and %d{2+3}def\"\"\" " + + let file = "/home/user/Test.fsx" + let parseResult, typeCheckResults = parseAndCheckScriptWithOptions(file, input, [| "/langversion:preview" |]) + + typeCheckResults.Errors |> shouldEqual [||] + typeCheckResults.GetFormatSpecifierLocationsAndArity() + |> Array.map (fun (range,numArgs) -> range.StartLine, range.StartColumn, range.EndLine, range.EndColumn, numArgs) + |> shouldEqual + [|(1, 16, 1, 18, 1); (1, 26, 1, 28, 1)|] +#endif // ASSUME_PREVIEW_FSHARP_CORE + + [] let ``should not report format specifiers for illformed format strings`` () = let input = @@ -1372,3 +1428,52 @@ let ``Inherit ctor arg recovery`` () = let x = this """ assertHasSymbolUsages ["x"] checkResults + +[] +let ``Brace matching smoke test`` () = + let input = + """ +let x1 = { contents = 1 } +let x2 = {| contents = 1 |} +let x3 = [ 1 ] +let x4 = [| 1 |] +let x5 = $"abc{1}def" +""" + let file = "/home/user/Test.fsx" + let braces = matchBraces(file, input) + + braces + |> Array.map (fun (r1,r2) -> + (r1.StartLine, r1.StartColumn, r1.EndLine, r1.EndColumn), + (r2.StartLine, r2.StartColumn, r2.EndLine, r2.EndColumn)) + |> shouldEqual + [|((2, 9, 2, 10), (2, 24, 2, 25)); + ((3, 9, 3, 11), (3, 25, 3, 27)); + ((4, 9, 4, 10), (4, 13, 4, 14)); + ((5, 9, 5, 11), (5, 14, 5, 16)); + ((6, 14, 6, 15), (6, 16, 6, 17))|] + + +[] +let ``Brace matching in interpolated strings`` () = + let input = + " +let x5 = $\"abc{1}def\" +let x6 = $\"abc{1}def{2}hij\" +let x7 = $\"\"\"abc{1}def{2}hij\"\"\" +let x8 = $\"\"\"abc{ {contents=1} }def{2}hij\"\"\" +" + let file = "/home/user/Test.fsx" + let braces = matchBraces(file, input) + + braces + |> Array.map (fun (r1,r2) -> + (r1.StartLine, r1.StartColumn, r1.EndLine, r1.EndColumn), + (r2.StartLine, r2.StartColumn, r2.EndLine, r2.EndColumn)) + |> shouldEqual + [|((2, 14, 2, 15), (2, 16, 2, 17)); ((3, 14, 3, 15), (3, 16, 3, 17)); + ((3, 20, 3, 21), (3, 22, 3, 23)); ((4, 16, 4, 17), (4, 18, 4, 19)); + ((4, 22, 4, 23), (4, 24, 4, 25)); ((5, 19, 5, 20), (5, 30, 5, 31)); + ((5, 16, 5, 17), (5, 32, 5, 33)); ((5, 36, 5, 37), (5, 38, 5, 39))|] + + diff --git a/tests/service/MultiProjectAnalysisTests.fs b/tests/service/MultiProjectAnalysisTests.fs index 8a7cc4b683..9ee1f798ba 100644 --- a/tests/service/MultiProjectAnalysisTests.fs +++ b/tests/service/MultiProjectAnalysisTests.fs @@ -128,22 +128,6 @@ let u = Case1 3 (Project1B.dllName, Project1B.options); |] } let cleanFileName a = if a = fileName1 then "file1" else "??" - - -[] -#if NETCOREAPP -[] -#endif -let ``Test multi project 1 whole project errors`` () = - - let wholeProjectResults = checker.ParseAndCheckProject(MultiProject1.options) |> Async.RunSynchronously - - for e in wholeProjectResults.Errors do - printfn "multi project 1 error: <<<%s>>>" e.Message - - wholeProjectResults .Errors.Length |> shouldEqual 0 - wholeProjectResults.ProjectContext.GetReferencedAssemblies().Length |> shouldEqual 7 - [] let ``Test multi project 1 basic`` () = @@ -321,22 +305,6 @@ let p = (""" let size = (if ensureBigEnough then numProjectsForStressTest + 10 else numProjectsForStressTest / 2 ) FSharpChecker.Create(projectCacheSize=size) -[] -#if NETCOREAPP -[] -#endif -let ``Test ManyProjectsStressTest whole project errors`` () = - - let checker = ManyProjectsStressTest.makeCheckerForStressTest true - let wholeProjectResults = checker.ParseAndCheckProject(ManyProjectsStressTest.jointProject.Options) |> Async.RunSynchronously - let wholeProjectResults = checker.ParseAndCheckProject(ManyProjectsStressTest.jointProject.Options) |> Async.RunSynchronously - - for e in wholeProjectResults.Errors do - printfn "ManyProjectsStressTest error: <<<%s>>>" e.Message - - wholeProjectResults .Errors.Length |> shouldEqual 0 - wholeProjectResults.ProjectContext.GetReferencedAssemblies().Length |> shouldEqual (ManyProjectsStressTest.numProjectsForStressTest + 5) - [] let ``Test ManyProjectsStressTest basic`` () = diff --git a/tests/service/ProjectAnalysisTests.fs b/tests/service/ProjectAnalysisTests.fs index 1e6b1c418c..110db85e4f 100644 --- a/tests/service/ProjectAnalysisTests.fs +++ b/tests/service/ProjectAnalysisTests.fs @@ -3800,7 +3800,7 @@ let ``Test Project26 parameter symbols`` () = let rec isByRef (ty: FSharpType) = if ty.IsAbbreviation then isByRef ty.AbbreviatedType - else ty.IsNamedType && ty.NamedEntity.IsByRef + else ty.HasTypeDefinition && ty.TypeDefinition.IsByRef // check we can get the CurriedParameterGroups let objMethodsCurriedParameterGroups = diff --git a/tests/service/TokenizerTests.fs b/tests/service/TokenizerTests.fs index 0827ff3502..6dea464054 100644 --- a/tests/service/TokenizerTests.fs +++ b/tests/service/TokenizerTests.fs @@ -32,7 +32,7 @@ let tokenizeLines (lines:string[]) = yield n, parseLine(line, state, tokenizer) |> List.ofSeq ] [] -let ``Tokenizer test 1``() = +let ``Tokenizer test - simple let with string``() = let tokenizedLines = tokenizeLines [| "// Sets the hello wrold variable" @@ -54,5 +54,164 @@ let ``Tokenizer test 1``() = ("STRING_TEXT", "\""); ("STRING_TEXT", "Hello"); ("STRING_TEXT", " "); ("STRING_TEXT", "world"); ("STRING", "\""); ("WHITESPACE", " ")])] - Assert.AreEqual(actual, expected) + if actual <> expected then + printfn "actual = %A" actual + printfn "expected = %A" expected + Assert.Fail(sprintf "actual and expected did not match,actual =\n%A\nexpected=\n%A\n" actual expected) + +[] +let ``Tokenizer test 2 - single line non-nested string interpolation``() = + let tokenizedLines = + tokenizeLines + [| "// Tests tokenizing string interpolation" + "let hello0 = $\"\"" + "let hello1 = $\"Hello world\" " + "let hello2 = $\"Hello world {1+1} = {2}\" " + "let hello0v = @$\"\"" + "let hello1v = @$\"Hello world\" " + "let hello2v = @$\"Hello world {1+1} = {2}\" " |] + + let actual = + [ for lineNo, lineToks in tokenizedLines do + yield lineNo, [ for str, info in lineToks do yield info.TokenName, str ] ] + let expected = + [(0, + [("LINE_COMMENT", "//"); ("LINE_COMMENT", " "); ("LINE_COMMENT", "Tests"); + ("LINE_COMMENT", " "); ("LINE_COMMENT", "tokenizing"); ("LINE_COMMENT", " "); + ("LINE_COMMENT", "string"); ("LINE_COMMENT", " "); + ("LINE_COMMENT", "interpolation")]); + (1, + [("LET", "let"); ("WHITESPACE", " "); ("IDENT", "hello0"); ("WHITESPACE", " "); + ("EQUALS", "="); ("WHITESPACE", " "); ("STRING_TEXT", "$\""); + ("INTERP_STRING_BEGIN_END", "\"")]); + (2, + [("LET", "let"); ("WHITESPACE", " "); ("IDENT", "hello1"); ("WHITESPACE", " "); + ("EQUALS", "="); ("WHITESPACE", " "); ("STRING_TEXT", "$\""); + ("STRING_TEXT", "Hello"); ("STRING_TEXT", " "); ("STRING_TEXT", "world"); + ("INTERP_STRING_BEGIN_END", "\""); ("WHITESPACE", " ")]); + (3, + [("LET", "let"); ("WHITESPACE", " "); ("IDENT", "hello2"); ("WHITESPACE", " "); + ("EQUALS", "="); ("WHITESPACE", " "); ("STRING_TEXT", "$\""); + ("STRING_TEXT", "Hello"); ("STRING_TEXT", " "); ("STRING_TEXT", "world"); + ("STRING_TEXT", " "); ("INTERP_STRING_BEGIN_PART", "{"); ("INT32", "1"); + ("PLUS_MINUS_OP", "+"); ("INT32", "1"); ("STRING_TEXT", "}"); + ("STRING_TEXT", " "); ("STRING_TEXT", "="); ("STRING_TEXT", " "); + ("INTERP_STRING_PART", "{"); ("INT32", "2"); ("STRING_TEXT", "}"); + ("INTERP_STRING_END", "\""); ("WHITESPACE", " ")]); + (4, + [("LET", "let"); ("WHITESPACE", " "); ("IDENT", "hello0v"); + ("WHITESPACE", " "); ("EQUALS", "="); ("WHITESPACE", " "); + ("STRING_TEXT", "@$\""); ("INTERP_STRING_BEGIN_END", "\"")]); + (5, + [("LET", "let"); ("WHITESPACE", " "); ("IDENT", "hello1v"); + ("WHITESPACE", " "); ("EQUALS", "="); ("WHITESPACE", " "); + ("STRING_TEXT", "@$\""); ("STRING_TEXT", "Hello"); ("STRING_TEXT", " "); + ("STRING_TEXT", "world"); ("INTERP_STRING_BEGIN_END", "\""); + ("WHITESPACE", " ")]); + (6, + [("LET", "let"); ("WHITESPACE", " "); ("IDENT", "hello2v"); + ("WHITESPACE", " "); ("EQUALS", "="); ("WHITESPACE", " "); + ("STRING_TEXT", "@$\""); ("STRING_TEXT", "Hello"); ("STRING_TEXT", " "); + ("STRING_TEXT", "world"); ("STRING_TEXT", " "); + ("INTERP_STRING_BEGIN_PART", "{"); ("INT32", "1"); ("PLUS_MINUS_OP", "+"); + ("INT32", "1"); ("STRING_TEXT", "}"); ("STRING_TEXT", " "); + ("STRING_TEXT", "="); ("STRING_TEXT", " "); ("INTERP_STRING_PART", "{"); + ("INT32", "2"); ("STRING_TEXT", "}"); ("INTERP_STRING_END", "\""); + ("WHITESPACE", " ")]);] + + if actual <> expected then + printfn "actual = %A" actual + printfn "expected = %A" expected + Assert.Fail(sprintf "actual and expected did not match,actual =\n%A\nexpected=\n%A\n" actual expected) + + +[] +let ``Tokenizer test - multiline non-nested string interpolation``() = + let tokenizedLines = + tokenizeLines + [| "let hello1t = $\"\"\"abc {1+" + " 1} def\"\"\"" |] + + let actual = + [ for lineNo, lineToks in tokenizedLines do + yield lineNo, [ for str, info in lineToks do yield info.TokenName, str ] ] + let expected = + [(0, + [("LET", "let"); ("WHITESPACE", " "); ("IDENT", "hello1t"); + ("WHITESPACE", " "); ("EQUALS", "="); ("WHITESPACE", " "); + ("STRING_TEXT", "$\"\"\""); ("STRING_TEXT", "abc"); ("STRING_TEXT", " "); + ("INTERP_STRING_BEGIN_PART", "{"); ("INT32", "1"); ("PLUS_MINUS_OP", "+")]); + (1, + [("WHITESPACE", " "); ("INT32", "1"); ("STRING_TEXT", "}"); + ("STRING_TEXT", " "); ("STRING_TEXT", "def"); ("INTERP_STRING_END", "\"\"\"")])] + + if actual <> expected then + printfn "actual = %A" actual + printfn "expected = %A" expected + Assert.Fail(sprintf "actual and expected did not match,actual =\n%A\nexpected=\n%A\n" actual expected) + +[] +// checks nested '{' and nested single-quote strings +let ``Tokenizer test - multi-line nested string interpolation``() = + let tokenizedLines = + tokenizeLines + [| "let hello1t = $\"\"\"abc {\"a\" + " + " { " + " contents = \"b\" " + " }.contents " + " } def\"\"\"" |] + + let actual = + [ for lineNo, lineToks in tokenizedLines do + yield lineNo, [ for str, info in lineToks do yield info.TokenName, str ] ] + let expected = + [(0, + [("LET", "let"); ("WHITESPACE", " "); ("IDENT", "hello1t"); + ("WHITESPACE", " "); ("EQUALS", "="); ("WHITESPACE", " "); + ("STRING_TEXT", "$\"\"\""); ("STRING_TEXT", "abc"); ("STRING_TEXT", " "); + ("INTERP_STRING_BEGIN_PART", "{"); ("STRING_TEXT", "\""); ("STRING_TEXT", "a"); + ("STRING", "\""); ("WHITESPACE", " "); ("PLUS_MINUS_OP", "+"); + ("WHITESPACE", " ")]); + (1, + [("WHITESPACE", " "); ("LBRACE", "{"); + ("WHITESPACE", " ")]); + (2, + [("WHITESPACE", " "); ("IDENT", "contents"); + ("WHITESPACE", " "); ("EQUALS", "="); ("WHITESPACE", " "); + ("STRING_TEXT", "\""); ("STRING_TEXT", "b"); ("STRING", "\""); + ("WHITESPACE", " ")]); + (3, + [("WHITESPACE", " "); ("RBRACE", "}"); ("DOT", "."); + ("IDENT", "contents"); ("WHITESPACE", " ")]); + (4, + [("WHITESPACE", " "); ("STRING_TEXT", "}"); + ("STRING_TEXT", " "); ("STRING_TEXT", "def"); ("INTERP_STRING_END", "\"\"\"")])] + + if actual <> expected then + printfn "actual = %A" actual + printfn "expected = %A" expected + Assert.Fail(sprintf "actual and expected did not match,actual =\n%A\nexpected=\n%A\n" actual expected) + +[] +let ``Tokenizer test - single-line nested string interpolation``() = + let tokenizedLines = + tokenizeLines + [| " $\"abc { { contents = 1 } }\" " |] + + let actual = + [ for lineNo, lineToks in tokenizedLines do + yield lineNo, [ for str, info in lineToks do yield info.TokenName, str ] ] + let expected = + [(0, + [("WHITESPACE", " "); ("STRING_TEXT", "$\""); ("STRING_TEXT", "abc"); + ("STRING_TEXT", " "); ("INTERP_STRING_BEGIN_PART", "{"); ("WHITESPACE", " "); + ("LBRACE", "{"); ("WHITESPACE", " "); ("IDENT", "contents"); + ("WHITESPACE", " "); ("EQUALS", "="); ("WHITESPACE", " "); ("INT32", "1"); + ("WHITESPACE", " "); ("RBRACE", "}"); ("WHITESPACE", " "); + ("STRING_TEXT", "}"); ("INTERP_STRING_END", "\""); ("WHITESPACE", " ")])] + + if actual <> expected then + printfn "actual = %A" actual + printfn "expected = %A" expected + Assert.Fail(sprintf "actual and expected did not match,actual =\n%A\nexpected=\n%A\n" actual expected) diff --git a/tests/service/data/CSharp_Analysis/CSharp_Analysis.csproj b/tests/service/data/CSharp_Analysis/CSharp_Analysis.csproj index 4fc4184b23..51649639ca 100644 --- a/tests/service/data/CSharp_Analysis/CSharp_Analysis.csproj +++ b/tests/service/data/CSharp_Analysis/CSharp_Analysis.csproj @@ -2,9 +2,9 @@ - net45 + netstandard2.0 1.0.0.0 - nunit + none $(NoWarn);0067;1591 diff --git a/tests/service/data/TestTP/TestTP.fsproj b/tests/service/data/TestTP/TestTP.fsproj index c56ec5f349..6608798215 100644 --- a/tests/service/data/TestTP/TestTP.fsproj +++ b/tests/service/data/TestTP/TestTP.fsproj @@ -2,7 +2,7 @@ - net45 + net472 true nunit diff --git a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj index e0ef07795e..d9c37232e4 100644 --- a/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj +++ b/vsintegration/Vsix/VisualFSharpFull/VisualFSharpFull.csproj @@ -106,7 +106,7 @@ All 2 True - TargetFramework=net45 + TargetFramework=netstandard2.0 {8B3E283D-B5FE-4055-9D80-7E3A32F3967B} diff --git a/vsintegration/src/FSharp.Editor/AutomaticCompletion/BraceCompletionSessionProvider.fs b/vsintegration/src/FSharp.Editor/AutomaticCompletion/BraceCompletionSessionProvider.fs index dd3be82109..0ee68698c2 100644 --- a/vsintegration/src/FSharp.Editor/AutomaticCompletion/BraceCompletionSessionProvider.fs +++ b/vsintegration/src/FSharp.Editor/AutomaticCompletion/BraceCompletionSessionProvider.fs @@ -459,6 +459,12 @@ type AsteriskCompletionSession() = [, FSharpConstants.FSharpLanguageName)>] type EditorBraceCompletionSessionFactory() = + let spanIsNotCommentOrString (span: ClassifiedSpan) = + match span.ClassificationType with + | ClassificationTypeNames.Comment + | ClassificationTypeNames.StringLiteral -> false + | _ -> true + member __.IsSupportedOpeningBrace openingBrace = match openingBrace with | Parenthesis.OpenCharacter | CurlyBrackets.OpenCharacter | SquareBrackets.OpenCharacter @@ -466,23 +472,37 @@ type EditorBraceCompletionSessionFactory() = | Asterisk.OpenCharacter -> true | _ -> false - member __.CheckCodeContext(document: Document, position: int, _openingBrace, cancellationToken) = - // We need to know if we are inside a F# comment. If we are, then don't do automatic completion. + member __.CheckCodeContext(document: Document, position: int, _openingBrace:char, cancellationToken) = + // We need to know if we are inside a F# string or comment. If we are, then don't do automatic completion. let sourceCodeTask = document.GetTextAsync(cancellationToken) sourceCodeTask.Wait(cancellationToken) let sourceCode = sourceCodeTask.Result position = 0 - || let colorizationData = Tokenizer.getClassifiedSpans(document.Id, sourceCode, TextSpan(position - 1, 1), Some (document.FilePath), [ ], cancellationToken) - in colorizationData.Count = 0 - || colorizationData.Exists(fun classifiedSpan -> - classifiedSpan.TextSpan.IntersectsWith position && - ( - match classifiedSpan.ClassificationType with - | ClassificationTypeNames.Comment - | ClassificationTypeNames.StringLiteral -> false - | _ -> true // anything else is a valid classification type - )) + || (let colorizationData = Tokenizer.getClassifiedSpans(document.Id, sourceCode, TextSpan(position - 1, 1), Some (document.FilePath), [ ], cancellationToken) + colorizationData.Count = 0 + || + colorizationData.Exists(fun classifiedSpan -> + classifiedSpan.TextSpan.IntersectsWith position && + spanIsNotCommentOrString classifiedSpan)) + + // This would be the case where '{' has been pressed in a string and the next position + // is known not to be a string. This corresponds to the end of an interpolated string part. + // + // However, Roslyn doesn't activate BraceCompletionSessionProvider for string text at all (and at the time '{ + // is pressed the text is classified as a string). So this code doesn't get called at all and so + // no brace completion is available inside interpolated strings. + // + // || (openingBrace = '{' && + // colorizationData.Exists(fun classifiedSpan -> + // classifiedSpan.TextSpan.IntersectsWith (position-1) && + // spanIsString classifiedSpan) && + // let colorizationData2 = Tokenizer.getClassifiedSpans(document.Id, sourceCode, TextSpan(position, 1), Some (document.FilePath), [ ], cancellationToken) + // (colorizationData2.Count = 0 + // || + // colorizationData2.Exists(fun classifiedSpan -> + // classifiedSpan.TextSpan.IntersectsWith position && + // not (spanIsString classifiedSpan))))) member __.CreateEditorSession(_document, _openingPosition, openingBrace, _cancellationToken) = match openingBrace with diff --git a/vsintegration/src/FSharp.Editor/Completion/CompletionUtils.fs b/vsintegration/src/FSharp.Editor/Completion/CompletionUtils.fs index 5d210d5f36..c5494a39fa 100644 --- a/vsintegration/src/FSharp.Editor/Completion/CompletionUtils.fs +++ b/vsintegration/src/FSharp.Editor/Completion/CompletionUtils.fs @@ -89,7 +89,8 @@ module internal CompletionUtils = let triggerLine = textLines.GetLineFromPosition triggerPosition let classifiedSpans = Tokenizer.getClassifiedSpans(documentId, sourceText, triggerLine.Span, Some filePath, defines, CancellationToken.None) classifiedSpans.Count = 0 || // we should provide completion at the start of empty line, where there are no tokens at all - classifiedSpans.Exists (fun classifiedSpan -> + let result = + classifiedSpans.Exists (fun classifiedSpan -> classifiedSpan.TextSpan.IntersectsWith triggerPosition && ( match classifiedSpan.ClassificationType with @@ -100,6 +101,7 @@ module internal CompletionUtils = | ClassificationTypeNames.NumericLiteral -> false | _ -> true // anything else is a valid classification type )) + result let inline getKindPriority kind = match kind with diff --git a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.cs b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.cs index 37f6af8e8e..9f6361691f 100644 --- a/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.cs +++ b/vsintegration/src/FSharp.ProjectSystem.Base/Project/ProjectNode.cs @@ -2315,7 +2315,7 @@ public virtual void SetOrCreateBuildEventProperty(string propertyName, string pr } /// Support hex format (like 0xFF) - /// + /// /// Raise if invalid format /// The inner exception contains the real exception, of type FormatException, StackOverflowException /// diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/VSPackage.resx b/vsintegration/src/FSharp.ProjectSystem.FSharp/VSPackage.resx index f29e74b9ec..8cc0c1c625 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/VSPackage.resx +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/VSPackage.resx @@ -464,10 +464,10 @@ Customizes the environment to maximize code editor screen space and improve the visibility of F# commands and tool windows. - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} + Microsoft Visual F# Tools - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} + Microsoft Visual F# Tools 1.0 @@ -476,7 +476,7 @@ Microsoft Visual F# Tools - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} + Visual F# Tools F# Interactive diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.cs.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.cs.xlf index faf0f6ced2..e52a10e47b 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.cs.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.cs.xlf @@ -433,13 +433,13 @@ - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} pro F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} pro F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools @@ -453,8 +453,8 @@ - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Visual F# Tools {{FSProductVersion}} pro F# {{FSLanguageVersion}} + Visual F# Tools + Visual F# Tools diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.de.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.de.xlf index 546139c69f..e21208b881 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.de.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.de.xlf @@ -433,13 +433,13 @@ - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} für F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} für F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools @@ -453,8 +453,8 @@ - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Visual F# Tools {{FSProductVersion}} für F# {{FSLanguageVersion}} + Visual F# Tools + Visual F# Tools diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.es.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.es.xlf index b3fcbe9c5f..49447a6e90 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.es.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.es.xlf @@ -433,13 +433,13 @@ - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Herramientas de Microsoft Visual F# {{FSProductVersion}} para F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Herramientas de Microsoft Visual F# - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Herramientas de Microsoft Visual F# {{FSProductVersion}} para F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Herramientas de Microsoft Visual F# @@ -453,8 +453,8 @@ - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Herramientas de Visual F# {{FSProductVersion}} para F# {{FSLanguageVersion}} + Visual F# Tools + Herramientas de Visual F# diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.fr.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.fr.xlf index 835598564e..112cb991ba 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.fr.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.fr.xlf @@ -433,13 +433,13 @@ - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} pour F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} pour F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools @@ -453,8 +453,8 @@ - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Visual F# Tools {{FSProductVersion}} pour F# {{FSLanguageVersion}} + Visual F# Tools + Visual F# Tools diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.it.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.it.xlf index 14900d3bbe..8bd00bd069 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.it.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.it.xlf @@ -433,13 +433,13 @@ - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} per F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} per F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools @@ -453,8 +453,8 @@ - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Visual F# Tools {{FSProductVersion}} per F# {{FSLanguageVersion}} + Visual F# Tools + Visual F# Tools diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ja.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ja.xlf index ea8b6aa5ed..d6fd139c10 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ja.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ja.xlf @@ -433,13 +433,13 @@ - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} + Microsoft Visual F# Tools F# {{FSLanguageVersion}} の Microsoft Visual F# Tools {{FSProductVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - F# {{FSLanguageVersion}} の Microsoft Visual F# Tools {{FSProductVersion}} + Microsoft Visual F# Tools + F# {{FSLanguageVersion}} の Microsoft Visual F# Tools {{FSProductVersion}} @@ -453,8 +453,8 @@ - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - F# {{FSLanguageVersion}} の Visual F# Tools {{FSProductVersion}} + Visual F# Tools + F# {{FSLanguageVersion}} の Visual F# Tools {{FSProductVersion}} diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ko.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ko.xlf index 28db29dbba..63ef9c89bd 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ko.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ko.xlf @@ -433,13 +433,13 @@ - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - F# {{FSLanguageVersion}}용 Microsoft Visual F# Tools {{FSProductVersion}} + Microsoft Visual F# Tools + F# {{FSLanguageVersion}}용 Microsoft Visual F# Tools {{FSProductVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - F# {{FSLanguageVersion}}용 Microsoft Visual F# Tools {{FSProductVersion}} + Microsoft Visual F# Tools + F# {{FSLanguageVersion}}용 Microsoft Visual F# Tools {{FSProductVersion}} @@ -453,8 +453,8 @@ - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - F# {{FSLanguageVersion}}용 Visual F# Tools {{FSProductVersion}} + Visual F# Tools + F# {{FSLanguageVersion}}용 Visual F# Tools {{FSProductVersion}} diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pl.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pl.xlf index b77f911527..b9ce9cc327 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pl.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pl.xlf @@ -433,13 +433,13 @@ - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} dla języka F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools {{FSProductVersion}} dla języka F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} dla języka F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools {{FSProductVersion}} dla języka F# {{FSLanguageVersion}} @@ -453,8 +453,8 @@ - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Visual F# Tools {{FSProductVersion}} dla języka F# {{FSLanguageVersion}} + Visual F# Tools + Visual F# Tools {{FSProductVersion}} dla języka F# {{FSLanguageVersion}} diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pt-BR.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pt-BR.xlf index ca14819663..2c82d17021 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pt-BR.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.pt-BR.xlf @@ -433,13 +433,13 @@ - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} para F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools {{FSProductVersion}} para F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} para F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools {{FSProductVersion}} para F# {{FSLanguageVersion}} @@ -453,8 +453,8 @@ - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Visual F# Tools {{FSProductVersion}} para F# {{FSLanguageVersion}} + Visual F# Tools + Visual F# Tools {{FSProductVersion}} para F# {{FSLanguageVersion}} diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ru.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ru.xlf index 8267881bf2..24aae7dc09 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ru.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.ru.xlf @@ -433,13 +433,13 @@ - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} для F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools {{FSProductVersion}} для F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} для F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools {{FSProductVersion}} для F# {{FSLanguageVersion}} @@ -453,8 +453,8 @@ - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Visual F# Tools {{FSProductVersion}} для F# {{FSLanguageVersion}} + Visual F# Tools + Visual F# Tools {{FSProductVersion}} для F# {{FSLanguageVersion}} diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.tr.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.tr.xlf index 6243b6ee11..7b6b423b6f 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.tr.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.tr.xlf @@ -433,13 +433,13 @@ - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - F# {{FSLanguageVersion}} için Microsoft Visual F# Tools {{FSProductVersion}} + Microsoft Visual F# Tools + F# {{FSLanguageVersion}} için Microsoft Visual F# Tools {{FSProductVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - F# {{FSLanguageVersion}} için Microsoft Visual F# Tools {{FSProductVersion}} + Microsoft Visual F# Tools + F# {{FSLanguageVersion}} için Microsoft Visual F# Tools {{FSProductVersion}} @@ -453,8 +453,8 @@ - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - F# {{FSLanguageVersion}} için Visual F# Tools {{FSProductVersion}} + Visual F# Tools + F# {{FSLanguageVersion}} için Visual F# Tools {{FSProductVersion}} diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.zh-Hans.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.zh-Hans.xlf index 92e49e25e2..b8a0a95b30 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.zh-Hans.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.zh-Hans.xlf @@ -433,13 +433,13 @@ - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} + Microsoft Visual F# Tools + Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} @@ -453,8 +453,8 @@ - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} + Visual F# Tools + Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} diff --git a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.zh-Hant.xlf b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.zh-Hant.xlf index 0864eb6086..a0d186fac0 100644 --- a/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.zh-Hant.xlf +++ b/vsintegration/src/FSharp.ProjectSystem.FSharp/xlf/VSPackage.zh-Hant.xlf @@ -433,13 +433,13 @@ - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - 適用於 F# {{FSLanguageVersion}} 的 Microsoft Visual F# Tools {{FSProductVersion}} + Microsoft Visual F# Tools + 適用於 F# {{FSLanguageVersion}} 的 Microsoft Visual F# Tools {{FSProductVersion}} - Microsoft Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - 適用於 F# {{FSLanguageVersion}} 的 Microsoft Visual F# Tools {{FSProductVersion}} + Microsoft Visual F# Tools + 適用於 F# {{FSLanguageVersion}} 的 Microsoft Visual F# Tools {{FSProductVersion}} @@ -453,8 +453,8 @@ - Visual F# Tools {{FSProductVersion}} for F# {{FSLanguageVersion}} - 適用於 F# {{FSLanguageVersion}} 的 Visual F# Tools {{FSProductVersion}} + Visual F# Tools + 適用於 F# {{FSLanguageVersion}} 的 Visual F# Tools {{FSProductVersion}} diff --git a/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj b/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj index 28e4f314f5..1fd3eced2b 100644 --- a/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj +++ b/vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj @@ -23,6 +23,7 @@ + CompilerLocationUtils.fs diff --git a/vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/DefinitionLocationAttribute.csproj b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/DefinitionLocationAttribute.csproj index f5f0216e9f..0fdc04a774 100644 --- a/vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/DefinitionLocationAttribute.csproj +++ b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttribute/DefinitionLocationAttribute.csproj @@ -3,7 +3,7 @@ - net45 + net472 diff --git a/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/DefinitionLocationAttributeFileDoesnotExist.csproj b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/DefinitionLocationAttributeFileDoesnotExist.csproj index f5f0216e9f..0fdc04a774 100644 --- a/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/DefinitionLocationAttributeFileDoesnotExist.csproj +++ b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeFileDoesnotExist/DefinitionLocationAttributeFileDoesnotExist.csproj @@ -3,7 +3,7 @@ - net45 + net472 diff --git a/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/DefinitionLocationAttributeLineDoesnotExist.csproj b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/DefinitionLocationAttributeLineDoesnotExist.csproj index f5f0216e9f..0fdc04a774 100644 --- a/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/DefinitionLocationAttributeLineDoesnotExist.csproj +++ b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeLineDoesnotExist/DefinitionLocationAttributeLineDoesnotExist.csproj @@ -3,7 +3,7 @@ - net45 + net472 diff --git a/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/DefinitionLocationAttributeWithSpaceInTheType.csproj b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/DefinitionLocationAttributeWithSpaceInTheType.csproj index f5f0216e9f..0fdc04a774 100644 --- a/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/DefinitionLocationAttributeWithSpaceInTheType.csproj +++ b/vsintegration/tests/MockTypeProviders/DefinitionLocationAttributeWithSpaceInTheType/DefinitionLocationAttributeWithSpaceInTheType.csproj @@ -3,7 +3,7 @@ - net45 + net472 diff --git a/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fsproj b/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fsproj index 0fb60c539a..28541d96ad 100644 --- a/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fsproj +++ b/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/DummyProviderForLanguageServiceTesting.fsproj @@ -3,7 +3,7 @@ - net45 + net472 true diff --git a/vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/EditorHideMethodsAttribute.csproj b/vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/EditorHideMethodsAttribute.csproj index f5f0216e9f..0fdc04a774 100644 --- a/vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/EditorHideMethodsAttribute.csproj +++ b/vsintegration/tests/MockTypeProviders/EditorHideMethodsAttribute/EditorHideMethodsAttribute.csproj @@ -3,7 +3,7 @@ - net45 + net472 diff --git a/vsintegration/tests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fsproj b/vsintegration/tests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fsproj index 5f0e7a69b6..295d1dc0e0 100644 --- a/vsintegration/tests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fsproj +++ b/vsintegration/tests/MockTypeProviders/EmptyAssembly/EmptyAssembly.fsproj @@ -3,7 +3,7 @@ - net45 + net472 true diff --git a/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/XmlDocAttributeWithAdequateComment.csproj b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/XmlDocAttributeWithAdequateComment.csproj index f5f0216e9f..0fdc04a774 100644 --- a/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/XmlDocAttributeWithAdequateComment.csproj +++ b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithAdequateComment/XmlDocAttributeWithAdequateComment.csproj @@ -3,7 +3,7 @@ - net45 + net472 diff --git a/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/XmlDocAttributeWithEmptyComment.csproj b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/XmlDocAttributeWithEmptyComment.csproj index f5f0216e9f..0fdc04a774 100644 --- a/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/XmlDocAttributeWithEmptyComment.csproj +++ b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithEmptyComment/XmlDocAttributeWithEmptyComment.csproj @@ -3,7 +3,7 @@ - net45 + net472 diff --git a/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/XmlDocAttributeWithLocalizedComment.csproj b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/XmlDocAttributeWithLocalizedComment.csproj index f5f0216e9f..0fdc04a774 100644 --- a/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/XmlDocAttributeWithLocalizedComment.csproj +++ b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLocalizedComment/XmlDocAttributeWithLocalizedComment.csproj @@ -3,7 +3,7 @@ - net45 + net472 diff --git a/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/XmlDocAttributeWithLongComment.csproj b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/XmlDocAttributeWithLongComment.csproj index f5f0216e9f..0fdc04a774 100644 --- a/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/XmlDocAttributeWithLongComment.csproj +++ b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithLongComment/XmlDocAttributeWithLongComment.csproj @@ -3,7 +3,7 @@ - net45 + net472 diff --git a/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/XmlDocAttributeWithNullComment.csproj b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/XmlDocAttributeWithNullComment.csproj index f5f0216e9f..0fdc04a774 100644 --- a/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/XmlDocAttributeWithNullComment.csproj +++ b/vsintegration/tests/MockTypeProviders/XmlDocAttributeWithNullComment/XmlDocAttributeWithNullComment.csproj @@ -3,7 +3,7 @@ - net45 + net472 diff --git a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj index c3e21061e0..dedeb8bbe0 100644 --- a/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj +++ b/vsintegration/tests/Salsa/VisualFSharp.Salsa.fsproj @@ -17,6 +17,7 @@ + CompilerLocationUtils.fs diff --git a/vsintegration/tests/UnitTests/BraceMatchingServiceTests.fs b/vsintegration/tests/UnitTests/BraceMatchingServiceTests.fs index 0e71493d22..67d8f88b88 100644 --- a/vsintegration/tests/UnitTests/BraceMatchingServiceTests.fs +++ b/vsintegration/tests/UnitTests/BraceMatchingServiceTests.fs @@ -86,6 +86,19 @@ type BraceMatchingServiceTests() = member this.BracketInExpression() = this.VerifyBraceMatch("let x = (3*5)-1", "(3*", ")-1") + [] + member this.BraceInInterpolatedStringSimple() = + this.VerifyBraceMatch("let x = $\"abc{1}def\"", "{1", "}def") + + [] + member this.BraceInInterpolatedStringTwoHoles() = + this.VerifyBraceMatch("let x = $\"abc{1}def{2+3}hij\"", "{2", "}hij") + + [] + member this.BraceInInterpolatedStringNestedRecord() = + this.VerifyBraceMatch("let x = $\"abc{ id{contents=3}.contents }\"", "{contents", "}.contents") + this.VerifyBraceMatch("let x = $\"abc{ id{contents=3}.contents }\"", "{ id", "}\"") + [] [] member this.BraceInMultiLineCommentShouldNotBeMatched(startMarker: string) = diff --git a/vsintegration/tests/UnitTests/CompletionProviderTests.fs b/vsintegration/tests/UnitTests/CompletionProviderTests.fs index 97ea7cbeff..520ef2b661 100644 --- a/vsintegration/tests/UnitTests/CompletionProviderTests.fs +++ b/vsintegration/tests/UnitTests/CompletionProviderTests.fs @@ -35,12 +35,12 @@ open FSharp.Compiler.SourceCodeServices open UnitTests.TestLib.LanguageService let filePath = "C:\\test.fs" -let internal projectOptions = { +let internal projectOptions opts = { ProjectFileName = "C:\\test.fsproj" ProjectId = None SourceFiles = [| filePath |] ReferencedProjects = [| |] - OtherOptions = [| |] + OtherOptions = opts IsIncompleteTypeCheckEnvironment = true UseScriptResolutionRules = false LoadTime = DateTime.MaxValue @@ -53,10 +53,10 @@ let internal projectOptions = { let formatCompletions(completions : string seq) = "\n\t" + String.Join("\n\t", completions) -let VerifyCompletionList(fileContents: string, marker: string, expected: string list, unexpected: string list) = +let VerifyCompletionListWithOptions(fileContents: string, marker: string, expected: string list, unexpected: string list, opts) = let caretPosition = fileContents.IndexOf(marker) + marker.Length let results = - FSharpCompletionProvider.ProvideCompletionsAsyncAux(checker, SourceText.From(fileContents), caretPosition, projectOptions, filePath, 0, (fun _ -> []), LanguageServicePerformanceOptions.Default, IntelliSenseOptions.Default) + FSharpCompletionProvider.ProvideCompletionsAsyncAux(checker, SourceText.From(fileContents), caretPosition, projectOptions opts, filePath, 0, (fun _ -> []), LanguageServicePerformanceOptions.Default, IntelliSenseOptions.Default) |> Async.RunSynchronously |> Option.defaultValue (ResizeArray()) |> Seq.map(fun result -> result.DisplayText) @@ -99,12 +99,15 @@ let VerifyCompletionList(fileContents: string, marker: string, expected: string let msg = sprintf "%s%s%s" expectedNotFoundMsg unexpectedFoundMsg completionsMsg Assert.Fail(msg) +let VerifyCompletionList(fileContents, marker, expected, unexpected) = + VerifyCompletionListWithOptions(fileContents, marker, expected, unexpected, [| |]) + let VerifyCompletionListExactly(fileContents: string, marker: string, expected: string list) = let caretPosition = fileContents.IndexOf(marker) + marker.Length let actual = - FSharpCompletionProvider.ProvideCompletionsAsyncAux(checker, SourceText.From(fileContents), caretPosition, projectOptions, filePath, 0, (fun _ -> []), LanguageServicePerformanceOptions.Default, IntelliSenseOptions.Default) + FSharpCompletionProvider.ProvideCompletionsAsyncAux(checker, SourceText.From(fileContents), caretPosition, projectOptions [| |], filePath, 0, (fun _ -> []), LanguageServicePerformanceOptions.Default, IntelliSenseOptions.Default) |> Async.RunSynchronously |> Option.defaultValue (ResizeArray()) |> Seq.toList @@ -134,18 +137,18 @@ let ShouldTriggerCompletionAtCorrectMarkers() = ("System.", true) ("Console.", true) ] - for (marker: string, shouldBeTriggered: bool) in testCases do - let fileContents = """ + for (marker, shouldBeTriggered) in testCases do + let fileContents = """ let x = 1 let y = 2 System.Console.WriteLine(x + y) """ - let caretPosition = fileContents.IndexOf(marker) + marker.Length - let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) - let getInfo() = documentId, filePath, [] - let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo, IntelliSenseOptions.Default) - Assert.AreEqual(shouldBeTriggered, triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should compute the correct result") + let caretPosition = fileContents.IndexOf(marker) + marker.Length + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let getInfo() = documentId, filePath, [] + let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo, IntelliSenseOptions.Default) + Assert.AreEqual(shouldBeTriggered, triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should compute the correct result") [] let ShouldNotTriggerCompletionAfterAnyTriggerOtherThanInsertionOrDeletion() = @@ -180,6 +183,32 @@ System.Console.WriteLine() let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo, IntelliSenseOptions.Default) Assert.IsFalse(triggered, "FSharpCompletionProvider.ShouldTriggerCompletionAux() should not trigger") +[] +let ShouldTriggerCompletionInInterpolatedString() = + let fileContents = """ + +let x = 1 +let y = 2 +let z = $"abc {System.Console.WriteLine(x + y)} def" +""" + let testCases = + [ + ("x", true) + ("y", true) + ("1", false) + ("2", false) + ("x +", false) + ("Console.Write", false) + ("System.", true) + ("Console.", true) ] + + for (marker, shouldBeTriggered) in testCases do + let caretPosition = fileContents.IndexOf(marker) + marker.Length + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let getInfo() = documentId, filePath, [] + let triggered = FSharpCompletionProvider.ShouldTriggerCompletionAux(SourceText.From(fileContents), caretPosition, CompletionTriggerKind.Insertion, getInfo, IntelliSenseOptions.Default) + Assert.AreEqual(shouldBeTriggered, triggered, sprintf "FSharpCompletionProvider.ShouldTriggerCompletionAux() should compute the correct result for marker '%s'" marker) + [] let ShouldNotTriggerCompletionInExcludedCode() = let fileContents = """ @@ -306,6 +335,16 @@ System.Console.WriteLine() """ VerifyCompletionList(fileContents, "System.", ["Console"; "Array"; "String"], ["T1"; "M1"; "M2"]) +[] +let ShouldDisplaySystemNamespaceInInterpolatedString() = + let fileContents = """ +type T1 = + member this.M1 = 5 + member this.M2 = "literal" +let x = $"1 not the same as {System.Int32.MaxValue} is it" +""" + VerifyCompletionListWithOptions(fileContents, "System.", ["Console"; "Array"; "String"], ["T1"; "M1"; "M2"], [| "/langversion:preview" |]) + [] let ``Class instance members are ordered according to their kind and where they are defined (simple case, by a variable)``() = let fileContents = """ diff --git a/vsintegration/tests/UnitTests/GoToDefinitionServiceTests.fs b/vsintegration/tests/UnitTests/GoToDefinitionServiceTests.fs index 17322b8faa..755b66ca08 100644 --- a/vsintegration/tests/UnitTests/GoToDefinitionServiceTests.fs +++ b/vsintegration/tests/UnitTests/GoToDefinitionServiceTests.fs @@ -62,6 +62,37 @@ module GoToDefinitionServiceTests = | _ -> return! None } + let makeOptions filePath args = + { + ProjectFileName = "C:\\test.fsproj" + ProjectId = None + SourceFiles = [| filePath |] + ReferencedProjects = [| |] + OtherOptions = args + IsIncompleteTypeCheckEnvironment = true + UseScriptResolutionRules = false + LoadTime = DateTime.MaxValue + OriginalLoadReferences = [] + UnresolvedReferences = None + ExtraProjectInfo = None + Stamp = None + } + + let GoToDefinitionTest (fileContents: string, caretMarker: string, expected) = + + let filePath = Path.GetTempFileName() + ".fs" + let options = makeOptions filePath [| |] + File.WriteAllText(filePath, fileContents) + + let caretPosition = fileContents.IndexOf(caretMarker) + caretMarker.Length - 1 // inside the marker + let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) + let actual = + findDefinition(checker, documentId, SourceText.From(fileContents), filePath, caretPosition, [], options, 0) + |> Option.map (fun range -> (range.StartLine, range.EndLine, range.StartColumn, range.EndColumn)) + + if actual <> expected then + Assert.Fail(sprintf "Incorrect information returned for fileContents=<<<%s>>>, caretMarker=<<<%s>>>, expected =<<<%A>>>, actual = <<<%A>>>" fileContents caretMarker expected actual) + [] let VerifyDefinition() = @@ -100,33 +131,20 @@ let _ = Module1.foo 1 for caretMarker, expected in testCases do printfn "Test case: caretMarker=<<<%s>>>" caretMarker - let filePath = Path.GetTempFileName() + ".fs" - let options: FSharpProjectOptions = { - ProjectFileName = "C:\\test.fsproj" - ProjectId = None - SourceFiles = [| filePath |] - ReferencedProjects = [| |] - OtherOptions = [| |] - IsIncompleteTypeCheckEnvironment = true - UseScriptResolutionRules = false - LoadTime = DateTime.MaxValue - OriginalLoadReferences = [] - UnresolvedReferences = None - ExtraProjectInfo = None - Stamp = None - } + GoToDefinitionTest (fileContents, caretMarker, expected) - File.WriteAllText(filePath, fileContents) + [] + let VerifyDefinitionStringInterpolation() = - let caretPosition = fileContents.IndexOf(caretMarker) + caretMarker.Length - 1 // inside the marker - let documentId = DocumentId.CreateNewId(ProjectId.CreateNewId()) - let actual = - findDefinition(checker, documentId, SourceText.From(fileContents), filePath, caretPosition, [], options, 0) - |> Option.map (fun range -> (range.StartLine, range.EndLine, range.StartColumn, range.EndColumn)) + let fileContents = """ +let xxxxx = 1 +let yyyy = $"{abc{xxxxx}def}" """ + let caretMarker = "xxxxx" + let expected = Some(2, 2, 4, 9) - if actual <> expected then - Assert.Fail(sprintf "Incorrect information returned for fileContents=<<<%s>>>, caretMarker=<<<%s>>>, expected =<<<%A>>>, actual = <<<%A>>>" fileContents caretMarker expected actual) + GoToDefinitionTest (fileContents, caretMarker, expected) #if EXE VerifyDefinition() + VerifyDefinitionStringInterpolation() #endif \ No newline at end of file diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs index 0c1a9f7d37..c64e402695 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs @@ -4673,7 +4673,7 @@ let x = query { for bbbb in abbbbc(*D0*) do MoveCursorToEndOfMarker(file,"System.Windows.") let completions = AutoCompleteAtCursor(file) printfn "Completions=%A" completions - Assert.AreEqual(1, completions.Length) + Assert.AreEqual(3, completions.Length) /// Tests whether we're correctly showing both type and module when they have the same name [] diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.General.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.General.fs index 6bc62eda15..7bf26561c2 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.General.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.General.fs @@ -330,8 +330,8 @@ type UsingMSBuild() = Parser.RPAREN, (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.ParamEnd ||| FSharpTokenTriggerClass.MatchBraces) ] let matching = [ // Other cases where we expect MatchBraces - Parser.LQUOTE("", false); Parser.LBRACK; Parser.LBRACE; Parser.LBRACK_BAR; - Parser.RQUOTE("", false); Parser.RBRACK; Parser.RBRACE; Parser.BAR_RBRACK ] + Parser.LQUOTE("", false); Parser.LBRACK; Parser.LBRACE (Unchecked.defaultof<_>); Parser.LBRACK_BAR; + Parser.RQUOTE("", false); Parser.RBRACK; Parser.RBRACE (Unchecked.defaultof<_>); Parser.BAR_RBRACK ] |> List.map (fun n -> n, (FSharpTokenColorKind.Punctuation,FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.MatchBraces)) for tok, expected in List.concat [ important; matching ] do let info = TestExpose.TokenInfo tok diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs index cd1589117a..ec5f5f2918 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs @@ -915,7 +915,7 @@ type UsingMSBuild() as this = let tooltip = GetQuickInfoAtCursor file AssertContains(tooltip, @"[Signature:P:System.String.Length]") // A message from the mock IDocumentationBuilder AssertContains(tooltip, @"[Filename:") - AssertContains(tooltip, @"mscorlib.dll]") // The assembly we expect the documentation to get taken from + AssertContains(tooltip, @"netstandard.dll]") // The assembly we expect the documentation to get taken from // Especially under 4.0 we need #r of .NET framework assemblies to resolve from like, // diff --git a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs index 1f5dfff205..b390100ded 100644 --- a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs +++ b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs @@ -266,8 +266,7 @@ type Miscellaneous() = this.MSBuildProjectBoilerplate "Library", (fun project ccn projFileName -> let fooPath = Path.Combine(project.ProjectFolder, "foo.fs") - File.AppendAllText(fooPath, "#light") - File.AppendAllText(fooPath, "module Foo") + File.AppendAllLines(fooPath, ["#light"; "module Foo"]) //ccn((project :> IVsHierarchy), "Debug|Any CPU") let configName = "Debug" @@ -278,6 +277,7 @@ type Miscellaneous() = let buildableCfg = vsBuildableCfg :?> BuildableProjectConfig AssertEqual VSConstants.S_OK hr + let mutable isCleaning = false let success = ref false use event = new System.Threading.ManualResetEvent(false) let (hr, cookie) = @@ -286,6 +286,8 @@ type Miscellaneous() = member this.BuildBegin pfContinue = pfContinue <- 1; VSConstants.S_OK member this.BuildEnd fSuccess = success := fSuccess <> 0 + printfn "Build %s, code %i, phase: %s." (if !success then "succeeded" else "failed") fSuccess (if isCleaning then "Cleaning" else "Build") + event.Set() |> Assert.IsTrue VSConstants.S_OK member this.Tick pfContinue = pfContinue <- 1; VSConstants.S_OK @@ -301,14 +303,19 @@ type Miscellaneous() = buildableCfg.Build(0u, output, target) event.WaitOne() |> Assert.IsTrue buildMgrAccessor.EndDesignTimeBuild() |> ValidateOK // this is not a design-time build, but our mock does all the right initialization of the build manager for us, similar to what the system would do in VS for real - AssertEqual true !success - printfn "building..." - doBuild "Build" + AssertEqual true !success + + printfn "Building..." + doBuild "Build" AssertEqual true (File.Exists (Path.Combine(project.ProjectFolder, "bin\\Debug\\Blah.dll"))) + printfn "Output files present." - printfn "cleaning..." + isCleaning <- true + printfn "Cleaning..." doBuild "Clean" + printfn "Finished build-then-clean." AssertEqual false (File.Exists (Path.Combine(project.ProjectFolder, "bin\\Debug\\Blah.dll"))) + printfn "Files were cleaned." finally buildableCfg.UnadviseBuildStatusCallback(cookie) |> AssertEqual VSConstants.S_OK )) diff --git a/vsintegration/tests/UnitTests/ProjectDiagnosticAnalyzerTests.fs b/vsintegration/tests/UnitTests/ProjectDiagnosticAnalyzerTests.fs deleted file mode 100644 index 2d45bef6cd..0000000000 --- a/vsintegration/tests/UnitTests/ProjectDiagnosticAnalyzerTests.fs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -namespace Microsoft.VisualStudio.FSharp.Editor.Tests.Roslyn - -open System -open System.IO -open System.Threading - -open FSharp.Compiler.Service.Tests.Common - -open NUnit.Framework - -open Microsoft.CodeAnalysis -open Microsoft.CodeAnalysis.Classification -open Microsoft.CodeAnalysis.Editor -open Microsoft.CodeAnalysis.Text - -open Microsoft.VisualStudio.FSharp.Editor -open Microsoft.VisualStudio.FSharp.LanguageService - -open FSharp.Compiler.SourceCodeServices -open FSharp.Compiler.Range - -[][] -type ProjectDiagnosticAnalyzerTests() = - - let CreateProjectAndGetOptions(fileContents: string) = - let tempName = Path.GetTempFileName() - let fileName = Path.ChangeExtension(tempName, ".fs") - let projectName = Path.ChangeExtension(tempName, ".fsproj") - let dllName = Path.ChangeExtension(tempName, ".dll") - File.WriteAllText(fileName, fileContents) - - let args = mkProjectCommandLineArgs (dllName, [fileName]) - checker.GetProjectOptionsFromCommandLineArgs (projectName, args) diff --git a/vsintegration/tests/UnitTests/UnusedOpensTests.fs b/vsintegration/tests/UnitTests/UnusedOpensTests.fs index 097e583fe6..28738bfe1c 100644 --- a/vsintegration/tests/UnitTests/UnusedOpensTests.fs +++ b/vsintegration/tests/UnitTests/UnusedOpensTests.fs @@ -6,7 +6,10 @@ open System open NUnit.Framework open FSharp.Compiler.SourceCodeServices open FSharp.Compiler.Range -open FsUnit + + +/// like "should equal", but validates same-type +let shouldEqual (x: 'a) (y: 'a) = Assert.AreEqual(x, y, sprintf "Expected: %A\nActual: %A" x y) let private filePath = "C:\\test.fs" diff --git a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj index 3692a280de..8956299d6e 100644 --- a/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj +++ b/vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj @@ -24,6 +24,7 @@ Internal.Utilities.Collections.fs + Internal.Utilities.CompilerLocationUtils.fs @@ -56,56 +57,9 @@ - - CompilerService\FsUnit.fs - - - CompilerService\Common.fs - - - CompilerService\Symbols.fs - - - CompilerService\EditorTests.fs - - - CompilerService\FileSystemTests.fs - - - CompilerService\ProjectAnalysisTests.fs - - - - CompilerService\PerfTests.fs - - - CompilerService\InteractiveCheckerTests.fs - - - CompilerService\ExprTests.fs - - - CompilerService\CSharpProjectAnalysis.fs - - - CompilerService\StructureTests.fs - - - CompilerService\AssemblyContentProviderTests.fs - - - CompilerService\ServiceUntypedParseTests.fs - CompilerService\UnusedOpensTests.fs - - CompilerService\TreeVisitorTests.fs - Roslyn\ProjectOptionsBuilder.fs @@ -138,9 +92,6 @@ Roslyn\DocumentDiagnosticAnalyzerTests.fs - - Roslyn\ProjectDiagnosticAnalyzerTests.fs - Roslyn\CompletionProviderTests.fs @@ -181,7 +132,6 @@ -