diff --git a/src/absil/illib.fs b/src/absil/illib.fs index a1adb372e98..8e8d8785952 100644 --- a/src/absil/illib.fs +++ b/src/absil/illib.fs @@ -448,16 +448,16 @@ module List = [] type ValueOption<'T> = - | VSome of 'T - | VNone - member x.IsSome = match x with VSome _ -> true | VNone -> false - member x.IsNone = match x with VSome _ -> false | VNone -> true - member x.Value = match x with VSome r -> r | VNone -> failwith "ValueOption.Value: value is None" + | ValueSome of 'T + | ValueNone + member x.IsSome = match x with ValueSome _ -> true | ValueNone -> false + member x.IsNone = match x with ValueSome _ -> false | ValueNone -> true + member x.Value = match x with ValueSome r -> r | ValueNone -> failwith "ValueOption.Value: value is None" [] module ValueOption = - let inline ofOption x = match x with Some x -> VSome x | None -> VNone - let inline bind f x = match x with VSome x -> f x | VNone -> VNone + let inline ofOption x = match x with Some x -> ValueSome x | None -> ValueNone + let inline bind f x = match x with ValueSome x -> f x | ValueNone -> ValueNone module String = let indexNotFound() = raise (new KeyNotFoundException("An index for the character was not found in the string")) diff --git a/src/fsharp/AttributeChecking.fs b/src/fsharp/AttributeChecking.fs index b0ac9faaf88..55948ca5203 100644 --- a/src/fsharp/AttributeChecking.fs +++ b/src/fsharp/AttributeChecking.fs @@ -511,7 +511,7 @@ let IsSecurityAttribute (g: TcGlobals) amap (casmap : Dictionary) ( | None -> false | Some attr -> match attr.TyconRef.TryDeref with - | VSome _ -> + | ValueSome _ -> let tcs = tcref.Stamp match casmap.TryGetValue(tcs) with | true, c -> c @@ -519,7 +519,7 @@ let IsSecurityAttribute (g: TcGlobals) amap (casmap : Dictionary) ( let exists = ExistsInEntireHierarchyOfType (fun t -> typeEquiv g t (mkAppTy attr.TyconRef [])) g amap m AllowMultiIntfInstantiations.Yes (mkAppTy tcref []) casmap.[tcs] <- exists exists - | VNone -> false + | ValueNone -> false let IsSecurityCriticalAttribute g (Attrib(tcref, _, _, _, _, _, _)) = (tyconRefEq g tcref g.attrib_SecurityCriticalAttribute.TyconRef || tyconRefEq g tcref g.attrib_SecuritySafeCriticalAttribute.TyconRef) diff --git a/src/fsharp/FSharp.Core/prim-types.fs b/src/fsharp/FSharp.Core/prim-types.fs index bb79e0f84d7..f082a2a26cc 100644 --- a/src/fsharp/FSharp.Core/prim-types.fs +++ b/src/fsharp/FSharp.Core/prim-types.fs @@ -2972,7 +2972,6 @@ namespace Microsoft.FSharp.Core and 'T option = Option<'T> - [] [] [] @@ -2980,6 +2979,17 @@ namespace Microsoft.FSharp.Core | Ok of ResultValue:'T | Error of ErrorValue:'TError + [] + [] + [] + type ValueOption<'T> = + | ValueNone : 'T voption + | ValueSome : 'T -> 'T voption + + member x.Value = match x with ValueSome x -> x | ValueNone -> raise (new System.InvalidOperationException("ValueOption.Value")) + + + and 'T voption = ValueOption<'T> namespace Microsoft.FSharp.Collections @@ -3345,11 +3355,11 @@ namespace Microsoft.FSharp.Core let (^) (s1: string) (s2: string) = System.String.Concat(s1, s2) - [] - [] let defaultArg arg defaultValue = match arg with None -> defaultValue | Some v -> v + [] + let defaultValueArg arg defaultValue = match arg with ValueNone -> defaultValue | ValueSome v -> v [] let inline (~-) (n: ^T) : ^T = diff --git a/src/fsharp/FSharp.Core/prim-types.fsi b/src/fsharp/FSharp.Core/prim-types.fsi index 9e9bb34c2ba..599e0b0ffea 100644 --- a/src/fsharp/FSharp.Core/prim-types.fsi +++ b/src/fsharp/FSharp.Core/prim-types.fsi @@ -1733,6 +1733,33 @@ namespace Microsoft.FSharp.Core /// due to the use of null as a value representation. and 'T option = Option<'T> + /// The type of optional values, represented as structs. + /// + /// Use the constructors ValueSome and ValueNone to create values of this type. + /// Use the values in the ValueOption module to manipulate values of this type, + /// or pattern match against the values directly. + [] + [] + [] + type ValueOption<'T> = + /// The representation of "No value" + | ValueNone: 'T voption + + /// The representation of "Value of type 'T" + /// The input value. + /// An option representing the value. + | ValueSome: 'T -> 'T voption + + /// Get the value of a 'ValueSome' option. An InvalidOperationException is raised if the option is 'ValueNone'. + member Value : 'T + + /// The type of optional values, represented as structs. + /// + /// Use the constructors ValueSome and ValueNone to create values of this type. + /// Use the values in the ValueOption module to manipulate values of this type, + /// or pattern match against the values directly. + and 'T voption = ValueOption<'T> + /// Helper type for error handling without exceptions. [] [] @@ -1998,6 +2025,13 @@ namespace Microsoft.FSharp.Core [] val defaultArg : arg:'T option -> defaultValue:'T -> 'T + /// Used to specify a default value for an optional argument in the implementation of a function + /// A value option representing the argument. + /// The default value of the argument. + /// The argument value. If it is None, the defaultValue is returned. + [] + val defaultValueArg : arg:'T voption -> defaultValue:'T -> 'T + /// Concatenate two strings. The operator '+' may also be used. [] val (^): s1:string -> s2:string -> string diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index e93708737d9..eac580fddc7 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -714,11 +714,11 @@ let AddStorageForVal (g: TcGlobals) (v,s) eenv = | None -> eenv | Some vref -> match vref.TryDeref with - | VNone -> + | ValueNone -> //let msg = sprintf "could not dereference external value reference to something in FSharp.Core.dll during code generation, v.MangledName = '%s', v.Range = %s" v.MangledName (stringOfRange v.Range) //System.Diagnostics.Debug.Assert(false, msg) eenv - | VSome gv -> + | ValueSome gv -> { eenv with valsInScope = eenv.valsInScope.Add gv s } else eenv diff --git a/src/fsharp/NameResolution.fs b/src/fsharp/NameResolution.fs index ce0d34a1c2c..e354ba2b1fd 100644 --- a/src/fsharp/NameResolution.fs +++ b/src/fsharp/NameResolution.fs @@ -249,8 +249,8 @@ type Item = let valRefHash (vref: ValRef) = match vref.TryDeref with - | VNone -> 0 - | VSome v -> LanguagePrimitives.PhysicalHash v + | ValueNone -> 0 + | ValueSome v -> LanguagePrimitives.PhysicalHash v [] /// Pairs an Item with a TyparInst showing how generic type variables of the item are instantiated at diff --git a/src/fsharp/TastOps.fs b/src/fsharp/TastOps.fs index 4d35987749e..f820d60c26c 100644 --- a/src/fsharp/TastOps.fs +++ b/src/fsharp/TastOps.fs @@ -6324,9 +6324,9 @@ let mkCallLiftValueWithName (g:TcGlobals) m ty nm e1 = let vref = ValRefForIntrinsic g.lift_value_with_name_info // Use "Expr.ValueWithName" if it exists in FSharp.Core match vref.TryDeref with - | VSome _ -> + | ValueSome _ -> mkApps g (typedExprForIntrinsic g m g.lift_value_with_name_info , [[ty]], [mkRefTupledNoTypes g m [e1; mkString g m nm]], m) - | VNone -> + | ValueNone -> mkApps g (typedExprForIntrinsic g m g.lift_value_info , [[ty]], [e1], m) let mkCallLiftValueWithDefn g m qty e1 = @@ -6335,11 +6335,11 @@ let mkCallLiftValueWithDefn g m qty e1 = let vref = ValRefForIntrinsic g.lift_value_with_defn_info // Use "Expr.WithValue" if it exists in FSharp.Core match vref.TryDeref with - | VSome _ -> + | ValueSome _ -> let copyOfExpr = copyExpr g ValCopyFlag.CloneAll e1 let quoteOfCopyOfExpr = Expr.Quote(copyOfExpr, ref None, false, m, qty) mkApps g (typedExprForIntrinsic g m g.lift_value_with_defn_info , [[ty]], [mkRefTupledNoTypes g m [e1; quoteOfCopyOfExpr]], m) - | VNone -> + | ValueNone -> Expr.Quote(e1, ref None, false, m, qty) let mkCallCheckThis g m ty e1 = diff --git a/src/fsharp/TypeChecker.fs b/src/fsharp/TypeChecker.fs index 979b826605f..3d833d5aab7 100755 --- a/src/fsharp/TypeChecker.fs +++ b/src/fsharp/TypeChecker.fs @@ -16879,8 +16879,8 @@ let ApplyAssemblyLevelAutoOpenAttributeToTcEnv g amap (ccu: CcuThunk) scopem env let h, t = List.frontAndBack p let modref = mkNonLocalTyconRef (mkNonLocalEntityRef ccu (Array.ofList h)) t match modref.TryDeref with - | VNone -> warn() - | VSome _ -> + | ValueNone -> warn() + | ValueSome _ -> let openDecl = OpenDeclaration.Create ([], [modref], scopem, false) OpenModulesOrNamespaces TcResultsSink.NoSink g amap scopem root env [modref] openDecl diff --git a/src/fsharp/infos.fs b/src/fsharp/infos.fs index 192254a9d60..42a7bebfa56 100755 --- a/src/fsharp/infos.fs +++ b/src/fsharp/infos.fs @@ -1096,7 +1096,7 @@ type MethInfo = | ILMeth(_,ilmeth,_) -> ilmeth.IsClassConstructor | FSMeth(_,_,vref,_) -> match vref.TryDeref with - | VSome x -> x.IsClassConstructor + | ValueSome x -> x.IsClassConstructor | _ -> false | DefaultStructCtor _ -> false #if !NO_EXTENSIONTYPING diff --git a/src/fsharp/tast.fs b/src/fsharp/tast.fs index 2910388fd5e..9807de6f604 100644 --- a/src/fsharp/tast.fs +++ b/src/fsharp/tast.fs @@ -2882,7 +2882,7 @@ and NonLocalEntityRef = /// Try to find the entity corresponding to the given path in the given CCU static member TryDerefEntityPath(ccu: CcuThunk, path:string[], i:int, entity:Entity) = - if i >= path.Length then VSome entity + if i >= path.Length then ValueSome entity else let next = entity.ModuleOrNamespaceType.AllEntitiesByCompiledAndLogicalMangledNames.TryFind(path.[i]) match next with @@ -2890,7 +2890,7 @@ and NonLocalEntityRef = #if !NO_EXTENSIONTYPING | None -> NonLocalEntityRef.TryDerefEntityPathViaProvidedType(ccu, path, i, entity) #else - | None -> VNone + | None -> ValueNone #endif #if !NO_EXTENSIONTYPING @@ -2908,11 +2908,11 @@ and NonLocalEntityRef = // types until i = path.Length-1. Create the Tycon's as needed let rec tryResolveNestedTypeOf(parentEntity:Entity,resolutionEnvironment,st:Tainted,i) = match st.PApply((fun st -> st.GetNestedType path.[i]),m) with - | Tainted.Null -> VNone + | Tainted.Null -> ValueNone | st -> let newEntity = Construct.NewProvidedTycon(resolutionEnvironment, st, ccu.ImportProvidedType, false, m) parentEntity.ModuleOrNamespaceType.AddProvidedTypeEntity(newEntity) - if i = path.Length-1 then VSome(newEntity) + if i = path.Length-1 then ValueSome(newEntity) else tryResolveNestedTypeOf(newEntity,resolutionEnvironment,st,i+1) tryResolveNestedTypeOf(entity,resolutionEnvironment,st,i) @@ -2970,18 +2970,18 @@ and NonLocalEntityRef = // newEntity is at 'j' NonLocalEntityRef.TryDerefEntityPath(ccu, path, (j+1), newEntity) - | [] -> VNone + | [] -> ValueNone | _ -> failwith "Unexpected" let rec tryResolvePrefixes j = - if j >= path.Length then VNone + if j >= path.Length then ValueNone else match tryResolvePrefix j with - | VNone -> tryResolvePrefixes (j+1) - | VSome res -> VSome res + | ValueNone -> tryResolvePrefixes (j+1) + | ValueSome res -> ValueSome res tryResolvePrefixes i - | _ -> VNone + | _ -> ValueNone #endif /// Try to link a non-local entity reference to an actual entity @@ -2990,11 +2990,11 @@ and NonLocalEntityRef = if canError then ccu.EnsureDerefable(path) - if ccu.IsUnresolvedReference then VNone else + if ccu.IsUnresolvedReference then ValueNone else match NonLocalEntityRef.TryDerefEntityPath(ccu, path, 0, ccu.Contents) with - | VSome _ as r -> r - | VNone -> + | ValueSome _ as r -> r + | ValueNone -> // OK, the lookup failed. Check if we can redirect through a type forwarder on this assembly. // Look for a forwarder for each prefix-path let rec tryForwardPrefixPath i = @@ -3004,7 +3004,7 @@ and NonLocalEntityRef = | Some tcref -> NonLocalEntityRef.TryDerefEntityPath(ccu, path, (i+1), tcref.Deref) | None -> tryForwardPrefixPath (i+1) else - VNone + ValueNone tryForwardPrefixPath 0 /// Get the CCU referenced by the nonlocal reference. @@ -3036,8 +3036,8 @@ and NonLocalEntityRef = /// Dereference the nonlocal reference, and raise an error if this fails. member nleref.Deref = match nleref.TryDeref(canError=true) with - | VSome res -> res - | VNone -> + | ValueSome res -> res + | ValueNone -> errorR (InternalUndefinedItemRef (FSComp.SR.tastUndefinedItemRefModuleNamespace, nleref.DisplayName, nleref.AssemblyName, "")) raise (KeyNotFoundException()) @@ -3067,9 +3067,9 @@ and member private tcr.Resolve(canError) = let res = tcr.nlr.TryDeref(canError) match res with - | VSome r -> + | ValueSome r -> tcr.binding <- nullableSlotFull r - | VNone -> + | ValueNone -> () /// Dereference the TyconRef to a Tycon. Amortize the cost of doing this. @@ -3090,11 +3090,11 @@ and | null -> tcr.Resolve(canError=false) match box tcr.binding with - | null -> VNone - | _ -> VSome tcr.binding + | null -> ValueNone + | _ -> ValueSome tcr.binding | _ -> - VSome tcr.binding + ValueSome tcr.binding /// Is the destination assembly available? member tcr.CanDeref = tcr.TryDeref.IsSome @@ -3417,8 +3417,8 @@ and let e = nlr.EnclosingEntity.Deref let possible = e.ModuleOrNamespaceType.TryLinkVal(nlr.EnclosingEntity.nlr.Ccu, nlr.ItemKey) match possible with - | VNone -> error (InternalUndefinedItemRef (FSComp.SR.tastUndefinedItemRefVal, e.DisplayNameWithStaticParameters, nlr.AssemblyName, sprintf "%+A" nlr.ItemKey.PartialKey)) - | VSome h -> h + | ValueNone -> error (InternalUndefinedItemRef (FSComp.SR.tastUndefinedItemRefVal, e.DisplayNameWithStaticParameters, nlr.AssemblyName, sprintf "%+A" nlr.ItemKey.PartialKey)) + | ValueSome h -> h vr.binding <- nullableSlotFull res res else vr.binding @@ -3428,14 +3428,14 @@ and if obj.ReferenceEquals(vr.binding, null) then let resOpt = match vr.nlr.EnclosingEntity.TryDeref with - | VNone -> VNone - | VSome e -> e.ModuleOrNamespaceType.TryLinkVal(vr.nlr.EnclosingEntity.nlr.Ccu, vr.nlr.ItemKey) + | ValueNone -> ValueNone + | ValueSome e -> e.ModuleOrNamespaceType.TryLinkVal(vr.nlr.EnclosingEntity.nlr.Ccu, vr.nlr.ItemKey) match resOpt with - | VNone -> () - | VSome res -> + | ValueNone -> () + | ValueSome res -> vr.binding <- nullableSlotFull res resOpt - else VSome vr.binding + else ValueSome vr.binding /// The type of the value. May be a TType_forall for a generic value. /// May be a type variable or type containing type variables during type inference. diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/OptionModule.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/OptionModule.fs index d5b3bbc2e95..5726775deff 100644 --- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/OptionModule.fs +++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Core/OptionModule.fs @@ -215,4 +215,37 @@ type OptionModule() = member this.MapBindEquivalenceProperties () = let fn x = x + 3 Assert.AreEqual(Option.map fn None, Option.bind (fn >> Some) None) - Assert.AreEqual(Option.map fn (Some 5), Option.bind (fn >> Some) (Some 5)) \ No newline at end of file + Assert.AreEqual(Option.map fn (Some 5), Option.bind (fn >> Some) (Some 5)) + +[] +type ValueOptionTests() = + + let assertWasNotCalledThunk () = raise (exn "Thunk should not have been called.") + + [] + member this.ValueOptionBasics () = + Assert.AreEqual( (ValueNone: int voption), (ValueNone: int voption)) + Assert.True( (ValueNone: int voption) <= (ValueNone: int voption)) + Assert.True( (ValueNone: int voption) >= (ValueNone: int voption)) + Assert.True( (ValueNone: int voption) < (ValueSome 1: int voption)) + Assert.True( (ValueSome 0: int voption) < (ValueSome 1: int voption)) + Assert.True( (ValueSome 1: int voption) > (ValueSome 0: int voption)) + Assert.False( (ValueSome 1: int voption) < (ValueNone : int voption)) + Assert.True( (ValueSome 1: int voption) <= (ValueSome 1: int voption)) + Assert.AreEqual( compare (ValueSome 1) (ValueSome 1), 0) + Assert.True( compare (ValueSome 0) (ValueSome 1) < 0) + Assert.True( compare (ValueNone: int voption) (ValueSome 1) < 0) + Assert.True( compare (ValueSome 1) (ValueNone : int voption) > 0) + Assert.AreEqual( ValueSome 1, ValueSome 1) + Assert.AreNotEqual( ValueSome 2, ValueSome 1) + Assert.AreEqual( ValueSome 2, ValueSome 2) + Assert.AreEqual( ValueSome (ValueSome 2), ValueSome (ValueSome 2)) + Assert.AreNotEqual( ValueSome (ValueSome 2), ValueSome (ValueSome 1)) + Assert.AreNotEqual( ValueSome (ValueSome 0), ValueSome ValueNone) + Assert.AreEqual( ValueSome (ValueNone: int voption), ValueSome (ValueNone: int voption)) + Assert.AreEqual( (ValueSome (ValueNone: int voption)).Value, (ValueNone: int voption)) + Assert.AreEqual( (ValueSome 1).Value, 1) + Assert.AreEqual( (ValueSome (1,2)).Value, (1,2)) + Assert.AreEqual(defaultValueArg ValueNone 1, 1) + Assert.AreEqual(defaultValueArg (ValueSome 3) 1, 3) + diff --git a/tests/FSharp.Core.UnitTests/SurfaceArea.coreclr.fs b/tests/FSharp.Core.UnitTests/SurfaceArea.coreclr.fs index c9738c1b8ba..da6c7183ac6 100644 --- a/tests/FSharp.Core.UnitTests/SurfaceArea.coreclr.fs +++ b/tests/FSharp.Core.UnitTests/SurfaceArea.coreclr.fs @@ -2116,6 +2116,36 @@ Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T ResultValue Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T get_ResultValue() Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError ErrorValue Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError get_ErrorValue() +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Boolean Equals(System.Object) +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 GetHashCode() +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueNone +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueSome +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: System.String ToString() +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: System.Type GetType() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(Microsoft.FSharp.Core.FSharpValueOption`1[T]) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpValueOption`1[T]) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object, System.Collections.IComparer) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode(System.Collections.IEqualityComparer) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 Tag +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 get_Tag() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T] +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] ValueNone +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueNone +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueSome +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueNone() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueSome() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] NewValueSome(T) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] get_ValueNone() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: System.String ToString() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: System.Type GetType() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Item +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Value +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Item() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Value() Microsoft.FSharp.Core.FSharpTypeFunc: Boolean Equals(System.Object) Microsoft.FSharp.Core.FSharpTypeFunc: Int32 GetHashCode() Microsoft.FSharp.Core.FSharpTypeFunc: System.Object Specialize[T]() @@ -2544,6 +2574,7 @@ Microsoft.FSharp.Core.Operators: T Ceiling[T](T) Microsoft.FSharp.Core.Operators: T Cos[T](T) Microsoft.FSharp.Core.Operators: T Cosh[T](T) Microsoft.FSharp.Core.Operators: T DefaultArg[T](Microsoft.FSharp.Core.FSharpOption`1[T], T) +Microsoft.FSharp.Core.Operators: T DefaultValueArg[T](Microsoft.FSharp.Core.FSharpValueOption`1[T], T) Microsoft.FSharp.Core.Operators: T Exit[T](Int32) Microsoft.FSharp.Core.Operators: T Exp[T](T) Microsoft.FSharp.Core.Operators: T FailWith[T](System.String) diff --git a/tests/FSharp.Core.UnitTests/SurfaceArea.net40.fs b/tests/FSharp.Core.UnitTests/SurfaceArea.net40.fs index 27527ff429a..8ac8b72dc33 100644 --- a/tests/FSharp.Core.UnitTests/SurfaceArea.net40.fs +++ b/tests/FSharp.Core.UnitTests/SurfaceArea.net40.fs @@ -2196,6 +2196,36 @@ Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T ResultValue Microsoft.FSharp.Core.FSharpResult`2[T,TError]: T get_ResultValue() Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError ErrorValue Microsoft.FSharp.Core.FSharpResult`2[T,TError]: TError get_ErrorValue() +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Boolean Equals(System.Object) +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 GetHashCode() +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueNone +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: Int32 ValueSome +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: System.String ToString() +Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T]: System.Type GetType() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(Microsoft.FSharp.Core.FSharpValueOption`1[T]) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean Equals(System.Object, System.Collections.IEqualityComparer) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(Microsoft.FSharp.Core.FSharpValueOption`1[T]) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 CompareTo(System.Object, System.Collections.IComparer) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 GetHashCode(System.Collections.IEqualityComparer) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 Tag +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Int32 get_Tag() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1+Tags[T] +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] ValueNone +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueNone +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean IsValueSome +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueNone() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Boolean get_IsValueSome() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] NewValueSome(T) +Microsoft.FSharp.Core.FSharpValueOption`1[T]: Microsoft.FSharp.Core.FSharpValueOption`1[T] get_ValueNone() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: System.String ToString() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: System.Type GetType() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Item +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T Value +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Item() +Microsoft.FSharp.Core.FSharpValueOption`1[T]: T get_Value() Microsoft.FSharp.Core.FSharpTypeFunc: Boolean Equals(System.Object) Microsoft.FSharp.Core.FSharpTypeFunc: Int32 GetHashCode() Microsoft.FSharp.Core.FSharpTypeFunc: System.Object Specialize[T]() @@ -2628,8 +2658,8 @@ Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_ Microsoft.FSharp.Core.Operators: System.Collections.Generic.IEnumerable`1[T] op_Range[T](T, T) Microsoft.FSharp.Core.Operators: System.Decimal ToDecimal[T](T) Microsoft.FSharp.Core.Operators: System.Exception Failure(System.String) -Microsoft.FSharp.Core.Operators: System.IO.TextReader ConsoleIn[T]() Microsoft.FSharp.Core.Operators: System.IO.TextWriter ConsoleError[T]() +Microsoft.FSharp.Core.Operators: System.IO.TextReader ConsoleIn[T]() Microsoft.FSharp.Core.Operators: System.IO.TextWriter ConsoleOut[T]() Microsoft.FSharp.Core.Operators: System.Object Box[T](T)" + #if DEBUG @@ -2652,6 +2682,7 @@ Microsoft.FSharp.Core.Operators: T Ceiling[T](T) Microsoft.FSharp.Core.Operators: T Cos[T](T) Microsoft.FSharp.Core.Operators: T Cosh[T](T) Microsoft.FSharp.Core.Operators: T DefaultArg[T](Microsoft.FSharp.Core.FSharpOption`1[T], T) +Microsoft.FSharp.Core.Operators: T DefaultValueArg[T](Microsoft.FSharp.Core.FSharpValueOption`1[T], T) Microsoft.FSharp.Core.Operators: T Exit[T](Int32) Microsoft.FSharp.Core.Operators: T Exp[T](T) Microsoft.FSharp.Core.Operators: T FailWith[T](System.String) diff --git a/tests/fsharpqa/Source/Misc/LongSourceFile01.fs b/tests/fsharpqa/Source/Misc/LongSourceFile01.fs index 0cf4c3e3e84..8d4c0cd35f5 100644 --- a/tests/fsharpqa/Source/Misc/LongSourceFile01.fs +++ b/tests/fsharpqa/Source/Misc/LongSourceFile01.fs @@ -2287,6 +2287,7 @@ Microsoft.FSharp.Core.Operators: T Ceiling[T](T) Microsoft.FSharp.Core.Operators: T Cos[T](T) Microsoft.FSharp.Core.Operators: T Cosh[T](T) Microsoft.FSharp.Core.Operators: T DefaultArg[T](Microsoft.FSharp.Core.FSharpOption`1[T], T) +Microsoft.FSharp.Core.Operators: T DefaultValueArg[T](Microsoft.FSharp.Core.FSharpValueOption`1[T], T) Microsoft.FSharp.Core.Operators: T Exit[T](Int32) Microsoft.FSharp.Core.Operators: T Exp[T](T) Microsoft.FSharp.Core.Operators: T FailWith[T](System.String)