From 3b461b1c7243a1d1092d770202d5b715cfc93f9c Mon Sep 17 00:00:00 2001 From: KevinRansom Date: Tue, 9 Jul 2024 23:38:28 -0700 Subject: [PATCH] initial --- .../.FSharp.Compiler.Service/8.0.400.md | 1 + .../.FSharp.Compiler.Service/9.0.100.md | 1 + docs/release-notes/.FSharp.Core/9.0.100.md | 1 + release-notes.md | 3 +- src/Compiler/AbstractIL/il.fs | 6 +- src/Compiler/AbstractIL/il.fsi | 1 + src/Compiler/Checking/AttributeChecking.fs | 4 +- .../Checking/AugmentWithHashCompare.fs | 4 +- src/Compiler/Checking/CheckBasics.fs | 2 +- .../Checking/CheckComputationExpressions.fs | 7 +- src/Compiler/Checking/CheckDeclarations.fs | 14 +- src/Compiler/Checking/CheckExpressions.fs | 6 +- src/Compiler/Checking/PostInferenceChecks.fs | 12 +- src/Compiler/Checking/TailCallChecks.fs | 2 +- src/Compiler/Checking/infos.fs | 4 +- src/Compiler/CodeGen/IlxGen.fs | 22 +- src/Compiler/CodeGen/IlxGenSupport.fs | 2 +- src/Compiler/Driver/CompilerConfig.fs | 12 +- src/Compiler/Driver/CompilerConfig.fsi | 8 +- src/Compiler/Driver/CompilerImports.fs | 6 +- src/Compiler/Driver/CompilerOptions.fs | 2 +- src/Compiler/Driver/CreateILModule.fs | 2 +- src/Compiler/Driver/ParseAndCheckInputs.fs | 14 +- src/Compiler/Driver/fsc.fs | 2 +- src/Compiler/Interactive/fsi.fs | 2 +- src/Compiler/Optimize/DetupleArgs.fs | 2 +- src/Compiler/Optimize/Optimizer.fs | 8 +- src/Compiler/Service/FSharpCheckerResults.fs | 10 +- src/Compiler/Service/FSharpCheckerResults.fsi | 2 +- src/Compiler/Service/ServiceLexing.fs | 8 +- src/Compiler/Service/ServiceLexing.fsi | 2 +- src/Compiler/Service/TransparentCompiler.fs | 4 +- src/Compiler/Symbols/SymbolHelpers.fs | 18 +- src/Compiler/SyntaxTree/LexFilter.fs | 8 +- src/Compiler/SyntaxTree/LexFilter.fsi | 2 +- src/Compiler/TypedTree/TcGlobals.fs | 16 +- src/Compiler/TypedTree/TypedTreeBasics.fs | 26 +- src/Compiler/TypedTree/TypedTreeBasics.fsi | 12 +- src/Compiler/TypedTree/TypedTreeOps.fs | 34 +- src/Compiler/TypedTree/TypedTreePickle.fs | 6 +- src/FSharp.Core/FSharp.Core.fsproj | 20 +- src/FSharp.Core/Linq.fs | 12 +- src/FSharp.Core/async.fs | 3 + src/FSharp.Core/async.fsi | 18 + src/FSharp.Core/collectionextensions.fs | 248 ++++++++ src/FSharp.Core/collectionextensions.fsi | 82 +++ src/FSharp.Core/fslib-extra-pervasives.fs | 63 +- src/FSharp.Core/fslib-extra-pervasives.fsi | 25 +- src/FSharp.Core/prim-types.fs | 21 + src/FSharp.Core/prim-types.fsi | 156 ++++- tests/AheadOfTime/Trimming/check.ps1 | 2 +- ...1.fs.RealInternalSignatureOff.il.debug.bsl | 2 +- ...fs.RealInternalSignatureOff.il.release.bsl | 2 +- ...t1.fs.RealInternalSignatureOn.il.debug.bsl | 2 +- ....fs.RealInternalSignatureOn.il.release.bsl | 2 +- ...2.fs.RealInternalSignatureOff.il.debug.bsl | 2 +- ...fs.RealInternalSignatureOff.il.release.bsl | 2 +- ...t2.fs.RealInternalSignatureOn.il.debug.bsl | 2 +- ....fs.RealInternalSignatureOn.il.release.bsl | 2 +- ...3.fs.RealInternalSignatureOff.il.debug.bsl | 2 +- ...fs.RealInternalSignatureOff.il.release.bsl | 2 +- ...t3.fs.RealInternalSignatureOn.il.debug.bsl | 2 +- ....fs.RealInternalSignatureOn.il.release.bsl | 2 +- ...4.fs.RealInternalSignatureOff.il.debug.bsl | 2 +- ...fs.RealInternalSignatureOff.il.release.bsl | 2 +- ...t4.fs.RealInternalSignatureOn.il.debug.bsl | 2 +- ....fs.RealInternalSignatureOn.il.release.bsl | 2 +- ...5.fs.RealInternalSignatureOff.il.debug.bsl | 2 +- ...fs.RealInternalSignatureOff.il.release.bsl | 2 +- ...t5.fs.RealInternalSignatureOn.il.debug.bsl | 2 +- ....fs.RealInternalSignatureOn.il.release.bsl | 2 +- ...6.fs.RealInternalSignatureOff.il.debug.bsl | 4 +- ...fs.RealInternalSignatureOff.il.release.bsl | 4 +- ...t6.fs.RealInternalSignatureOn.il.debug.bsl | 4 +- ....fs.RealInternalSignatureOn.il.release.bsl | 4 +- .../EmittedIL/RefactorExtraPervasives.fs | 559 ++++++++++++++++++ .../FSharp.Compiler.ComponentTests.fsproj | 1 + ...nsions.fsx.realInternalSignatureOff.il.bsl | 4 +- ...ensions.fsx.realInternalSignatureOn.il.bsl | 4 +- ...ervice.SurfaceArea.netstandard20.debug.bsl | 6 +- ...vice.SurfaceArea.netstandard20.release.bsl | 6 +- ...p.Core.SurfaceArea.netstandard20.debug.bsl | 58 ++ ...Core.SurfaceArea.netstandard20.release.bsl | 19 + ...p.Core.SurfaceArea.netstandard21.debug.bsl | 59 +- ...Core.SurfaceArea.netstandard21.release.bsl | 19 + .../CompilerServiceBenchmarks.fs | 2 +- 86 files changed, 1467 insertions(+), 274 deletions(-) create mode 100644 src/FSharp.Core/collectionextensions.fs create mode 100644 src/FSharp.Core/collectionextensions.fsi create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/RefactorExtraPervasives.fs diff --git a/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md b/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md index 60394d22e239..82c4d3e5522e 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md +++ b/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md @@ -31,6 +31,7 @@ * Support empty-bodied computation expressions. ([Language suggestion #1232](https://github.com/fsharp/fslang-suggestions/issues/1232), [RFC FS-1144 (PR #774)](https://github.com/fsharp/fslang-design/pull/774), [PR #17352](https://github.com/dotnet/fsharp/pull/17352)) ### Changed +* `Initial refactoring of FSharp.Core` ([Issues #17372](https://github.com/dotnet/fsharp/issues/17372), [PR #17370](https://github.com/dotnet/fsharp/pull/17370)) * Enforce `AttributeTargets.Interface` ([PR #17173](https://github.com/dotnet/fsharp/pull/17173)) * Minor compiler perf improvements. ([PR #17130](https://github.com/dotnet/fsharp/pull/17130)) * Improve error messages for active pattern argument count mismatch ([PR #16846](https://github.com/dotnet/fsharp/pull/16846), [PR #17186](https://github.com/dotnet/fsharp/pull/17186)) diff --git a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md index 7282b2d0b50a..687d8225e344 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/9.0.100.md @@ -6,5 +6,6 @@ ### Changed * Change compiler default setting realsig+ when building assemblies ([Issue #17384](https://github.com/dotnet/fsharp/issues/17384), [PR #17378](https://github.com/dotnet/fsharp/pull/17385)) * Change compiler default setting for compressedMetadata ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383)) +* Initial refactoring of FSharp.Core ([Issues #17372](https://github.com/dotnet/fsharp/issues/17372), [PR #17370](https://github.com/dotnet/fsharp/pull/17370)) ### Breaking Changes diff --git a/docs/release-notes/.FSharp.Core/9.0.100.md b/docs/release-notes/.FSharp.Core/9.0.100.md index 7050bf1a6669..5733f02e2f9b 100644 --- a/docs/release-notes/.FSharp.Core/9.0.100.md +++ b/docs/release-notes/.FSharp.Core/9.0.100.md @@ -5,6 +5,7 @@ ### Changed * Change compiler default setting realsig+ when building assemblies ([Issue #17384](https://github.com/dotnet/fsharp/issues/17384), [PR #17378](https://github.com/dotnet/fsharp/pull/17385)) * Change compiler default setting for compressedMetadata ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383)) +* Initial refactoring of FSharp.Core ([Issues #17372](https://github.com/dotnet/fsharp/issues/17372), [PR #17370](https://github.com/dotnet/fsharp/pull/17370)) ### Breaking Changes diff --git a/release-notes.md b/release-notes.md index 748f7575eb3f..e9b7e36c5945 100644 --- a/release-notes.md +++ b/release-notes.md @@ -27,7 +27,7 @@ These release notes track our current efforts to document changes to the F# proj A 'do expr' declaration in a module will correspond to a SynModuleDecl.Expr enclosing a SynExpr.Do This constructo also loses the debug point as it was always None. The debug point is always implicit for this construct. -* In FCS API, FSharpParsingOptions, `CompilingFsLib` --> `CompilingFSharpCore` +* In FCS API, FSharpParsingOptions, `CompilingFsLib` --> `compilingFSharpCore` * In FCS API, FSharpParsingOptions, `ErrorSeverityOptions` --> `DiagnosticOptions` * [SynIdent](https://fsharp.github.io/fsharp-compiler-docs/reference/fsharp-compiler-syntax-synident.html#SynIdent) was introduced in the Untyped Syntax Tree. This represent an `Ident` with potential additional information, stored as [IdentTrivia](https://fsharp.github.io/fsharp-compiler-docs/reference/fsharp-compiler-syntaxtrivia-identtrivia.html)). @@ -40,6 +40,7 @@ These release notes track our current efforts to document changes to the F# proj * `DoesIdentifierNeedBackticks` is removed, it should always be sufficient to call `NormalizeIdentifierBackticks` or else call something in `PrettyNaming` * `AddBackticksToIdentifierIfNeeded` is removed, it should always be sufficient to call `NormalizeIdentifierBackticks` * `DeclarationListItem.Name` --> `DeclarationListItem.NameInList` +* In FCS API, FSharpParsingOptions, `compilingFSharpCore` --> `compilingCoreLibrary` ### F# 6.0 / Visual Studio 17.0 diff --git a/src/Compiler/AbstractIL/il.fs b/src/Compiler/AbstractIL/il.fs index 66b736f87c3b..d7b85586264f 100644 --- a/src/Compiler/AbstractIL/il.fs +++ b/src/Compiler/AbstractIL/il.fs @@ -4774,11 +4774,11 @@ let compareILVersions (version1: ILVersionInfo) (version2: ILVersionInfo) = let c = compare version1.Revision version2.Revision if c <> 0 then c else 0 -let DummyFSharpCoreScopeRef = +let mkDummyCoreLibraryScopeRef coreLibraryName = let asmRef = // The exact public key token and version used here don't actually matter, or shouldn't. ILAssemblyRef.Create( - "FSharp.Core", + coreLibraryName, None, Some(PublicKeyToken(Bytes.ofInt32Array [| 0xb0; 0x3f; 0x5f; 0x7f; 0x11; 0xd5; 0x0a; 0x3a |])), false, @@ -4789,7 +4789,7 @@ let DummyFSharpCoreScopeRef = ILScopeRef.Assembly asmRef let PrimaryAssemblyILGlobals = - mkILGlobals (ILScopeRef.PrimaryAssembly, [], DummyFSharpCoreScopeRef) + mkILGlobals (ILScopeRef.PrimaryAssembly, [], mkDummyCoreLibraryScopeRef "FSharp.Core") let rec decodeCustomAttrElemType bytes sigptr x = match x with diff --git a/src/Compiler/AbstractIL/il.fsi b/src/Compiler/AbstractIL/il.fsi index d6673131060d..ed5d230044a7 100644 --- a/src/Compiler/AbstractIL/il.fsi +++ b/src/Compiler/AbstractIL/il.fsi @@ -2406,6 +2406,7 @@ val internal sha1HashBytes: byte[] -> byte (* SHA1 hash *) [] val internal parseILVersion: string -> ILVersionInfo val internal formatILVersion: ILVersionInfo -> string val internal compareILVersions: ILVersionInfo -> ILVersionInfo -> int +val internal mkDummyCoreLibraryScopeRef: string -> ILScopeRef /// Decompose a type definition according to its kind. type internal ILEnumInfo = diff --git a/src/Compiler/Checking/AttributeChecking.fs b/src/Compiler/Checking/AttributeChecking.fs index 2564a54bdd3f..9b47a067adea 100644 --- a/src/Compiler/Checking/AttributeChecking.fs +++ b/src/Compiler/Checking/AttributeChecking.fs @@ -294,7 +294,7 @@ let CheckFSharpAttributes (g:TcGlobals) attribs m = // See attribute on FSharp.Core 'nameof' if n = 3501 then () - elif isError && (not g.compilingFSharpCore || n <> 1204) then + elif isError && (not g.compilingCoreLibrary || n <> 1204) then do! ErrorD msg else do! WarnD msg @@ -304,7 +304,7 @@ let CheckFSharpAttributes (g:TcGlobals) attribs m = match TryFindFSharpAttribute g g.attrib_ExperimentalAttribute attribs with | Some(Attrib(_, _, [ AttribStringArg(s) ], _, _, _, _)) -> let isExperimentalAttributeDisabled (s:string) = - if g.compilingFSharpCore then + if g.compilingCoreLibrary then true else g.langVersion.IsPreviewEnabled && (s.IndexOf(langVersionPrefix, StringComparison.OrdinalIgnoreCase) >= 0) diff --git a/src/Compiler/Checking/AugmentWithHashCompare.fs b/src/Compiler/Checking/AugmentWithHashCompare.fs index 4326ac6ccfce..368bc01ec552 100644 --- a/src/Compiler/Checking/AugmentWithHashCompare.fs +++ b/src/Compiler/Checking/AugmentWithHashCompare.fs @@ -1159,7 +1159,7 @@ let CheckAugmentationAttribs isImplementation g amap (tycon: Tycon) = let TyconIsCandidateForAugmentationWithCompare (g: TcGlobals) (tycon: Tycon) = // This type gets defined in prim-types, before we can add attributes to F# type definitions - let isUnit = g.compilingFSharpCore && tycon.DisplayName = "Unit" + let isUnit = g.compilingCoreLibrary && tycon.DisplayName = "Unit" not isUnit && not (isByrefLikeTyconRef g tycon.Range (mkLocalTyconRef tycon)) @@ -1175,7 +1175,7 @@ let TyconIsCandidateForAugmentationWithCompare (g: TcGlobals) (tycon: Tycon) = let TyconIsCandidateForAugmentationWithEquals (g: TcGlobals) (tycon: Tycon) = // This type gets defined in prim-types, before we can add attributes to F# type definitions - let isUnit = g.compilingFSharpCore && tycon.DisplayName = "Unit" + let isUnit = g.compilingCoreLibrary && tycon.DisplayName = "Unit" not isUnit && not (isByrefLikeTyconRef g tycon.Range (mkLocalTyconRef tycon)) diff --git a/src/Compiler/Checking/CheckBasics.fs b/src/Compiler/Checking/CheckBasics.fs index 61b4b835c6f5..9cfd013abfdf 100644 --- a/src/Compiler/Checking/CheckBasics.fs +++ b/src/Compiler/Checking/CheckBasics.fs @@ -366,7 +366,7 @@ type TcFileState = isSig = isSig haveSig = haveSig namedDebugPointsForInlinedCode = Dictionary() - compilingCanonicalFslibModuleType = (isSig || not haveSig) && g.compilingFSharpCore + compilingCanonicalFslibModuleType = (isSig || not haveSig) && g.compilingCoreLibrary conditionalDefines = conditionalDefines isInternalTestSpanStackReferring = isInternalTestSpanStackReferring diagnosticOptions = diagnosticOptions diff --git a/src/Compiler/Checking/CheckComputationExpressions.fs b/src/Compiler/Checking/CheckComputationExpressions.fs index 4fc0c8844efb..8d4bbcd951e8 100644 --- a/src/Compiler/Checking/CheckComputationExpressions.fs +++ b/src/Compiler/Checking/CheckComputationExpressions.fs @@ -3465,7 +3465,7 @@ let TcSequenceExpressionEntry (cenv: cenv) env (overallTy: OverallTy) tpenv (has errorR (Error(FSComp.SR.tcInvalidObjectSequenceOrRecordExpression (), m)) | _ -> () - if not hasBuilder && not cenv.g.compilingFSharpCore then + if not hasBuilder && not cenv.g.compilingCoreLibrary then error (Error(FSComp.SR.tcInvalidSequenceExpressionSyntaxForm (), m)) TcSequenceExpression cenv env tpenv comp overallTy m @@ -3490,7 +3490,7 @@ let TcArrayOrListComputedExpression (cenv: cenv) env (overallTy: OverallTy) tpen let expr, tpenv = TcExpr cenv (MustEqual exprTy) env tpenv replacementExpr let expr = - if cenv.g.compilingFSharpCore then + if cenv.g.compilingCoreLibrary then expr else // We add a call to 'seq ... ' to make sure sequence expression compilation gets applied to the contents of the @@ -3600,8 +3600,7 @@ let TcArrayOrListComputedExpression (cenv: cenv) env (overallTy: OverallTy) tpen let expr = mkCoerceIfNeeded cenv.g exprTy (tyOfExpr cenv.g expr) expr let expr = - if cenv.g.compilingFSharpCore then - //warning(Error(FSComp.SR.fslibUsingComputedListOrArray(), expr.Range)) + if cenv.g.compilingCoreLibrary then expr else // We add a call to 'seq ... ' to make sure sequence expression compilation gets applied to the contents of the diff --git a/src/Compiler/Checking/CheckDeclarations.fs b/src/Compiler/Checking/CheckDeclarations.fs index b85bce8a1983..104ead89e196 100644 --- a/src/Compiler/Checking/CheckDeclarations.fs +++ b/src/Compiler/Checking/CheckDeclarations.fs @@ -384,7 +384,7 @@ exception NotUpperCaseConstructorWithoutRQA of range: range let CheckNamespaceModuleOrTypeName (g: TcGlobals) (id: Ident) = // type names '[]' etc. are used in fslib - if not g.compilingFSharpCore && id.idText.IndexOfAny IllegalCharactersInTypeAndNamespaceNames <> -1 then + if not g.compilingCoreLibrary && id.idText.IndexOfAny IllegalCharactersInTypeAndNamespaceNames <> -1 then errorR(Error(FSComp.SR.tcInvalidNamespaceModuleTypeUnionName(), id.idRange)) let CheckDuplicates (idf: _ -> Ident) k elems = @@ -1556,7 +1556,7 @@ module MutRecBindingChecking = // // REVIEW: consider allowing an optimization switch to turn off these checks - let needsSafeStaticInit = not g.compilingFSharpCore + let needsSafeStaticInit = not g.compilingCoreLibrary // We only need safe static init checks if there are some static field bindings (actually, we look for non-method bindings) let hasStaticBindings = @@ -2173,7 +2173,7 @@ module TyconConstraintInference = assumedTycons |> Set.filter (fun tyconStamp -> let tycon, structuralTypes = tab[tyconStamp] - if cenv.g.compilingFSharpCore && + if cenv.g.compilingCoreLibrary && AugmentTypeDefinitions.TyconIsCandidateForAugmentationWithCompare g tycon && not (HasFSharpAttribute g g.attrib_StructuralComparisonAttribute tycon.Attribs) && not (HasFSharpAttribute g g.attrib_NoComparisonAttribute tycon.Attribs) then @@ -2301,7 +2301,7 @@ module TyconConstraintInference = let tycon, structuralTypes = tab[tyconStamp] - if cenv.g.compilingFSharpCore && + if cenv.g.compilingCoreLibrary && AugmentTypeDefinitions.TyconIsCandidateForAugmentationWithEquals g tycon && not (HasFSharpAttribute g g.attrib_StructuralEqualityAttribute tycon.Attribs) && not (HasFSharpAttribute g g.attrib_NoEqualityAttribute tycon.Attribs) then @@ -3341,7 +3341,7 @@ module EstablishTypeDefinitionCores = let hasAbstractAttr = HasFSharpAttribute g g.attrib_AbstractClassAttribute attrs let hasSealedAttr = // The special case is needed for 'unit' because the 'Sealed' attribute is not yet available when this type is defined. - if g.compilingFSharpCore && id.idText = "Unit" then + if g.compilingCoreLibrary && id.idText = "Unit" then Some true else TryFindFSharpBoolAttribute g g.attrib_SealedAttribute attrs @@ -3387,7 +3387,7 @@ module EstablishTypeDefinitionCores = let hiddenReprChecks hasRepr = structLayoutAttributeCheck false - if hasSealedAttr = Some false || (hasRepr && hasSealedAttr <> Some true && not (id.idText = "Unit" && g.compilingFSharpCore) ) then + if hasSealedAttr = Some false || (hasRepr && hasSealedAttr <> Some true && not (id.idText = "Unit" && g.compilingCoreLibrary) ) then errorR(Error(FSComp.SR.tcRepresentationOfTypeHiddenBySignature(), m)) if hasAbstractAttr then errorR (Error(FSComp.SR.tcOnlyClassesCanHaveAbstract(), m)) @@ -4190,7 +4190,7 @@ module TcDeclarations = | _ -> //false // There is a special case we allow when compiling FSharp.Core.dll which permits interface implementations across namespace fragments - g.compilingFSharpCore && tcref.LogicalName.StartsWithOrdinal("Tuple`") + g.compilingCoreLibrary && tcref.LogicalName.StartsWithOrdinal("Tuple`") let nReqTypars = reqTypars.Length diff --git a/src/Compiler/Checking/CheckExpressions.fs b/src/Compiler/Checking/CheckExpressions.fs index 6bdf94ed9ffb..2dd44c23422d 100644 --- a/src/Compiler/Checking/CheckExpressions.fs +++ b/src/Compiler/Checking/CheckExpressions.fs @@ -1207,7 +1207,7 @@ let ComputeAccessAndCompPath (g:TcGlobals) env (declKindOpt: DeclKind option) m let CheckForAbnormalOperatorNames (cenv: cenv) (idRange: range) coreDisplayName (memberInfoOpt: ValMemberInfo option) = let g = cenv.g if (idRange.EndColumn - idRange.StartColumn <= 5) && - not g.compilingFSharpCore + not g.compilingCoreLibrary then let opName = ConvertValLogicalNameToDisplayNameCore coreDisplayName let isMember = memberInfoOpt.IsSome @@ -10590,13 +10590,13 @@ and TcStaticOptimizationConstraint cenv env tpenv c = match c with | SynStaticOptimizationConstraint.WhenTyparTyconEqualsTycon(tp, ty, m) -> - if not g.compilingFSharpCore then + if not g.compilingCoreLibrary then errorR(Error(FSComp.SR.tcStaticOptimizationConditionalsOnlyForFSharpLibrary(), m)) let tyR, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.UseInType WarnOnIWSAM.Yes env tpenv ty let tpR, tpenv = TcTypar cenv env NewTyparsOK tpenv tp TTyconEqualsTycon(mkTyparTy tpR, tyR), tpenv | SynStaticOptimizationConstraint.WhenTyparIsStruct(tp, m) -> - if not g.compilingFSharpCore then + if not g.compilingCoreLibrary then errorR(Error(FSComp.SR.tcStaticOptimizationConditionalsOnlyForFSharpLibrary(), m)) let tpR, tpenv = TcTypar cenv env NewTyparsOK tpenv tp TTyconIsStruct(mkTyparTy tpR), tpenv diff --git a/src/Compiler/Checking/PostInferenceChecks.fs b/src/Compiler/Checking/PostInferenceChecks.fs index c7090709ccaa..d2939ccf70ca 100644 --- a/src/Compiler/Checking/PostInferenceChecks.fs +++ b/src/Compiler/Checking/PostInferenceChecks.fs @@ -354,7 +354,7 @@ let rec CheckTypeDeep (cenv: cenv) (visitTy, visitTyconRefOpt, visitAppTyOpt, vi | _ -> () let ty = - if g.compilingFSharpCore then + if g.compilingCoreLibrary then match stripTyparEqns ty with // When compiling FSharp.Core, do not strip type equations at this point if we can't dereference a tycon. | TType_app (tcref, _, _) when not tcref.CanDeref -> ty @@ -659,7 +659,7 @@ let CheckTypeAux permitByRefLike (cenv: cenv) env m ty onInnerByrefError = match info with | FSMethSln(_, vref, _, _) -> //printfn "considering %s..." vref.DisplayName - if valRefInThisAssembly cenv.g.compilingFSharpCore vref && not (cenv.boundVals.ContainsKey(vref.Stamp)) then + if valRefInThisAssembly cenv.g.compilingCoreLibrary vref && not (cenv.boundVals.ContainsKey(vref.Stamp)) then //printfn "recording %s..." vref.DisplayName cenv.potentialUnboundUsesOfVals <- cenv.potentialUnboundUsesOfVals.Add(vref.Stamp, m) | _ -> () @@ -1768,7 +1768,7 @@ and CheckLambdas isTop (memberVal: Val option) cenv env inlined valReprInfo alwa CheckNoReraise cenv freesOpt body // Check the body of the lambda - if isTop && not g.compilingFSharpCore && isByrefLikeTy g m bodyTy then + if isTop && not g.compilingCoreLibrary && isByrefLikeTy g m bodyTy then // allow byref to occur as return position for byref-typed top level function or method CheckExprPermitReturnableByRef cenv env body |> ignore else @@ -1780,7 +1780,7 @@ and CheckLambdas isTop (memberVal: Val option) cenv env inlined valReprInfo alwa CheckForByrefLikeType cenv env m bodyTy (fun () -> errorR(Error(FSComp.SR.chkFirstClassFuncNoByref(), m))) - elif not g.compilingFSharpCore && isByrefTy g bodyTy then + elif not g.compilingCoreLibrary && isByrefTy g bodyTy then // check no byrefs-in-the-byref CheckForByrefType cenv env (destByrefTy g bodyTy) (fun () -> errorR(Error(FSComp.SR.chkReturnTypeNoByref(), m))) @@ -2112,7 +2112,7 @@ let CheckModuleBinding cenv env (TBind(v, e, _) as bind) = IsSimpleSyntacticConstantExpr g e && // Check the thing is actually compiled as a property IsCompiledAsStaticProperty g v || - (g.compilingFSharpCore && v.Attribs |> List.exists(fun (Attrib(tc, _, _, _, _, _, _)) -> tc.CompiledName = "ValueAsStaticPropertyAttribute")) + (g.compilingCoreLibrary && v.Attribs |> List.exists(fun (Attrib(tc, _, _, _, _, _, _)) -> tc.CompiledName = "ValueAsStaticPropertyAttribute")) then v.SetIsCompiledAsStaticPropertyWithoutField() @@ -2545,7 +2545,7 @@ let CheckEntityDefn cenv env (tycon: Entity) = | None -> () | Some ty -> // Library-defined outref<'T> and inref<'T> contain byrefs on the r.h.s. - if not g.compilingFSharpCore then + if not g.compilingCoreLibrary then CheckForByrefType cenv env ty (fun () -> errorR(Error(FSComp.SR.chkNoByrefInTypeAbbrev(), tycon.Range))) let CheckEntityDefns cenv env tycons = diff --git a/src/Compiler/Checking/TailCallChecks.fs b/src/Compiler/Checking/TailCallChecks.fs index c373be9eb8af..ddfd5fe042ad 100644 --- a/src/Compiler/Checking/TailCallChecks.fs +++ b/src/Compiler/Checking/TailCallChecks.fs @@ -643,7 +643,7 @@ and CheckLambdas destLambdaWithValReprInfo g cenv.amap valReprInfo (expr, ety) // Check the body of the lambda - if isTop && not g.compilingFSharpCore && isByrefLikeTy g m bodyTy then + if isTop && not g.compilingCoreLibrary && isByrefLikeTy g m bodyTy then // allow byref to occur as return position for byref-typed top level function or method CheckExprPermitReturnableByRef cenv body else diff --git a/src/Compiler/Checking/infos.fs b/src/Compiler/Checking/infos.fs index c90d49f3dcc5..07d7b3c36c9d 100644 --- a/src/Compiler/Checking/infos.fs +++ b/src/Compiler/Checking/infos.fs @@ -734,7 +734,7 @@ type MethInfo = /// Indicates if this is a method defined in this assembly with an internal XML comment member x.HasDirectXmlComment = match x with - | FSMeth(g, _, vref, _) -> valRefInThisAssembly g.compilingFSharpCore vref + | FSMeth(g, _, vref, _) -> valRefInThisAssembly g.compilingCoreLibrary vref #if !NO_TYPEPROVIDERS | ProvidedMeth _ -> true #endif @@ -1720,7 +1720,7 @@ type PropInfo = member x.HasDirectXmlComment = match x with | FSProp(g, _, Some vref, _) - | FSProp(g, _, _, Some vref) -> valRefInThisAssembly g.compilingFSharpCore vref + | FSProp(g, _, _, Some vref) -> valRefInThisAssembly g.compilingCoreLibrary vref #if !NO_TYPEPROVIDERS | ProvidedProp _ -> true #endif diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index c152a0f239af..298ea098d74a 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -1281,7 +1281,7 @@ let AddStorageForVal (g: TcGlobals) (v, s) eenv = // v, dereferencing it to find the corresponding signature Val, and adding an entry for the signature val. // // A similar code path exists in ilxgen.fs for the tables of "optimization data" for values - if g.compilingFSharpCore then + if g.compilingCoreLibrary then // Passing an empty remap is sufficient for FSharp.Core.dll because it turns out the remapped type signature can // still be resolved. match tryRescopeVal g.fslibCcu Remap.Empty v with @@ -3846,7 +3846,7 @@ and GenUnionCaseProof cenv cgbuf eenv (e, ucref, tyargs, m) sequel = GenExpr cenv cgbuf eenv e Continue let cuspec, idx = GenUnionCaseSpec cenv m eenv.tyenv ucref tyargs let fty = EraseUnions.GetILTypeForAlternative cuspec idx - let avoidHelpers = entityRefInThisAssembly g.compilingFSharpCore ucref.TyconRef + let avoidHelpers = entityRefInThisAssembly g.compilingCoreLibrary ucref.TyconRef EraseUnions.emitCastData g.ilg (UnionCodeGen cgbuf) (false, avoidHelpers, cuspec, idx) CG.EmitInstrs cgbuf (pop 1) (Push [ fty ]) [] // push/pop to match the line above GenSequel cenv eenv.cloc cgbuf sequel @@ -3858,7 +3858,7 @@ and GenGetUnionCaseField cenv cgbuf eenv (e, ucref, tyargs, n, m) sequel = GenExpr cenv cgbuf eenv e Continue let cuspec, idx = GenUnionCaseSpec cenv m eenv.tyenv ucref tyargs let fty = actualTypOfIlxUnionField cuspec idx n - let avoidHelpers = entityRefInThisAssembly g.compilingFSharpCore ucref.TyconRef + let avoidHelpers = entityRefInThisAssembly g.compilingCoreLibrary ucref.TyconRef CG.EmitInstr cgbuf (pop 1) (Push [ fty ]) (EraseUnions.mkLdData (avoidHelpers, cuspec, idx, n)) GenSequel cenv eenv.cloc cgbuf sequel @@ -3869,7 +3869,7 @@ and GenGetUnionCaseFieldAddr cenv cgbuf eenv (e, ucref, tyargs, n, m) sequel = GenExpr cenv cgbuf eenv e Continue let cuspec, idx = GenUnionCaseSpec cenv m eenv.tyenv ucref tyargs let fty = actualTypOfIlxUnionField cuspec idx n - let avoidHelpers = entityRefInThisAssembly g.compilingFSharpCore ucref.TyconRef + let avoidHelpers = entityRefInThisAssembly g.compilingCoreLibrary ucref.TyconRef CG.EmitInstr cgbuf (pop 1) (Push [ ILType.Byref fty ]) (EraseUnions.mkLdDataAddr (avoidHelpers, cuspec, idx, n)) GenSequel cenv eenv.cloc cgbuf sequel @@ -3877,7 +3877,7 @@ and GenGetUnionCaseTag cenv cgbuf eenv (e, tcref, tyargs, m) sequel = let g = cenv.g GenExpr cenv cgbuf eenv e Continue let cuspec = GenUnionSpec cenv m eenv.tyenv tcref tyargs - let avoidHelpers = entityRefInThisAssembly g.compilingFSharpCore tcref + let avoidHelpers = entityRefInThisAssembly g.compilingCoreLibrary tcref EraseUnions.emitLdDataTag g.ilg (UnionCodeGen cgbuf) (avoidHelpers, cuspec) CG.EmitInstrs cgbuf (pop 1) (Push [ g.ilg.typ_Int32 ]) [] // push/pop to match the line above GenSequel cenv eenv.cloc cgbuf sequel @@ -3886,7 +3886,7 @@ and GenSetUnionCaseField cenv cgbuf eenv (e, ucref, tyargs, n, e2, m) sequel = let g = cenv.g GenExpr cenv cgbuf eenv e Continue let cuspec, idx = GenUnionCaseSpec cenv m eenv.tyenv ucref tyargs - let avoidHelpers = entityRefInThisAssembly g.compilingFSharpCore ucref.TyconRef + let avoidHelpers = entityRefInThisAssembly g.compilingCoreLibrary ucref.TyconRef EraseUnions.emitCastData g.ilg (UnionCodeGen cgbuf) (false, avoidHelpers, cuspec, idx) CG.EmitInstrs cgbuf (pop 1) (Push [ cuspec.DeclaringType ]) [] // push/pop to match the line above GenExpr cenv cgbuf eenv e2 Continue @@ -3930,7 +3930,7 @@ and GenFieldGet isStatic cenv cgbuf eenv (rfref: RecdFieldRef, tyargs, m) = if useGenuineField rfref.Tycon rfref.RecdField - || entityRefInThisAssembly cenv.g.compilingFSharpCore rfref.TyconRef + || entityRefInThisAssembly cenv.g.compilingCoreLibrary rfref.TyconRef then let instr = if isStatic then @@ -5655,7 +5655,7 @@ and GenGenericParam cenv eenv (tp: Typar) = | None -> tp.Name | Some nm -> nm // Some special rules apply when compiling Fsharp.Core.dll to avoid a proliferation of [] attributes on type parameters - if g.compilingFSharpCore then + if g.compilingCoreLibrary then match nm with | "U" -> "TResult" | "U1" -> "TResult1" @@ -7642,7 +7642,7 @@ and GenDecisionTreeSwitch let cuspec = GenUnionSpec cenv m eenv.tyenv c.TyconRef tyargs let idx = c.Index - let avoidHelpers = entityRefInThisAssembly g.compilingFSharpCore c.TyconRef + let avoidHelpers = entityRefInThisAssembly g.compilingCoreLibrary c.TyconRef let tester = (Some(pop 1, Push [ g.ilg.typ_Bool ], Choice1Of2(avoidHelpers, cuspec, idx))) @@ -7761,7 +7761,7 @@ and GenDecisionTreeSwitch | TCase(DecisionTreeTest.UnionCase(c, _), _) -> (c.Index, label.CodeLabel) | _ -> failwith "error: mixed constructor/const test?") - let avoidHelpers = entityRefInThisAssembly g.compilingFSharpCore hdc.TyconRef + let avoidHelpers = entityRefInThisAssembly g.compilingCoreLibrary hdc.TyconRef EraseUnions.emitDataSwitch g.ilg (UnionCodeGen cgbuf) (avoidHelpers, cuspec, dests) CG.EmitInstrs cgbuf (pop 1) Push0 [] // push/pop to match the line above @@ -10876,7 +10876,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) : ILTypeRef option let generateDebugDisplayAttribute = not g.useReflectionFreeCodeGen - && not g.compilingFSharpCore + && not g.compilingCoreLibrary && tycon.IsUnionTycon && isNil debugDisplayAttrs diff --git a/src/Compiler/CodeGen/IlxGenSupport.fs b/src/Compiler/CodeGen/IlxGenSupport.fs index a0fa11a4a313..c809e351fdbc 100644 --- a/src/Compiler/CodeGen/IlxGenSupport.fs +++ b/src/Compiler/CodeGen/IlxGenSupport.fs @@ -180,7 +180,7 @@ let GenReadOnlyAttributeIfNecessary g ty = let GetDynamicallyAccessedMemberTypes (g: TcGlobals) = let tref = g.enum_DynamicallyAccessedMemberTypes.TypeRef - if not (g.compilingFSharpCore) then + if not (g.compilingCoreLibrary) then g.TryEmbedILType( tref, (fun () -> diff --git a/src/Compiler/Driver/CompilerConfig.fs b/src/Compiler/Driver/CompilerConfig.fs index ba16b8542987..581faf1fec31 100644 --- a/src/Compiler/Driver/CompilerConfig.fs +++ b/src/Compiler/Driver/CompilerConfig.fs @@ -122,6 +122,8 @@ let ComputeMakePathAbsolute implicitIncludeDir (path: string) = with :? ArgumentException -> path +let isCoreLibrary compilingLibraryName = compilingLibraryName = "FSharp.Core" + //---------------------------------------------------------------------------- // Configuration //---------------------------------------------------------------------------- @@ -419,7 +421,7 @@ type TcConfigBuilder = mutable implicitIncludeDir: string (* normally "." *) mutable openDebugInformationForLaterStaticLinking: bool (* only for --standalone *) defaultFSharpBinariesDir: string - mutable compilingFSharpCore: bool + mutable compilingLibraryName: string mutable useIncrementalBuilder: bool mutable includes: string list mutable implicitOpens: string list @@ -661,7 +663,7 @@ type TcConfigBuilder = stackReserveSize = None conditionalDefines = [] openDebugInformationForLaterStaticLinking = false - compilingFSharpCore = false + compilingLibraryName = null useIncrementalBuilder = false implicitOpens = [] includes = [] @@ -1082,6 +1084,8 @@ type TcConfigBuilder = else ri, FileSystemUtils.fileNameOfPath ri, ILResourceAccess.Public + member tcConfigB.compilingCoreLibrary = isCoreLibrary tcConfigB.compilingLibraryName + //---------------------------------------------------------------------------- // TcConfig //-------------------------------------------------------------------------- @@ -1234,7 +1238,7 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) = data.openDebugInformationForLaterStaticLinking member _.fsharpBinariesDir = data.defaultFSharpBinariesDir - member _.compilingFSharpCore = data.compilingFSharpCore + member _.compilingLibraryName = data.compilingLibraryName member _.useIncrementalBuilder = data.useIncrementalBuilder member _.includes = data.includes member _.implicitOpens = data.implicitOpens @@ -1471,6 +1475,8 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) = member tcConfig.assumeDotNetFramework = tcConfig.primaryAssembly = PrimaryAssembly.Mscorlib + member tcConfig.compilingCoreLibrary = isCoreLibrary tcConfig.compilingLibraryName + /// Represents a computation to return a TcConfig. Normally this is just a constant immutable TcConfig, /// but for F# Interactive it may be based on an underlying mutable TcConfigBuilder. type TcConfigProvider = diff --git a/src/Compiler/Driver/CompilerConfig.fsi b/src/Compiler/Driver/CompilerConfig.fsi index 89e0039610b9..398c1db2a6b9 100644 --- a/src/Compiler/Driver/CompilerConfig.fsi +++ b/src/Compiler/Driver/CompilerConfig.fsi @@ -238,7 +238,7 @@ type TcConfigBuilder = defaultFSharpBinariesDir: string - mutable compilingFSharpCore: bool + mutable compilingLibraryName: string mutable useIncrementalBuilder: bool @@ -572,6 +572,8 @@ type TcConfigBuilder = member SetPrimaryAssembly: primaryAssembly: PrimaryAssembly -> unit + member compilingCoreLibrary: bool + /// Immutable TcConfig, modifications are made via a TcConfigBuilder [] type TcConfig = @@ -587,7 +589,7 @@ type TcConfig = member fsharpBinariesDir: string - member compilingFSharpCore: bool + member compilingCoreLibrary: bool member useIncrementalBuilder: bool @@ -898,6 +900,8 @@ type TcConfig = member realsig: bool + member compilingCoreLibrary: bool + /// Represents a computation to return a TcConfig. Normally this is just a constant immutable TcConfig, /// but for F# Interactive it may be based on an underlying mutable TcConfigBuilder. [] diff --git a/src/Compiler/Driver/CompilerImports.fs b/src/Compiler/Driver/CompilerImports.fs index 765735999193..f9811cf13b7e 100644 --- a/src/Compiler/Driver/CompilerImports.fs +++ b/src/Compiler/Driver/CompilerImports.fs @@ -729,7 +729,7 @@ type TcAssemblyResolutions(tcConfig: TcConfig, results: AssemblyResolution list, let assumeDotNetFramework = primaryReference.SimpleAssemblyNameIs("mscorlib") - if not tcConfig.compilingFSharpCore then + if not tcConfig.compilingCoreLibrary then tcConfig.CoreLibraryDllReference() if assumeDotNetFramework then @@ -2457,7 +2457,7 @@ and [] TcImports let! fslibCcu, fsharpCoreAssemblyScopeRef = async { - if tcConfig.compilingFSharpCore then + if tcConfig.compilingCoreLibrary then // When compiling FSharp.Core.dll, the fslibCcu reference to FSharp.Core.dll is a delayed ccu thunk fixed up during type checking return CcuThunk.CreateDelayed getFSharpCoreLibraryName, ILScopeRef.Local else @@ -2507,7 +2507,7 @@ and [] TcImports // OK, now we have both mscorlib.dll and FSharp.Core.dll we can create TcGlobals let tcGlobals = TcGlobals( - tcConfig.compilingFSharpCore, + tcConfig.compilingCoreLibrary, ilGlobals, fslibCcu, tcConfig.implicitIncludeDir, diff --git a/src/Compiler/Driver/CompilerOptions.fs b/src/Compiler/Driver/CompilerOptions.fs index e742a20e1395..b62e134af240 100644 --- a/src/Compiler/Driver/CompilerOptions.fs +++ b/src/Compiler/Driver/CompilerOptions.fs @@ -1767,7 +1767,7 @@ let compilingFsLibFlag (tcConfigB: TcConfigBuilder) = "compiling-fslib", tagNone, OptionUnit(fun () -> - tcConfigB.compilingFSharpCore <- true + tcConfigB.compilingLibraryName <- "FSharp.Core" tcConfigB.TurnWarningOff(rangeStartup, "42")), Some(InternalCommandLineOption("--compiling-fslib", rangeCmdArgs)), None diff --git a/src/Compiler/Driver/CreateILModule.fs b/src/Compiler/Driver/CreateILModule.fs index 506171ed0eff..32b6e4a977ca 100644 --- a/src/Compiler/Driver/CreateILModule.fs +++ b/src/Compiler/Driver/CreateILModule.fs @@ -333,7 +333,7 @@ module MainModuleBuilder = // Add the type forwarders to any .NET DLL post-.NET-2.0, to give binary compatibility let exportedTypesList = - if tcConfig.compilingFSharpCore then + if tcConfig.compilingCoreLibrary then List.append (createMscorlibExportList tcGlobals) (createSystemNumericsExportList tcConfig tcImports) else [] diff --git a/src/Compiler/Driver/ParseAndCheckInputs.fs b/src/Compiler/Driver/ParseAndCheckInputs.fs index 7f7dd55ef7a0..9c072064b614 100644 --- a/src/Compiler/Driver/ParseAndCheckInputs.fs +++ b/src/Compiler/Driver/ParseAndCheckInputs.fs @@ -643,7 +643,7 @@ let ParseOneInputLexbuf (tcConfig: TcConfig, lexResourceManager, lexbuf, fileNam LexFilter .LexFilter( indentationSyntaxStatus, - tcConfig.compilingFSharpCore, + tcConfig.compilingCoreLibrary, Lexer.token lexargs skipWhitespaceTokens, lexbuf, tcConfig.tokenize = TokenizeOption.Debug @@ -654,7 +654,7 @@ let ParseOneInputLexbuf (tcConfig: TcConfig, lexResourceManager, lexbuf, fileNam LexFilter .LexFilter( indentationSyntaxStatus, - tcConfig.compilingFSharpCore, + tcConfig.compilingCoreLibrary, Lexer.token lexargs skipWhitespaceTokens, lexbuf, tcConfig.tokenize = TokenizeOption.Debug @@ -719,7 +719,7 @@ let parseInputStreamAux // Set up the LexBuffer for the file let lexbuf = - UnicodeLexing.StreamReaderAsLexbuf(not tcConfig.compilingFSharpCore, tcConfig.langVersion, tcConfig.strictIndentation, reader) + UnicodeLexing.StreamReaderAsLexbuf(not tcConfig.compilingCoreLibrary, tcConfig.langVersion, tcConfig.strictIndentation, reader) // Parse the file drawing tokens from the lexbuf ParseOneInputLexbuf(tcConfig, lexResourceManager, lexbuf, fileName, isLastCompiland, diagnosticsLogger) @@ -735,7 +735,7 @@ let parseInputSourceTextAux ) = // Set up the LexBuffer for the file let lexbuf = - UnicodeLexing.SourceTextAsLexbuf(not tcConfig.compilingFSharpCore, tcConfig.langVersion, tcConfig.strictIndentation, sourceText) + UnicodeLexing.SourceTextAsLexbuf(not tcConfig.compilingCoreLibrary, tcConfig.langVersion, tcConfig.strictIndentation, sourceText) // Parse the file drawing tokens from the lexbuf ParseOneInputLexbuf(tcConfig, lexResourceManager, lexbuf, fileName, isLastCompiland, diagnosticsLogger) @@ -747,7 +747,7 @@ let parseInputFileAux (tcConfig: TcConfig, lexResourceManager, fileName, isLastC // Set up the LexBuffer for the file let lexbuf = - UnicodeLexing.StreamReaderAsLexbuf(not tcConfig.compilingFSharpCore, tcConfig.langVersion, tcConfig.strictIndentation, reader) + UnicodeLexing.StreamReaderAsLexbuf(not tcConfig.compilingCoreLibrary, tcConfig.langVersion, tcConfig.strictIndentation, reader) // Parse the file drawing tokens from the lexbuf ParseOneInputLexbuf(tcConfig, lexResourceManager, lexbuf, fileName, isLastCompiland, diagnosticsLogger) @@ -1199,7 +1199,7 @@ let GetInitialTcState (m, ccuName, tcConfig: TcConfig, tcGlobals, tcImports: TcI let ccu = CcuThunk.Create(ccuName, ccuData) // OK, is this is the FSharp.Core CCU then fix it up. - if tcConfig.compilingFSharpCore then + if tcConfig.compilingCoreLibrary then tcGlobals.fslibCcu.Fixup ccu { @@ -1965,7 +1965,7 @@ let CheckClosedInputSet (ctok, checkForErrors, tcConfig: TcConfig, tcImports, tc // tcEnvAtEndOfLastFile is the environment required by fsi.exe when incrementally adding definitions let results, tcState = match tcConfig.typeCheckingConfig.Mode with - | TypeCheckingMode.Graph when (not tcConfig.isInteractive && not tcConfig.compilingFSharpCore) -> + | TypeCheckingMode.Graph when (not tcConfig.isInteractive && not tcConfig.compilingCoreLibrary) -> CheckMultipleInputsUsingGraphMode( ctok, checkForErrors, diff --git a/src/Compiler/Driver/fsc.fs b/src/Compiler/Driver/fsc.fs index 26be4051cbd7..2f6f08cfef0c 100644 --- a/src/Compiler/Driver/fsc.fs +++ b/src/Compiler/Driver/fsc.fs @@ -1222,7 +1222,7 @@ let main6 // Don't copy referenced FSharp.core.dll if we are building FSharp.Core.dll if (tcConfig.copyFSharpCore = CopyFSharpCoreFlag.Yes) - && not tcConfig.compilingFSharpCore + && not tcConfig.compilingCoreLibrary && not tcConfig.standalone then CopyFSharpCore(outfile, tcConfig.referencedDLLs) diff --git a/src/Compiler/Interactive/fsi.fs b/src/Compiler/Interactive/fsi.fs index 1e560e70bdd4..2b1196519a16 100644 --- a/src/Compiler/Interactive/fsi.fs +++ b/src/Compiler/Interactive/fsi.fs @@ -3579,7 +3579,7 @@ type FsiStdinLexerProvider let tokenizer = LexFilter.LexFilter( indentationSyntaxStatus, - tcConfigB.compilingFSharpCore, + tcConfigB.compilingCoreLibrary, Lexer.token lexargs skip, lexbuf, tcConfigB.tokenize = TokenizeOption.Debug diff --git a/src/Compiler/Optimize/DetupleArgs.fs b/src/Compiler/Optimize/DetupleArgs.fs index a1655bafb0b3..649ec817d0eb 100644 --- a/src/Compiler/Optimize/DetupleArgs.fs +++ b/src/Compiler/Optimize/DetupleArgs.fs @@ -282,7 +282,7 @@ module GlobalUsageAnalysis = // - tmethods let UsageFolders (g: TcGlobals) = let foldLocalVal f z (vref: ValRef) = - if valRefInThisAssembly g.compilingFSharpCore vref then + if valRefInThisAssembly g.compilingCoreLibrary vref then f z vref.Deref else z diff --git a/src/Compiler/Optimize/Optimizer.fs b/src/Compiler/Optimize/Optimizer.fs index b2f5f654ce2a..f251e1ccf214 100644 --- a/src/Compiler/Optimize/Optimizer.fs +++ b/src/Compiler/Optimize/Optimizer.fs @@ -585,7 +585,7 @@ let BindExternalLocalVal cenv (v: Val) vval env = // // A similar code path exists in ilxgen.fs for the tables of "representations" for values let env = - if g.compilingFSharpCore then + if g.compilingCoreLibrary then // Passing an empty remap is sufficient for FSharp.Core.dll because it turns out the remapped type signature can // still be resolved. match tryRescopeVal g.fslibCcu Remap.Empty v with @@ -672,7 +672,7 @@ let GetInfoForNonLocalVal cenv env (vref: ValRef) = | None -> //dprintn ("\n\n*** Optimization info for value "+n+" from module "+(full_name_of_nlpath smv)+" not found, module contains values: "+String.concat ", " (NameMap.domainL structInfo.ValInfos)) //System.Diagnostics.Debug.Assert(false, sprintf "Break for module %s, value %s" (full_name_of_nlpath smv) n) - if g.compilingFSharpCore then + if g.compilingCoreLibrary then match structInfo.ValInfos.TryFindForFslib (g, vref) with | true, ninfo -> snd ninfo | _ -> UnknownValInfo @@ -3436,7 +3436,7 @@ and TryInlineApplication cenv env finfo (tyargs: TType list, args: Expr list, m) // confuse the optimizer if the assembly is referenced on 4.0, since there will be no value to tie back // to FSharp.Core let isValFromLazyExtensions = - if g.compilingFSharpCore then + if g.compilingCoreLibrary then false else match finfo.Info with @@ -4180,7 +4180,7 @@ and OptimizeBinding cenv isRec env (TBind(vref, expr, spBind)) = // ilxgen.fs, hence treat them as if no-inline (when preparing the inline information for // FSharp.Core). (let nvref = mkLocalValRef vref - g.compilingFSharpCore && + g.compilingCoreLibrary && (valRefEq g nvref g.seq_vref || valRefEq g nvref g.seq_generated_vref || valRefEq g nvref g.seq_finally_vref || diff --git a/src/Compiler/Service/FSharpCheckerResults.fs b/src/Compiler/Service/FSharpCheckerResults.fs index cab12da5cdf3..0b65b0828630 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fs +++ b/src/Compiler/Service/FSharpCheckerResults.fs @@ -2711,7 +2711,7 @@ type FSharpParsingOptions = IsInteractive: bool IndentationAwareSyntax: bool option StrictIndentation: bool option - CompilingFSharpCore: bool + compilingCoreLibrary: bool IsExe: bool } @@ -2729,7 +2729,7 @@ type FSharpParsingOptions = IsInteractive = false IndentationAwareSyntax = None StrictIndentation = None - CompilingFSharpCore = false + compilingCoreLibrary = false IsExe = false } @@ -2743,7 +2743,7 @@ type FSharpParsingOptions = IsInteractive = isInteractive IndentationAwareSyntax = tcConfig.indentationAwareSyntax StrictIndentation = tcConfig.strictIndentation - CompilingFSharpCore = tcConfig.compilingFSharpCore + compilingCoreLibrary = tcConfig.compilingCoreLibrary IsExe = tcConfig.target.IsExe } @@ -2757,7 +2757,7 @@ type FSharpParsingOptions = IsInteractive = isInteractive IndentationAwareSyntax = tcConfigB.indentationAwareSyntax StrictIndentation = tcConfigB.strictIndentation - CompilingFSharpCore = tcConfigB.compilingFSharpCore + compilingCoreLibrary = tcConfigB.compilingCoreLibrary IsExe = tcConfigB.target.IsExe } @@ -2896,7 +2896,7 @@ module internal ParseAndCheckFile = ) let tokenizer = - LexFilter.LexFilter(indentationSyntaxStatus, options.CompilingFSharpCore, Lexer.token lexargs true, lexbuf, false) + LexFilter.LexFilter(indentationSyntaxStatus, options.compilingCoreLibrary, Lexer.token lexargs true, lexbuf, false) if ct.CanBeCanceled then (fun _ -> diff --git a/src/Compiler/Service/FSharpCheckerResults.fsi b/src/Compiler/Service/FSharpCheckerResults.fsi index 0ae8b3039d9f..623b6d6356d2 100644 --- a/src/Compiler/Service/FSharpCheckerResults.fsi +++ b/src/Compiler/Service/FSharpCheckerResults.fsi @@ -232,7 +232,7 @@ type public FSharpParsingOptions = StrictIndentation: bool option - CompilingFSharpCore: bool + compilingCoreLibrary: bool IsExe: bool } diff --git a/src/Compiler/Service/ServiceLexing.fs b/src/Compiler/Service/ServiceLexing.fs index 9abe2199dc00..f7a084615180 100644 --- a/src/Compiler/Service/ServiceLexing.fs +++ b/src/Compiler/Service/ServiceLexing.fs @@ -1275,7 +1275,7 @@ type FSharpLexerFlags = | Default = 0x11011 | LightSyntaxOn = 0x00001 | Compiling = 0x00010 - | CompilingFSharpCore = 0x00110 + | compilingCoreLibrary = 0x00110 | SkipTrivia = 0x01000 | UseLexFilter = 0x10000 @@ -1856,8 +1856,8 @@ module FSharpLexerImpl = let isCompiling = (flags &&& FSharpLexerFlags.Compiling) = FSharpLexerFlags.Compiling - let isCompilingFSharpCore = - (flags &&& FSharpLexerFlags.CompilingFSharpCore) = FSharpLexerFlags.CompilingFSharpCore + let iscompilingCoreLibrary = + (flags &&& FSharpLexerFlags.compilingCoreLibrary) = FSharpLexerFlags.compilingCoreLibrary let canUseLexFilter = (flags &&& FSharpLexerFlags.UseLexFilter) = FSharpLexerFlags.UseLexFilter @@ -1884,7 +1884,7 @@ module FSharpLexerImpl = if canUseLexFilter then let lexFilter = - LexFilter.LexFilter(lexargs.indentationSyntaxStatus, isCompilingFSharpCore, lexer, lexbuf, false) + LexFilter.LexFilter(lexargs.indentationSyntaxStatus, iscompilingCoreLibrary, lexer, lexbuf, false) (fun _ -> lexFilter.GetToken()) else diff --git a/src/Compiler/Service/ServiceLexing.fsi b/src/Compiler/Service/ServiceLexing.fsi index ee2ab7411d5d..253565a9902e 100755 --- a/src/Compiler/Service/ServiceLexing.fsi +++ b/src/Compiler/Service/ServiceLexing.fsi @@ -361,7 +361,7 @@ type public FSharpLexerFlags = | Default = 0x11011 | LightSyntaxOn = 0x00001 | Compiling = 0x00010 - | CompilingFSharpCore = 0x00110 + | compilingCoreLibrary = 0x00110 | SkipTrivia = 0x01000 | UseLexFilter = 0x10000 diff --git a/src/Compiler/Service/TransparentCompiler.fs b/src/Compiler/Service/TransparentCompiler.fs index f2af93736e37..50e1c83300ed 100644 --- a/src/Compiler/Service/TransparentCompiler.fs +++ b/src/Compiler/Service/TransparentCompiler.fs @@ -1134,7 +1134,7 @@ type internal TransparentCompiler // TODO: we will probably want to cache and re-use larger graphs if available let graph = - if tcConfig.compilingFSharpCore then + if tcConfig.compilingCoreLibrary then mkLinearGraph sourceFiles.Length else DependencyResolution.mkGraph filePairs sourceFiles |> fst |> processGraph @@ -2053,7 +2053,7 @@ type internal TransparentCompiler yield options.IsInteractive yield! (Option.toList options.IndentationAwareSyntax) yield! (Option.toList options.StrictIndentation) - yield options.CompilingFSharpCore + yield options.compilingCoreLibrary yield options.IsExe ] |> Md5Hasher.toString diff --git a/src/Compiler/Symbols/SymbolHelpers.fs b/src/Compiler/Symbols/SymbolHelpers.fs index 1584e096edd6..9ca70edf9929 100644 --- a/src/Compiler/Symbols/SymbolHelpers.fs +++ b/src/Compiler/Symbols/SymbolHelpers.fs @@ -605,11 +605,11 @@ module internal SymbolHelpers = GetXmlCommentForItemAux None infoReader m item | Item.Value vref | Item.CustomBuilder (_, vref) -> - let doc = if valRefInThisAssembly g.compilingFSharpCore vref || vref.XmlDoc.NonEmpty then Some vref.XmlDoc else None + let doc = if valRefInThisAssembly g.compilingCoreLibrary vref || vref.XmlDoc.NonEmpty then Some vref.XmlDoc else None GetXmlCommentForItemAux doc infoReader m item | Item.UnionCase(ucinfo, _) -> - let doc = if tyconRefUsesLocalXmlDoc g.compilingFSharpCore ucinfo.TyconRef || ucinfo.UnionCase.XmlDoc.NonEmpty then Some ucinfo.UnionCase.XmlDoc else None + let doc = if tyconRefUsesLocalXmlDoc g.compilingCoreLibrary ucinfo.TyconRef || ucinfo.UnionCase.XmlDoc.NonEmpty then Some ucinfo.UnionCase.XmlDoc else None GetXmlCommentForItemAux doc infoReader m item | Item.ActivePatternCase apref -> @@ -617,13 +617,13 @@ module internal SymbolHelpers = GetXmlCommentForItemAux doc infoReader m item | Item.ExnCase ecref -> - let doc = if tyconRefUsesLocalXmlDoc g.compilingFSharpCore ecref || ecref.XmlDoc.NonEmpty then Some ecref.XmlDoc else None + let doc = if tyconRefUsesLocalXmlDoc g.compilingCoreLibrary ecref || ecref.XmlDoc.NonEmpty then Some ecref.XmlDoc else None GetXmlCommentForItemAux doc infoReader m item | Item.RecdField rfinfo -> let tcref = rfinfo.TyconRef let doc = - if tyconRefUsesLocalXmlDoc g.compilingFSharpCore tcref || tcref.XmlDoc.NonEmpty then + if tyconRefUsesLocalXmlDoc g.compilingCoreLibrary tcref || tcref.XmlDoc.NonEmpty then if tcref.IsFSharpException then Some tcref.XmlDoc else @@ -650,7 +650,7 @@ module internal SymbolHelpers = let doc = match tys with | AbbrevOrAppTy(tcref, _) :: _ -> - if tyconRefUsesLocalXmlDoc g.compilingFSharpCore tcref || tcref.XmlDoc.NonEmpty then + if tyconRefUsesLocalXmlDoc g.compilingCoreLibrary tcref || tcref.XmlDoc.NonEmpty then Some tcref.XmlDoc else None @@ -661,7 +661,7 @@ module internal SymbolHelpers = let doc = match tcrefs with | tcref :: _ -> - if tyconRefUsesLocalXmlDoc g.compilingFSharpCore tcref || tcref.XmlDoc.NonEmpty then + if tyconRefUsesLocalXmlDoc g.compilingCoreLibrary tcref || tcref.XmlDoc.NonEmpty then Some tcref.XmlDoc else None @@ -671,7 +671,7 @@ module internal SymbolHelpers = | Item.ModuleOrNamespaces(modref :: _ as modrefs) -> let definiteNamespace = modrefs |> List.forall (fun modref -> modref.IsNamespace) if not definiteNamespace then - let doc = if entityRefInThisAssembly g.compilingFSharpCore modref || modref.XmlDoc.NonEmpty then Some modref.XmlDoc else None + let doc = if entityRefInThisAssembly g.compilingCoreLibrary modref || modref.XmlDoc.NonEmpty then Some modref.XmlDoc else None GetXmlCommentForItemAux doc infoReader m item else GetXmlCommentForItemAux None infoReader m item @@ -682,13 +682,13 @@ module internal SymbolHelpers = | Some(ArgumentContainer.Method minfo) -> if minfo.HasDirectXmlComment || minfo.XmlDoc.NonEmpty then Some minfo.XmlDoc else None | Some(ArgumentContainer.Type tcref) -> - if tyconRefUsesLocalXmlDoc g.compilingFSharpCore tcref || tcref.XmlDoc.NonEmpty then Some tcref.XmlDoc else None + if tyconRefUsesLocalXmlDoc g.compilingCoreLibrary tcref || tcref.XmlDoc.NonEmpty then Some tcref.XmlDoc else None | _ -> None GetXmlCommentForItemAux doc infoReader m item | Item.UnionCaseField (ucinfo, _) -> let doc = - if tyconRefUsesLocalXmlDoc g.compilingFSharpCore ucinfo.TyconRef || ucinfo.UnionCase.XmlDoc.NonEmpty then + if tyconRefUsesLocalXmlDoc g.compilingCoreLibrary ucinfo.TyconRef || ucinfo.UnionCase.XmlDoc.NonEmpty then Some ucinfo.UnionCase.XmlDoc else None diff --git a/src/Compiler/SyntaxTree/LexFilter.fs b/src/Compiler/SyntaxTree/LexFilter.fs index 79afdca04c34..069658b01553 100644 --- a/src/Compiler/SyntaxTree/LexFilter.fs +++ b/src/Compiler/SyntaxTree/LexFilter.fs @@ -588,7 +588,7 @@ type PositionWithColumn = //--------------------------------------------------------------------------*) type LexFilterImpl ( indentationSyntaxStatus: IndentationAwareSyntaxStatus, - compilingFSharpCore, + compilingCoreLibrary, lexer: (Lexbuf -> token), lexbuf: Lexbuf, debug: bool @@ -1465,7 +1465,7 @@ type LexFilterImpl ( // (# "unbox.any !0" type ('T) x : 'T #) // where the type keyword is used inside an expression, so we must exempt FSharp.Core from some extra failed-parse-diagnostics-recovery-processing of the 'type' keyword let mutable effectsToDo = [] - if not compilingFSharpCore then + if not compilingCoreLibrary then // ... <<< code with unmatched ( or [ or { or [| >>> ... "type" ... // We want a TYPE or MODULE keyword to close any currently-open "expression" contexts, as though there were close delimiters in the file, so: let rec nextOuterMostInterestingContextIsNamespaceOrModule offsideStack = @@ -2675,9 +2675,9 @@ type LexFilterImpl ( // LexFilterImpl does the majority of the work for offsides rules and other magic. // LexFilter just wraps it with light post-processing that introduces a few more 'coming soon' symbols, to // make it easier for the parser to 'look ahead' and safely shift tokens in a number of recovery scenarios. -type LexFilter (indentationSyntaxStatus: IndentationAwareSyntaxStatus, compilingFSharpCore, lexer, lexbuf: Lexbuf, debug) = +type LexFilter (indentationSyntaxStatus: IndentationAwareSyntaxStatus, compilingCoreLibrary, lexer, lexbuf: Lexbuf, debug) = let debug = debug || forceDebug - let inner = LexFilterImpl(indentationSyntaxStatus, compilingFSharpCore, lexer, lexbuf, debug) + let inner = LexFilterImpl(indentationSyntaxStatus, compilingCoreLibrary, lexer, lexbuf, debug) // We don't interact with lexbuf state at all, any inserted tokens have same state/location as the real one read, so // we don't have to do any of the wrapped lexbuf magic that you see in LexFilterImpl. diff --git a/src/Compiler/SyntaxTree/LexFilter.fsi b/src/Compiler/SyntaxTree/LexFilter.fsi index 7d39b8325dfc..256f4c71fb4b 100644 --- a/src/Compiler/SyntaxTree/LexFilter.fsi +++ b/src/Compiler/SyntaxTree/LexFilter.fsi @@ -20,7 +20,7 @@ type LexFilter = /// Create a lex filter new: indentationSyntaxStatus: IndentationAwareSyntaxStatus * - compilingFSharpCore: bool * + compilingCoreLibrary: bool * lexer: (LexBuffer -> token) * lexbuf: LexBuffer * debug: bool -> diff --git a/src/Compiler/TypedTree/TcGlobals.fs b/src/Compiler/TypedTree/TcGlobals.fs index 69a99dfe119a..c84e21a4d9ef 100644 --- a/src/Compiler/TypedTree/TcGlobals.fs +++ b/src/Compiler/TypedTree/TcGlobals.fs @@ -181,7 +181,7 @@ let tname_IsByRefLikeAttribute = "System.Runtime.CompilerServices.IsByRefLikeAtt //------------------------------------------------------------------------- type TcGlobals( - compilingFSharpCore: bool, + compilingCoreLibrary: bool, ilg: ILGlobals, fslibCcu: CcuThunk, directoryToResolveRelativePaths, @@ -593,7 +593,7 @@ type TcGlobals( let v_choice5_tcr = mk_MFCore_tcref fslibCcu "Choice`5" let v_choice6_tcr = mk_MFCore_tcref fslibCcu "Choice`6" let v_choice7_tcr = mk_MFCore_tcref fslibCcu "Choice`7" - let tyconRefEq x y = primEntityRefEq compilingFSharpCore fslibCcu x y + let tyconRefEq x y = primEntityRefEq compilingCoreLibrary fslibCcu x y let v_suppressed_types = [ mk_MFCore_tcref fslibCcu "Option`1"; @@ -1047,7 +1047,7 @@ type TcGlobals( /// Doing this normalization is a fairly performance critical piece of code as it is frequently invoked /// in the process of converting .NET metadata to F# internal compiler data structures (see import.fs). let decompileTy (tcref: EntityRef) tinst = - if compilingFSharpCore then + if compilingCoreLibrary then // No need to decompile when compiling FSharp.Core.dll TType_app (tcref, tinst, v_knownWithoutNull) else @@ -1060,7 +1060,7 @@ type TcGlobals( /// Doing this normalization is a fairly performance critical piece of code as it is frequently invoked /// in the process of converting .NET metadata to F# internal compiler data structures (see import.fs). let improveTy (tcref: EntityRef) tinst = - if compilingFSharpCore then + if compilingCoreLibrary then let dict = getBetterTypeDict1() match dict.TryGetValue tcref.LogicalName with | true, builder -> builder tcref tinst @@ -1106,7 +1106,7 @@ type TcGlobals( // better the job we do of mapping from provided expressions back to FSharp.Core F# functions and values. member _.knownFSharpCoreModules = v_knownFSharpCoreModules - member _.compilingFSharpCore = compilingFSharpCore + member _.compilingCoreLibrary = compilingCoreLibrary member _.useReflectionFreeCodeGen = useReflectionFreeCodeGen @@ -1122,9 +1122,9 @@ type TcGlobals( member _.realsig = realsig - member _.unionCaseRefEq x y = primUnionCaseRefEq compilingFSharpCore fslibCcu x y + member _.unionCaseRefEq x y = primUnionCaseRefEq compilingCoreLibrary fslibCcu x y - member _.valRefEq x y = primValRefEq compilingFSharpCore fslibCcu x y + member _.valRefEq x y = primValRefEq compilingCoreLibrary fslibCcu x y member _.fslibCcu = fslibCcu @@ -1849,7 +1849,7 @@ type TcGlobals( /// Indicates if we are generating witness arguments for SRTP constraints. Only done if the FSharp.Core /// supports witness arguments. member g.generateWitnesses = - compilingFSharpCore || + compilingCoreLibrary || ((ValRefForIntrinsic g.call_with_witnesses_info).TryDeref.IsSome && langVersion.SupportsFeature LanguageFeature.WitnessPassing) /// Indicates if we can use System.Array.Empty when emitting IL for empty array literals diff --git a/src/Compiler/TypedTree/TypedTreeBasics.fs b/src/Compiler/TypedTree/TypedTreeBasics.fs index ca2674f873f4..8a2c54b1fa3c 100644 --- a/src/Compiler/TypedTree/TypedTreeBasics.fs +++ b/src/Compiler/TypedTree/TypedTreeBasics.fs @@ -290,12 +290,12 @@ let rescopePubPath viewedCcu (PubPath p) = NonLocalEntityRef(viewedCcu, p) // Equality between TAST items. //--------------------------------------------------------------------------- -let valRefInThisAssembly compilingFSharpCore (x: ValRef) = +let valRefInThisAssembly compilingCoreLibrary (x: ValRef) = match x with | VRefLocal _ -> true - | VRefNonLocal _ -> compilingFSharpCore + | VRefNonLocal _ -> compilingCoreLibrary -let tyconRefUsesLocalXmlDoc compilingFSharpCore (x: TyconRef) = +let tyconRefUsesLocalXmlDoc compilingCoreLibrary (x: TyconRef) = match x with | ERefLocal _ -> true | ERefNonLocal _ -> @@ -304,12 +304,12 @@ let tyconRefUsesLocalXmlDoc compilingFSharpCore (x: TyconRef) = | TProvidedTypeRepr _ -> true | _ -> #endif - compilingFSharpCore + compilingCoreLibrary -let entityRefInThisAssembly compilingFSharpCore (x: EntityRef) = +let entityRefInThisAssembly compilingCoreLibrary (x: EntityRef) = match x with | ERefLocal _ -> true - | ERefNonLocal _ -> compilingFSharpCore + | ERefNonLocal _ -> compilingCoreLibrary let arrayPathEq (y1: string[]) (y2: string[]) = let len1 = y1.Length @@ -386,10 +386,10 @@ let fslibValRefEq fslibCcu vref1 vref2 = /// Primitive routine to compare two EntityRef's for equality /// This takes into account the possibility that they may have type forwarders -let primEntityRefEq compilingFSharpCore fslibCcu (x: EntityRef) (y: EntityRef) = +let primEntityRefEq compilingCoreLibrary fslibCcu (x: EntityRef) (y: EntityRef) = x === y || - if x.IsResolved && y.IsResolved && not compilingFSharpCore then + if x.IsResolved && y.IsResolved && not compilingCoreLibrary then x.ResolvedTarget === y.ResolvedTarget elif not x.IsLocalRef && not y.IsLocalRef && (// Two tcrefs with identical paths are always equal @@ -402,11 +402,11 @@ let primEntityRefEq compilingFSharpCore fslibCcu (x: EntityRef) (y: EntityRef) = | _ -> match y.TryDeref with ValueNone -> true | _ -> false)) then true else - compilingFSharpCore && fslibEntityRefEq fslibCcu x y + compilingCoreLibrary && fslibEntityRefEq fslibCcu x y /// Primitive routine to compare two UnionCaseRef's for equality -let primUnionCaseRefEq compilingFSharpCore fslibCcu (UnionCaseRef(tcr1, c1) as uc1) (UnionCaseRef(tcr2, c2) as uc2) = - uc1 === uc2 || (primEntityRefEq compilingFSharpCore fslibCcu tcr1 tcr2 && c1 = c2) +let primUnionCaseRefEq compilingCoreLibrary fslibCcu (UnionCaseRef(tcr1, c1) as uc1) (UnionCaseRef(tcr2, c2) as uc2) = + uc1 === uc2 || (primEntityRefEq compilingCoreLibrary fslibCcu tcr1 tcr2 && c1 = c2) /// Primitive routine to compare two ValRef's for equality. On the whole value identity is not particularly /// significant in F#. However it is significant for @@ -415,7 +415,7 @@ let primUnionCaseRefEq compilingFSharpCore fslibCcu (UnionCaseRef(tcr1, c1) as u /// and quotation splicing /// /// Note this routine doesn't take type forwarding into account -let primValRefEq compilingFSharpCore fslibCcu (x: ValRef) (y: ValRef) = +let primValRefEq compilingCoreLibrary fslibCcu (x: ValRef) (y: ValRef) = x === y || (x.IsResolved && y.IsResolved && x.ResolvedTarget === y.ResolvedTarget) || (x.IsLocalRef && y.IsLocalRef && valEq x.ResolvedTarget y.ResolvedTarget) @@ -423,7 +423,7 @@ let primValRefEq compilingFSharpCore fslibCcu (x: ValRef) (y: ValRef) = match x.TryDeref with | ValueSome v1 -> match y.TryDeref with ValueSome v2 -> v1 === v2 | ValueNone -> false | ValueNone -> match y.TryDeref with ValueNone -> true | ValueSome _ -> false - || (compilingFSharpCore && fslibValRefEq fslibCcu x y) + || (compilingCoreLibrary && fslibValRefEq fslibCcu x y) //--------------------------------------------------------------------------- // pubpath/cpath mess diff --git a/src/Compiler/TypedTree/TypedTreeBasics.fsi b/src/Compiler/TypedTree/TypedTreeBasics.fsi index 001e4129d06d..a7cb9f43ef32 100644 --- a/src/Compiler/TypedTree/TypedTreeBasics.fsi +++ b/src/Compiler/TypedTree/TypedTreeBasics.fsi @@ -152,11 +152,11 @@ val rescopePubPathToParent: viewedCcu: CcuThunk -> PublicPath -> NonLocalEntityR /// From Ref_private to Ref_nonlocal when exporting data. val rescopePubPath: viewedCcu: CcuThunk -> PublicPath -> NonLocalEntityRef -val valRefInThisAssembly: compilingFSharpCore: bool -> x: ValRef -> bool +val valRefInThisAssembly: compilingCoreLibrary: bool -> x: ValRef -> bool -val tyconRefUsesLocalXmlDoc: compilingFSharpCore: bool -> x: TyconRef -> bool +val tyconRefUsesLocalXmlDoc: compilingCoreLibrary: bool -> x: TyconRef -> bool -val entityRefInThisAssembly: compilingFSharpCore: bool -> x: EntityRef -> bool +val entityRefInThisAssembly: compilingCoreLibrary: bool -> x: EntityRef -> bool val arrayPathEq: y1: string[] -> y2: string[] -> bool @@ -181,10 +181,10 @@ val fslibValRefEq: fslibCcu: CcuThunk -> vref1: ValRef -> vref2: ValRef -> bool /// Primitive routine to compare two EntityRef's for equality /// This takes into account the possibility that they may have type forwarders -val primEntityRefEq: compilingFSharpCore: bool -> fslibCcu: CcuThunk -> x: EntityRef -> y: EntityRef -> bool +val primEntityRefEq: compilingCoreLibrary: bool -> fslibCcu: CcuThunk -> x: EntityRef -> y: EntityRef -> bool /// Primitive routine to compare two UnionCaseRef's for equality -val primUnionCaseRefEq: compilingFSharpCore: bool -> fslibCcu: CcuThunk -> UnionCaseRef -> UnionCaseRef -> bool +val primUnionCaseRefEq: compilingCoreLibrary: bool -> fslibCcu: CcuThunk -> UnionCaseRef -> UnionCaseRef -> bool /// Primitive routine to compare two ValRef's for equality. On the whole value identity is not particularly /// significant in F#. However it is significant for @@ -193,7 +193,7 @@ val primUnionCaseRefEq: compilingFSharpCore: bool -> fslibCcu: CcuThunk -> Union /// and quotation splicing /// /// Note this routine doesn't take type forwarding into account -val primValRefEq: compilingFSharpCore: bool -> fslibCcu: CcuThunk -> x: ValRef -> y: ValRef -> bool +val primValRefEq: compilingCoreLibrary: bool -> fslibCcu: CcuThunk -> x: ValRef -> y: ValRef -> bool val fullCompPathOfModuleOrNamespace: m: ModuleOrNamespace -> CompilationPath diff --git a/src/Compiler/TypedTree/TypedTreeOps.fs b/src/Compiler/TypedTree/TypedTreeOps.fs index 120baae84617..fbdb29e52b82 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.fs +++ b/src/Compiler/TypedTree/TypedTreeOps.fs @@ -413,8 +413,8 @@ let mkTyconRefInst (tcref: TyconRef) tinst = mkTyconInst tcref.Deref tinst // Basic equalities //--------------------------------------------------------------------------- -let tyconRefEq (g: TcGlobals) tcref1 tcref2 = primEntityRefEq g.compilingFSharpCore g.fslibCcu tcref1 tcref2 -let valRefEq (g: TcGlobals) vref1 vref2 = primValRefEq g.compilingFSharpCore g.fslibCcu vref1 vref2 +let tyconRefEq (g: TcGlobals) tcref1 tcref2 = primEntityRefEq g.compilingCoreLibrary g.fslibCcu tcref1 tcref2 +let valRefEq (g: TcGlobals) vref1 vref2 = primValRefEq g.compilingCoreLibrary g.fslibCcu vref1 vref2 //--------------------------------------------------------------------------- // Remove inference equations and abbreviations from units @@ -3875,34 +3875,34 @@ let (|AttribBitwiseOrExpr|_|) g expr = // is defined. These get through type checking because enums implicitly support the '|||' operator through // the automatic resolution of undefined operators (see tc.fs, Item.ImplicitOp). This then compiles as an // application of a lambda to two arguments. We recognize this pattern here - | Expr.App (Expr.Lambda _, _, _, [arg1;arg2], _) when g.compilingFSharpCore -> + | Expr.App (Expr.Lambda _, _, _, [arg1;arg2], _) when g.compilingCoreLibrary -> ValueSome(arg1, arg2) | _ -> ValueNone let isUncheckedDefaultOfValRef g vref = valRefEq g vref g.unchecked_defaultof_vref // There is an internal version of typeof defined in prim-types.fs that needs to be detected - || (g.compilingFSharpCore && vref.LogicalName = "defaultof") + || (g.compilingCoreLibrary && vref.LogicalName = "defaultof") let isTypeOfValRef g vref = valRefEq g vref g.typeof_vref // There is an internal version of typeof defined in prim-types.fs that needs to be detected - || (g.compilingFSharpCore && vref.LogicalName = "typeof") + || (g.compilingCoreLibrary && vref.LogicalName = "typeof") let isSizeOfValRef g vref = valRefEq g vref g.sizeof_vref // There is an internal version of typeof defined in prim-types.fs that needs to be detected - || (g.compilingFSharpCore && vref.LogicalName = "sizeof") + || (g.compilingCoreLibrary && vref.LogicalName = "sizeof") let isNameOfValRef g vref = valRefEq g vref g.nameof_vref // There is an internal version of nameof defined in prim-types.fs that needs to be detected - || (g.compilingFSharpCore && vref.LogicalName = "nameof") + || (g.compilingCoreLibrary && vref.LogicalName = "nameof") let isTypeDefOfValRef g vref = valRefEq g vref g.typedefof_vref // There is an internal version of typedefof defined in prim-types.fs that needs to be detected - || (g.compilingFSharpCore && vref.LogicalName = "typedefof") + || (g.compilingCoreLibrary && vref.LogicalName = "typedefof") [] let (|UncheckedDefaultOfExpr|_|) g expr = @@ -5908,7 +5908,7 @@ and remapExprImpl (ctxt: RemapContext) (compgen: ValCopyFlag) (tmenv: Remap) exp | Expr.Op (TOp.ValFieldGetAddr (rfref, readonly), tinst, [arg], m) when not rfref.RecdField.IsMutable && - not (entityRefInThisAssembly ctxt.g.compilingFSharpCore rfref.TyconRef) -> + not (entityRefInThisAssembly ctxt.g.compilingCoreLibrary rfref.TyconRef) -> let tinst = remapTypes tmenv tinst let arg = remapExprImpl ctxt compgen tmenv arg @@ -5917,7 +5917,7 @@ and remapExprImpl (ctxt: RemapContext) (compgen: ValCopyFlag) (tmenv: Remap) exp | Expr.Op (TOp.UnionCaseFieldGetAddr (uref, cidx, readonly), tinst, [arg], m) when not (uref.FieldByIndex(cidx).IsMutable) && - not (entityRefInThisAssembly ctxt.g.compilingFSharpCore uref.TyconRef) -> + not (entityRefInThisAssembly ctxt.g.compilingCoreLibrary uref.TyconRef) -> let tinst = remapTypes tmenv tinst let arg = remapExprImpl ctxt compgen tmenv arg @@ -6537,7 +6537,7 @@ let isExnDefinitelyMutable (_ecref: TyconRef) = true // with caution. Hence we are conservative and within FSharp.Core we don't treat list // reads as if they were pure. let isUnionCaseFieldMutable (g: TcGlobals) (ucref: UnionCaseRef) n = - (g.compilingFSharpCore && tyconRefEq g ucref.TyconRef g.list_tcr_canon && n = 1) || + (g.compilingCoreLibrary && tyconRefEq g ucref.TyconRef g.list_tcr_canon && n = 1) || (ucref.FieldByIndex n).IsMutable let isExnFieldMutable ecref n = @@ -6963,7 +6963,7 @@ let CanTakeAddressOfImmutableVal (g: TcGlobals) m (vref: ValRef) mut = not vref.IsMutable && not vref.IsMemberOrModuleBinding && // Note: We can't add this: - // || valRefInThisAssembly g.compilingFSharpCore vref + // || valRefInThisAssembly g.compilingCoreLibrary vref // This is because we don't actually guarantee to generate static backing fields for all values like these, e.g. simple constants "let x = 1". // We always generate a static property but there is no field to take an address of CanTakeAddressOf g m false vref.Type mut @@ -6971,7 +6971,7 @@ let CanTakeAddressOfImmutableVal (g: TcGlobals) m (vref: ValRef) mut = let MustTakeAddressOfVal (g: TcGlobals) (vref: ValRef) = vref.IsMutable && // We can only take the address of mutable values in the same assembly - valRefInThisAssembly g.compilingFSharpCore vref + valRefInThisAssembly g.compilingCoreLibrary vref let MustTakeAddressOfByrefGet (g: TcGlobals) (vref: ValRef) = isByrefTy g vref.Type && not (isInByrefTy g vref.Type) @@ -6989,13 +6989,13 @@ let MustTakeAddressOfRecdFieldRef (rfref: RecdFieldRef) = MustTakeAddressOfRecdF let CanTakeAddressOfRecdFieldRef (g: TcGlobals) m (rfref: RecdFieldRef) tinst mut = // We only do this if the field is defined in this assembly because we can't take addresses across assemblies for immutable fields - entityRefInThisAssembly g.compilingFSharpCore rfref.TyconRef && + entityRefInThisAssembly g.compilingCoreLibrary rfref.TyconRef && not rfref.RecdField.IsMutable && CanTakeAddressOf g m false (actualTyOfRecdFieldRef rfref tinst) mut let CanTakeAddressOfUnionFieldRef (g: TcGlobals) m (uref: UnionCaseRef) cidx tinst mut = // We only do this if the field is defined in this assembly because we can't take addresses across assemblies for immutable fields - entityRefInThisAssembly g.compilingFSharpCore uref.TyconRef && + entityRefInThisAssembly g.compilingCoreLibrary uref.TyconRef && let rfref = uref.FieldByIndex cidx not rfref.IsMutable && CanTakeAddressOf g m false (actualTyOfUnionFieldRef uref cidx tinst) mut @@ -7220,7 +7220,7 @@ let rec IterateRecursiveFixups g (selfv: Val option) rvs (access: Expr, set) exp (fun e -> // NICE: it would be better to do this check in the type checker let tcref = c.TyconRef - if not (c.FieldByIndex n).IsMutable && not (entityRefInThisAssembly g.compilingFSharpCore tcref) then + if not (c.FieldByIndex n).IsMutable && not (entityRefInThisAssembly g.compilingCoreLibrary tcref) then errorR(Error(FSComp.SR.tastRecursiveValuesMayNotAppearInConstructionOfType(tcref.LogicalName), m)) mkUnionCaseFieldSet (access, c, tinst, n, e, m)))) @@ -7231,7 +7231,7 @@ let rec IterateRecursiveFixups g (selfv: Val option) rvs (access: Expr, set) exp (mkRecdFieldGetViaExprAddr (access, fref, tinst, m), (fun e -> // NICE: it would be better to do this check in the type checker - if not fspec.IsMutable && not (entityRefInThisAssembly g.compilingFSharpCore tcref) then + if not fspec.IsMutable && not (entityRefInThisAssembly g.compilingCoreLibrary tcref) then errorR(Error(FSComp.SR.tastRecursiveValuesMayNotBeAssignedToNonMutableField(fspec.rfield_id.idText, tcref.LogicalName), m)) mkRecdFieldSetViaExprAddr (access, fref, tinst, e, m))) arg ) | Expr.Val _ diff --git a/src/Compiler/TypedTree/TypedTreePickle.fs b/src/Compiler/TypedTree/TypedTreePickle.fs index 038909659ce1..76c42c9dc77a 100644 --- a/src/Compiler/TypedTree/TypedTreePickle.fs +++ b/src/Compiler/TypedTree/TypedTreePickle.fs @@ -1779,7 +1779,7 @@ let rec p_tycon_repr x st = // Unions with static fields, added to format | TFSharpTyconRepr ({ fsobjmodel_cases = cases; fsobjmodel_kind = TFSharpUnion } as r) -> - if st.oglobals.compilingFSharpCore then + if st.oglobals.compilingCoreLibrary then let fields = r.fsobjmodel_rfields.FieldsByIndex let firstFieldRange = fields[0].DefinitionRange let allFieldsText = fields |> Array.map (fun f -> f.LogicalName) |> String.concat System.Environment.NewLine @@ -1962,11 +1962,11 @@ and p_tycon_objmodel_kind x st = | TFSharpDelegate ss -> p_byte 3 st; p_slotsig ss st | TFSharpEnum -> p_byte 4 st | TFSharpUnion -> - if st.oglobals.compilingFSharpCore then + if st.oglobals.compilingCoreLibrary then raise (Error(FSComp.SR.pickleFsharpCoreBackwardsCompatible("union as FSharpTyconKind ",st.ofile), range.Zero)) p_byte 5 st | TFSharpRecord -> - if st.oglobals.compilingFSharpCore then + if st.oglobals.compilingCoreLibrary then raise (Error(FSComp.SR.pickleFsharpCoreBackwardsCompatible("record as FSharpTyconKind ",st.ofile), range.Zero)) p_byte 6 st diff --git a/src/FSharp.Core/FSharp.Core.fsproj b/src/FSharp.Core/FSharp.Core.fsproj index 418f8a57c522..2dddaf660c51 100644 --- a/src/FSharp.Core/FSharp.Core.fsproj +++ b/src/FSharp.Core/FSharp.Core.fsproj @@ -25,7 +25,7 @@ $(OtherFlags) --nowarn:3511 $(OtherFlags) --nowarn:3513 - $(OtherFlags) --compiling-fslib --compiling-fslib-40 --maxerrors:100 --extraoptimizationloops:1 + $(OtherFlags) --compiling-fslib --maxerrors:100 --extraoptimizationloops:1 true true @@ -103,12 +103,6 @@ Collections/local.fs - - Collections/array2.fsi - - - Collections/array2.fs - Collections/option.fsi @@ -157,6 +151,12 @@ Collections/array.fs + + Collections/array2.fsi + + + Collections/array2.fs + Collections/array3.fsi @@ -175,6 +175,12 @@ Collections/set.fs + + Collections/collectionextensions.fsi + + + Collections/collectionextensions.fs + Reflection/reflect.fsi diff --git a/src/FSharp.Core/Linq.fs b/src/FSharp.Core/Linq.fs index cf7033e09db3..7afa7d471382 100644 --- a/src/FSharp.Core/Linq.fs +++ b/src/FSharp.Core/Linq.fs @@ -345,10 +345,10 @@ module LeafExpressionConverter = let (|ConvIntPtrQ|_|) = (|SpecificCallToMethod|_|) (methodhandleof (Operators.nativeint)) let (|ConvUIntPtrQ|_|) = (|SpecificCallToMethod|_|) (methodhandleof (Operators.unativeint)) - let (|ConvInt8Q|_|) = SpecificCallToMethodInfo (typeof.Assembly.GetType("Microsoft.FSharp.Core.ExtraTopLevelOperators").GetMethod("ToSByte")) - let (|ConvUInt8Q|_|) = SpecificCallToMethodInfo (typeof.Assembly.GetType("Microsoft.FSharp.Core.ExtraTopLevelOperators").GetMethod("ToByte")) - let (|ConvDoubleQ|_|) = SpecificCallToMethodInfo (typeof.Assembly.GetType("Microsoft.FSharp.Core.ExtraTopLevelOperators").GetMethod("ToDouble")) - let (|ConvSingleQ|_|) = SpecificCallToMethodInfo (typeof.Assembly.GetType("Microsoft.FSharp.Core.ExtraTopLevelOperators").GetMethod("ToSingle")) + let (|ConvInt8Q|_|) = (|SpecificCallToMethod|_|) (methodhandleof (fun x -> Operators.int8 x)) + let (|ConvUInt8Q|_|) = (|SpecificCallToMethod|_|) (methodhandleof (fun x -> Operators.uint8 x)) + let (|ConvDoubleQ|_|) = (|SpecificCallToMethod|_|) (methodhandleof (fun x -> Operators.double x)) + let (|ConvSingleQ|_|) = (|SpecificCallToMethod|_|) (methodhandleof (fun x -> Operators.single x)) let (|ConvNullableCharQ|_|) = (|SpecificCallToMethod|_|) (methodhandleof (Nullable.char)) let (|ConvNullableDecimalQ|_|) = (|SpecificCallToMethod|_|) (methodhandleof (Nullable.decimal)) @@ -374,8 +374,8 @@ module LeafExpressionConverter = let (|TypeTestGeneric|_|) = (|SpecificCallToMethod|_|) (methodhandleof (fun x -> LanguagePrimitives.IntrinsicFunctions.TypeTestGeneric x)) let (|CheckedConvCharQ|_|) = (|SpecificCallToMethod|_|) (methodhandleof (Checked.char)) let (|CheckedConvSByteQ|_|) = (|SpecificCallToMethod|_|) (methodhandleof (Checked.sbyte)) - let (|CheckedConvInt8Q|_|) = SpecificCallToMethodInfo (typeof.Assembly.GetType("Microsoft.FSharp.Core.ExtraTopLevelOperators+Checked").GetMethod("ToSByte")) - let (|CheckedConvUInt8Q|_|) = SpecificCallToMethodInfo (typeof.Assembly.GetType("Microsoft.FSharp.Core.ExtraTopLevelOperators+Checked").GetMethod("ToByte")) + let (|CheckedConvInt8Q|_|) = (|SpecificCallToMethod|_|) (methodhandleof (fun x -> Operators.Checked.int8 x)) + let (|CheckedConvUInt8Q|_|) = (|SpecificCallToMethod|_|) (methodhandleof (fun x -> Operators.Checked.uint8 x)) let (|CheckedConvInt16Q|_|) = (|SpecificCallToMethod|_|) (methodhandleof (Checked.int16)) let (|CheckedConvInt32Q|_|) = (|SpecificCallToMethod|_|) (methodhandleof (Checked.int32)) let (|CheckedConvInt64Q|_|) = (|SpecificCallToMethod|_|) (methodhandleof (Checked.int64)) diff --git a/src/FSharp.Core/async.fs b/src/FSharp.Core/async.fs index 9f9a2d1ef485..f6eda0982e8b 100644 --- a/src/FSharp.Core/async.fs +++ b/src/FSharp.Core/async.fs @@ -2246,6 +2246,9 @@ type Async = module CommonExtensions = + [] + let async = AsyncBuilder() + type System.IO.Stream with [] // give the extension member a 'nice', unmangled compiled name, unique within this module diff --git a/src/FSharp.Core/async.fsi b/src/FSharp.Core/async.fsi index 6b621176c9d8..3e7ec38d196b 100644 --- a/src/FSharp.Core/async.fsi +++ b/src/FSharp.Core/async.fsi @@ -1394,6 +1394,24 @@ namespace Microsoft.FSharp.Control [] module CommonExtensions = + /// Builds an asynchronous workflow using computation expression syntax. + /// + /// + /// + /// let sleepExample() = + /// async { + /// printfn "sleeping" + /// do! Async.Sleep 10 + /// printfn "waking up" + /// return 6 + /// } + /// + /// sleepExample() |> Async.RunSynchronously + /// + /// + [] + val async: AsyncBuilder + type System.IO.Stream with /// Returns an asynchronous computation that will read from the stream into the given buffer. diff --git a/src/FSharp.Core/collectionextensions.fs b/src/FSharp.Core/collectionextensions.fs new file mode 100644 index 000000000000..79b8a6ee3d88 --- /dev/null +++ b/src/FSharp.Core/collectionextensions.fs @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Collections + +open System +open System.Collections.Generic +open System.ComponentModel +open System.IO +open System.Diagnostics +open Microsoft.FSharp.Core +open Microsoft.FSharp.Collections +open Microsoft.FSharp.Core.CompilerServices + + +[] +module CollectionExtensions = + + [] + let inline set elements = + Set.ofSeq elements + + let dummyArray = [||] + + let inline dont_tail_call f = + let result = f () + dummyArray.Length |> ignore // pretty stupid way to avoid tail call, would be better if attribute existed, but this should be inlineable by the JIT + result + + let inline ICollection_Contains<'collection, 'item when 'collection :> ICollection<'item>> + (collection: 'collection) + (item: 'item) + = + collection.Contains item + + [] + [>)>] + type DictImpl<'SafeKey, 'Key, 'T> + (t: Dictionary<'SafeKey, 'T>, makeSafeKey: 'Key -> 'SafeKey, getKey: 'SafeKey -> 'Key) = + + member _.Count = t.Count + + // Give a read-only view of the dictionary + interface IDictionary<'Key, 'T> with + member _.Item + with get x = dont_tail_call (fun () -> t.[makeSafeKey x]) + and set _ _ = raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) + + member _.Keys = + let keys = t.Keys + + { new ICollection<'Key> with + member _.Add(x) = + raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) + + member _.Clear() = + raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) + + member _.Remove(x) = + raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) + + member _.Contains(x) = + t.ContainsKey(makeSafeKey x) + + member _.CopyTo(arr, i) = + let mutable n = 0 + + for k in keys do + arr.[i + n] <- getKey k + n <- n + 1 + + member _.IsReadOnly = true + + member _.Count = keys.Count + interface IEnumerable<'Key> with + member _.GetEnumerator() = + (keys |> Seq.map getKey).GetEnumerator() + interface System.Collections.IEnumerable with + member _.GetEnumerator() = + ((keys |> Seq.map getKey) :> System.Collections.IEnumerable).GetEnumerator() + } + + member _.Values = upcast t.Values + + member _.Add(_, _) = + raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) + + member _.ContainsKey(k) = + dont_tail_call (fun () -> t.ContainsKey(makeSafeKey k)) + + member _.TryGetValue(k, r) = + let safeKey = makeSafeKey k + + match t.TryGetValue safeKey with + | true, tsafe -> + (r <- tsafe + true) + | false, _ -> false + + member _.Remove(_: 'Key) = + (raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))): bool) + + interface IReadOnlyDictionary<'Key, 'T> with + + member _.Item + with get key = t.[makeSafeKey key] + + member _.Keys = t.Keys |> Seq.map getKey + + member _.TryGetValue(key, r) = + match t.TryGetValue(makeSafeKey key) with + | false, _ -> false + | true, value -> + r <- value + true + + member _.Values = (t :> IReadOnlyDictionary<_, _>).Values + + member _.ContainsKey k = + t.ContainsKey(makeSafeKey k) + + interface ICollection> with + + member _.Add(_) = + raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) + + member _.Clear() = + raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) + + member _.Remove(_) = + raise (NotSupportedException(SR.GetString(SR.thisValueCannotBeMutated))) + + member _.Contains(KeyValue(k, v)) = + ICollection_Contains t (KeyValuePair<_, _>(makeSafeKey k, v)) + + member _.CopyTo(arr, i) = + let mutable n = 0 + + for (KeyValue(k, v)) in t do + arr.[i + n] <- KeyValuePair<_, _>(getKey k, v) + n <- n + 1 + + member _.IsReadOnly = true + + member _.Count = t.Count + + interface IReadOnlyCollection> with + member _.Count = t.Count + + interface IEnumerable> with + + member _.GetEnumerator() = + // We use an array comprehension here instead of seq {} as otherwise we get incorrect + // IEnumerator.Reset() and IEnumerator.Current semantics. + let kvps = [| for (KeyValue(k, v)) in t -> KeyValuePair(getKey k, v) |] :> seq<_> + kvps.GetEnumerator() + + interface System.Collections.IEnumerable with + member _.GetEnumerator() = + // We use an array comprehension here instead of seq {} as otherwise we get incorrect + // IEnumerator.Reset() and IEnumerator.Current semantics. + let kvps = + [| for (KeyValue(k, v)) in t -> KeyValuePair(getKey k, v) |] :> System.Collections.IEnumerable + + kvps.GetEnumerator() + + and DictDebugView<'SafeKey, 'Key, 'T>(d: DictImpl<'SafeKey, 'Key, 'T>) = + [] + member _.Items = Array.ofSeq d + + let inline dictImpl + (comparer: IEqualityComparer<'SafeKey>) + (makeSafeKey: 'Key -> 'SafeKey) + (getKey: 'SafeKey -> 'Key) + (l: seq<'Key * 'T>) + = + let t = Dictionary comparer + + for (k, v) in l do + t.[makeSafeKey k] <- v + + DictImpl(t, makeSafeKey, getKey) + + // We avoid wrapping a StructBox, because under 64 JIT we get some "hard" tailcalls which affect performance + let dictValueType (l: seq<'Key * 'T>) = + dictImpl HashIdentity.Structural<'Key> id id l + + // Wrap a StructBox around all keys in case the key type is itself a type using null as a representation + let dictRefType (l: seq<'Key * 'T>) = + dictImpl RuntimeHelpers.StructBox<'Key>.Comparer (RuntimeHelpers.StructBox) (fun sb -> sb.Value) l + + [] + let dict (keyValuePairs: seq<'Key * 'T>) : IDictionary<'Key, 'T> = + if typeof<'Key>.IsValueType then + dictValueType keyValuePairs + else + dictRefType keyValuePairs + + [] + let readOnlyDict (keyValuePairs: seq<'Key * 'T>) : IReadOnlyDictionary<'Key, 'T> = + if typeof<'Key>.IsValueType then + dictValueType keyValuePairs + else + dictRefType keyValuePairs + + let inline checkNonNullNullArg argName arg = + match box arg with + | null -> nullArg argName + | _ -> () + + let inline checkNonNullInvalidArg argName message arg = + match box arg with + | null -> invalidArg argName message + | _ -> () + + let getArray (vals: seq<'T>) = + match vals with + | :? ('T array) as arr -> arr + | _ -> Seq.toArray vals + + [] + let array2D (rows: seq<#seq<'T>>) = + checkNonNullNullArg "rows" rows + let rowsArr = getArray rows + let m = rowsArr.Length + + if m = 0 then + Array2D.zeroCreate 0 0 + else + checkNonNullInvalidArg "rows" (SR.GetString(SR.nullsNotAllowedInArray)) rowsArr.[0] + let firstRowArr = getArray rowsArr.[0] + let n = firstRowArr.Length + let res = Array2D.zeroCreate m n + + for j in 0 .. (n - 1) do + res.[0, j] <- firstRowArr.[j] + + for i in 1 .. (m - 1) do + checkNonNullInvalidArg "rows" (SR.GetString(SR.nullsNotAllowedInArray)) rowsArr.[i] + let rowiArr = getArray rowsArr.[i] + + if rowiArr.Length <> n then + invalidArg "vals" (SR.GetString(SR.arraysHadDifferentLengths)) + + for j in 0 .. (n - 1) do + res.[i, j] <- rowiArr.[j] + + res + diff --git a/src/FSharp.Core/collectionextensions.fsi b/src/FSharp.Core/collectionextensions.fsi new file mode 100644 index 000000000000..a88ea73d9a47 --- /dev/null +++ b/src/FSharp.Core/collectionextensions.fsi @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace Microsoft.FSharp.Collections + +open Microsoft.FSharp.Core +open System.ComponentModel + +/// A set of extra operators and functions. This module is automatically opened in all F# code. +/// +/// Basic Operators +[] +module CollectionExtensions = + + /// Builds a set from a sequence of objects. The objects are indexed using generic comparison. + /// + /// The input sequence of elements. + /// + /// The created set. + /// + /// + /// + /// let values = set [ 1; 2; 3; 5; 7; 11 ] + /// + /// Evaluates to a set containing the given numbers. + /// + [] + val inline set: elements: seq<'T> -> Set<'T> + + /// Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. + /// + /// + /// + /// let table = dict [ (1, 100); (2, 200) ] + /// + /// table[1] + /// + /// Evaluates to 100. + /// + /// + /// + /// + /// let table = dict [ (1, 100); (2, 200) ] + /// + /// table[3] + /// + /// Throws System.Collections.Generic.KeyNotFoundException. + /// + [] + val dict: keyValuePairs: seq<'Key * 'Value> -> System.Collections.Generic.IDictionary<'Key,'Value> when 'Key : equality + + /// Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. + /// + /// + /// + /// let table = readOnlyDict [ (1, 100); (2, 200) ] + /// + /// table[1] + /// + /// Evaluates to 100. + /// + /// + /// + /// + /// let table = readOnlyDict [ (1, 100); (2, 200) ] + /// + /// table[3] + /// + /// Throws System.Collections.Generic.KeyNotFoundException. + /// + [] + val readOnlyDict: keyValuePairs: seq<'Key * 'Value> -> System.Collections.Generic.IReadOnlyDictionary<'Key,'Value> when 'Key : equality + + /// Builds a 2D array from a sequence of sequences of elements. + /// + /// + /// + /// array2D [ [ 1.0; 2.0 ]; [ 3.0; 4.0 ] ] + /// + /// Evaluates to a 2x2 zero-based array with contents [[1.0; 2.0]; [3.0; 4.0]] + /// + [] + val array2D: rows: seq<#seq<'T>> -> 'T[,] diff --git a/src/FSharp.Core/fslib-extra-pervasives.fs b/src/FSharp.Core/fslib-extra-pervasives.fs index b5cf5dee3aff..d1b9f7f47923 100644 --- a/src/FSharp.Core/fslib-extra-pervasives.fs +++ b/src/FSharp.Core/fslib-extra-pervasives.fs @@ -6,6 +6,7 @@ module ExtraTopLevelOperators = open System open System.Collections.Generic + open System.ComponentModel open System.IO open System.Diagnostics open Microsoft.FSharp @@ -17,19 +18,9 @@ module ExtraTopLevelOperators = open Microsoft.FSharp.Primitives.Basics open Microsoft.FSharp.Core.CompilerServices - let inline checkNonNullNullArg argName arg = - match box arg with - | null -> nullArg argName - | _ -> () - - let inline checkNonNullInvalidArg argName message arg = - match box arg with - | null -> invalidArg argName message - | _ -> () - - [] + [] let set elements = - Collections.Set.ofSeq elements + set elements let dummyArray = [||] @@ -214,39 +205,9 @@ module ExtraTopLevelOperators = else dictRefType keyValuePairs - let getArray (vals: seq<'T>) = - match vals with - | :? ('T array) as arr -> arr - | _ -> Seq.toArray vals - - [] + [] let array2D (rows: seq<#seq<'T>>) = - checkNonNullNullArg "rows" rows - let rowsArr = getArray rows - let m = rowsArr.Length - - if m = 0 then - Array2D.zeroCreate<'T> 0 0 - else - checkNonNullInvalidArg "rows" (SR.GetString(SR.nullsNotAllowedInArray)) rowsArr.[0] - let firstRowArr = getArray rowsArr.[0] - let n = firstRowArr.Length - let res = Array2D.zeroCreate<'T> m n - - for j in 0 .. (n - 1) do - res.[0, j] <- firstRowArr.[j] - - for i in 1 .. (m - 1) do - checkNonNullInvalidArg "rows" (SR.GetString(SR.nullsNotAllowedInArray)) rowsArr.[i] - let rowiArr = getArray rowsArr.[i] - - if rowiArr.Length <> n then - invalidArg "vals" (SR.GetString(SR.arraysHadDifferentLengths)) - - for j in 0 .. (n - 1) do - res.[i, j] <- rowiArr.[j] - - res + array2D rows [] let sprintf format = @@ -280,32 +241,32 @@ module ExtraTopLevelOperators = let eprintfn format = Printf.eprintfn format - [] + [] let async = AsyncBuilder() - [] + [] let inline single value = float32 value - [] + [] let inline double value = float value - [] + [] let inline uint8 value = byte value - [] + [] let inline int8 value = sbyte value module Checked = - [] + [] let inline uint8 value = Checked.byte value - [] + [] let inline int8 value = Checked.sbyte value diff --git a/src/FSharp.Core/fslib-extra-pervasives.fsi b/src/FSharp.Core/fslib-extra-pervasives.fsi index 97120245f87a..2898ddf943c7 100644 --- a/src/FSharp.Core/fslib-extra-pervasives.fsi +++ b/src/FSharp.Core/fslib-extra-pervasives.fsi @@ -9,6 +9,7 @@ namespace Microsoft.FSharp.Core [] module ExtraTopLevelOperators = + open System.ComponentModel open System.IO open Microsoft.FSharp.Core open Microsoft.FSharp.Control @@ -112,7 +113,7 @@ module ExtraTopLevelOperators = /// /// Evaluates to a set containing the given numbers. /// - [] + [] val set: elements: seq<'T> -> Set<'T> /// Builds an asynchronous workflow using computation expression syntax. @@ -130,7 +131,7 @@ module ExtraTopLevelOperators = /// sleepExample() |> Async.RunSynchronously /// /// - [] + [] val async: AsyncBuilder /// Converts the argument to 32-bit float. @@ -144,7 +145,7 @@ module ExtraTopLevelOperators = /// /// Evaluates to 45.0f. /// - [] + [] val inline single: value: ^T -> single when ^T : (static member op_Explicit : ^T -> single) and default ^T : int /// Converts the argument to 64-bit float. @@ -165,7 +166,7 @@ module ExtraTopLevelOperators = /// /// Evaluates to 12.30000019. /// - [] + [] val inline double: value: ^T -> double when ^T : (static member op_Explicit : ^T -> double) and default ^T : int /// Converts the argument to byte. @@ -178,7 +179,7 @@ module ExtraTopLevelOperators = /// /// Evaluates to 12uy. /// - [] + [] val inline uint8: value: ^T -> uint8 when ^T : (static member op_Explicit : ^T -> uint8) and default ^T : int /// Converts the argument to signed byte. @@ -199,7 +200,7 @@ module ExtraTopLevelOperators = /// /// Evaluates to 3y. /// - [] + [] val inline int8: value: ^T -> int8 when ^T : (static member op_Explicit : ^T -> int8) and default ^T : int module Checked = @@ -221,7 +222,7 @@ module ExtraTopLevelOperators = /// /// Throws System.OverflowException. /// - [] + [] val inline uint8: value: ^T -> byte when ^T : (static member op_Explicit : ^T -> uint8) and default ^T : int /// Converts the argument to signed byte. @@ -242,7 +243,7 @@ module ExtraTopLevelOperators = /// /// Throws System.OverflowException. /// - [] + [] val inline int8: value: ^T -> sbyte when ^T : (static member op_Explicit : ^T -> int8) and default ^T : int /// Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. @@ -264,7 +265,7 @@ module ExtraTopLevelOperators = /// /// Throws System.Collections.Generic.KeyNotFoundException. /// - [] + [] val dict: keyValuePairs: seq<'Key * 'Value> -> System.Collections.Generic.IDictionary<'Key,'Value> when 'Key : equality /// Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. @@ -286,7 +287,7 @@ module ExtraTopLevelOperators = /// /// Throws System.Collections.Generic.KeyNotFoundException. /// - [] + [] val readOnlyDict: keyValuePairs: seq<'Key * 'Value> -> System.Collections.Generic.IReadOnlyDictionary<'Key,'Value> when 'Key : equality /// Builds a 2D array from a sequence of sequences of elements. @@ -297,7 +298,7 @@ module ExtraTopLevelOperators = /// /// Evaluates to a 2x2 zero-based array with contents [[1.0; 2.0]; [3.0; 4.0]] /// - [] + [] val array2D: rows: seq<#seq<'T>> -> 'T[,] /// Special prefix operator for splicing typed expressions into quotation holes. @@ -339,7 +340,7 @@ module ExtraTopLevelOperators = /// /// Evaluates to 10. The text eval! is printed once on the first invocation of f. /// - [] + [] val (|Lazy|): input: Lazy<'T> -> 'T /// Builds a query using query syntax and operators. diff --git a/src/FSharp.Core/prim-types.fs b/src/FSharp.Core/prim-types.fs index d95659a14f2a..7ff46fa6401a 100644 --- a/src/FSharp.Core/prim-types.fs +++ b/src/FSharp.Core/prim-types.fs @@ -4742,6 +4742,9 @@ namespace Microsoft.FSharp.Core // this condition is used whenever ^T is resolved to a nominal type or witnesses are available when ^T : ^T = (^T : (static member op_Explicit: ^T -> byte) (value)) + [] + let inline uint8 value = byte value + [] [] let inline sbyte (value: ^T) = @@ -4764,6 +4767,10 @@ namespace Microsoft.FSharp.Core // this condition is used whenever ^T is resolved to a nominal type or witnesses are available when ^T : ^T = (^T : (static member op_Explicit: ^T -> sbyte) (value)) + + [] + let inline int8 value = sbyte value + [] [] let inline uint16 (value: ^T) = @@ -4944,6 +4951,8 @@ namespace Microsoft.FSharp.Core when ^T : byte = (# "conv.r.un conv.r4" value : float32 #) when ^T : ^T = (^T : (static member op_Explicit: ^T -> float32) (value)) + let inline single value = float32 value + [] [] let inline float (value: ^T) = @@ -4966,6 +4975,8 @@ namespace Microsoft.FSharp.Core when ^T : decimal = (Convert.ToDouble((# "" value : decimal #))) when ^T : ^T = (^T : (static member op_Explicit: ^T -> float) (value)) + let inline double value = float value + [] [] let inline decimal (value: ^T) = @@ -5496,6 +5507,9 @@ namespace Microsoft.FSharp.Core when ^T : byte = (# "" value : byte #) when ^T : ^T = (^T : (static member op_Explicit: ^T -> byte) (value)) + [] + let inline uint8 value = byte value + [] [] let inline sbyte (value: ^T) = @@ -5516,6 +5530,9 @@ namespace Microsoft.FSharp.Core when ^T : byte = (# "conv.ovf.i1.un" value : sbyte #) when ^T : ^T = (^T : (static member op_Explicit: ^T -> sbyte) (value)) + [] + let inline int8 value = sbyte value + [] [] let inline uint16 (value: ^T) = @@ -7152,6 +7169,7 @@ namespace Microsoft.FSharp.Control open Microsoft.FSharp.Core.Operators module LazyExtensions = + type System.Lazy<'T> with [] // give the extension member a 'nice', unmangled compiled name, unique within this module static member Create(creator : unit -> 'T) : Lazy<'T> = @@ -7176,6 +7194,9 @@ namespace Microsoft.FSharp.Control [] // give the extension member a 'nice', unmangled compiled name, unique within this module member x.UnsynchronizedForce() = x.Value + + [] + let (|Lazy|) (input: Lazy<_>) = input.Force() type Lazy<'T> = System.Lazy<'T> diff --git a/src/FSharp.Core/prim-types.fsi b/src/FSharp.Core/prim-types.fsi index cb8c890171cf..766cb6a3dddd 100644 --- a/src/FSharp.Core/prim-types.fsi +++ b/src/FSharp.Core/prim-types.fsi @@ -3249,7 +3249,7 @@ namespace Microsoft.FSharp.Core /// [] val (|Failure|_|): error: exn -> string option - + /// Return the first element of a tuple, fst (a,b) = a. /// /// The input tuple. @@ -4324,8 +4324,22 @@ namespace Microsoft.FSharp.Core /// /// [] - val inline byte: value: ^T -> byte when ^T: (static member op_Explicit: ^T -> byte) and default ^T: int - + val inline byte: value: ^T -> byte when ^T: (static member op_Explicit: ^T -> byte) and default ^T: int + + /// Converts the argument to uint8. + /// This is a direct conversion for all + /// primitive numeric types. For strings, the input is converted using Byte.Parse() + /// on strings and otherwise requires a ToByte method on the input type. + /// + /// + /// + /// uint8 12 + /// + /// Evaluates to 12uy. + /// + [] + val inline uint8: value: ^T -> uint8 when ^T : (static member op_Explicit : ^T -> uint8) and default ^T : int + /// Converts the argument to signed byte. This is a direct conversion for all /// primitive numeric types. For strings, the input is converted using SByte.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate @@ -4346,6 +4360,27 @@ namespace Microsoft.FSharp.Core [] val inline sbyte: value:^T -> sbyte when ^T: (static member op_Explicit: ^T -> sbyte) and default ^T: int + /// Converts the argument to signed byte. + /// This is a direct, checked conversion for all + /// primitive numeric types. For strings, the input is converted using SByte.Parse() with InvariantCulture settings. + /// Otherwise the operation requires and invokes a ToSByte method on the input type. + /// + /// + /// + /// Checked.int8 -12 + /// + /// Evaluates to -12y. + /// + /// + /// + /// + /// Checked.int8 "129" + /// + /// Throws System.OverflowException. + /// + [] + val inline int8: value: ^T -> sbyte when ^T : (static member op_Explicit : ^T -> int8) and default ^T : int + /// Converts the argument to signed 16-bit integer. This is a direct conversion for all /// primitive numeric types. For strings, the input is converted using Int16.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate @@ -4545,6 +4580,19 @@ namespace Microsoft.FSharp.Core [] val inline float32: value: ^T -> float32 when ^T: (static member op_Explicit: ^T -> float32) and default ^T: int + /// Converts the argument to 32-bit float. + /// + /// This is a direct conversion for all + /// primitive numeric types. For strings, the input is converted using Single.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSingle method on the input type. + /// + /// + /// + /// single 45 + /// + /// Evaluates to 45.0f. + /// + val inline single: value: ^T -> single when ^T : (static member op_Explicit : ^T -> single) and default ^T : int + /// Converts the argument to 64-bit float. This is a direct conversion for all /// primitive numeric types. For strings, the input is converted using Double.Parse() /// with InvariantCulture settings. Otherwise the operation requires an appropriate @@ -4565,6 +4613,26 @@ namespace Microsoft.FSharp.Core [] val inline float: value: ^T -> float when ^T: (static member op_Explicit: ^T -> float) and default ^T: int + /// Converts the argument to 64-bit float. + /// + /// This is a direct conversion for all + /// primitive numeric types. For strings, the input is converted using Double.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToDouble method on the input type. + /// + /// + /// + /// double 45 + /// + /// Evaluates to 45.0. + /// + /// + /// + /// + /// double 12.3f + /// + /// Evaluates to 12.30000019. + /// + val inline double: value: ^T -> double when ^T : (static member op_Explicit : ^T -> double) and default ^T : int + /// Converts the argument to signed native integer. This is a direct conversion for all /// primitive numeric types. Otherwise the operation requires an appropriate /// static conversion method on the input type. @@ -5797,6 +5865,26 @@ namespace Microsoft.FSharp.Core [] val inline byte: value: ^T -> byte when ^T: (static member op_Explicit: ^T -> byte) and default ^T: int + /// Converts the argument to byte. + /// This is a direct, checked conversion for all + /// primitive numeric types. For strings, the input is converted using Byte.Parse() on strings and otherwise requires a ToByte method on the input type. + /// + /// + /// + /// Checked.uint8 12 + /// + /// Evaluates to -12y. + /// + /// + /// + /// + /// Checked.uint8 -12 + /// + /// Throws System.OverflowException. + /// + [] + val inline uint8: value: ^T -> byte when ^T : (static member op_Explicit : ^T -> uint8) and default ^T : int + /// Converts the argument to sbyte. This is a direct, checked conversion for all /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate @@ -5811,6 +5899,27 @@ namespace Microsoft.FSharp.Core [] val inline sbyte: value: ^T -> sbyte when ^T: (static member op_Explicit: ^T -> sbyte) and default ^T: int + /// Converts the argument to signed byte. + /// This is a direct, checked conversion for all + /// primitive numeric types. For strings, the input is converted using SByte.Parse() with InvariantCulture settings. + /// Otherwise the operation requires and invokes a ToSByte method on the input type. + /// + /// + /// + /// Checked.int8 -12 + /// + /// Evaluates to -12y. + /// + /// + /// + /// + /// Checked.int8 "129" + /// + /// Throws System.OverflowException. + /// + [] + val inline int8: value: ^T -> sbyte when ^T : (static member op_Explicit : ^T -> int8) and default ^T : int + /// Converts the argument to int16. This is a direct, checked conversion for all /// primitive numeric types. For strings, the input is converted using /// with InvariantCulture settings. Otherwise the operation requires an appropriate @@ -5953,6 +6062,19 @@ namespace Microsoft.FSharp.Control open Microsoft.FSharp.Core + + /// The type of delayed computations. + /// + /// Use the values in the Lazy module to manipulate + /// values of this type, and the notation lazy expr to create values + /// of type . + /// + /// Lazy Computation + type Lazy<'T> = System.Lazy<'T> + and + [] + 'T ``lazy`` = System.Lazy<'T> + /// Extensions related to Lazy values. /// /// Lazy Computation @@ -5982,18 +6104,22 @@ namespace Microsoft.FSharp.Control /// The value of the Lazy object. [] // give the extension member a 'nice', unmangled compiled name, unique within this module member Force: unit -> 'T - - /// The type of delayed computations. - /// - /// Use the values in the Lazy module to manipulate - /// values of this type, and the notation lazy expr to create values - /// of type . - /// - /// Lazy Computation - type Lazy<'T> = System.Lazy<'T> - and - [] - 'T ``lazy`` = System.Lazy<'T> + + /// An active pattern to force the execution of values of type Lazy<_>. + /// + /// + /// + /// let f (Lazy v) = v + v + /// + /// let v = lazy (printf "eval!"; 5+5) + /// + /// f v + /// f v + /// + /// Evaluates to 10. The text eval! is printed once on the first invocation of f. + /// + [] + val (|Lazy|): input: Lazy<'T> -> 'T namespace Microsoft.FSharp.Control diff --git a/tests/AheadOfTime/Trimming/check.ps1 b/tests/AheadOfTime/Trimming/check.ps1 index c9699c66c1b2..4c0f2fbe6cb2 100644 --- a/tests/AheadOfTime/Trimming/check.ps1 +++ b/tests/AheadOfTime/Trimming/check.ps1 @@ -42,7 +42,7 @@ function CheckTrim($root, $tfm, $outputfile, $expected_len) { # error NETSDK1124: Trimming assemblies requires .NET Core 3.0 or higher. # Check net7.0 trimmed assemblies -CheckTrim -root "SelfContained_Trimming_Test" -tfm "net8.0" -outputfile "FSharp.Core.dll" -expected_len 284672 +CheckTrim -root "SelfContained_Trimming_Test" -tfm "net8.0" -outputfile "FSharp.Core.dll" -expected_len 285184 # Check net8.0 trimmed assemblies CheckTrim -root "StaticLinkedFSharpCore_Trimming_Test" -tfm "net8.0" -outputfile "StaticLinkedFSharpCore_Trimming_Test.dll" -expected_len 8818176 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.il.debug.bsl index c95b446032a2..93ffa6431082 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.il.debug.bsl @@ -101,7 +101,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.il.release.bsl index c95b446032a2..93ffa6431082 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.il.release.bsl @@ -101,7 +101,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.il.debug.bsl index 90c7d53851cb..a53ab94d1c3e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.il.debug.bsl @@ -98,7 +98,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.il.release.bsl index 90c7d53851cb..a53ab94d1c3e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.il.release.bsl @@ -98,7 +98,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.il.debug.bsl index 416b71131a9d..d667b5665bb7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.il.debug.bsl @@ -199,7 +199,7 @@ IL_0000: ldc.i4.0 IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) IL_0006: stloc.0 - IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_000c: stloc.1 IL_000d: ldloc.1 IL_000e: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.il.release.bsl index 416b71131a9d..d667b5665bb7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.il.release.bsl @@ -199,7 +199,7 @@ IL_0000: ldc.i4.0 IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) IL_0006: stloc.0 - IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_000c: stloc.1 IL_000d: ldloc.1 IL_000e: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.il.debug.bsl index bdcb8cfe3a15..0f1ffc1cbb95 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.il.debug.bsl @@ -194,7 +194,7 @@ IL_0000: ldc.i4.0 IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) IL_0006: stloc.0 - IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_000c: stloc.1 IL_000d: ldloc.1 IL_000e: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.il.release.bsl index bdcb8cfe3a15..0f1ffc1cbb95 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.il.release.bsl @@ -194,7 +194,7 @@ IL_0000: ldc.i4.0 IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) IL_0006: stloc.0 - IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_000c: stloc.1 IL_000d: ldloc.1 IL_000e: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.il.debug.bsl index 86e0cc6afbd5..731318ac8952 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.il.debug.bsl @@ -166,7 +166,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.il.release.bsl index f564cc5c3c6e..4aa2b3e9a2d0 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.il.release.bsl @@ -163,7 +163,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.il.debug.bsl index 38d888ef90e4..57fe692fdf02 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.il.debug.bsl @@ -161,7 +161,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.il.release.bsl index 69e251eafbfd..73143fbeb5e4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.il.release.bsl @@ -158,7 +158,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.il.debug.bsl index 77d0d57a7999..23c65f949f1a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.il.debug.bsl @@ -316,7 +316,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.il.release.bsl index 62f0e29565a1..34165159be8b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.il.release.bsl @@ -307,7 +307,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.il.debug.bsl index 57fce064655c..76517b09ad56 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.il.debug.bsl @@ -307,7 +307,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.il.release.bsl index 8d15000dc25d..8b15871f5860 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.il.release.bsl @@ -298,7 +298,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.il.debug.bsl index 537e2ce83d71..caf7b26bc721 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.il.debug.bsl @@ -353,7 +353,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.il.release.bsl index 2b8dd85d2748..08b87359c701 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.il.release.bsl @@ -344,7 +344,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.il.debug.bsl index 9c7a9399b778..4f27f484f4a6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.il.debug.bsl @@ -342,7 +342,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.il.release.bsl index e192d2bc6399..a56b67be4818 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.il.release.bsl @@ -333,7 +333,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.il.debug.bsl index e68776c8dac5..4b975cf00584 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.il.debug.bsl @@ -733,7 +733,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 @@ -749,7 +749,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.il.release.bsl index 723f29b7d821..186cf14285a7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.il.release.bsl @@ -703,7 +703,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 @@ -719,7 +719,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.il.debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.il.debug.bsl index d731307a799e..2a0b2f2effea 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.il.debug.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.il.debug.bsl @@ -715,7 +715,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 @@ -730,7 +730,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.il.release.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.il.release.bsl index 6dd4c2cb2fca..c1be3ee9735f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.il.release.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.il.release.bsl @@ -685,7 +685,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 @@ -700,7 +700,7 @@ .maxstack 4 .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0005: stloc.0 IL_0006: ldloc.0 IL_0007: ldloc.0 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/RefactorExtraPervasives.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RefactorExtraPervasives.fs new file mode 100644 index 000000000000..7e697852bf29 --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/RefactorExtraPervasives.fs @@ -0,0 +1,559 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace EmittedIL + +open Xunit +open FSharp.Test.Compiler +open FSharp.Test.Compiler.Assertions.StructuredResultsAsserts + +module RefactorExtraPervasives = + + let lazyPatternSource code = $""" +module LazyExtensionsModule +let printlazy v = match v with | {code} x -> x +let _ = printlazy (lazy "Hello, World") +""" + + [] + [] + [] + let ``LazyPattern - LazyExtensions`` (code) = + FSharp (lazyPatternSource code) + |> asExe + |> withOptimize + |> compileAndRun + |> shouldSucceed + |> verifyIL [ +#if Release + """ + .method public static !!a printlazy(class [runtime]System.Lazy`1 v) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance !0 class [netstandard]System.Lazy`1::get_Value() + IL_0006: ret + } """ + """ .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class LazyExtensionsModule/clo@4 LazyExtensionsModule/clo@4::@_instance + IL_0005: call class [runtime]System.Lazy`1 [FSharp.Core]Microsoft.FSharp.Control.LazyExtensions::Create(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_000a: callvirt instance !0 class [netstandard]System.Lazy`1::get_Value() + IL_000f: pop + IL_0010: ret + } """ ] +#else + """ + .method public static !!a printlazy(class [runtime]System.Lazy`1 v) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: tail. + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Control.LazyExtensions::LazyPattern(class [runtime]System.Lazy`1) + IL_0008: ret + } """ + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class LazyExtensionsModule/clo@4 LazyExtensionsModule/clo@4::@_instance + IL_0005: call class [runtime]System.Lazy`1 [FSharp.Core]Microsoft.FSharp.Control.LazyExtensions::Create(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Control.LazyExtensions::LazyPattern(class [runtime]System.Lazy`1) + IL_000f: pop + IL_0010: ret + } """ ] +#endif + + [] + [] + let ``LazyPattern - ExtraTopLevelOperators`` (code) = + FSharp (lazyPatternSource code) + |> asLibrary + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ +#if Release + """ + .method public static !!a printlazy(class [runtime]System.Lazy`1 v) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: callvirt instance !0 class [netstandard]System.Lazy`1::get_Value() + IL_0006: ret + } """ + """ .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class LazyExtensionsModule/clo@4 LazyExtensionsModule/clo@4::@_instance + IL_0005: call class [runtime]System.Lazy`1 [FSharp.Core]Microsoft.FSharp.Control.LazyExtensions::Create(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_000a: callvirt instance !0 class [netstandard]System.Lazy`1::get_Value() + IL_000f: pop + IL_0010: ret + } """ ] +#else + """ + .method public static !!a printlazy(class [runtime]System.Lazy`1 v) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: tail. + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::LazyPattern(class [runtime]System.Lazy`1) + IL_0008: ret + } """ + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class LazyExtensionsModule/clo@4 LazyExtensionsModule/clo@4::@_instance + IL_0005: call class [runtime]System.Lazy`1 [FSharp.Core]Microsoft.FSharp.Control.LazyExtensions::Create(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::LazyPattern(class [runtime]System.Lazy`1) + IL_000f: pop + IL_0010: ret + } """ ] +#endif + + + [] + [] + [] + [] + [] + [] + [] + [] + [] + let ``convert to byte unchecked``(code) = + FSharp $""" +module OperatorsTests +{code}""" + |> asLibrary + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ +#if Release + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.s 25 + IL_0002: stsfld uint8 OperatorsTests::x@3 + IL_0007: ldstr "%d" + IL_000c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,uint8>::.ctor(string) + IL_0011: stsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> OperatorsTests::format@1 + IL_0016: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_001b: call class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> OperatorsTests::get_format@1() + IL_0020: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0025: call uint8 OperatorsTests::get_x() + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: pop + IL_0030: ret + } """ ] +#else + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.s 25 + IL_0002: stsfld uint8 OperatorsTests::x@3 + IL_0007: ldstr "%d" + IL_000c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,uint8>::.ctor(string) + IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0016: call uint8 OperatorsTests::get_x() + IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0020: pop + IL_0021: ret + } """ ] +#endif + + [] + [] + [] + [] + [] + [] + [] + [] + [] + let ``convert to byte checked``(code) = + FSharp $""" +module OperatorsTests +{code}""" + |> asLibrary + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ +#if Release + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.s 25 + IL_0002: conv.ovf.u1 + IL_0003: stsfld uint8 OperatorsTests::x@3 + IL_0008: ldstr "%d" + IL_000d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,uint8>::.ctor(string) + IL_0012: stsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> OperatorsTests::format@1 + IL_0017: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_001c: call class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> OperatorsTests::get_format@1() + IL_0021: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0026: call uint8 OperatorsTests::get_x() + IL_002b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0030: pop + IL_0031: ret + } """ ] +#else + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.s 25 + IL_0002: conv.ovf.u1 + IL_0003: stsfld uint8 OperatorsTests::x@3 + IL_0008: ldstr "%d" + IL_000d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,uint8>::.ctor(string) + IL_0012: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0017: call uint8 OperatorsTests::get_x() + IL_001c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0021: pop + IL_0022: ret + } +""" ] +#endif + + [] + [] + [] + [] + [] + [] + [] + [] + [] + let ``convert to sbyte unchecked``(code) = + FSharp $""" +module OperatorsTests +{code}""" + |> asLibrary + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ +#if Release + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.s 25 + IL_0002: stsfld int8 OperatorsTests::x@3 + IL_0007: ldstr "%d" + IL_000c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int8>::.ctor(string) + IL_0011: stsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> OperatorsTests::format@1 + IL_0016: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_001b: call class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> OperatorsTests::get_format@1() + IL_0020: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0025: call int8 OperatorsTests::get_x() + IL_002a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_002f: pop + IL_0030: ret + } """ ] +#else + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.s 25 + IL_0002: stsfld int8 OperatorsTests::x@3 + IL_0007: ldstr "%d" + IL_000c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int8>::.ctor(string) + IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0016: call int8 OperatorsTests::get_x() + IL_001b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0020: pop + IL_0021: ret + } """ ] +#endif + + [] + [] + [] + [] + [] + [] + [] + [] + [] + let ``convert to sbyte checked``(code) = + FSharp $""" +module OperatorsTests +{code}""" + |> asLibrary + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ +#if Release + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.s 25 + IL_0002: conv.ovf.i1 + IL_0003: stsfld int8 OperatorsTests::x@3 + IL_0008: ldstr "%d" + IL_000d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int8>::.ctor(string) + IL_0012: stsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> OperatorsTests::format@1 + IL_0017: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_001c: call class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> OperatorsTests::get_format@1() + IL_0021: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0026: call int8 OperatorsTests::get_x() + IL_002b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0030: pop + IL_0031: ret + } """ ] +#else + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.s 25 + IL_0002: conv.ovf.i1 + IL_0003: stsfld int8 OperatorsTests::x@3 + IL_0008: ldstr "%d" + IL_000d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int8>::.ctor(string) + IL_0012: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0017: call int8 OperatorsTests::get_x() + IL_001c: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0021: pop + IL_0022: ret + } """ ] +#endif + + [] + [] + [] + let ``verifyDefaultAsyncImplementation - CommonExtensions``(code) = + FSharp $""" +module AsyncTests +{code}""" + |> asLibrary + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() + IL_0005: stsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncTests::_x@3 + IL_000a: ret + } """] + + [] + [] + let ``verifyDefaultAsyncImplementation - ExtraTopLevelOperators``(code) = + FSharp $""" +module AsyncTests +{code}""" + |> asLibrary + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0005: stsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncTests::_x@3 + IL_000a: ret + } """ ] + + [] + [] + [] + let ``verifyDefaultsetImplementation - CollectionExtensions``(code) = + FSharp $""" +module SetExtensionsTests +{code}""" + |> asLibrary + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.s 10 + IL_0002: ldc.i4.s 20 + IL_0004: ldc.i4.s 30 + IL_0006: ldc.i4.s 40 + IL_0008: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0012: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0017: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_001c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0021: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpSet`1 [FSharp.Core]Microsoft.FSharp.Collections.SetModule::OfSeq(class [runtime]System.Collections.Generic.IEnumerable`1) + IL_0026: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpSet`1 SetExtensionsTests::_x@3 + IL_002b: ret + } + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpSet`1 + _x() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpSet`1 SetExtensionsTests::get__x() + }""" ] + + [] + [] + let ``verifyDefaultsetImplementation - ExtraTopLevelOperators``(code) = + FSharp $""" +module SetExtensionsTests +{code}""" + |> asLibrary + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.s 10 + IL_0002: ldc.i4.s 20 + IL_0004: ldc.i4.s 30 + IL_0006: ldc.i4.s 40 + IL_0008: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0012: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0017: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_001c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0021: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpSet`1 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::CreateSet(class [runtime]System.Collections.Generic.IEnumerable`1) + IL_0026: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpSet`1 SetExtensionsTests::_x@3 + IL_002b: ret + } + + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpSet`1 + _x() + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) + .get class [FSharp.Core]Microsoft.FSharp.Collections.FSharpSet`1 SetExtensionsTests::get__x() + }""" ] + + [] + [] + [] + let ``verifyDefaultarray2DImplementation - CollectionExtensions``(code) = + FSharp $""" +module array2DExtensionsTests +{code}""" + |> asLibrary + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 6 + IL_0000: ldc.i4.s 10 + IL_0002: ldc.i4.s 20 + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_000e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0013: ldc.i4.s 30 + IL_0015: ldc.i4.s 40 + IL_0017: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_001c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0021: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::get_Empty() + IL_002b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0030: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0035: call !!1[0...,0...] [FSharp.Core]Microsoft.FSharp.Collections.CollectionExtensions::CreateArray2D,int32>(class [runtime]System.Collections.Generic.IEnumerable`1) + IL_003a: stsfld int32[0...,0...] array2DExtensionsTests::_x@3 + IL_003f: ret + }""" ] + + [] + [] + let ``verifyDefaultarray2DImplementation - ExtraTopLevelOperators``(code) = + FSharp $""" +module array2DExtensionsTests +{code}""" + |> asLibrary + |> withOptimize + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method assembly specialname static void staticInitialization@() cil managed + { + + .maxstack 6 + IL_0000: ldc.i4.s 10 + IL_0002: ldc.i4.s 20 + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_000e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0013: ldc.i4.s 30 + IL_0015: ldc.i4.s 40 + IL_0017: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_001c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0021: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::get_Empty() + IL_002b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0030: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0035: call !!1[0...,0...] [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::CreateArray2D,int32>(class [runtime]System.Collections.Generic.IEnumerable`1) + IL_003a: stsfld int32[0...,0...] array2DExtensionsTests::_x@3 + IL_003f: ret + }""" ] diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index aa3435737919..2718fad73c22 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -164,6 +164,7 @@ + diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOff.il.bsl index e96af9ece71e..a96aa6772d30 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOff.il.bsl @@ -509,7 +509,7 @@ IL_0006: ldc.i4.1 IL_0007: volatile. IL_0009: stsfld int32 assembly/Foo::init@4 - IL_000e: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_000e: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0013: ldsfld class assembly/todo1@18 assembly/todo1@18::@_instance IL_0018: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_001d: stsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> ''.$assembly$fsx::todo1@16 @@ -534,7 +534,7 @@ IL_004e: ldsflda valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::matchValue@25 IL_0053: call instance !1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::get_ErrorValue() IL_0058: call void [runtime]System.Environment::Exit(int32) - IL_005d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_005d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0062: ldsfld class assembly/todo2@37 assembly/todo2@37::@_instance IL_0067: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_006c: stsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> ''.$assembly$fsx::todo2@35 diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOn.il.bsl index 50c58d1a2b20..4cb7ca7bb8c3 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOn.il.bsl @@ -483,7 +483,7 @@ .maxstack 5 IL_0000: call void assembly/Foo::staticInitialization@() - IL_0005: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0005: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_000a: ldsfld class assembly/todo1@18 assembly/todo1@18::@_instance IL_000f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0014: stsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::todo1@16 @@ -508,7 +508,7 @@ IL_0045: ldsflda valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 assembly::matchValue@25 IL_004a: call instance !1 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::get_ErrorValue() IL_004f: call void [runtime]System.Environment::Exit(int32) - IL_0054: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0054: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Control.CommonExtensions::get_DefaultAsyncBuilder() IL_0059: ldsfld class assembly/todo2@37 assembly/todo2@37::@_instance IL_005e: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0063: stsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::todo2@35 diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl index 63a16671bcad..fad3577937dc 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl @@ -2164,7 +2164,7 @@ FSharp.Compiler.CodeAnalysis.FSharpParseFileResults: System.String get_FileName( FSharp.Compiler.CodeAnalysis.FSharpParseFileResults: System.String[] DependencyFiles FSharp.Compiler.CodeAnalysis.FSharpParseFileResults: System.String[] get_DependencyFiles() FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean ApplyLineDirectives -FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean CompilingFSharpCore +FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean compilingCoreLibrary FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean Equals(FSharp.Compiler.CodeAnalysis.FSharpParsingOptions) FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean Equals(FSharp.Compiler.CodeAnalysis.FSharpParsingOptions, System.Collections.IEqualityComparer) FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean Equals(System.Object) @@ -2172,7 +2172,7 @@ FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean Equals(System.Object, FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean IsExe FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean IsInteractive FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean get_ApplyLineDirectives() -FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean get_CompilingFSharpCore() +FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean get_compilingCoreLibrary() FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean get_IsExe() FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean get_IsInteractive() FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: FSharp.Compiler.CodeAnalysis.FSharpParsingOptions Default @@ -10790,7 +10790,7 @@ FSharp.Compiler.Tokenization.FSharpKeywords: Microsoft.FSharp.Collections.FSharp FSharp.Compiler.Tokenization.FSharpKeywords: System.String NormalizeIdentifierBackticks(System.String) FSharp.Compiler.Tokenization.FSharpLexer: Void Tokenize(FSharp.Compiler.Text.ISourceText, Microsoft.FSharp.Core.FSharpFunc`2[FSharp.Compiler.Tokenization.FSharpToken,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[System.String]], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Tokenization.FSharpLexerFlags], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpMap`2[System.String,System.String]], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) FSharp.Compiler.Tokenization.FSharpLexerFlags: FSharp.Compiler.Tokenization.FSharpLexerFlags Compiling -FSharp.Compiler.Tokenization.FSharpLexerFlags: FSharp.Compiler.Tokenization.FSharpLexerFlags CompilingFSharpCore +FSharp.Compiler.Tokenization.FSharpLexerFlags: FSharp.Compiler.Tokenization.FSharpLexerFlags compilingCoreLibrary FSharp.Compiler.Tokenization.FSharpLexerFlags: FSharp.Compiler.Tokenization.FSharpLexerFlags Default FSharp.Compiler.Tokenization.FSharpLexerFlags: FSharp.Compiler.Tokenization.FSharpLexerFlags LightSyntaxOn FSharp.Compiler.Tokenization.FSharpLexerFlags: FSharp.Compiler.Tokenization.FSharpLexerFlags SkipTrivia diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl index e8647e3f6ba6..fead844a7301 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -2164,7 +2164,7 @@ FSharp.Compiler.CodeAnalysis.FSharpParseFileResults: System.String get_FileName( FSharp.Compiler.CodeAnalysis.FSharpParseFileResults: System.String[] DependencyFiles FSharp.Compiler.CodeAnalysis.FSharpParseFileResults: System.String[] get_DependencyFiles() FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean ApplyLineDirectives -FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean CompilingFSharpCore +FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean compilingCoreLibrary FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean Equals(FSharp.Compiler.CodeAnalysis.FSharpParsingOptions) FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean Equals(FSharp.Compiler.CodeAnalysis.FSharpParsingOptions, System.Collections.IEqualityComparer) FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean Equals(System.Object) @@ -2172,7 +2172,7 @@ FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean Equals(System.Object, FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean IsExe FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean IsInteractive FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean get_ApplyLineDirectives() -FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean get_CompilingFSharpCore() +FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean get_compilingCoreLibrary() FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean get_IsExe() FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: Boolean get_IsInteractive() FSharp.Compiler.CodeAnalysis.FSharpParsingOptions: FSharp.Compiler.CodeAnalysis.FSharpParsingOptions Default @@ -10852,7 +10852,7 @@ FSharp.Compiler.Tokenization.FSharpKeywords: Microsoft.FSharp.Collections.FSharp FSharp.Compiler.Tokenization.FSharpKeywords: System.String NormalizeIdentifierBackticks(System.String) FSharp.Compiler.Tokenization.FSharpLexer: Void Tokenize(FSharp.Compiler.Text.ISourceText, Microsoft.FSharp.Core.FSharpFunc`2[FSharp.Compiler.Tokenization.FSharpToken,Microsoft.FSharp.Core.Unit], Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[System.Boolean], Microsoft.FSharp.Core.FSharpOption`1[System.String], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpList`1[System.String]], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Tokenization.FSharpLexerFlags], Microsoft.FSharp.Core.FSharpOption`1[Microsoft.FSharp.Collections.FSharpMap`2[System.String,System.String]], Microsoft.FSharp.Core.FSharpOption`1[System.Threading.CancellationToken]) FSharp.Compiler.Tokenization.FSharpLexerFlags: FSharp.Compiler.Tokenization.FSharpLexerFlags Compiling -FSharp.Compiler.Tokenization.FSharpLexerFlags: FSharp.Compiler.Tokenization.FSharpLexerFlags CompilingFSharpCore +FSharp.Compiler.Tokenization.FSharpLexerFlags: FSharp.Compiler.Tokenization.FSharpLexerFlags compilingCoreLibrary FSharp.Compiler.Tokenization.FSharpLexerFlags: FSharp.Compiler.Tokenization.FSharpLexerFlags Default FSharp.Compiler.Tokenization.FSharpLexerFlags: FSharp.Compiler.Tokenization.FSharpLexerFlags LightSyntaxOn FSharp.Compiler.Tokenization.FSharpLexerFlags: FSharp.Compiler.Tokenization.FSharpLexerFlags SkipTrivia diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl index def2dea16c8e..80e768f11871 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.debug.bsl @@ -126,6 +126,9 @@ Microsoft.FSharp.Collections.ArrayModule: T MaxBy[T,TResult](Microsoft.FSharp.Co Microsoft.FSharp.Collections.ArrayModule: T Max[T](T[]) Microsoft.FSharp.Collections.ArrayModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[]) Microsoft.FSharp.Collections.ArrayModule: T Min[T](T[]) +Microsoft.FSharp.Collections.ArrayModule: T RandomChoiceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], T[]) +Microsoft.FSharp.Collections.ArrayModule: T RandomChoiceWith[T](System.Random, T[]) +Microsoft.FSharp.Collections.ArrayModule: T RandomChoice[T](T[]) Microsoft.FSharp.Collections.ArrayModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) Microsoft.FSharp.Collections.ArrayModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) Microsoft.FSharp.Collections.ArrayModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) @@ -164,6 +167,15 @@ Microsoft.FSharp.Collections.ArrayModule: T[] InsertManyAt[T](Int32, System.Coll Microsoft.FSharp.Collections.ArrayModule: T[] OfList[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ArrayModule: T[] OfSeq[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.ArrayModule: T[] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomChoicesBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomChoicesWith[T](System.Random, Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomChoices[T](Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomSampleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomSampleWith[T](System.Random, Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomSample[T](Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomShuffleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomShuffleWith[T](System.Random, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomShuffle[T](T[]) Microsoft.FSharp.Collections.ArrayModule: T[] RemoveAt[T](Int32, T[]) Microsoft.FSharp.Collections.ArrayModule: T[] RemoveManyAt[T](Int32, Int32, T[]) Microsoft.FSharp.Collections.ArrayModule: T[] Replicate[T](Int32, T) @@ -194,10 +206,17 @@ Microsoft.FSharp.Collections.ArrayModule: Void Iterate2[T1,T2](Microsoft.FSharp. Microsoft.FSharp.Collections.ArrayModule: Void IterateIndexed2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.Unit]]], T1[], T2[]) Microsoft.FSharp.Collections.ArrayModule: Void IterateIndexed[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit]], T[]) Microsoft.FSharp.Collections.ArrayModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], T[]) +Microsoft.FSharp.Collections.ArrayModule: Void RandomShuffleInPlaceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], T[]) +Microsoft.FSharp.Collections.ArrayModule: Void RandomShuffleInPlaceWith[T](System.Random, T[]) +Microsoft.FSharp.Collections.ArrayModule: Void RandomShuffleInPlace[T](T[]) Microsoft.FSharp.Collections.ArrayModule: Void Set[T](T[], Int32, T) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[]) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceWith[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]], T[]) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlace[T](T[]) +Microsoft.FSharp.Collections.CollectionExtensions: Microsoft.FSharp.Collections.FSharpSet`1[T] CreateSet[T](System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.CollectionExtensions: System.Collections.Generic.IDictionary`2[TKey,TValue] CreateDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) +Microsoft.FSharp.Collections.CollectionExtensions: System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] CreateReadOnlyDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) +Microsoft.FSharp.Collections.CollectionExtensions: T[,] CreateArray2D[a,T](System.Collections.Generic.IEnumerable`1[a]) Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] FromFunction[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]]) Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] NonStructural$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]]) Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] NonStructural[T]() @@ -329,6 +348,15 @@ Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] OfArray[T](T[]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] OfSeq[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomChoicesBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomChoicesWith[T](System.Random, Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomChoices[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomSampleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomSampleWith[T](System.Random, Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomSample[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomShuffleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomShuffleWith[T](System.Random, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomShuffle[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RemoveAt[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RemoveManyAt[T](Int32, Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Replicate[T](Int32, T) @@ -377,6 +405,9 @@ Microsoft.FSharp.Collections.ListModule: T MaxBy[T,TResult](Microsoft.FSharp.Cor Microsoft.FSharp.Collections.ListModule: T Max[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T Min[T](Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: T RandomChoiceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: T RandomChoiceWith[T](System.Random, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: T RandomChoice[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) @@ -483,6 +514,15 @@ Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1 Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] OfArray[T](T[]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] OfList[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomChoicesBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomChoicesWith[T](System.Random, Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomChoices[T](Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomSampleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomSampleWith[T](System.Random, Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomSample[T](Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomShuffleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomShuffleWith[T](System.Random, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomShuffle[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] ReadOnly[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RemoveAt[T](Int32, System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RemoveManyAt[T](Int32, Int32, System.Collections.Generic.IEnumerable`1[T]) @@ -518,6 +558,9 @@ Microsoft.FSharp.Collections.SeqModule: T MaxBy[T,TResult](Microsoft.FSharp.Core Microsoft.FSharp.Collections.SeqModule: T Max[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T Min[T](System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: T RandomChoiceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: T RandomChoiceWith[T](System.Random, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: T RandomChoice[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) @@ -582,6 +625,8 @@ Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn T Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.FSharpAsync`1[T] MakeAsync[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.AsyncActivation`1[T],Microsoft.FSharp.Control.AsyncReturn]) Microsoft.FSharp.Control.BackgroundTaskBuilder: System.Threading.Tasks.Task`1[T] RunDynamic[T](Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T]) Microsoft.FSharp.Control.BackgroundTaskBuilder: System.Threading.Tasks.Task`1[T] Run[T](Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T]) +Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsyncBuilder DefaultAsyncBuilder +Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsyncBuilder get_DefaultAsyncBuilder() Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] AsyncWrite(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[System.Byte[]] AsyncReadBytes(System.IO.Stream, Int32) Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[System.Int32] AsyncRead(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) @@ -692,6 +737,7 @@ Microsoft.FSharp.Control.IDelegateEvent`1[TDelegate]: Void RemoveHandler(TDelega Microsoft.FSharp.Control.LazyExtensions: System.Lazy`1[T] CreateFromValue[T](T) Microsoft.FSharp.Control.LazyExtensions: System.Lazy`1[T] Create[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T]) Microsoft.FSharp.Control.LazyExtensions: T Force[T](System.Lazy`1[T]) +Microsoft.FSharp.Control.LazyExtensions: T LazyPattern[T](System.Lazy`1[T]) Microsoft.FSharp.Control.ObservableModule: System.IDisposable Subscribe[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], System.IObservable`1[T]) Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[System.Tuple`2[T,T]] Pairwise[T](System.IObservable`1[T]) Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[TResult] Choose[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], System.IObservable`1[T]) @@ -1591,6 +1637,8 @@ Microsoft.FSharp.Core.Operators+ArrayExtensions: Int32 [,]`1.GetReverseIndex[T]( Microsoft.FSharp.Core.Operators+ArrayExtensions: Int32 []`1.GetReverseIndex[T](T[], Int32, Int32) Microsoft.FSharp.Core.Operators+Checked: Byte ToByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) Microsoft.FSharp.Core.Operators+Checked: Byte ToByte[T](T) +Microsoft.FSharp.Core.Operators+Checked: Byte ToUInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) +Microsoft.FSharp.Core.Operators+Checked: Byte ToUInt8[T](T) Microsoft.FSharp.Core.Operators+Checked: Char ToChar$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Char], T) Microsoft.FSharp.Core.Operators+Checked: Char ToChar[T](T) Microsoft.FSharp.Core.Operators+Checked: Int16 ToInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int16], T) @@ -1603,6 +1651,8 @@ Microsoft.FSharp.Core.Operators+Checked: Int64 ToInt64$W[T](Microsoft.FSharp.Cor Microsoft.FSharp.Core.Operators+Checked: Int64 ToInt64[T](T) Microsoft.FSharp.Core.Operators+Checked: IntPtr ToIntPtr$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.IntPtr], T) Microsoft.FSharp.Core.Operators+Checked: IntPtr ToIntPtr[T](T) +Microsoft.FSharp.Core.Operators+Checked: SByte ToInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) +Microsoft.FSharp.Core.Operators+Checked: SByte ToInt8[T](T) Microsoft.FSharp.Core.Operators+Checked: SByte ToSByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) Microsoft.FSharp.Core.Operators+Checked: SByte ToSByte[T](T) Microsoft.FSharp.Core.Operators+Checked: T op_UnaryNegation$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) @@ -1758,12 +1808,16 @@ Microsoft.FSharp.Core.Operators: Boolean op_LessThanOrEqual[T](T, T) Microsoft.FSharp.Core.Operators: Boolean op_LessThan[T](T, T) Microsoft.FSharp.Core.Operators: Byte ToByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) Microsoft.FSharp.Core.Operators: Byte ToByte[T](T) +Microsoft.FSharp.Core.Operators: Byte ToUInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) +Microsoft.FSharp.Core.Operators: Byte ToUInt8[T](T) Microsoft.FSharp.Core.Operators: Char ToChar$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Char], T) Microsoft.FSharp.Core.Operators: Char ToChar[T](T) Microsoft.FSharp.Core.Operators: Double Infinity Microsoft.FSharp.Core.Operators: Double NaN Microsoft.FSharp.Core.Operators: Double ToDouble$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Double], T) Microsoft.FSharp.Core.Operators: Double ToDouble[T](T) +Microsoft.FSharp.Core.Operators: Double double$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Double], T) +Microsoft.FSharp.Core.Operators: Double double[T](T) Microsoft.FSharp.Core.Operators: Double get_Infinity() Microsoft.FSharp.Core.Operators: Double get_NaN() Microsoft.FSharp.Core.Operators: Int16 ToInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int16], T) @@ -1793,6 +1847,8 @@ Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+Checked Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+NonStructuralComparison Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+OperatorIntrinsics Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+Unchecked +Microsoft.FSharp.Core.Operators: SByte ToInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) +Microsoft.FSharp.Core.Operators: SByte ToInt8[T](T) Microsoft.FSharp.Core.Operators: SByte ToSByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) Microsoft.FSharp.Core.Operators: SByte ToSByte[T](T) Microsoft.FSharp.Core.Operators: Single InfinitySingle @@ -1801,6 +1857,8 @@ Microsoft.FSharp.Core.Operators: Single ToSingle$W[T](Microsoft.FSharp.Core.FSha Microsoft.FSharp.Core.Operators: Single ToSingle[T](T) Microsoft.FSharp.Core.Operators: Single get_InfinitySingle() Microsoft.FSharp.Core.Operators: Single get_NaNSingle() +Microsoft.FSharp.Core.Operators: Single single$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Single], T) +Microsoft.FSharp.Core.Operators: Single single[T](T) Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] CreateSequence[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_Range$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T, T) Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_RangeStep$W[T,TStep](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TStep], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TStep,T]], T, TStep, T) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl index e1864618be61..c978b0b0fad8 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard20.release.bsl @@ -213,6 +213,10 @@ Microsoft.FSharp.Collections.ArrayModule: Void Set[T](T[], Int32, T) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[]) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceWith[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]], T[]) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlace[T](T[]) +Microsoft.FSharp.Collections.CollectionExtensions: Microsoft.FSharp.Collections.FSharpSet`1[T] CreateSet[T](System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.CollectionExtensions: System.Collections.Generic.IDictionary`2[TKey,TValue] CreateDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) +Microsoft.FSharp.Collections.CollectionExtensions: System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] CreateReadOnlyDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) +Microsoft.FSharp.Collections.CollectionExtensions: T[,] CreateArray2D[a,T](System.Collections.Generic.IEnumerable`1[a]) Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] FromFunction[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]]) Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] NonStructural$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]]) Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] NonStructural[T]() @@ -621,6 +625,8 @@ Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn T Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.FSharpAsync`1[T] MakeAsync[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.AsyncActivation`1[T],Microsoft.FSharp.Control.AsyncReturn]) Microsoft.FSharp.Control.BackgroundTaskBuilder: System.Threading.Tasks.Task`1[T] RunDynamic[T](Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T]) Microsoft.FSharp.Control.BackgroundTaskBuilder: System.Threading.Tasks.Task`1[T] Run[T](Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T]) +Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsyncBuilder DefaultAsyncBuilder +Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsyncBuilder get_DefaultAsyncBuilder() Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] AsyncWrite(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[System.Byte[]] AsyncReadBytes(System.IO.Stream, Int32) Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[System.Int32] AsyncRead(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) @@ -731,6 +737,7 @@ Microsoft.FSharp.Control.IDelegateEvent`1[TDelegate]: Void RemoveHandler(TDelega Microsoft.FSharp.Control.LazyExtensions: System.Lazy`1[T] CreateFromValue[T](T) Microsoft.FSharp.Control.LazyExtensions: System.Lazy`1[T] Create[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T]) Microsoft.FSharp.Control.LazyExtensions: T Force[T](System.Lazy`1[T]) +Microsoft.FSharp.Control.LazyExtensions: T LazyPattern[T](System.Lazy`1[T]) Microsoft.FSharp.Control.ObservableModule: System.IDisposable Subscribe[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], System.IObservable`1[T]) Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[System.Tuple`2[T,T]] Pairwise[T](System.IObservable`1[T]) Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[TResult] Choose[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], System.IObservable`1[T]) @@ -1630,6 +1637,8 @@ Microsoft.FSharp.Core.Operators+ArrayExtensions: Int32 [,]`1.GetReverseIndex[T]( Microsoft.FSharp.Core.Operators+ArrayExtensions: Int32 []`1.GetReverseIndex[T](T[], Int32, Int32) Microsoft.FSharp.Core.Operators+Checked: Byte ToByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) Microsoft.FSharp.Core.Operators+Checked: Byte ToByte[T](T) +Microsoft.FSharp.Core.Operators+Checked: Byte ToUInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) +Microsoft.FSharp.Core.Operators+Checked: Byte ToUInt8[T](T) Microsoft.FSharp.Core.Operators+Checked: Char ToChar$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Char], T) Microsoft.FSharp.Core.Operators+Checked: Char ToChar[T](T) Microsoft.FSharp.Core.Operators+Checked: Int16 ToInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int16], T) @@ -1642,6 +1651,8 @@ Microsoft.FSharp.Core.Operators+Checked: Int64 ToInt64$W[T](Microsoft.FSharp.Cor Microsoft.FSharp.Core.Operators+Checked: Int64 ToInt64[T](T) Microsoft.FSharp.Core.Operators+Checked: IntPtr ToIntPtr$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.IntPtr], T) Microsoft.FSharp.Core.Operators+Checked: IntPtr ToIntPtr[T](T) +Microsoft.FSharp.Core.Operators+Checked: SByte ToInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) +Microsoft.FSharp.Core.Operators+Checked: SByte ToInt8[T](T) Microsoft.FSharp.Core.Operators+Checked: SByte ToSByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) Microsoft.FSharp.Core.Operators+Checked: SByte ToSByte[T](T) Microsoft.FSharp.Core.Operators+Checked: T op_UnaryNegation$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) @@ -1797,12 +1808,16 @@ Microsoft.FSharp.Core.Operators: Boolean op_LessThanOrEqual[T](T, T) Microsoft.FSharp.Core.Operators: Boolean op_LessThan[T](T, T) Microsoft.FSharp.Core.Operators: Byte ToByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) Microsoft.FSharp.Core.Operators: Byte ToByte[T](T) +Microsoft.FSharp.Core.Operators: Byte ToUInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) +Microsoft.FSharp.Core.Operators: Byte ToUInt8[T](T) Microsoft.FSharp.Core.Operators: Char ToChar$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Char], T) Microsoft.FSharp.Core.Operators: Char ToChar[T](T) Microsoft.FSharp.Core.Operators: Double Infinity Microsoft.FSharp.Core.Operators: Double NaN Microsoft.FSharp.Core.Operators: Double ToDouble$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Double], T) Microsoft.FSharp.Core.Operators: Double ToDouble[T](T) +Microsoft.FSharp.Core.Operators: Double double$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Double], T) +Microsoft.FSharp.Core.Operators: Double double[T](T) Microsoft.FSharp.Core.Operators: Double get_Infinity() Microsoft.FSharp.Core.Operators: Double get_NaN() Microsoft.FSharp.Core.Operators: Int16 ToInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int16], T) @@ -1832,6 +1847,8 @@ Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+Checked Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+NonStructuralComparison Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+OperatorIntrinsics Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+Unchecked +Microsoft.FSharp.Core.Operators: SByte ToInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) +Microsoft.FSharp.Core.Operators: SByte ToInt8[T](T) Microsoft.FSharp.Core.Operators: SByte ToSByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) Microsoft.FSharp.Core.Operators: SByte ToSByte[T](T) Microsoft.FSharp.Core.Operators: Single InfinitySingle @@ -1840,6 +1857,8 @@ Microsoft.FSharp.Core.Operators: Single ToSingle$W[T](Microsoft.FSharp.Core.FSha Microsoft.FSharp.Core.Operators: Single ToSingle[T](T) Microsoft.FSharp.Core.Operators: Single get_InfinitySingle() Microsoft.FSharp.Core.Operators: Single get_NaNSingle() +Microsoft.FSharp.Core.Operators: Single single$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Single], T) +Microsoft.FSharp.Core.Operators: Single single[T](T) Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] CreateSequence[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_Range$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T, T) Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_RangeStep$W[T,TStep](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TStep], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TStep,T]], T, TStep, T) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl index 5fa4760b53ed..80e768f11871 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.debug.bsl @@ -126,6 +126,9 @@ Microsoft.FSharp.Collections.ArrayModule: T MaxBy[T,TResult](Microsoft.FSharp.Co Microsoft.FSharp.Collections.ArrayModule: T Max[T](T[]) Microsoft.FSharp.Collections.ArrayModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], T[]) Microsoft.FSharp.Collections.ArrayModule: T Min[T](T[]) +Microsoft.FSharp.Collections.ArrayModule: T RandomChoiceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], T[]) +Microsoft.FSharp.Collections.ArrayModule: T RandomChoiceWith[T](System.Random, T[]) +Microsoft.FSharp.Collections.ArrayModule: T RandomChoice[T](T[]) Microsoft.FSharp.Collections.ArrayModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) Microsoft.FSharp.Collections.ArrayModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) Microsoft.FSharp.Collections.ArrayModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T[]) @@ -164,6 +167,15 @@ Microsoft.FSharp.Collections.ArrayModule: T[] InsertManyAt[T](Int32, System.Coll Microsoft.FSharp.Collections.ArrayModule: T[] OfList[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ArrayModule: T[] OfSeq[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.ArrayModule: T[] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomChoicesBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomChoicesWith[T](System.Random, Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomChoices[T](Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomSampleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomSampleWith[T](System.Random, Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomSample[T](Int32, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomShuffleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomShuffleWith[T](System.Random, T[]) +Microsoft.FSharp.Collections.ArrayModule: T[] RandomShuffle[T](T[]) Microsoft.FSharp.Collections.ArrayModule: T[] RemoveAt[T](Int32, T[]) Microsoft.FSharp.Collections.ArrayModule: T[] RemoveManyAt[T](Int32, Int32, T[]) Microsoft.FSharp.Collections.ArrayModule: T[] Replicate[T](Int32, T) @@ -194,10 +206,17 @@ Microsoft.FSharp.Collections.ArrayModule: Void Iterate2[T1,T2](Microsoft.FSharp. Microsoft.FSharp.Collections.ArrayModule: Void IterateIndexed2[T1,T2](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T1,Microsoft.FSharp.Core.FSharpFunc`2[T2,Microsoft.FSharp.Core.Unit]]], T1[], T2[]) Microsoft.FSharp.Collections.ArrayModule: Void IterateIndexed[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit]], T[]) Microsoft.FSharp.Collections.ArrayModule: Void Iterate[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], T[]) +Microsoft.FSharp.Collections.ArrayModule: Void RandomShuffleInPlaceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], T[]) +Microsoft.FSharp.Collections.ArrayModule: Void RandomShuffleInPlaceWith[T](System.Random, T[]) +Microsoft.FSharp.Collections.ArrayModule: Void RandomShuffleInPlace[T](T[]) Microsoft.FSharp.Collections.ArrayModule: Void Set[T](T[], Int32, T) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[]) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceWith[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]], T[]) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlace[T](T[]) +Microsoft.FSharp.Collections.CollectionExtensions: Microsoft.FSharp.Collections.FSharpSet`1[T] CreateSet[T](System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.CollectionExtensions: System.Collections.Generic.IDictionary`2[TKey,TValue] CreateDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) +Microsoft.FSharp.Collections.CollectionExtensions: System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] CreateReadOnlyDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) +Microsoft.FSharp.Collections.CollectionExtensions: T[,] CreateArray2D[a,T](System.Collections.Generic.IEnumerable`1[a]) Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] FromFunction[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]]) Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] NonStructural$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]]) Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] NonStructural[T]() @@ -329,6 +348,15 @@ Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] OfArray[T](T[]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] OfSeq[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomChoicesBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomChoicesWith[T](System.Random, Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomChoices[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomSampleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomSampleWith[T](System.Random, Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomSample[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomShuffleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomShuffleWith[T](System.Random, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RandomShuffle[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RemoveAt[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] RemoveManyAt[T](Int32, Int32, Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[T] Replicate[T](Int32, T) @@ -377,6 +405,9 @@ Microsoft.FSharp.Collections.ListModule: T MaxBy[T,TResult](Microsoft.FSharp.Cor Microsoft.FSharp.Collections.ListModule: T Max[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T Min[T](Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: T RandomChoiceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: T RandomChoiceWith[T](System.Random, Microsoft.FSharp.Collections.FSharpList`1[T]) +Microsoft.FSharp.Collections.ListModule: T RandomChoice[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.ListModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], Microsoft.FSharp.Collections.FSharpList`1[T]) @@ -483,6 +514,15 @@ Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1 Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] OfArray[T](T[]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] OfList[T](Microsoft.FSharp.Collections.FSharpList`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] Permute[T](Microsoft.FSharp.Core.FSharpFunc`2[System.Int32,System.Int32], System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomChoicesBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomChoicesWith[T](System.Random, Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomChoices[T](Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomSampleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomSampleWith[T](System.Random, Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomSample[T](Int32, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomShuffleBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomShuffleWith[T](System.Random, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RandomShuffle[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] ReadOnly[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RemoveAt[T](Int32, System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[T] RemoveManyAt[T](Int32, Int32, System.Collections.Generic.IEnumerable`1[T]) @@ -518,6 +558,9 @@ Microsoft.FSharp.Collections.SeqModule: T MaxBy[T,TResult](Microsoft.FSharp.Core Microsoft.FSharp.Collections.SeqModule: T Max[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T MinBy[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,TResult], System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T Min[T](System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: T RandomChoiceBy[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,System.Double], System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: T RandomChoiceWith[T](System.Random, System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.SeqModule: T RandomChoice[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T ReduceBack[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T Reduce[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Collections.SeqModule: T Sum$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], System.Collections.Generic.IEnumerable`1[T]) @@ -582,6 +625,8 @@ Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn T Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.FSharpAsync`1[T] MakeAsync[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.AsyncActivation`1[T],Microsoft.FSharp.Control.AsyncReturn]) Microsoft.FSharp.Control.BackgroundTaskBuilder: System.Threading.Tasks.Task`1[T] RunDynamic[T](Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T]) Microsoft.FSharp.Control.BackgroundTaskBuilder: System.Threading.Tasks.Task`1[T] Run[T](Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T]) +Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsyncBuilder DefaultAsyncBuilder +Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsyncBuilder get_DefaultAsyncBuilder() Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] AsyncWrite(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[System.Byte[]] AsyncReadBytes(System.IO.Stream, Int32) Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[System.Int32] AsyncRead(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) @@ -692,6 +737,7 @@ Microsoft.FSharp.Control.IDelegateEvent`1[TDelegate]: Void RemoveHandler(TDelega Microsoft.FSharp.Control.LazyExtensions: System.Lazy`1[T] CreateFromValue[T](T) Microsoft.FSharp.Control.LazyExtensions: System.Lazy`1[T] Create[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T]) Microsoft.FSharp.Control.LazyExtensions: T Force[T](System.Lazy`1[T]) +Microsoft.FSharp.Control.LazyExtensions: T LazyPattern[T](System.Lazy`1[T]) Microsoft.FSharp.Control.ObservableModule: System.IDisposable Subscribe[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], System.IObservable`1[T]) Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[System.Tuple`2[T,T]] Pairwise[T](System.IObservable`1[T]) Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[TResult] Choose[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], System.IObservable`1[T]) @@ -711,7 +757,6 @@ Microsoft.FSharp.Control.TaskBuilderBase: Microsoft.FSharp.Core.CompilerServices Microsoft.FSharp.Control.TaskBuilderBase: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T] Delay[TOverall,T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T]]) Microsoft.FSharp.Control.TaskBuilderBase: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T] TryFinally[TOverall,T](Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T], Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,Microsoft.FSharp.Core.Unit]) Microsoft.FSharp.Control.TaskBuilderBase: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T] TryWith[TOverall,T](Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T], Microsoft.FSharp.Core.FSharpFunc`2[System.Exception,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T]]) -Microsoft.FSharp.Control.TaskBuilderBase: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T] Using[TResource,TOverall,T](TResource, Microsoft.FSharp.Core.FSharpFunc`2[TResource,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],T]]) Microsoft.FSharp.Control.TaskBuilderBase: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T] Return[T](T) Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Boolean TaskBuilderBase.BindDynamic.Static[TOverall,TResult1,TResult2](Microsoft.FSharp.Core.CompilerServices.ResumableStateMachine`1[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall]] ByRef, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority: Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2] TaskBuilderBase.Bind[TResult1,TOverall,TResult2](Microsoft.FSharp.Control.TaskBuilderBase, System.Threading.Tasks.Task`1[TResult1], Microsoft.FSharp.Core.FSharpFunc`2[TResult1,Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[TOverall],TResult2]]) @@ -1592,6 +1637,8 @@ Microsoft.FSharp.Core.Operators+ArrayExtensions: Int32 [,]`1.GetReverseIndex[T]( Microsoft.FSharp.Core.Operators+ArrayExtensions: Int32 []`1.GetReverseIndex[T](T[], Int32, Int32) Microsoft.FSharp.Core.Operators+Checked: Byte ToByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) Microsoft.FSharp.Core.Operators+Checked: Byte ToByte[T](T) +Microsoft.FSharp.Core.Operators+Checked: Byte ToUInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) +Microsoft.FSharp.Core.Operators+Checked: Byte ToUInt8[T](T) Microsoft.FSharp.Core.Operators+Checked: Char ToChar$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Char], T) Microsoft.FSharp.Core.Operators+Checked: Char ToChar[T](T) Microsoft.FSharp.Core.Operators+Checked: Int16 ToInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int16], T) @@ -1604,6 +1651,8 @@ Microsoft.FSharp.Core.Operators+Checked: Int64 ToInt64$W[T](Microsoft.FSharp.Cor Microsoft.FSharp.Core.Operators+Checked: Int64 ToInt64[T](T) Microsoft.FSharp.Core.Operators+Checked: IntPtr ToIntPtr$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.IntPtr], T) Microsoft.FSharp.Core.Operators+Checked: IntPtr ToIntPtr[T](T) +Microsoft.FSharp.Core.Operators+Checked: SByte ToInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) +Microsoft.FSharp.Core.Operators+Checked: SByte ToInt8[T](T) Microsoft.FSharp.Core.Operators+Checked: SByte ToSByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) Microsoft.FSharp.Core.Operators+Checked: SByte ToSByte[T](T) Microsoft.FSharp.Core.Operators+Checked: T op_UnaryNegation$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) @@ -1759,12 +1808,16 @@ Microsoft.FSharp.Core.Operators: Boolean op_LessThanOrEqual[T](T, T) Microsoft.FSharp.Core.Operators: Boolean op_LessThan[T](T, T) Microsoft.FSharp.Core.Operators: Byte ToByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) Microsoft.FSharp.Core.Operators: Byte ToByte[T](T) +Microsoft.FSharp.Core.Operators: Byte ToUInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) +Microsoft.FSharp.Core.Operators: Byte ToUInt8[T](T) Microsoft.FSharp.Core.Operators: Char ToChar$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Char], T) Microsoft.FSharp.Core.Operators: Char ToChar[T](T) Microsoft.FSharp.Core.Operators: Double Infinity Microsoft.FSharp.Core.Operators: Double NaN Microsoft.FSharp.Core.Operators: Double ToDouble$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Double], T) Microsoft.FSharp.Core.Operators: Double ToDouble[T](T) +Microsoft.FSharp.Core.Operators: Double double$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Double], T) +Microsoft.FSharp.Core.Operators: Double double[T](T) Microsoft.FSharp.Core.Operators: Double get_Infinity() Microsoft.FSharp.Core.Operators: Double get_NaN() Microsoft.FSharp.Core.Operators: Int16 ToInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int16], T) @@ -1794,6 +1847,8 @@ Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+Checked Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+NonStructuralComparison Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+OperatorIntrinsics Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+Unchecked +Microsoft.FSharp.Core.Operators: SByte ToInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) +Microsoft.FSharp.Core.Operators: SByte ToInt8[T](T) Microsoft.FSharp.Core.Operators: SByte ToSByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) Microsoft.FSharp.Core.Operators: SByte ToSByte[T](T) Microsoft.FSharp.Core.Operators: Single InfinitySingle @@ -1802,6 +1857,8 @@ Microsoft.FSharp.Core.Operators: Single ToSingle$W[T](Microsoft.FSharp.Core.FSha Microsoft.FSharp.Core.Operators: Single ToSingle[T](T) Microsoft.FSharp.Core.Operators: Single get_InfinitySingle() Microsoft.FSharp.Core.Operators: Single get_NaNSingle() +Microsoft.FSharp.Core.Operators: Single single$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Single], T) +Microsoft.FSharp.Core.Operators: Single single[T](T) Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] CreateSequence[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_Range$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T, T) Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_RangeStep$W[T,TStep](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TStep], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TStep,T]], T, TStep, T) diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl index 92d85ccd98de..16708eaa46fd 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl +++ b/tests/FSharp.Core.UnitTests/FSharp.Core.SurfaceArea.netstandard21.release.bsl @@ -213,6 +213,10 @@ Microsoft.FSharp.Collections.ArrayModule: Void Set[T](T[], Int32, T) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[]) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlaceWith[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]], T[]) Microsoft.FSharp.Collections.ArrayModule: Void SortInPlace[T](T[]) +Microsoft.FSharp.Collections.CollectionExtensions: Microsoft.FSharp.Collections.FSharpSet`1[T] CreateSet[T](System.Collections.Generic.IEnumerable`1[T]) +Microsoft.FSharp.Collections.CollectionExtensions: System.Collections.Generic.IDictionary`2[TKey,TValue] CreateDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) +Microsoft.FSharp.Collections.CollectionExtensions: System.Collections.Generic.IReadOnlyDictionary`2[TKey,TValue] CreateReadOnlyDictionary[TKey,TValue](System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,TValue]]) +Microsoft.FSharp.Collections.CollectionExtensions: T[,] CreateArray2D[a,T](System.Collections.Generic.IEnumerable`1[a]) Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] FromFunction[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int32]]) Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] NonStructural$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,System.Boolean]]) Microsoft.FSharp.Collections.ComparisonIdentity: System.Collections.Generic.IComparer`1[T] NonStructural[T]() @@ -621,6 +625,8 @@ Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.AsyncReturn T Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.FSharpAsync`1[T] MakeAsync[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Control.AsyncActivation`1[T],Microsoft.FSharp.Control.AsyncReturn]) Microsoft.FSharp.Control.BackgroundTaskBuilder: System.Threading.Tasks.Task`1[T] RunDynamic[T](Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T]) Microsoft.FSharp.Control.BackgroundTaskBuilder: System.Threading.Tasks.Task`1[T] Run[T](Microsoft.FSharp.Core.CompilerServices.ResumableCode`2[Microsoft.FSharp.Control.TaskStateMachineData`1[T],T]) +Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsyncBuilder DefaultAsyncBuilder +Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsyncBuilder get_DefaultAsyncBuilder() Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] AsyncWrite(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[System.Byte[]] AsyncReadBytes(System.IO.Stream, Int32) Microsoft.FSharp.Control.CommonExtensions: Microsoft.FSharp.Control.FSharpAsync`1[System.Int32] AsyncRead(System.IO.Stream, Byte[], Microsoft.FSharp.Core.FSharpOption`1[System.Int32], Microsoft.FSharp.Core.FSharpOption`1[System.Int32]) @@ -731,6 +737,7 @@ Microsoft.FSharp.Control.IDelegateEvent`1[TDelegate]: Void RemoveHandler(TDelega Microsoft.FSharp.Control.LazyExtensions: System.Lazy`1[T] CreateFromValue[T](T) Microsoft.FSharp.Control.LazyExtensions: System.Lazy`1[T] Create[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T]) Microsoft.FSharp.Control.LazyExtensions: T Force[T](System.Lazy`1[T]) +Microsoft.FSharp.Control.LazyExtensions: T LazyPattern[T](System.Lazy`1[T]) Microsoft.FSharp.Control.ObservableModule: System.IDisposable Subscribe[T](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.Unit], System.IObservable`1[T]) Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[System.Tuple`2[T,T]] Pairwise[T](System.IObservable`1[T]) Microsoft.FSharp.Control.ObservableModule: System.IObservable`1[TResult] Choose[T,TResult](Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpOption`1[TResult]], System.IObservable`1[T]) @@ -1631,6 +1638,8 @@ Microsoft.FSharp.Core.Operators+ArrayExtensions: Int32 [,]`1.GetReverseIndex[T]( Microsoft.FSharp.Core.Operators+ArrayExtensions: Int32 []`1.GetReverseIndex[T](T[], Int32, Int32) Microsoft.FSharp.Core.Operators+Checked: Byte ToByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) Microsoft.FSharp.Core.Operators+Checked: Byte ToByte[T](T) +Microsoft.FSharp.Core.Operators+Checked: Byte ToUInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) +Microsoft.FSharp.Core.Operators+Checked: Byte ToUInt8[T](T) Microsoft.FSharp.Core.Operators+Checked: Char ToChar$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Char], T) Microsoft.FSharp.Core.Operators+Checked: Char ToChar[T](T) Microsoft.FSharp.Core.Operators+Checked: Int16 ToInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int16], T) @@ -1643,6 +1652,8 @@ Microsoft.FSharp.Core.Operators+Checked: Int64 ToInt64$W[T](Microsoft.FSharp.Cor Microsoft.FSharp.Core.Operators+Checked: Int64 ToInt64[T](T) Microsoft.FSharp.Core.Operators+Checked: IntPtr ToIntPtr$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.IntPtr], T) Microsoft.FSharp.Core.Operators+Checked: IntPtr ToIntPtr[T](T) +Microsoft.FSharp.Core.Operators+Checked: SByte ToInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) +Microsoft.FSharp.Core.Operators+Checked: SByte ToInt8[T](T) Microsoft.FSharp.Core.Operators+Checked: SByte ToSByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) Microsoft.FSharp.Core.Operators+Checked: SByte ToSByte[T](T) Microsoft.FSharp.Core.Operators+Checked: T op_UnaryNegation$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,T], T) @@ -1798,12 +1809,16 @@ Microsoft.FSharp.Core.Operators: Boolean op_LessThanOrEqual[T](T, T) Microsoft.FSharp.Core.Operators: Boolean op_LessThan[T](T, T) Microsoft.FSharp.Core.Operators: Byte ToByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) Microsoft.FSharp.Core.Operators: Byte ToByte[T](T) +Microsoft.FSharp.Core.Operators: Byte ToUInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Byte], T) +Microsoft.FSharp.Core.Operators: Byte ToUInt8[T](T) Microsoft.FSharp.Core.Operators: Char ToChar$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Char], T) Microsoft.FSharp.Core.Operators: Char ToChar[T](T) Microsoft.FSharp.Core.Operators: Double Infinity Microsoft.FSharp.Core.Operators: Double NaN Microsoft.FSharp.Core.Operators: Double ToDouble$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Double], T) Microsoft.FSharp.Core.Operators: Double ToDouble[T](T) +Microsoft.FSharp.Core.Operators: Double double$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Double], T) +Microsoft.FSharp.Core.Operators: Double double[T](T) Microsoft.FSharp.Core.Operators: Double get_Infinity() Microsoft.FSharp.Core.Operators: Double get_NaN() Microsoft.FSharp.Core.Operators: Int16 ToInt16$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Int16], T) @@ -1833,6 +1848,8 @@ Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+Checked Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+NonStructuralComparison Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+OperatorIntrinsics Microsoft.FSharp.Core.Operators: Microsoft.FSharp.Core.Operators+Unchecked +Microsoft.FSharp.Core.Operators: SByte ToInt8$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) +Microsoft.FSharp.Core.Operators: SByte ToInt8[T](T) Microsoft.FSharp.Core.Operators: SByte ToSByte$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.SByte], T) Microsoft.FSharp.Core.Operators: SByte ToSByte[T](T) Microsoft.FSharp.Core.Operators: Single InfinitySingle @@ -1841,6 +1858,8 @@ Microsoft.FSharp.Core.Operators: Single ToSingle$W[T](Microsoft.FSharp.Core.FSha Microsoft.FSharp.Core.Operators: Single ToSingle[T](T) Microsoft.FSharp.Core.Operators: Single get_InfinitySingle() Microsoft.FSharp.Core.Operators: Single get_NaNSingle() +Microsoft.FSharp.Core.Operators: Single single$W[T](Microsoft.FSharp.Core.FSharpFunc`2[T,System.Single], T) +Microsoft.FSharp.Core.Operators: Single single[T](T) Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] CreateSequence[T](System.Collections.Generic.IEnumerable`1[T]) Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_Range$W[T](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,T], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[T,T]], T, T) Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_RangeStep$W[T,TStep](Microsoft.FSharp.Core.FSharpFunc`2[Microsoft.FSharp.Core.Unit,TStep], Microsoft.FSharp.Core.FSharpFunc`2[T,Microsoft.FSharp.Core.FSharpFunc`2[TStep,T]], T, TStep, T) diff --git a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fs b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fs index 44a0f9fdaaf1..f18ebea9fc37 100644 --- a/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fs +++ b/tests/benchmarks/FCSBenchmarks/CompilerServiceBenchmarks/CompilerServiceBenchmarks.fs @@ -86,7 +86,7 @@ type CompilerServiceBenchmarks() = ApplyLineDirectives = false IndentationAwareSyntax = None StrictIndentation = None - CompilingFSharpCore = false + compilingCoreLibrary = false IsExe = false }