提交 66d8ec51 编写于 作者: D Don Syme

merge part of main

......@@ -122,3 +122,5 @@ nCrunchTemp_*
/tests/fsharp/core/members/set-only-property/vb.dll
/tests/fsharp/core/members/set-only-property/fs.dll
/tests/fsharp/core/members/set-only-property/cs.dll
.fake
\ No newline at end of file
......@@ -8,9 +8,9 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.21459.5">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.21474.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>fa4a48044d33222537e6dbd000f8a2adaa7a15c7</Sha>
<Sha>3ea0d860c6973f2cbadc9e895c7ec2cbdaec4ad5</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
</ToolsetDependencies>
......
......@@ -6,7 +6,7 @@ usage()
{
echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [--skipunmount] --rootfsdir <directory>]"
echo "BuildArch can be: arm(default), armel, arm64, x86"
echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.9 or alpine3.13. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.13 or alpine3.14. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
echo " for FreeBSD can be: freebsd11, freebsd12, freebsd13"
echo " for illumos can be: illumos."
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD"
......@@ -32,9 +32,9 @@ __UbuntuPackages="build-essential"
__AlpinePackages="alpine-base"
__AlpinePackages+=" build-base"
__AlpinePackages+=" linux-headers"
__AlpinePackagesEdgeCommunity=" lldb-dev"
__AlpinePackagesEdgeMain+=" python3"
__AlpinePackagesEdgeMain+=" libedit"
__AlpinePackages+=" lldb-dev"
__AlpinePackages+=" python3"
__AlpinePackages+=" libedit"
# symlinks fixer
__UbuntuPackages+=" symlinks"
......@@ -185,23 +185,17 @@ while :; do
__UbuntuRepo=
__Tizen=tizen
;;
alpine|alpine3.9)
alpine|alpine3.13)
__CodeName=alpine
__UbuntuRepo=
__AlpineVersion=3.9
__AlpinePackagesEdgeMain+=" llvm11-libs"
__AlpinePackagesEdgeMain+=" clang-libs"
__AlpineVersion=3.13
__AlpinePackages+=" llvm10-libs"
;;
alpine3.13)
alpine3.14)
__CodeName=alpine
__UbuntuRepo=
__AlpineVersion=3.13
# Alpine 3.13 has all the packages we need in the 3.13 repository
__AlpinePackages+=$__AlpinePackagesEdgeCommunity
__AlpinePackagesEdgeCommunity=
__AlpinePackages+=$__AlpinePackagesEdgeMain
__AlpinePackagesEdgeMain=
__AlpinePackages+=" llvm10-libs"
__AlpineVersion=3.14
__AlpinePackages+=" llvm11-libs"
;;
freebsd11)
__FreeBSDBase="11.3-RELEASE"
......@@ -279,20 +273,6 @@ if [[ "$__CodeName" == "alpine" ]]; then
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
add $__AlpinePackages
if [[ -n "$__AlpinePackagesEdgeMain" ]]; then
$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
-X http://dl-cdn.alpinelinux.org/alpine/edge/main \
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
add $__AlpinePackagesEdgeMain
fi
if [[ -n "$__AlpinePackagesEdgeCommunity" ]]; then
$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
-X http://dl-cdn.alpinelinux.org/alpine/edge/community \
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
add $__AlpinePackagesEdgeCommunity
fi
rm -r $__ApkToolsDir
elif [[ "$__CodeName" == "freebsd" ]]; then
mkdir -p $__RootfsDir/usr/local/etc
......
......@@ -44,7 +44,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86")
set(TOOLCHAIN "i686-linux-gnu")
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
set(triple "x86_64-unknown-freebsd11")
set(triple "x86_64-unknown-freebsd12")
elseif (ILLUMOS)
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
set(TOOLCHAIN "x86_64-illumos")
......@@ -91,6 +91,9 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
set(CMAKE_CXX_COMPILER_TARGET ${triple})
set(CMAKE_ASM_COMPILER_TARGET ${triple})
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=lld")
elseif(ILLUMOS)
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
......@@ -138,8 +141,8 @@ function(add_toolchain_linker_flag Flag)
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)
set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}_INIT" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}_INIT} ${Flag}" PARENT_SCOPE)
set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}_INIT" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}_INIT} ${Flag}" PARENT_SCOPE)
endfunction()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
......
#!/usr/bin/env bash
#
# This file locates the native compiler with the given name and version and sets the environment variables to locate it.
# This file detects the C/C++ compiler and exports it to the CC/CXX environment variables
#
source="${BASH_SOURCE[0]}"
# resolve $SOURCE until the file is no longer a symlink
while [[ -h $source ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"
# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
if [ $# -lt 0 ]
then
if [[ "$#" -lt 2 ]]; then
echo "Usage..."
echo "find-native-compiler.sh <compiler> <compiler major version> <compiler minor version>"
echo "init-compiler.sh <Architecture> <compiler> <compiler major version> <compiler minor version>"
echo "Specify the target architecture."
echo "Specify the name of compiler (clang or gcc)."
echo "Specify the major version of compiler."
echo "Specify the minor version of compiler."
exit 1
fi
. $scriptroot/../pipeline-logging-functions.sh
. "$( cd -P "$( dirname "$0" )" && pwd )"/../pipeline-logging-functions.sh
compiler="$1"
build_arch="$1"
compiler="$2"
cxxCompiler="$compiler++"
majorVersion="$2"
minorVersion="$3"
majorVersion="$3"
minorVersion="$4"
if [ "$compiler" = "gcc" ]; then cxxCompiler="g++"; fi
# clear the existing CC and CXX from environment
CC=
CXX=
LDFLAGS=
if [[ "$compiler" == "gcc" ]]; then cxxCompiler="g++"; fi
check_version_exists() {
desired_version=-1
......@@ -50,38 +43,38 @@ check_version_exists() {
echo "$desired_version"
}
if [ -z "$CLR_CC" ]; then
if [[ -z "$CLR_CC" ]]; then
# Set default versions
if [ -z "$majorVersion" ]; then
if [[ -z "$majorVersion" ]]; then
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
if [ "$compiler" = "clang" ]; then versions=( 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
elif [ "$compiler" = "gcc" ]; then versions=( 9 8 7 6 5 4.9 ); fi
if [[ "$compiler" == "clang" ]]; then versions=( 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
elif [[ "$compiler" == "gcc" ]]; then versions=( 11 10 9 8 7 6 5 4.9 ); fi
for version in "${versions[@]}"; do
parts=(${version//./ })
desired_version="$(check_version_exists "${parts[0]}" "${parts[1]}")"
if [ "$desired_version" != "-1" ]; then majorVersion="${parts[0]}"; break; fi
if [[ "$desired_version" != "-1" ]]; then majorVersion="${parts[0]}"; break; fi
done
if [ -z "$majorVersion" ]; then
if [[ -z "$majorVersion" ]]; then
if command -v "$compiler" > /dev/null; then
if [ "$(uname)" != "Darwin" ]; then
if [[ "$(uname)" != "Darwin" ]]; then
Write-PipelineTelemetryError -category "Build" -type "warning" "Specific version of $compiler not found, falling back to use the one in PATH."
fi
export CC="$(command -v "$compiler")"
export CXX="$(command -v "$cxxCompiler")"
CC="$(command -v "$compiler")"
CXX="$(command -v "$cxxCompiler")"
else
Write-PipelineTelemetryError -category "Build" "No usable version of $compiler found."
exit 1
fi
else
if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ]; then
if [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; then
if [[ "$compiler" == "clang" && "$majorVersion" -lt 5 ]]; then
if [[ "$build_arch" == "arm" || "$build_arch" == "armel" ]]; then
if command -v "$compiler" > /dev/null; then
Write-PipelineTelemetryError -category "Build" -type "warning" "Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH."
export CC="$(command -v "$compiler")"
export CXX="$(command -v "$cxxCompiler")"
CC="$(command -v "$compiler")"
CXX="$(command -v "$cxxCompiler")"
else
Write-PipelineTelemetryError -category "Build" "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH."
exit 1
......@@ -91,31 +84,40 @@ if [ -z "$CLR_CC" ]; then
fi
else
desired_version="$(check_version_exists "$majorVersion" "$minorVersion")"
if [ "$desired_version" = "-1" ]; then
if [[ "$desired_version" == "-1" ]]; then
Write-PipelineTelemetryError -category "Build" "Could not find specific version of $compiler: $majorVersion $minorVersion."
exit 1
fi
fi
if [ -z "$CC" ]; then
export CC="$(command -v "$compiler$desired_version")"
export CXX="$(command -v "$cxxCompiler$desired_version")"
if [ -z "$CXX" ]; then export CXX="$(command -v "$cxxCompiler")"; fi
if [[ -z "$CC" ]]; then
CC="$(command -v "$compiler$desired_version")"
CXX="$(command -v "$cxxCompiler$desired_version")"
if [[ -z "$CXX" ]]; then CXX="$(command -v "$cxxCompiler")"; fi
fi
else
if [ ! -f "$CLR_CC" ]; then
if [[ ! -f "$CLR_CC" ]]; then
Write-PipelineTelemetryError -category "Build" "CLR_CC is set but path '$CLR_CC' does not exist"
exit 1
fi
export CC="$CLR_CC"
export CXX="$CLR_CXX"
CC="$CLR_CC"
CXX="$CLR_CXX"
fi
if [ -z "$CC" ]; then
Write-PipelineTelemetryError -category "Build" "Unable to find $compiler."
if [[ -z "$CC" ]]; then
Write-PipelineTelemetryError -category "Build" "Unable to find $compiler."
exit 1
fi
export CCC_CC="$CC"
export CCC_CXX="$CXX"
export SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")"
if [[ "$compiler" == "clang" ]]; then
if command -v "lld$desired_version" > /dev/null; then
# Only lld version >= 9 can be considered stable
if [[ "$majorVersion" -ge 9 ]]; then
LDFLAGS="-fuse-ld=lld"
fi
fi
fi
SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")"
export CC CXX LDFLAGS SCAN_BUILD_COMMAND
......@@ -709,14 +709,7 @@ function MSBuild() {
Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20'
}
if ($ci) {
$env:NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY = 'true'
$env:NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT = 6
$env:NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS = 1000
Write-PipelineSetVariable -Name 'NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY' -Value 'true'
Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT' -Value '6'
Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS' -Value '1000'
}
Enable-Nuget-EnhancedRetry
$toolsetBuildProject = InitializeToolset
$basePath = Split-Path -parent $toolsetBuildProject
......@@ -764,6 +757,8 @@ function MSBuild-Core() {
}
}
Enable-Nuget-EnhancedRetry
$buildTool = InitializeBuildTool
$cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci"
......@@ -904,3 +899,18 @@ function Try-LogClientIpAddress()
Write-Host "Unable to get this machine's effective IP address for logging: $_"
}
}
#
# If $ci flag is set, turn on (and log that we did) special environment variables for improved Nuget client retry logic.
#
function Enable-Nuget-EnhancedRetry() {
if ($ci) {
Write-Host "Setting NUGET enhanced retry environment variables"
$env:NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY = 'true'
$env:NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT = 6
$env:NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS = 1000
Write-PipelineSetVariable -Name 'NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY' -Value 'true'
Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT' -Value '6'
Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS' -Value '1000'
}
}
......@@ -14,7 +14,7 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.21459.5",
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.21474.2",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
}
}
......@@ -483,9 +483,9 @@ module TcRecdUnionAndEnumDeclarations =
| Some fieldId, Parent tcref ->
let item = Item.UnionCaseField (UnionCaseInfo (thisTyInst, UnionCaseRef (tcref, id.idText)), i)
CallNameResolutionSink cenv.tcSink (fieldId.idRange, env.NameEnv, item, emptyTyparInst, ItemOccurence.Binding, env.AccessRights)
| _ -> ()
TcAnonFieldDecl cenv env parent tpenv (mkUnionCaseFieldName nFields i) fld)
TcNamedFieldDecl cenv env parent false tpenv fld
| _ ->
TcAnonFieldDecl cenv env parent tpenv (mkUnionCaseFieldName nFields i) fld)
ValidateFieldNames(flds, rfields)
rfields, thisTy
......@@ -878,12 +878,21 @@ module IncrClassChecking =
not arity.HasNoArgs && not v.IsMutable
/// <summary>
/// Choose how a binding is represented
member localRep.ChooseRepresentation (cenv: cenv, env: TcEnv, isStatic, isCtorArg,
ctorInfo: IncrClassCtorLhs,
/// The vars forced to be fields due to static member bindings, instance initialization expressions or instance member bindings
staticForcedFieldVars: FreeLocals,
/// The vars forced to be fields due to instance member bindings
/// </summary>
/// <param name='cenv'></param>
/// <param name='env'></param>
/// <param name='isStatic'></param>
/// <param name='isCtorArg'></param>
/// <param name='ctorInfo'></param>
/// <param name='staticForcedFieldVars'>The vars forced to be fields due to static member bindings, instance initialization expressions or instance member bindings</param>
/// <param name='instanceForcedFieldVars'>The vars forced to be fields due to instance member bindings</param>
/// <param name='takenFieldNames'></param>
/// <param name='bind'></param>
member localRep.ChooseRepresentation (cenv: cenv, env: TcEnv, isStatic, isCtorArg,
ctorInfo: IncrClassCtorLhs,
staticForcedFieldVars: FreeLocals,
instanceForcedFieldVars: FreeLocals,
takenFieldNames: Set<string>,
bind: Binding) =
......@@ -1091,9 +1100,9 @@ module IncrClassChecking =
/// Given localRep saying how locals have been represented, e.g. as fields.
/// Given an expr under a given thisVal context.
//
/// Fix up the references to the locals, e.g.
/// v -> this.fieldv
/// f x -> this.method x
// Fix up the references to the locals, e.g.
// v -> this.fieldv
// f x -> this.method x
member localRep.FixupIncrClassExprPhase2C cenv thisValOpt safeStaticInitInfo (thisTyInst: TypeInst) expr =
// fixup: intercept and expr rewrite
let FixupExprNode rw e =
......@@ -1143,21 +1152,27 @@ module IncrClassChecking =
| Phase2CCtorJustAfterSuperInit
| Phase2CCtorJustAfterLastLet
/// Given a set of 'let' bindings (static or not, recursive or not) that make up a class,
/// generate their initialization expression(s).
let MakeCtorForIncrClassConstructionPhase2C
/// <summary>
/// Given a set of 'let' bindings (static or not, recursive or not) that make up a class,
/// generate their initialization expression(s).
/// </summary>
/// <param name='cenv'></param>
/// <param name='env'></param>
/// <param name='ctorInfo'>The lhs information about the implicit constructor</param>
/// <param name='inheritsExpr'>The call to the super class constructor</param>
/// <param name='inheritsIsVisible'>Should we place a sequence point at the 'inheritedTys call?</param>
/// <param name='decs'>The declarations</param>
/// <param name='memberBinds'></param>
/// <param name='generalizedTyparsForRecursiveBlock'>Record any unconstrained type parameters generalized for the outer members as "free choices" in the let bindings</param>
/// <param name='safeStaticInitInfo'></param>
let MakeCtorForIncrClassConstructionPhase2C
(cenv: cenv,
env: TcEnv,
/// The lhs information about the implicit constructor
ctorInfo: IncrClassCtorLhs,
/// The call to the super class constructor
inheritsExpr,
/// Should we place a sequence point at the 'inheritedTys call?
inheritsIsVisible,
/// The declarations
env: TcEnv,
ctorInfo: IncrClassCtorLhs,
inheritsExpr,
inheritsIsVisible,
decs: IncrClassConstructionBindingsPhase2C list,
memberBinds: Binding list,
/// Record any unconstrained type parameters generalized for the outer members as "free choices" in the let bindings
memberBinds: Binding list,
generalizedTyparsForRecursiveBlock,
safeStaticInitInfo: SafeInitData) =
......@@ -1459,7 +1474,7 @@ module IncrClassChecking =
ctorBody
let cctorBodyOpt =
/// Omit the .cctor if it's empty
// Omit the .cctor if it's empty
match cctorInitActions with
| [] -> None
| _ ->
......@@ -2155,14 +2170,14 @@ module MutRecBindingChecking =
/// Update the contents accessible via the recursive namespace declaration, if any
let TcMutRecDefns_UpdateNSContents mutRecNSInfo =
match mutRecNSInfo with
| Some (Some (mspecNS: ModuleOrNamespace), mtypeAcc) ->
mspecNS.entity_modul_contents <- MaybeLazy.Strict !mtypeAcc
| Some (Some (mspecNS: ModuleOrNamespace), mtypeAcc: _ ref) ->
mspecNS.entity_modul_contents <- MaybeLazy.Strict mtypeAcc.Value
| _ -> ()
/// Updates the types of the modules to contain the contents so far
let TcMutRecDefns_UpdateModuleContents mutRecNSInfo defns =
defns |> MutRecShapes.iterModules (fun (MutRecDefnsPhase2DataForModule (mtypeAcc, mspec), _) ->
mspec.entity_modul_contents <- MaybeLazy.Strict !mtypeAcc)
mspec.entity_modul_contents <- MaybeLazy.Strict mtypeAcc.Value)
TcMutRecDefns_UpdateNSContents mutRecNSInfo
......@@ -2205,7 +2220,7 @@ module MutRecBindingChecking =
let envForDecls =
(envForDecls, opens) ||> List.fold (fun env (target, m, moduleRange, openDeclsRef) ->
let env, openDecls = TcOpenDecl cenv m moduleRange env target
openDeclsRef := openDecls
openDeclsRef.Value <- openDecls
env)
// Add the type definitions being defined
let envForDecls = (if report then AddLocalTyconsAndReport cenv.tcSink scopem else AddLocalTycons) cenv.g cenv.amap m tycons envForDecls
......@@ -3585,7 +3600,7 @@ module EstablishTypeDefinitionCores =
/// Note that for
/// type PairOfInts = int * int
/// then after running this phase and checking for cycles, operations
// such as 'isRefTupleTy' will return reliable results, e.g. isRefTupleTy on the
/// such as 'isRefTupleTy' will return reliable results, e.g. isRefTupleTy on the
/// TAST type for 'PairOfInts' will report 'true'
//
let private TcTyconDefnCore_Phase1C_Phase1E_EstablishAbbreviations (cenv: cenv) envinner inSig tpenv pass (MutRecDefnsPhase1DataForTycon(_, synTyconRepr, _, _, _, _)) (tycon: Tycon) (attrs: Attribs) =
......@@ -5119,7 +5134,7 @@ let rec TcSignatureElementNonMutRec cenv parent typeNames endm (env: TcEnv) synS
let envNS = ImplicitlyOpenOwnNamespace cenv.tcSink cenv.g cenv.amap m enclosingNamespacePath envNS
// For 'namespace rec' and 'module rec' we add the thing being defined
let mtypNS = !(envNS.eModuleOrNamespaceTypeAccumulator)
let mtypNS = envNS.eModuleOrNamespaceTypeAccumulator.Value
let mtypRoot, mspecNSs = BuildRootModuleType enclosingNamespacePath envNS.eCompPath mtypNS
let mspecNSOpt = List.tryHead mspecNSs
......@@ -5150,7 +5165,8 @@ let rec TcSignatureElementNonMutRec cenv parent typeNames endm (env: TcEnv) synS
| None -> env, []
// Publish the combined module type
env.eModuleOrNamespaceTypeAccumulator := CombineCcuContentFragments m [!(env.eModuleOrNamespaceTypeAccumulator); mtypRoot]
env.eModuleOrNamespaceTypeAccumulator.Value <-
CombineCcuContentFragments m [env.eModuleOrNamespaceTypeAccumulator.Value; mtypRoot]
env
return env
......@@ -5244,7 +5260,7 @@ and TcModuleOrNamespaceSignatureElementsNonMutRec cenv parent env (id, modKind,
let! envAtEnd = TcSignatureElements cenv parent endm envForModule xml None defs
// mtypeAcc has now accumulated the module type
return !mtypeAcc, envAtEnd
return mtypeAcc.Value, envAtEnd
}
//-------------------------------------------------------------------------
......@@ -5388,7 +5404,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem
let! mexpr, topAttrsNew, envAtEnd = TcModuleOrNamespaceElements cenv (Parent (mkLocalModRef mspec)) endm envForModule xml None [] mdefs
// Get the inferred type of the decls and record it in the mspec.
mspec.entity_modul_contents <- MaybeLazy.Strict !mtypeAcc
mspec.entity_modul_contents <- MaybeLazy.Strict mtypeAcc.Value
let modDefn = TMDefRec(false, [], [], [ModuleOrNamespaceBinding.Module(mspec, mexpr)], m)
PublishModuleDefn cenv env mspec
let env = AddLocalSubModuleAndReport cenv.tcSink scopem cenv.g cenv.amap m env mspec
......@@ -5430,7 +5446,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem
let envNS = LocateEnv cenv.topCcu env enclosingNamespacePath
let envNS = ImplicitlyOpenOwnNamespace cenv.tcSink cenv.g cenv.amap m enclosingNamespacePath envNS
let mtypNS = !(envNS.eModuleOrNamespaceTypeAccumulator)
let mtypNS = envNS.eModuleOrNamespaceTypeAccumulator.Value
let mtypRoot, mspecNSs = BuildRootModuleType enclosingNamespacePath envNS.eCompPath mtypNS
let mspecNSOpt = List.tryHead mspecNSs
......@@ -5461,7 +5477,8 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem
| None -> env, []
// Publish the combined module type
env.eModuleOrNamespaceTypeAccumulator := CombineCcuContentFragments m [!(env.eModuleOrNamespaceTypeAccumulator); mtypRoot]
env.eModuleOrNamespaceTypeAccumulator.Value <-
CombineCcuContentFragments m [env.eModuleOrNamespaceTypeAccumulator.Value; mtypRoot]
env, openDecls
let modExprRoot = BuildRootModuleExpr enclosingNamespacePath envNS.eCompPath modExpr
......@@ -5591,7 +5608,7 @@ and TcMutRecDefsFinish cenv defs m =
binds |> List.map ModuleOrNamespaceBinding.Binding
| MutRecShape.Module ((MutRecDefnsPhase2DataForModule(mtypeAcc, mspec), _), mdefs) ->
let mexpr = TcMutRecDefsFinish cenv mdefs m
mspec.entity_modul_contents <- MaybeLazy.Strict !mtypeAcc
mspec.entity_modul_contents <- MaybeLazy.Strict mtypeAcc.Value
[ ModuleOrNamespaceBinding.Module(mspec, mexpr) ])
TMDefRec(true, opens, tycons, binds, m)
......@@ -5828,7 +5845,7 @@ let TypeCheckOneImplFile
let defs = [ for x in implFileFrags -> SynModuleDecl.NamespaceFragment x ]
let! mexpr, topAttrs, envAtEnd = TcModuleOrNamespaceElements cenv ParentNone qualNameOfFile.Range envinner PreXmlDoc.Empty None openDecls0 defs
let implFileTypePriorToSig = !mtypeAcc
let implFileTypePriorToSig = mtypeAcc.Value
let topAttrs =
let mainMethodAttrs, others = topAttrs |> List.partition (fun (possTargets, _) -> possTargets &&& AttributeTargets.Method <> enum 0)
......@@ -5937,7 +5954,7 @@ let TypeCheckOneSigFile (g, niceNameGen, amap, topCcu, checkForErrors, condition
let specs = [ for x in sigFileFrags -> SynModuleSigDecl.NamespaceFragment x ]
let! tcEnv = TcSignatureElements cenv ParentNone qualNameOfFile.Range envinner PreXmlDoc.Empty None specs
let sigFileType = !mtypeAcc
let sigFileType = mtypeAcc.Value
if not (checkForErrors()) then
try sigFileType |> IterTyconsOfModuleOrNamespaceType (FinalTypeDefinitionChecksAtEndOfInferenceScope(cenv.infoReader, tcEnv.NameEnv, cenv.tcSink, false, tcEnv.DisplayEnv))
......
......@@ -556,10 +556,12 @@ let MakeInnerEnvForMember env (v: Val) =
| Some _ -> MakeInnerEnvForTyconRef env v.MemberApparentEntity v.IsExtensionMember
/// Get the current accumulator for the namespace/module we're in
let GetCurrAccumulatedModuleOrNamespaceType env = !(env.eModuleOrNamespaceTypeAccumulator)
let GetCurrAccumulatedModuleOrNamespaceType env =
env.eModuleOrNamespaceTypeAccumulator.Value
/// Set the current accumulator for the namespace/module we're in, updating the inferred contents
let SetCurrAccumulatedModuleOrNamespaceType env x = env.eModuleOrNamespaceTypeAccumulator := x
let SetCurrAccumulatedModuleOrNamespaceType env x =
env.eModuleOrNamespaceTypeAccumulator.Value <- x
/// Set up the initial environment accounting for the enclosing "namespace X.Y.Z" definition
let LocateEnv ccu env enclosingNamespacePath =
......@@ -1041,8 +1043,8 @@ let noArgOrRetAttribs = ArgAndRetAttribs ([], [])
/// shares the same code paths (e.g. TcLetBinding and TcLetrec) as processing expression bindings (such as "let x = 1 in ...")
/// Member bindings also use this path.
//
/// However there are differences in how different bindings get processed,
/// i.e. module bindings get published to the implicitly accumulated module type, but expression 'let' bindings don't.
// However there are differences in how different bindings get processed,
// i.e. module bindings get published to the implicitly accumulated module type, but expression 'let' bindings don't.
type DeclKind =
| ModuleOrMemberBinding
......@@ -2092,7 +2094,7 @@ module GeneralizationHelpers =
| Expr.App (e1, _, _, [], _) -> IsGeneralizableValue g e1
| Expr.TyChoose (_, b, _) -> IsGeneralizableValue g b
| Expr.Obj (_, ty, _, _, _, _, _) -> isInterfaceTy g ty || isDelegateTy g ty
| Expr.Link eref -> IsGeneralizableValue g !eref
| Expr.Link eref -> IsGeneralizableValue g eref.Value
| _ -> false
......@@ -3447,7 +3449,7 @@ let EliminateInitializationGraphs
// n-ary expressions
| Expr.Op (op, _, args, m) -> CheckExprOp st op m; List.iter (CheckExpr (strict st)) args
// misc
| Expr.Link eref -> CheckExpr st !eref
| Expr.Link eref -> CheckExpr st eref.Value
| Expr.TyChoose (_, b, _) -> CheckExpr st b
| Expr.Quote _ -> ()
| Expr.WitnessArg (_witnessInfo, _m) -> ()
......@@ -3535,7 +3537,8 @@ let EliminateInitializationGraphs
let vrhs = (mkLazyDelayed g m ty felazy)
if mustHaveArity then vlazy.SetValReprInfo (Some(InferArityOfExpr g AllowTypeDirectedDetupling.Yes vty [] [] vrhs))
fixupPoints |> List.iter (fun (fp, _) -> fp := mkLazyForce g (!fp).Range ty velazy)
for (fixupPoint, _) in fixupPoints do
fixupPoint.Value <- mkLazyForce g fixupPoint.Value.Range ty velazy
[mkInvisibleBind flazy frhs; mkInvisibleBind vlazy vrhs],
[mkBind seqPtOpt v (mkLazyForce g m ty velazy)]
......@@ -3626,8 +3629,8 @@ let CheckAndRewriteObjectCtor g env (ctorLambdaExpr: Expr) =
and checkAndRewriteCtorUsage expr =
match expr with
| Expr.Link eref ->
let e = checkAndRewriteCtorUsage !eref
eref := e
let e = checkAndRewriteCtorUsage eref.Value
eref.Value <- e
expr
// Type applications are ok, e.g.
......@@ -4718,9 +4721,14 @@ and TcNestedTypeApplication cenv newOk checkCxs occ env tpenv mWholeTypeApp ty p
and TryAdjustHiddenVarNameToCompGenName cenv env (id: Ident) altNameRefCellOpt =
match altNameRefCellOpt with
| Some ({contents = SynSimplePatAlternativeIdInfo.Undecided altId } as altNameRefCell) ->
match ResolvePatternLongIdent cenv.tcSink cenv.nameResolver AllIdsOK false id.idRange env.eAccessRights env.TraitContext env.eNameResEnv TypeNameResolutionInfo.Default [id] with
| Item.NewDef _ -> None // the name is not in scope as a pattern identifier (e.g. union case), so do not use the alternate ID
| _ -> altNameRefCell := SynSimplePatAlternativeIdInfo.Decided altId; Some altId // the name is in scope as a pattern identifier, so use the alternate ID
match ResolvePatternLongIdent cenv.tcSink cenv.nameResolver AllIdsOK false id.idRange env.eAccessRights env.TraitContext env.eNameResEnv TypeNameResolutionInfo.Default [id] with
| Item.NewDef _ ->
// The name is not in scope as a pattern identifier (e.g. union case), so do not use the alternate ID
None
| _ ->
// The name is in scope as a pattern identifier, so use the alternate ID
altNameRefCell.Value <- SynSimplePatAlternativeIdInfo.Decided altId
Some altId
| Some {contents = SynSimplePatAlternativeIdInfo.Decided altId } -> Some altId
| None -> None
......@@ -5969,7 +5977,7 @@ and TcExprUndelayed cenv (overallTy: OverallTy) env tpenv (synExpr: SynExpr) =
let e3', tpenv = TcExpr cenv overallTy env tpenv e3
Expr.StaticOptimization (constraints', e2', e3', m), tpenv
/// e1.longId <- e2
// e1.longId <- e2
| SynExpr.DotSet (e1, (LongIdentWithDots(longId, _) as lidwd), e2, mStmt) ->
if lidwd.ThereIsAnExtraDotAtTheEnd then
// just drop rhs on the floor
......@@ -5979,11 +5987,11 @@ and TcExprUndelayed cenv (overallTy: OverallTy) env tpenv (synExpr: SynExpr) =
let mExprAndDotLookup = unionRanges e1.Range (rangeOfLid longId)
TcExprThen cenv overallTy env tpenv false e1 [DelayedDotLookup(longId, mExprAndDotLookup); MakeDelayedSet(e2, mStmt)]
/// e1 <- e2
// e1 <- e2
| SynExpr.Set (e1, e2, mStmt) ->
TcExprThen cenv overallTy env tpenv false e1 [MakeDelayedSet(e2, mStmt)]
/// e1.longId(e2) <- e3, very rarely used named property setters
// e1.longId(e2) <- e3, very rarely used named property setters
| SynExpr.DotNamedIndexedPropertySet (e1, (LongIdentWithDots(longId, _) as lidwd), e2, e3, mStmt) ->
if lidwd.ThereIsAnExtraDotAtTheEnd then
// just drop rhs on the floor
......
......@@ -46,10 +46,10 @@ val InitialImplicitCtorInfo: unit -> CtorInfo
[<NoEquality; NoComparison>]
type UngeneralizableItem
[<NoEquality; NoComparison>]
/// Represents the type environment at a particular scope. Includes the name
/// resolution environment, the ungeneralizable items from earlier in the scope
/// and other information about the scope.
[<NoEquality; NoComparison>]
type TcEnv =
{
/// Name resolution information
......
......@@ -860,8 +860,8 @@ type TcConfigBuilder =
// TcConfig
//--------------------------------------------------------------------------
[<Sealed>]
/// This type is immutable and must be kept as such. Do not extract or mutate the underlying data except by cloning it.
[<Sealed>]
type TcConfig private (data: TcConfigBuilder, validate: bool) =
// Validate the inputs - this helps ensure errors in options are shown in visual studio rather than only when built
......
......@@ -117,8 +117,8 @@ type ImportedAssembly =
}
[<Sealed>]
/// Tables of assembly resolutions
[<Sealed>]
type TcAssemblyResolutions =
member GetAssemblyResolutions: unit -> AssemblyResolution list
......
......@@ -294,10 +294,10 @@ let ParseCompilerOptions (collectOtherArgument: string -> unit, blocks: Compiler
f (getSwitch opt); t
| CompilerOption(s, _, OptionSet f, d, _) :: _ when optToken = s && argString = "" ->
reportDeprecatedOption d
f := true; t
f.Value <- true; t
| CompilerOption(s, _, OptionClear f, d, _) :: _ when optToken = s && argString = "" ->
reportDeprecatedOption d
f := false; t
f.Value <- false; t
| CompilerOption(s, _, OptionString f, d, _) as compilerOption :: _ when optToken = s ->
reportDeprecatedOption d
let oa = getOptionArg compilerOption argString
......
......@@ -141,8 +141,8 @@ let FreshenMethInfo traitCtxt m (minfo: MethInfo) =
// Subsumption of types: solve/record subtyping constraints
//-------------------------------------------------------------------------
[<RequireQualifiedAccess>]
/// Information about the context of a type equation.
[<RequireQualifiedAccess>]
type ContextInfo =
/// No context was given.
......
......@@ -47,9 +47,9 @@ val FreshenTypars : ITraitContext option -> range -> Typars -> TType list
/// Make new type inference variables for the use of a method at a particular location
val FreshenMethInfo : ITraitContext option -> range -> MethInfo -> TType list
[<RequireQualifiedAccess>]
/// Information about the context of a type equation, for better error reporting
type ContextInfo =
[<RequireQualifiedAccess>]
>>>>>>> 06d9821e5561dd9125fafa4a77b0a4a922da29c6
/// No context was given.
| NoContext
......
......@@ -1608,6 +1608,7 @@ forFormatInvalidForInterpolated4,"Interpolated strings used as type IFormattable
3391,tcLiteralAttributeCannotUseActivePattern,"A [<Literal>] declaration cannot use an active pattern for its identifier"
3392,containerDeprecated,"The 'AssemblyKeyNameAttribute' has been deprecated. Use 'AssemblyKeyFileAttribute' instead."
3393,containerSigningUnsupportedOnThisPlatform,"Key container signing is not supported on this platform."
3394,parsNewExprMemberAccess,"This member access is ambiguous. Please use parentheses around the object creation, e.g. '(new SomeType(args)).MemberName'"
3401,ilxgenInvalidConstructInStateMachineDuringCodegen,"The resumable code construct '%s' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code."
3402,tcInvalidResumableConstruct,"The construct '%s' may only be used in valid resumable code."
3501,tcResumableCodeFunctionMustBeInline,"Invalid resumable code. Any method of function accepting or returning resumable code must be marked 'inline'"
......@@ -1630,3 +1631,4 @@ reprStateMachineInvalidForm,"The state machine has an unexpected form"
3517,optFailedToInlineSuggestedValue,"The value '%s' was marked 'InlineIfLambda' but was not determined to have a lambda value. This warning is for informational purposes only."
3518,implMissingInlineIfLambda,"The 'InlineIfLambda' attribute is present in the signature but not the implementation."
3519,tcInlineIfLambdaUsedOnNonInlineFunctionOrMethod,"The 'InlineIfLambda' attribute may only be used on parameters of inlined functions of methods whose type is a function or F# delegate type."
3520,invalidXmlDocPosition,"XML comment is not placed on a valid language element."
......@@ -7,9 +7,8 @@
<TargetFramework Condition="'$(Configuration)' != 'Proto'">netstandard2.0</TargetFramework>
<TargetFrameworks Condition="'$(Configuration)' == 'Proto'">netstandard2.0</TargetFrameworks>
<AssemblyName>FSharp.Build</AssemblyName>
<NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn>
<NoWarn>$(NoWarn);75</NoWarn> <!-- InternalCommandLineOption -->
<AllowCrossTargeting>true</AllowCrossTargeting>
<OtherFlags>$(OtherFlags) --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
<DefineConstants>$(DefineConstants);LOCALIZATION_FSBUILD</DefineConstants>
<NoWarn>NU1701;FS0075</NoWarn>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
......
......@@ -6,9 +6,7 @@
<OutputType>Library</OutputType>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AssemblyName>FSharp.Compiler.Interactive.Settings</AssemblyName>
<NoWarn>$(NoWarn);45;55;62;75;1182;1204</NoWarn>
<AllowCrossTargeting>true</AllowCrossTargeting>
<OtherFlags>$(OtherFlags) --maxerrors:20 --extraoptimizationloops:1</OtherFlags>
</PropertyGroup>
<ItemGroup>
......
......@@ -5,12 +5,17 @@
<PropertyGroup>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<OutputType>Library</OutputType>
<NoWarn>$(NoWarn);44;45;54;55;57;61;62;69;65;75;1204;2003;NU5125</NoWarn>
<NoWarn>$(NoWarn);44</NoWarn> <!-- Obsolete -->
<NoWarn>$(NoWarn);57</NoWarn> <!-- Experimental -->
<NoWarn>$(NoWarn);75</NoWarn> <!-- InternalCommandLineOption -->
<NoWarn>$(NoWarn);1204</NoWarn> <!-- This construct is for use in the FSharp.Core library and should not be used directly -->
<NoWarn>$(NoWarn);NU5125</NoWarn>
<AssemblyName>FSharp.Compiler.Service</AssemblyName>
<AllowCrossTargeting>true</AllowCrossTargeting>
<DefineConstants>$(DefineConstants);COMPILER</DefineConstants>
<DefineConstants>$(DefineConstants);ENABLE_MONO_SUPPORT</DefineConstants>
<OtherFlags>$(OtherFlags) /warnon:3218 /warnon:1182 /warnon:3390 --maxerrors:20 --extraoptimizationloops:1 --times</OtherFlags>
<DefineConstants Condition="'$(FSHARPCORE_USE_PACKAGE)' == 'true'">$(DefineConstants);USE_SHIPPED_FSCORE</DefineConstants>
<OtherFlags>$(OtherFlags) /warnon:3218 /warnon:1182 /warnon:3390 --extraoptimizationloops:1 --times</OtherFlags>
<Tailcalls>true</Tailcalls> <!-- .tail annotations always emitted for this binary, even in debug mode -->
<FsYaccOutputFolder>$(IntermediateOutputPath)$(TargetFramework)\</FsYaccOutputFolder>
<FsLexOutputFolder>$(IntermediateOutputPath)$(TargetFramework)\</FsLexOutputFolder>
......@@ -972,7 +977,7 @@
</ItemGroup>
<ItemGroup Condition="'$(FSHARPCORE_USE_PACKAGE)' == 'true'">
<PackageReference Include="FSharp.Core" Version="$(FSharpCorePreviewPackageVersion)" />
<PackageReference Include="FSharp.Core" Version="$(FSharpCoreShippedPackageVersionProperty)" />
</ItemGroup>
<ItemGroup>
......
......@@ -5,7 +5,9 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>netstandard2.1;netstandard2.0</TargetFrameworks>
<NoWarn>$(NoWarn);45;55;62;75;1204</NoWarn>
<NoWarn>$(NoWarn);62</NoWarn> <!-- ML Compat -->
<NoWarn>$(NoWarn);75</NoWarn> <!-- InternalCommandLineOption -->
<NoWarn>$(NoWarn);1204</NoWarn> <!-- This construct is for use in the FSharp.Core library and should not be used directly -->
<AllowCrossTargeting>true</AllowCrossTargeting>
<DefineConstants>$(DefineConstants);FSHARP_CORE</DefineConstants>
<DefineConstants Condition="'$(Configuration)' == 'Proto'">BUILDING_WITH_LKG;$(DefineConstants)</DefineConstants>
......@@ -15,6 +17,8 @@
<OtherFlags>$(OtherFlags) --warnon:1182</OtherFlags>
<!-- 3390: xmlDocBadlyFormed -->
<OtherFlags>$(OtherFlags) --warnon:3390</OtherFlags>
<!-- 3520: invalidXmlDocPosition -->
<OtherFlags>$(OtherFlags) --warnon:3520</OtherFlags>
<!-- Turn off 57: Use of construct with Experimental attribute -->
<OtherFlags>$(OtherFlags) --nowarn:57</OtherFlags>
<!-- Turn off 3511: state machine not compilable - expected for inlined functions defining state machine generators -->
......
......@@ -497,7 +497,7 @@ module LeafExpressionConverter =
// or type T to an argument expecting Expression<T>.
| ImplicitExpressionConversionHelperQ (_, [_], [x1]) -> ConvExprToLinqInContext env x1
/// Use witnesses if they are available
// Use witnesses if they are available
| CallWithWitnesses (objArgOpt, _, minfo2, witnessArgs, args) ->
let fullArgs = witnessArgs @ args
let replacementExpr =
......
......@@ -16,10 +16,12 @@ open Microsoft.FSharp.Quotations
/// Library functionality associated with converting F# quotations to .NET LINQ expression trees.
/// </summary></namespacedoc>
module LeafExpressionConverter =
/// <summary>
/// When used in a quotation, this function indicates a specific conversion
/// should be performed when converting the quotation to a LINQ expression.
///
/// This function should not be called directly.
/// </summary>
//
// NOTE: when an F# expression tree is converted to a Linq expression tree using ToLinqExpression
// the transformation of <c>LinqExpressionHelper(e)</c> is the same as the transformation of
......@@ -29,36 +31,60 @@ module LeafExpressionConverter =
//[<System.Obsolete("This type is for use by the quotation to LINQ expression tree converter and is not for direct use from user code")>]
val ImplicitExpressionConversionHelper : 'T -> Expression<'T>
/// <summary>
/// When used in a quotation, this function indicates a specific conversion
/// should be performed when converting the quotation to a LINQ expression.
///
/// This function should not be called directly.
/// </summary>
//[<System.Obsolete("This type is for use by the quotation to LINQ expression tree converter and is not for direct use from user code")>]
val MemberInitializationHelper : 'T -> 'T
/// <summary>
/// When used in a quotation, this function indicates a specific conversion
/// should be performed when converting the quotation to a LINQ expression.
///
/// This function should not be called directly.
/// </summary>
//[<System.Obsolete("This type is for use by the quotation to LINQ expression tree converter and is not for direct use from user code")>]
val NewAnonymousObjectHelper : 'T -> 'T
/// <summary>
/// Converts a subset of F# quotations to a LINQ expression, for the subset of LINQ expressions represented by the
/// expression syntax in the C# language.
/// </summary>
///
/// <example-tbd></example-tbd>
val QuotationToExpression : Expr -> Expression
/// <summary>
/// Converts a subset of F# quotations to a LINQ expression, for the subset of LINQ expressions represented by the
/// expression syntax in the C# language.
/// </summary>
///
/// <example-tbd></example-tbd>
val QuotationToLambdaExpression : Expr<'T> -> Expression<'T>
/// <summary>
/// Evaluates a subset of F# quotations by first converting to a LINQ expression, for the subset of LINQ expressions represented by the
/// expression syntax in the C# language.
/// </summary>
///
/// <example-tbd></example-tbd>
val EvaluateQuotation : Expr -> obj
/// <summary>
/// A runtime helper used to evaluate nested quotation literals.
/// </summary>
///
/// <example-tbd></example-tbd>
val SubstHelper : Expr * Var[] * obj[] -> Expr<'T>
/// <summary>
/// A runtime helper used to evaluate nested quotation literals.
/// </summary>
///
/// <example-tbd></example-tbd>
val SubstHelperRaw : Expr * Var[] * obj[] -> Expr
val internal (|SpecificCallToMethod|_|) : System.RuntimeMethodHandle -> (Expr -> (Expr option * Type list * Expr list) option)
此差异已折叠。
此差异已折叠。
......@@ -283,5 +283,3 @@ module internal Adapters =
tipf expr
let MakeSeqConv conv = match conv with NoConv -> NoConv | _ -> SeqConv conv
......@@ -4,112 +4,112 @@
namespace Microsoft.FSharp.Data.UnitSystems.SI.UnitNames
open Microsoft.FSharp.Core
[<Measure>]
/// The SI unit of length
[<Measure>]
type metre
[<Measure>]
/// The SI unit of length
[<Measure>]
type meter = metre
[<Measure>]
/// The SI unit of mass
[<Measure>]
type kilogram
[<Measure>]
/// The SI unit of time
[<Measure>]
type second
[<Measure>]
/// The SI unit of electric current
[<Measure>]
type ampere
[<Measure>]
/// The SI unit of thermodynamic temperature
[<Measure>]
type kelvin
[<Measure>]
/// The SI unit of amount of substance
[<Measure>]
type mole
[<Measure>]
/// The SI unit of luminous intensity
[<Measure>]
type candela
[<Measure>]
/// The SI unit of frequency
[<Measure>]
type hertz = / second
[<Measure>]
/// The SI unit of force
[<Measure>]
type newton = kilogram metre / second^2
[<Measure>]
/// The SI unit of pressure, stress
[<Measure>]
type pascal = newton / metre^2
[<Measure>]
/// The SI unit of energy, work, amount of heat
[<Measure>]
type joule = newton metre
[<Measure>]
/// The SI unit of power, radiant flux
[<Measure>]
type watt = joule / second
[<Measure>]
/// The SI unit of electric charge, amount of electricity
[<Measure>]
type coulomb = second ampere
[<Measure>]
/// The SI unit of electric potential difference, electromotive force
[<Measure>]
type volt = watt/ampere
[<Measure>]
/// The SI unit of capacitance
[<Measure>]
type farad = coulomb/volt
[<Measure>]
/// The SI unit of electric resistance
[<Measure>]
type ohm = volt/ampere
[<Measure>]
/// The SI unit of electric conductance
[<Measure>]
type siemens = ampere/volt
[<Measure>]
/// The SI unit of magnetic flux
[<Measure>]
type weber = volt second
[<Measure>]
/// The SI unit of magnetic flux density
[<Measure>]
type tesla = weber/metre^2
[<Measure>]
/// The SI unit of inductance
[<Measure>]
type henry = weber/ampere
[<Measure>]
/// The SI unit of luminous flux
[<Measure>]
type lumen = candela
[<Measure>]
/// The SI unit of illuminance
[<Measure>]
type lux = lumen/metre^2
[<Measure>]
/// The SI unit of activity referred to a radionuclide
[<Measure>]
type becquerel = second^-1
[<Measure>]
/// The SI unit of absorbed dose
[<Measure>]
type gray = joule/kilogram
[<Measure>]
/// The SI unit of does equivalent
[<Measure>]
type sievert = joule/kilogram
[<Measure>]
/// The SI unit of catalytic activity
[<Measure>]
type katal = mole/second
......@@ -118,106 +118,106 @@ namespace Microsoft.FSharp.Data.UnitSystems.SI.UnitSymbols
open Microsoft.FSharp.Core
open Microsoft.FSharp.Data.UnitSystems.SI.UnitNames
[<Measure>]
/// A synonym for Metre, the SI unit of length
[<Measure>]
type m = metre
[<Measure>]
/// A synonym for kilogram, the SI unit of mass
[<Measure>]
type kg = kilogram
[<Measure>]
/// A synonym for second, the SI unit of time
[<Measure>]
type s = second
[<Measure>]
/// A synonym for ampere, the SI unit of electric current
[<Measure>]
type A = ampere
[<Measure>]
/// A synonym for kelvin, the SI unit of thermodynamic temperature
[<Measure>]
type K = kelvin
[<Measure>]
/// A synonym for mole, the SI unit of amount of substance
[<Measure>]
type mol = mole
[<Measure>]
/// A synonym for candela, the SI unit of luminous intensity
[<Measure>]
type cd = candela
[<Measure>]
/// A synonym for hertz, the SI unit of frequency
[<Measure>]
type Hz = hertz
[<Measure>]
/// A synonym for newton, the SI unit of force
[<Measure>]
type N = newton
[<Measure>]
/// A synonym for pascal, the SI unit of pressure, stress
[<Measure>]
type Pa = pascal
[<Measure>]
/// A synonym for joule, the SI unit of energy, work, amount of heat
[<Measure>]
type J = joule
[<Measure>]
/// A synonym for watt, the SI unit of power, radiant flux
[<Measure>]
type W = watt
[<Measure>]
/// A synonym for coulomb, the SI unit of electric charge, amount of electricity
[<Measure>]
type C = coulomb
[<Measure>]
/// A synonym for volt, the SI unit of electric potential difference, electromotive force
[<Measure>]
type V = volt
[<Measure>]
/// A synonym for farad, the SI unit of capacitance
[<Measure>]
type F = farad
[<Measure>]
/// A synonym for siemens, the SI unit of electric conductance
[<Measure>]
type S = siemens
[<Measure>]
/// A synonym for UnitNames.ohm, the SI unit of electric resistance.
[<Measure>]
type ohm = Microsoft.FSharp.Data.UnitSystems.SI.UnitNames.ohm
[<Measure>]
/// A synonym for weber, the SI unit of magnetic flux
[<Measure>]
type Wb = weber
[<Measure>]
/// A synonym for tesla, the SI unit of magnetic flux density
[<Measure>]
type T = tesla
[<Measure>]
/// A synonym for lumen, the SI unit of luminous flux
[<Measure>]
type lm = lumen
[<Measure>]
/// A synonym for lux, the SI unit of illuminance
[<Measure>]
type lx = lux
[<Measure>]
/// A synonym for becquerel, the SI unit of activity referred to a radionuclide
[<Measure>]
type Bq = becquerel
[<Measure>]
/// A synonym for gray, the SI unit of absorbed dose
[<Measure>]
type Gy = gray
[<Measure>]
/// A synonym for sievert, the SI unit of does equivalent
[<Measure>]
type Sv = sievert
[<Measure>]
/// A synonym for katal, the SI unit of catalytic activity
[<Measure>]
type kat = katal
[<Measure>]
/// A synonym for henry, the SI unit of inductance
[<Measure>]
type H = henry
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -233,9 +233,9 @@ namespace Microsoft.FSharp.Control
// NOTE: this must be a tailcall
cont res
/// Represents rarely changing components of an in-flight async computation
[<NoEquality; NoComparison>]
[<AutoSerializable(false)>]
/// Represents rarely changing components of an in-flight async computation
type AsyncActivationAux =
{ /// The active cancellation token
token: CancellationToken
......@@ -249,9 +249,9 @@ namespace Microsoft.FSharp.Control
/// Holds some commonly-allocated callbacks and a mutable location to use for a trampoline
trampolineHolder: TrampolineHolder }
/// Represents context for an in-flight async computation
[<NoEquality; NoComparison>]
[<AutoSerializable(false)>]
/// Represents context for an in-flight async computation
type AsyncActivationContents<'T> =
{ /// The success continuation
cont: cont<'T>
......@@ -305,8 +305,9 @@ namespace Microsoft.FSharp.Control
contents.aux.ccont (OperationCanceledException (contents.aux.token))
/// Check for trampoline hijacking.
//
// Note, this must make tailcalls, so may not be an instance member taking a byref argument,
/// nor call any members taking byref arguments.
// nor call any members taking byref arguments.
static member inline HijackCheckThenCall (ctxt: AsyncActivation<'T>) cont arg =
ctxt.aux.trampolineHolder.HijackCheckThenCall cont arg
......@@ -756,7 +757,7 @@ namespace Microsoft.FSharp.Control
/// - Hijack check after 'entering' the implied try/finally and after MoveNext call
/// - Do not apply 'GetEnumerator' with exception protection. However for an 'async'
/// in an 'async { ... }' the exception protection will be provided by the enclosing
// Delay or Bind or similar construct.
/// Delay or Bind or similar construct.
/// - Apply 'MoveNext' with exception protection
/// - Apply 'Current' with exception protection
......
此差异已折叠。
......@@ -3,69 +3,84 @@
/// <summary>This namespace contains some common collections in a style primarily designed for use from F#.</summary>
namespace Microsoft.FSharp.Collections
open Microsoft.FSharp.Core
open Microsoft.FSharp.Collections
open Microsoft.FSharp.Primitives.Basics
open System
open System.Collections.Generic
/// <summary>Common notions of value ordering implementing the <see cref="T:System.Collections.Generic.IComparer`1"/>
/// interface, for constructing sorted data structures and performing sorting operations.</summary>
module ComparisonIdentity =
/// <summary>Get an implementation of comparison semantics using structural comparison.</summary>
///
/// <returns>An object implementing <see cref="T:System.Collections.Generic.IComparer`1"/> using <see cref="M:Microsoft.FSharp.Core.Operators.compare"/>.</returns>
val inline Structural<'T> : IComparer<'T> when 'T : comparison
open Microsoft.FSharp.Core
open Microsoft.FSharp.Collections
open Microsoft.FSharp.Primitives.Basics
open System
open System.Collections.Generic
/// <summary>Get an implementation of comparison semantics using non-structural comparison.</summary>
///
/// <returns>An object implementing <see cref="T:System.Collections.Generic.IComparer`1"/> using <see cref="M:Microsoft.FSharp.Core.Operators.NonStructuralComparison.Compare"/>.</returns>
val inline NonStructural< ^T > : IComparer< ^T > when ^T : (static member ( < ) : ^T * ^T -> bool) and ^T : (static member ( > ) : ^T * ^T -> bool)
/// <summary>Common notions of value ordering implementing the <see cref="T:System.Collections.Generic.IComparer`1"/>
/// interface, for constructing sorted data structures and performing sorting operations.</summary>
module ComparisonIdentity =
/// <summary>Get an implementation of comparison semantics using structural comparison.</summary>
///
/// <returns>An object implementing <see cref="T:System.Collections.Generic.IComparer`1"/> using <see cref="M:Microsoft.FSharp.Core.Operators.compare"/>.</returns>
///
/// <example-tbd></example-tbd>
val inline Structural<'T> : IComparer<'T> when 'T : comparison
/// <summary>Get an implementation of comparison semantics using the given function.</summary>
///
/// <param name="comparer">A function to compare two values.</param>
///
/// <returns>An object implementing <see cref="T:System.Collections.Generic.IComparer`1"/> using the supplied function.</returns>
val FromFunction : comparer:('T -> 'T -> int) -> IComparer<'T>
/// <summary>Common notions of value identity implementing the <see cref="T:System.Collections.Generic.IEqualityComparer`1"/>
/// interface, for constructing <see cref="T:System.Collections.Generic.Dictionary`2"/> objects and other collections</summary>
module HashIdentity =
/// <summary>Get an implementation of comparison semantics using non-structural comparison.</summary>
///
/// <returns>An object implementing <see cref="T:System.Collections.Generic.IComparer`1"/> using <see cref="M:Microsoft.FSharp.Core.Operators.NonStructuralComparison.Compare"/>.</returns>
///
/// <example-tbd></example-tbd>
val inline NonStructural< ^T > : IComparer< ^T > when ^T : (static member ( < ) : ^T * ^T -> bool) and ^T : (static member ( > ) : ^T * ^T -> bool)
/// <summary>Get an implementation of equality semantics using structural equality and structural hashing.</summary>
///
/// <returns>An object implementing <see cref="T:System.Collections.Generic.IEqualityComparer`1"/> using <see cref="M:Microsoft.FSharp.Core.Operators.op_Equality"/> and <see cref="M:Microsoft.FSharp.Core.Operators.hash"/>.</returns>
val inline Structural<'T> : IEqualityComparer<'T> when 'T : equality
/// <summary>Get an implementation of equality semantics using non-structural equality and non-structural hashing.</summary>
///
/// <returns>
/// An object implementing <see cref="T:System.Collections.Generic.IEqualityComparer`1"/> using <see cref="M:Microsoft.FSharp.Core.Operators.NonStructuralComparison.op_Equality"/>
/// and <see cref="M:Microsoft.FSharp.Core.Operators.NonStructuralComparison.hash"/>.
/// </returns>
val inline NonStructural<'T> : IEqualityComparer< ^T > when ^T : equality and ^T : (static member ( = ) : ^T * ^T -> bool)
/// <summary>Get an implementation of equality semantics semantics using structural equality and structural hashing.</summary>
///
/// <returns>An object implementing <see cref="T:System.Collections.Generic.IEqualityComparer`1"/>.</returns>
val inline LimitedStructural<'T> : limit: int -> IEqualityComparer<'T> when 'T : equality
/// <summary>Get an implementation of equality semantics using reference equality and reference hashing.</summary>
///
/// <returns>
/// An object implementing <see cref="T:System.Collections.Generic.IEqualityComparer`1"/> using <see cref="M:Microsoft.FSharp.Core.LanguagePrimitives.PhysicalEquality"/>
/// and <see cref="M:Microsoft.FSharp.Core.LanguagePrimitives.PhysicalHash"/>.
/// </returns>
val Reference<'T> : IEqualityComparer<'T> when 'T : not struct
/// <summary>Get an implementation of equality semantics using the given functions.</summary>
///
/// <param name="hasher">A function to generate a hash code from a value.</param>
/// <param name="equality">A function to test equality of two values.</param>
///
/// <returns>An object implementing <see cref="T:System.Collections.Generic.IEqualityComparer`1"/> using the given functions.</returns>
val inline FromFunctions<'T> : hasher:('T -> int) -> equality:('T -> 'T -> bool) -> IEqualityComparer<'T>
/// <summary>Get an implementation of comparison semantics using the given function.</summary>
///
/// <param name="comparer">A function to compare two values.</param>
///
/// <returns>An object implementing <see cref="T:System.Collections.Generic.IComparer`1"/> using the supplied function.</returns>
///
/// <example-tbd></example-tbd>
val FromFunction : comparer:('T -> 'T -> int) -> IComparer<'T>
/// <summary>Common notions of value identity implementing the <see cref="T:System.Collections.Generic.IEqualityComparer`1"/>
/// interface, for constructing <see cref="T:System.Collections.Generic.Dictionary`2"/> objects and other collections</summary>
module HashIdentity =
/// <summary>Get an implementation of equality semantics using structural equality and structural hashing.</summary>
///
/// <returns>An object implementing <see cref="T:System.Collections.Generic.IEqualityComparer`1"/> using <see cref="M:Microsoft.FSharp.Core.Operators.op_Equality"/> and <see cref="M:Microsoft.FSharp.Core.Operators.hash"/>.</returns>
///
/// <example-tbd></example-tbd>
val inline Structural<'T> : IEqualityComparer<'T> when 'T : equality
/// <summary>Get an implementation of equality semantics using non-structural equality and non-structural hashing.</summary>
///
/// <returns>
/// An object implementing <see cref="T:System.Collections.Generic.IEqualityComparer`1"/> using <see cref="M:Microsoft.FSharp.Core.Operators.NonStructuralComparison.op_Equality"/>
/// and <see cref="M:Microsoft.FSharp.Core.Operators.NonStructuralComparison.hash"/>.
/// </returns>
///
/// <example-tbd></example-tbd>
val inline NonStructural<'T> : IEqualityComparer< ^T > when ^T : equality and ^T : (static member ( = ) : ^T * ^T -> bool)
/// <summary>Get an implementation of equality semantics semantics using structural equality and structural hashing.</summary>
///
/// <returns>An object implementing <see cref="T:System.Collections.Generic.IEqualityComparer`1"/>.</returns>
///
/// <example-tbd></example-tbd>
val inline LimitedStructural<'T> : limit: int -> IEqualityComparer<'T> when 'T : equality
/// <summary>Get an implementation of equality semantics using reference equality and reference hashing.</summary>
///
/// <returns>
/// An object implementing <see cref="T:System.Collections.Generic.IEqualityComparer`1"/> using <see cref="M:Microsoft.FSharp.Core.LanguagePrimitives.PhysicalEquality"/>
/// and <see cref="M:Microsoft.FSharp.Core.LanguagePrimitives.PhysicalHash"/>.
/// </returns>
///
/// <example-tbd></example-tbd>
val Reference<'T> : IEqualityComparer<'T> when 'T : not struct
/// <summary>Get an implementation of equality semantics using the given functions.</summary>
///
/// <param name="hasher">A function to generate a hash code from a value.</param>
/// <param name="equality">A function to test equality of two values.</param>
///
/// <returns>An object implementing <see cref="T:System.Collections.Generic.IEqualityComparer`1"/> using the given functions.</returns>
///
/// <example-tbd></example-tbd>
val inline FromFunctions<'T> : hasher:('T -> int) -> equality:('T -> 'T -> bool) -> IEqualityComparer<'T>
......@@ -2,54 +2,79 @@
namespace Microsoft.FSharp.Control
open System
open Microsoft.FSharp.Core
open Microsoft.FSharp.Core.Operators
open Microsoft.FSharp.Control
open Microsoft.FSharp.Collections
open System
open Microsoft.FSharp.Core
open Microsoft.FSharp.Core.Operators
open Microsoft.FSharp.Control
open Microsoft.FSharp.Collections
/// <summary>Event implementations for an arbitrary type of delegate.</summary>
///
/// <category index="3">Events and Observables</category>
[<CompiledName("FSharpDelegateEvent`1")>]
type DelegateEvent<'Delegate when 'Delegate :> System.Delegate> =
/// <summary>Creates an event object suitable for implementing an arbitrary type of delegate.</summary>
/// <returns>The event object.</returns>
new : unit -> DelegateEvent<'Delegate>
/// <summary>Triggers the event using the given parameters.</summary>
/// <param name="args">The parameters for the event.</param>
member Trigger : args:obj[] -> unit
/// <summary>Publishes the event as a first class event value.</summary>
member Publish : IDelegateEvent<'Delegate>
/// <summary>Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument.</summary>
/// <summary>Event implementations for an arbitrary type of delegate.</summary>
///
/// <category index="3">Events and Observables</category>
[<CompiledName("FSharpDelegateEvent`1")>]
type DelegateEvent<'Delegate when 'Delegate :> System.Delegate> =
/// <summary>Creates an event object suitable for implementing an arbitrary type of delegate.</summary>
/// <returns>The event object.</returns>
///
/// <example-tbd></example-tbd>
new : unit -> DelegateEvent<'Delegate>
/// <summary>Triggers the event using the given parameters.</summary>
/// <param name="args">The parameters for the event.</param>
///
/// <example-tbd></example-tbd>
member Trigger : args:obj[] -> unit
/// <summary>Publishes the event as a first class event value.</summary>
///
/// <example-tbd></example-tbd>
member Publish : IDelegateEvent<'Delegate>
/// <summary>Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument.</summary>
///
/// <category index="3">Events and Observables</category>
[<CompiledName("FSharpEvent`2")>]
type Event<'Delegate,'Args when 'Delegate : delegate<'Args,unit> and 'Delegate :> System.Delegate and 'Delegate : not struct> =
/// <summary>Creates an event object suitable for delegate types following the standard .NET Framework convention of a first 'sender' argument.</summary>
/// <returns>The created event.</returns>
///
/// <example-tbd></example-tbd>
new : unit -> Event<'Delegate,'Args>
/// <summary>Triggers the event using the given sender object and parameters. The sender object may be <c>null</c>.</summary>
///
/// <category index="3">Events and Observables</category>
[<CompiledName("FSharpEvent`2")>]
type Event<'Delegate,'Args when 'Delegate : delegate<'Args,unit> and 'Delegate :> System.Delegate and 'Delegate : not struct> =
/// <summary>Creates an event object suitable for delegate types following the standard .NET Framework convention of a first 'sender' argument.</summary>
/// <returns>The created event.</returns>
new : unit -> Event<'Delegate,'Args>
/// <summary>Triggers the event using the given sender object and parameters. The sender object may be <c>null</c>.</summary>
///
/// <param name="sender">The object triggering the event.</param>
/// <param name="args">The parameters for the event.</param>
member Trigger : sender:obj * args:'Args -> unit
/// <summary>Publishes the event as a first class event value.</summary>
member Publish : IEvent<'Delegate,'Args>
/// <summary>Event implementations for the IEvent&lt;_&gt; type.</summary>
/// <param name="sender">The object triggering the event.</param>
/// <param name="args">The parameters for the event.</param>
///
/// <example-tbd></example-tbd>
member Trigger : sender:obj * args:'Args -> unit
/// <summary>Publishes the event as a first class event value.</summary>
///
/// <example-tbd></example-tbd>
member Publish : IEvent<'Delegate,'Args>
/// <summary>Event implementations for the IEvent&lt;_&gt; type.</summary>
///
/// <category index="3">Events and Observables</category>
[<CompiledName("FSharpEvent`1")>]
type Event<'T> =
/// <summary>Creates an observable object.</summary>
/// <returns>The created event.</returns>
///
/// <example-tbd></example-tbd>
new : unit -> Event<'T>
/// <summary>Triggers the event using the given parameters.</summary>
///
/// <category index="3">Events and Observables</category>
[<CompiledName("FSharpEvent`1")>]
type Event<'T> =
/// <summary>Creates an observable object.</summary>
/// <returns>The created event.</returns>
new : unit -> Event<'T>
/// <summary>Triggers an observation using the given parameters.</summary>
///
/// <param name="arg">The event parameters.</param>
member Trigger : arg:'T -> unit
/// <summary>Publishes an observation as a first class value.</summary>
member Publish : IEvent<'T>
/// <param name="arg">The event parameters.</param>
///
/// <example-tbd></example-tbd>
member Trigger : arg:'T -> unit
/// <summary>Publishes the event as a first class value.</summary>
///
/// <example-tbd></example-tbd>
member Publish : IEvent<'T>
......@@ -5,11 +5,11 @@ namespace Microsoft.FSharp.Control
open Microsoft.FSharp.Core
open Microsoft.FSharp.Control
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
[<RequireQualifiedAccess>]
/// <summary>Contains operations for working with values of type <see cref="T:Microsoft.FSharp.Control.IEvent`1"/>.</summary>
///
/// <category index="3">Events and Observables</category>
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
[<RequireQualifiedAccess>]
module Event =
/// <summary>Fires the output event when either of the input events fire.</summary>
......@@ -73,11 +73,10 @@ namespace Microsoft.FSharp.Control
[<CompiledName("Choose")>]
val choose: chooser:('T -> 'U option) -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U>
[<CompiledName("Scan")>]
/// <summary>Returns a new event consisting of the results of applying the given accumulating function
/// to successive values triggered on the input event. An item of internal state
/// 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
/// execution of the accumulation function, so care should be taken that the
/// input IEvent not triggered by multiple threads simultaneously.</summary>
///
/// <param name="collector">The function to update the state with each event value.</param>
......@@ -85,6 +84,7 @@ namespace Microsoft.FSharp.Control
/// <param name="sourceEvent">The input event.</param>
///
/// <returns>An event that fires on the updated state values.</returns>
[<CompiledName("Scan")>]
val scan: collector:('U -> 'T -> 'U) -> state:'U -> sourceEvent:IEvent<'Del,'T> -> IEvent<'U>
/// <summary>Runs the given function each time the given event is triggered.</summary>
......
......@@ -3,10 +3,10 @@
/// <summary>Pervasives: Additional bindings available at the top level</summary>
namespace Microsoft.FSharp.Core
[<AutoOpen>]
/// <summary>A set of extra operators and functions. This module is automatically opened in all F# code.</summary>
///
/// <category>Basic Operators</category>
[<AutoOpen>]
module ExtraTopLevelOperators =
open System
......@@ -20,6 +20,8 @@ module ExtraTopLevelOperators =
/// <param name="format">The formatter.</param>
///
/// <returns>The formatted result.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("PrintFormat")>]
val printf: format:Printf.TextWriterFormat<'T> -> 'T
......@@ -28,6 +30,8 @@ module ExtraTopLevelOperators =
/// <param name="format">The formatter.</param>
///
/// <returns>The formatted result.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("PrintFormatLine")>]
val printfn: format:Printf.TextWriterFormat<'T> -> 'T
......@@ -36,6 +40,8 @@ module ExtraTopLevelOperators =
/// <param name="format">The formatter.</param>
///
/// <returns>The formatted result.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("PrintFormatToError")>]
val eprintf: format:Printf.TextWriterFormat<'T> -> 'T
......@@ -44,6 +50,8 @@ module ExtraTopLevelOperators =
/// <param name="format">The formatter.</param>
///
/// <returns>The formatted result.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("PrintFormatLineToError")>]
val eprintfn: format:Printf.TextWriterFormat<'T> -> 'T
......@@ -52,6 +60,8 @@ module ExtraTopLevelOperators =
/// <param name="format">The formatter.</param>
///
/// <returns>The formatted result.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("PrintFormatToString")>]
val sprintf: format:Printf.StringFormat<'T> -> 'T
......@@ -61,6 +71,8 @@ module ExtraTopLevelOperators =
/// <param name="format">The formatter.</param>
///
/// <returns>The formatted result.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("PrintFormatToStringThenFail")>]
val failwithf: format:Printf.StringFormat<'T,'Result> -> 'T
......@@ -70,6 +82,8 @@ module ExtraTopLevelOperators =
/// <param name="format">The formatter.</param>
///
/// <returns>The formatted result.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("PrintFormatToTextWriter")>]
val fprintf : textWriter:System.IO.TextWriter -> format:Printf.TextWriterFormat<'T> -> 'T
......@@ -79,6 +93,8 @@ module ExtraTopLevelOperators =
/// <param name="format">The formatter.</param>
///
/// <returns>The formatted result.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("PrintFormatLineToTextWriter")>]
val fprintfn : textWriter:System.IO.TextWriter -> format:Printf.TextWriterFormat<'T> -> 'T
......@@ -87,28 +103,40 @@ module ExtraTopLevelOperators =
/// <param name="elements">The input sequence of elements.</param>
///
/// <returns>The created set.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("CreateSet")>]
val set : elements:seq<'T> -> Set<'T>
/// <summary>Builds an asynchronous workflow using computation expression syntax.</summary>
///
/// <example-tbd></example-tbd>
[<CompiledName("DefaultAsyncBuilder")>]
val async : Microsoft.FSharp.Control.AsyncBuilder
/// <summary>Converts the argument to 32-bit float.</summary>
///
/// <remarks>This is a direct conversion for all
/// primitive numeric types. For strings, the input is converted using <c>Single.Parse()</c> with InvariantCulture settings. Otherwise the operation requires and invokes a <c>ToSingle</c> method on the input type.</remarks>
///
/// <example-tbd></example-tbd>
[<CompiledName("ToSingle")>]
val inline single : value:^T -> single when ^T : (static member op_Explicit : ^T -> single) and default ^T : int
/// <summary>Converts the argument to 64-bit float.</summary>
///
/// <remarks>This is a direct conversion for all
/// primitive numeric types. For strings, the input is converted using <c>Double.Parse()</c> with InvariantCulture settings. Otherwise the operation requires and invokes a <c>ToDouble</c> method on the input type.</remarks>
///
/// <example-tbd></example-tbd>
[<CompiledName("ToDouble")>]
val inline double : value:^T -> double when ^T : (static member op_Explicit : ^T -> double) and default ^T : int
/// <summary>Converts the argument to byte.</summary>
/// <remarks>This is a direct conversion for all
/// primitive numeric types. For strings, the input is converted using <c>Byte.Parse()</c> on strings and otherwise requires a <c>ToByte</c> method on the input type.</remarks>
///
/// <example-tbd></example-tbd>
[<CompiledName("ToByte")>]
val inline uint8 : value:^T -> uint8 when ^T : (static member op_Explicit : ^T -> uint8) and default ^T : int
......@@ -116,15 +144,18 @@ module ExtraTopLevelOperators =
/// <remarks>This is a direct conversion for all
/// primitive numeric types. For strings, the input is converted using <c>SByte.Parse()</c> with InvariantCulture settings.
/// Otherwise the operation requires and invokes a <c>ToSByte</c> method on the input type.</remarks>
///
/// <example-tbd></example-tbd>
[<CompiledName("ToSByte")>]
val inline int8 : value:^T -> int8 when ^T : (static member op_Explicit : ^T -> int8) and default ^T : int
module Checked =
/// <summary>Converts the argument to byte.</summary>
/// <remarks>This is a direct, checked conversion for all
/// primitive numeric types. For strings, the input is converted using <c>Byte.Parse()</c> on strings and otherwise requires a <c>ToByte</c> method on the input type.</remarks>
///
/// <example-tbd></example-tbd>
[<CompiledName("ToByte")>]
val inline uint8 : value:^T -> byte when ^T : (static member op_Explicit : ^T -> uint8) and default ^T : int
......@@ -132,38 +163,53 @@ module ExtraTopLevelOperators =
/// <remarks>This is a direct, checked conversion for all
/// primitive numeric types. For strings, the input is converted using <c>SByte.Parse()</c> with InvariantCulture settings.
/// Otherwise the operation requires and invokes a <c>ToSByte</c> method on the input type.</remarks>
///
/// <example-tbd></example-tbd>
[<CompiledName("ToSByte")>]
val inline int8 : value:^T -> sbyte when ^T : (static member op_Explicit : ^T -> int8) and default ^T : int
/// <summary>Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality.</summary>
///
/// <example-tbd></example-tbd>
[<CompiledName("CreateDictionary")>]
val dict : keyValuePairs:seq<'Key * 'Value> -> System.Collections.Generic.IDictionary<'Key,'Value> when 'Key : equality
/// <summary>Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality.</summary>
///
/// <example-tbd></example-tbd>
[<CompiledName("CreateReadOnlyDictionary")>]
val readOnlyDict : keyValuePairs:seq<'Key * 'Value> -> System.Collections.Generic.IReadOnlyDictionary<'Key,'Value> when 'Key : equality
/// <summary>Builds a 2D array from a sequence of sequences of elements.</summary>
///
/// <example-tbd></example-tbd>
[<CompiledName("CreateArray2D")>]
val array2D : rows:seq<#seq<'T>> -> 'T[,]
/// <summary>Special prefix operator for splicing typed expressions into quotation holes.</summary>
///
/// <example-tbd></example-tbd>
[<CompiledName("SpliceExpression")>]
val (~%) : expression:Microsoft.FSharp.Quotations.Expr<'T> -> 'T
/// <summary>Special prefix operator for splicing untyped expressions into quotation holes.</summary>
///
/// <example-tbd></example-tbd>
[<CompiledName("SpliceUntypedExpression")>]
val (~%%) : expression:Microsoft.FSharp.Quotations.Expr -> 'T
/// <summary>An active pattern to force the execution of values of type <c>Lazy&lt;_&gt;</c>.</summary>
///
/// <example-tbd></example-tbd>
[<CompiledName("LazyPattern")>]
val (|Lazy|) : input:Lazy<'T> -> 'T
/// <summary>Builds a query using query syntax and operators.</summary>
///
/// <example-tbd></example-tbd>
val query : Microsoft.FSharp.Linq.QueryBuilder
namespace Microsoft.FSharp.Core.CompilerServices
open System
......@@ -174,7 +220,6 @@ namespace Microsoft.FSharp.Core.CompilerServices
open Microsoft.FSharp.Control
open Microsoft.FSharp.Quotations
/// <summary>Represents the product of two measure expressions when returned as a generic argument of a provided type.</summary>
///
/// <namespacedoc><summary>
......@@ -193,6 +238,7 @@ namespace Microsoft.FSharp.Core.CompilerServices
[<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false)>]
type TypeProviderAttribute =
inherit System.Attribute
/// <summary>Creates an instance of the attribute</summary>
/// <returns>TypeProviderAttribute</returns>
new : unit -> TypeProviderAttribute
......@@ -202,43 +248,57 @@ namespace Microsoft.FSharp.Core.CompilerServices
| SuppressRelocate = 0x80000000
| IsErased = 0x40000000
/// <summary>Place attribute on runtime assembly to indicate that there is a corresponding design-time
/// assembly that contains a type provider. Runtime and designer assembly may be the same. </summary>
/// <summary>Place this attribute on a runtime assembly to indicate that there is a corresponding design-time
/// assembly that contains a type provider. Runtime and design-time assembly may be the same. </summary>
[<AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple = false)>]
type TypeProviderAssemblyAttribute =
inherit System.Attribute
/// <summary>Creates an instance of the attribute</summary>
/// <returns>TypeProviderAssemblyAttribute</returns>
new : unit -> TypeProviderAssemblyAttribute
/// <summary>Creates an instance of the attribute</summary>
/// <returns>TypeProviderAssemblyAttribute</returns>
/// <param name="assemblyName">The name of the design-time assembly for this type provider.</param>
new : assemblyName : string -> TypeProviderAssemblyAttribute
/// <summary>Gets the assembly name.</summary>
member AssemblyName : string
/// The TypeProviderXmlDocAttribute attribute can be added to types and members.
/// The language service will display the CommentText property from the attribute
/// in the appropriate place when the user hovers over a type or member.
/// <summary>A type provider may provide an instance of this attribute to indicate the documentation to show for
/// a provided type or member.</summary>
[<AttributeUsageAttribute(AttributeTargets.All, AllowMultiple = false)>]
type TypeProviderXmlDocAttribute =
inherit System.Attribute
/// <summary>Creates an instance of the attribute</summary>
/// <returns>TypeProviderXmlDocAttribute</returns>
new : commentText : string -> TypeProviderXmlDocAttribute
/// <summary>Gets the comment text.</summary>
member CommentText : string
/// <summary>A type provider may provide an instance of this attribute to indicate the definition location for a provided type or member.</summary>
[<AttributeUsageAttribute(AttributeTargets.All, AllowMultiple = false)>]
type TypeProviderDefinitionLocationAttribute =
inherit System.Attribute
new : unit -> TypeProviderDefinitionLocationAttribute
/// <summary>Gets or sets the file path for the definition location.</summary>
member FilePath : string with get, set
/// <summary>Gets or sets the line for the location.</summary>
member Line : int with get, set
/// <summary>Gets or sets the column for the location.</summary>
member Column : int with get, set
[<AttributeUsageAttribute(AttributeTargets.Class ||| AttributeTargets.Interface ||| AttributeTargets.Struct ||| AttributeTargets.Delegate, AllowMultiple = false)>]
/// <summary>Indicates that a code editor should hide all System.Object methods from the intellisense menus for instances of a provided type</summary>
[<AttributeUsageAttribute(AttributeTargets.Class ||| AttributeTargets.Interface ||| AttributeTargets.Struct ||| AttributeTargets.Delegate, AllowMultiple = false)>]
type TypeProviderEditorHideMethodsAttribute =
inherit System.Attribute
/// <summary>Creates an instance of the attribute</summary>
/// <returns>TypeProviderEditorHideMethodsAttribute</returns>
new : unit -> TypeProviderEditorHideMethodsAttribute
......@@ -272,7 +332,6 @@ namespace Microsoft.FSharp.Core.CompilerServices
/// Checks if given type exists in target system runtime library
member SystemRuntimeContainsType : string -> bool
/// <summary>
/// Represents a namespace provided by a type provider component.
/// </summary>
......@@ -304,7 +363,7 @@ namespace Microsoft.FSharp.Core.CompilerServices
inherit System.IDisposable
/// <summary>
/// Namespace name the this TypeProvider injects types into.
/// Gets the namespaces provided by the type provider.
/// </summary>
abstract GetNamespaces : unit -> IProvidedNamespace[]
......@@ -320,7 +379,9 @@ namespace Microsoft.FSharp.Core.CompilerServices
/// <summary>
/// Apply static arguments to a provided type that accepts static arguments.
/// </summary>
///
/// <remarks>The provider must return a type with the given mangled name.</remarks>
///
/// <param name="typeWithoutArguments">the provided type definition which has static parameters</param>
/// <param name="typePathWithArguments">the full path of the type, including encoded representations of static parameters</param>
/// <param name="staticArguments">the static parameters, indexed by name</param>
......@@ -359,7 +420,6 @@ namespace Microsoft.FSharp.Core.CompilerServices
/// <param name="methodWithoutArguments">A method returned by GetMethod on a provided type</param>
///
/// <returns>The static parameters of the provided method, if any</returns>
abstract GetStaticParametersForMethod : methodWithoutArguments:MethodBase -> ParameterInfo[]
/// <summary>
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -17,10 +17,10 @@ namespace Microsoft.FSharp.Core
/// <category>Basic Types</category>
type bigint = System.Numerics.BigInteger
[<AutoOpen>]
/// <summary>Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' </summary>
///
/// <category>Language Primitives</category>
[<AutoOpen>]
module NumericLiterals =
/// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI'
......
......@@ -2,147 +2,168 @@
namespace Microsoft.FSharp.Control
open System
open Microsoft.FSharp.Core
open System
open Microsoft.FSharp.Core
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
[<RequireQualifiedAccess>]
/// <summary>Contains operations for working with first class event and other observable objects.</summary>
///
/// <category index="3">Events and Observables</category>
module Observable =
/// <summary>Contains operations for working with first class event and other observable objects.</summary>
///
/// <category index="3">Events and Observables</category>
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
[<RequireQualifiedAccess>]
module Observable =
/// <summary>Returns an observable for the merged observations from the sources.
/// The returned object propagates success and error values arising
/// from either source and completes when both the sources have completed.</summary>
///
/// <remarks>For each observer, the registered intermediate observing object is not
/// thread safe. That is, observations arising from the sources must not
/// be triggered concurrently on different threads.</remarks>
/// <param name="source1">The first Observable.</param>
/// <param name="source2">The second Observable.</param>
///
/// <returns>An Observable that propagates information from both sources.</returns>
[<CompiledName("Merge")>]
val merge: source1:IObservable<'T> -> source2:IObservable<'T> -> IObservable<'T>
/// <summary>Returns an observable for the merged observations from the sources.
/// The returned object propagates success and error values arising
/// from either source and completes when both the sources have completed.</summary>
///
/// <remarks>For each observer, the registered intermediate observing object is not
/// thread safe. That is, observations arising from the sources must not
/// be triggered concurrently on different threads.</remarks>
///
/// <param name="source1">The first Observable.</param>
/// <param name="source2">The second Observable.</param>
///
/// <returns>An Observable that propagates information from both sources.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("Merge")>]
val merge: source1:IObservable<'T> -> source2:IObservable<'T> -> IObservable<'T>
/// <summary>Returns an observable which transforms the observations of the source by the
/// given function. The transformation function is executed once for each
/// subscribed observer. The returned object also propagates error observations
/// arising from the source and completes when the source completes.</summary>
/// <param name="mapping">The function applied to observations from the source.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>An Observable of the type specified by <c>mapping</c>.</returns>
[<CompiledName("Map")>]
val map: mapping:('T -> 'U) -> source:IObservable<'T> -> IObservable<'U>
/// <summary>Returns an observable which transforms the observations of the source by the
/// given function. The transformation function is executed once for each
/// subscribed observer. The returned object also propagates error observations
/// arising from the source and completes when the source completes.</summary>
/// <param name="mapping">The function applied to observations from the source.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>An Observable of the type specified by <c>mapping</c>.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("Map")>]
val map: mapping:('T -> 'U) -> source:IObservable<'T> -> IObservable<'U>
/// <summary>Returns an observable which filters the observations of the source
/// by the given function. The observable will see only those observations
/// 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.</summary>
///
/// <param name="predicate">The function to apply to observations to determine if it should
/// be kept.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>An Observable that filters observations based on <c>filter</c>.</returns>
[<CompiledName("Filter")>]
val filter: predicate:('T -> bool) -> source:IObservable<'T> -> IObservable<'T>
/// <summary>Returns an observable which filters the observations of the source
/// by the given function. The observable will see only those observations
/// 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.</summary>
///
/// <param name="predicate">The function to apply to observations to determine if it should
/// be kept.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>An Observable that filters observations based on <c>filter</c>.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("Filter")>]
val filter: predicate:('T -> bool) -> source:IObservable<'T> -> IObservable<'T>
/// <summary>Returns two observables which partition the observations of the source by
/// the given function. The first will trigger observations for those values
/// for which the predicate returns true. The second will trigger observations
/// for those values where the predicate returns false. The predicate is
/// executed once for each subscribed observer. Both also propagate all error
/// observations arising from the source and each completes when the source
/// completes.</summary>
///
/// <param name="predicate">The function to determine which output Observable will trigger
/// a particular observation.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>A tuple of Observables. The first triggers when the predicate returns true, and
/// the second triggers when the predicate returns false.</returns>
[<CompiledName("Partition")>]
val partition: predicate:('T -> bool) -> source:IObservable<'T> -> (IObservable<'T> * IObservable<'T>)
/// <summary>Returns two observables which partition the observations of the source by
/// the given function. The first will trigger observations for those values
/// for which the predicate returns true. The second will trigger observations
/// for those values where the predicate returns false. The predicate is
/// executed once for each subscribed observer. Both also propagate all error
/// observations arising from the source and each completes when the source
/// completes.</summary>
///
/// <param name="predicate">The function to determine which output Observable will trigger
/// a particular observation.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>A tuple of Observables. The first triggers when the predicate returns true, and
/// the second triggers when the predicate returns false.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("Partition")>]
val partition: predicate:('T -> bool) -> source:IObservable<'T> -> (IObservable<'T> * IObservable<'T>)
/// <summary>Returns two observables which split the observations of the source by the
/// given function. The first will trigger observations <c>x</c> for which the
/// splitter returns <c>Choice1Of2 x</c>. The second will trigger observations
/// <c>y</c> for which the splitter returns <c>Choice2Of2 y</c> The splitter is
/// executed once for each subscribed observer. Both also propagate error
/// observations arising from the source and each completes when the source
/// completes.</summary>
///
/// <param name="splitter">The function that takes an observation an transforms
/// it into one of the two output Choice types.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>A tuple of Observables. The first triggers when <c>splitter</c> returns Choice1of2
/// and the second triggers when <c>splitter</c> returns Choice2of2.</returns>
[<CompiledName("Split")>]
val split: splitter:('T -> Choice<'U1,'U2>) -> source:IObservable<'T> -> (IObservable<'U1> * IObservable<'U2>)
/// <summary>Returns two observables which split the observations of the source by the
/// given function. The first will trigger observations <c>x</c> for which the
/// splitter returns <c>Choice1Of2 x</c>. The second will trigger observations
/// <c>y</c> for which the splitter returns <c>Choice2Of2 y</c> The splitter is
/// executed once for each subscribed observer. Both also propagate error
/// observations arising from the source and each completes when the source
/// completes.</summary>
///
/// <param name="splitter">The function that takes an observation an transforms
/// it into one of the two output Choice types.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>A tuple of Observables. The first triggers when <c>splitter</c> returns Choice1of2
/// and the second triggers when <c>splitter</c> returns Choice2of2.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("Split")>]
val split: splitter:('T -> Choice<'U1,'U2>) -> source:IObservable<'T> -> (IObservable<'U1> * IObservable<'U2>)
/// <summary>Returns an observable which chooses a projection of observations from the source
/// using the given function. The returned object will trigger observations <c>x</c>
/// for which the splitter returns <c>Some x</c>. The returned object also propagates
/// all errors arising from the source and completes when the source completes.</summary>
///
/// <param name="chooser">The function that returns Some for observations to be propagated
/// and None for observations to ignore.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>An Observable that only propagates some of the observations from the source.</returns>
[<CompiledName("Choose")>]
val choose: chooser:('T -> 'U option) -> source:IObservable<'T> -> IObservable<'U>
/// <summary>Returns an observable which chooses a projection of observations from the source
/// using the given function. The returned object will trigger observations <c>x</c>
/// for which the splitter returns <c>Some x</c>. The returned object also propagates
/// all errors arising from the source and completes when the source completes.</summary>
///
/// <param name="chooser">The function that returns Some for observations to be propagated
/// and None for observations to ignore.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>An Observable that only propagates some of the observations from the source.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("Choose")>]
val choose: chooser:('T -> 'U option) -> source:IObservable<'T> -> IObservable<'U>
/// <summary>Returns an observable which, for each observer, allocates an item of state
/// and applies the given accumulating function to successive values arising from
/// the input. The returned object will trigger observations for each computed
/// state value, excluding the initial value. The returned object propagates
/// all errors arising from the source and completes when the source completes.</summary>
///
/// <remarks>For each observer, the registered intermediate observing object is not thread safe.
/// That is, observations arising from the source must not be triggered concurrently
/// on different threads.</remarks>
/// <param name="collector">The function to update the state with each observation.</param>
/// <param name="state">The initial state.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>An Observable that triggers on the updated state values.</returns>
[<CompiledName("Scan")>]
val scan: collector:('U -> 'T -> 'U) -> state:'U -> source:IObservable<'T> -> IObservable<'U>
/// <summary>Returns an observable which, for each observer, allocates an item of state
/// and applies the given accumulating function to successive values arising from
/// the input. The returned object will trigger observations for each computed
/// state value, excluding the initial value. The returned object propagates
/// all errors arising from the source and completes when the source completes.</summary>
///
/// <remarks>For each observer, the registered intermediate observing object is not thread safe.
/// That is, observations arising from the source must not be triggered concurrently
/// on different threads.</remarks>
/// <param name="collector">The function to update the state with each observation.</param>
/// <param name="state">The initial state.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>An Observable that triggers on the updated state values.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("Scan")>]
val scan: collector:('U -> 'T -> 'U) -> state:'U -> source:IObservable<'T> -> IObservable<'U>
/// <summary>Creates an observer which permanently subscribes to the given observable and which calls
/// the given function for each observation.</summary>
///
/// <param name="callback">The function to be called on each observation.</param>
/// <param name="source">The input Observable.</param>
[<CompiledName("Add")>]
val add : callback:('T -> unit) -> source:IObservable<'T> -> unit
/// <summary>Creates an observer which permanently subscribes to the given observable and which calls
/// the given function for each observation.</summary>
///
/// <param name="callback">The function to be called on each observation.</param>
/// <param name="source">The input Observable.</param>
///
/// <example-tbd></example-tbd>
[<CompiledName("Add")>]
val add : callback:('T -> unit) -> source:IObservable<'T> -> unit
/// <summary>Creates an observer which subscribes to the given observable and which calls
/// the given function for each observation.</summary>
///
/// <param name="callback">The function to be called on each observation.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>An object that will remove the callback if disposed.</returns>
[<CompiledName("Subscribe")>]
val subscribe : callback:('T -> unit) -> source:IObservable<'T> -> System.IDisposable
/// <summary>Creates an observer which subscribes to the given observable and which calls
/// the given function for each observation.</summary>
///
/// <param name="callback">The function to be called on each observation.</param>
/// <param name="source">The input Observable.</param>
///
/// <returns>An object that will remove the callback if disposed.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("Subscribe")>]
val subscribe : callback:('T -> unit) -> source:IObservable<'T> -> System.IDisposable
/// <summary>Returns a new observable that triggers on the second and subsequent triggerings of the input observable.
/// The Nth triggering of the input observable 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.</summary>
///
/// <remarks>For each observer, the registered intermediate observing object is not thread safe.
/// That is, observations arising from the source must not be triggered concurrently
/// on different threads.</remarks>
/// <param name="source">The input Observable.</param>
///
/// <returns>An Observable that triggers on successive pairs of observations from the input Observable.</returns>
[<CompiledName("Pairwise")>]
val pairwise: source:IObservable<'T> -> IObservable<'T * 'T>
/// <summary>Returns a new observable that triggers on the second and subsequent triggerings of the input observable.
/// The Nth triggering of the input observable 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.</summary>
///
/// <remarks>For each observer, the registered intermediate observing object is not thread safe.
/// That is, observations arising from the source must not be triggered concurrently
/// on different threads.</remarks>
/// <param name="source">The input Observable.</param>
///
/// <returns>An Observable that triggers on successive pairs of observations from the input Observable.</returns>
///
/// <example-tbd></example-tbd>
[<CompiledName("Pairwise")>]
val pairwise: source:IObservable<'T> -> IObservable<'T * 'T>
此差异已折叠。
......@@ -253,8 +253,8 @@ module internal PrintfImpl =
i <- i + 1
buf.ToString()
[<NoComparison; NoEquality>]
/// Represents one step in the execution of a format string
[<NoComparison; NoEquality>]
type Step =
| StepWithArg of prefix: string * conv: (obj -> string)
| StepWithTypedArg of prefix: string * conv: (obj -> Type -> string)
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册