@@ -2882,15 +2882,15 @@ and NonLocalEntityRef =
28822882
28832883/// Try to find the entity corresponding to the given path in the given CCU
28842884static member TryDerefEntityPath ( ccu : CcuThunk , path : string [], i : int , entity : Entity ) =
2885- if i>= path.Lengththen VSome entity
2885+ if i>= path.Lengththen ValueSome entity
28862886else
28872887let next = entity.ModuleOrNamespaceType.AllEntitiesByCompiledAndLogicalMangledNames.TryFind( path.[ i])
28882888match nextwith
28892889| Some res-> NonLocalEntityRef.TryDerefEntityPath( ccu, path, ( i+ 1 ), res)
28902890#if ! NO_ EXTENSIONTYPING
28912891| None-> NonLocalEntityRef.TryDerefEntityPathViaProvidedType( ccu, path, i, entity)
28922892#else
2893- | None-> VNone
2893+ | None-> ValueNone
28942894#endif
28952895
28962896#if ! NO_ EXTENSIONTYPING
@@ -2908,11 +2908,11 @@ and NonLocalEntityRef =
29082908// types until i = path.Length-1. Create the Tycon's as needed
29092909let rec tryResolveNestedTypeOf ( parentEntity : Entity , resolutionEnvironment , st : Tainted < ProvidedType >, i ) =
29102910match st.PApply(( fun st -> st.GetNestedType path.[ i]), m) with
2911- | Tainted.Null-> VNone
2911+ | Tainted.Null-> ValueNone
29122912| st->
29132913let newEntity = Construct.NewProvidedTycon( resolutionEnvironment, st, ccu.ImportProvidedType, false , m)
29142914 parentEntity.ModuleOrNamespaceType.AddProvidedTypeEntity( newEntity)
2915- if i= path.Length-1 then VSome ( newEntity)
2915+ if i= path.Length-1 then ValueSome ( newEntity)
29162916else tryResolveNestedTypeOf( newEntity, resolutionEnvironment, st, i+ 1 )
29172917
29182918 tryResolveNestedTypeOf( entity, resolutionEnvironment, st, i)
@@ -2970,18 +2970,18 @@ and NonLocalEntityRef =
29702970// newEntity is at 'j'
29712971 NonLocalEntityRef.TryDerefEntityPath( ccu, path, ( j+ 1 ), newEntity)
29722972
2973- | [] -> VNone
2973+ | [] -> ValueNone
29742974| _ -> failwith" Unexpected"
29752975
29762976let rec tryResolvePrefixes j =
2977- if j>= path.Lengththen VNone
2977+ if j>= path.Lengththen ValueNone
29782978else match tryResolvePrefix jwith
2979- | VNone -> tryResolvePrefixes( j+ 1 )
2980- | VSome res-> VSome res
2979+ | ValueNone -> tryResolvePrefixes( j+ 1 )
2980+ | ValueSome res-> ValueSome res
29812981
29822982 tryResolvePrefixes i
29832983
2984- | _ -> VNone
2984+ | _ -> ValueNone
29852985#endif
29862986
29872987/// Try to link a non-local entity reference to an actual entity
@@ -2990,11 +2990,11 @@ and NonLocalEntityRef =
29902990if canErrorthen
29912991 ccu.EnsureDerefable( path)
29922992
2993- if ccu.IsUnresolvedReferencethen VNone else
2993+ if ccu.IsUnresolvedReferencethen ValueNone else
29942994
29952995match NonLocalEntityRef.TryDerefEntityPath( ccu, path, 0 , ccu.Contents) with
2996- | VSome _ as r-> r
2997- | VNone ->
2996+ | ValueSome _ as r-> r
2997+ | ValueNone ->
29982998// OK, the lookup failed. Check if we can redirect through a type forwarder on this assembly.
29992999// Look for a forwarder for each prefix-path
30003000let rec tryForwardPrefixPath i =
@@ -3004,7 +3004,7 @@ and NonLocalEntityRef =
30043004| Some tcref-> NonLocalEntityRef.TryDerefEntityPath( ccu, path, ( i+ 1 ), tcref.Deref)
30053005| None-> tryForwardPrefixPath( i+ 1 )
30063006else
3007- VNone
3007+ ValueNone
30083008 tryForwardPrefixPath0
30093009
30103010/// Get the CCU referenced by the nonlocal reference.
@@ -3036,8 +3036,8 @@ and NonLocalEntityRef =
30363036/// Dereference the nonlocal reference, and raise an error if this fails.
30373037member nleref.Deref =
30383038match nleref.TryDeref( canError= true ) with
3039- | VSome res-> res
3040- | VNone ->
3039+ | ValueSome res-> res
3040+ | ValueNone ->
30413041 errorR( InternalUndefinedItemRef( FSComp.SR.tastUndefinedItemRefModuleNamespace, nleref.DisplayName, nleref.AssemblyName, " <some module on this path>" ))
30423042 raise( KeyNotFoundException())
30433043
@@ -3067,9 +3067,9 @@ and
30673067member private tcr.Resolve ( canError ) =
30683068let res = tcr.nlr.TryDeref( canError)
30693069match reswith
3070- | VSome r->
3070+ | ValueSome r->
30713071 tcr.binding<- nullableSlotFull r
3072- | VNone ->
3072+ | ValueNone ->
30733073()
30743074
30753075/// Dereference the TyconRef to a Tycon. Amortize the cost of doing this.
@@ -3090,11 +3090,11 @@ and
30903090| null ->
30913091 tcr.Resolve( canError= false )
30923092match box tcr.bindingwith
3093- | null -> VNone
3094- | _ -> VSome tcr.binding
3093+ | null -> ValueNone
3094+ | _ -> ValueSome tcr.binding
30953095
30963096| _ ->
3097- VSome tcr.binding
3097+ ValueSome tcr.binding
30983098
30993099/// Is the destination assembly available?
31003100member tcr.CanDeref = tcr.TryDeref.IsSome
@@ -3417,8 +3417,8 @@ and
34173417let e = nlr.EnclosingEntity.Deref
34183418let possible = e.ModuleOrNamespaceType.TryLinkVal( nlr.EnclosingEntity.nlr.Ccu, nlr.ItemKey)
34193419match possiblewith
3420- | VNone -> error( InternalUndefinedItemRef( FSComp.SR.tastUndefinedItemRefVal, e.DisplayNameWithStaticParameters, nlr.AssemblyName, sprintf" %+A " nlr.ItemKey.PartialKey))
3421- | VSome h-> h
3420+ | ValueNone -> error( InternalUndefinedItemRef( FSComp.SR.tastUndefinedItemRefVal, e.DisplayNameWithStaticParameters, nlr.AssemblyName, sprintf" %+A " nlr.ItemKey.PartialKey))
3421+ | ValueSome h-> h
34223422 vr.binding<- nullableSlotFull res
34233423 res
34243424else vr.binding
@@ -3428,14 +3428,14 @@ and
34283428if obj.ReferenceEquals( vr.binding, null ) then
34293429let resOpt =
34303430match vr.nlr.EnclosingEntity.TryDerefwith
3431- | VNone -> VNone
3432- | VSome e-> e.ModuleOrNamespaceType.TryLinkVal( vr.nlr.EnclosingEntity.nlr.Ccu, vr.nlr.ItemKey)
3431+ | ValueNone -> ValueNone
3432+ | ValueSome e-> e.ModuleOrNamespaceType.TryLinkVal( vr.nlr.EnclosingEntity.nlr.Ccu, vr.nlr.ItemKey)
34333433match resOptwith
3434- | VNone -> ()
3435- | VSome res->
3434+ | ValueNone -> ()
3435+ | ValueSome res->
34363436 vr.binding<- nullableSlotFull res
34373437 resOpt
3438- else VSome vr.binding
3438+ else ValueSome vr.binding
34393439
34403440/// The type of the value. May be a TType_forall for a generic value.
34413441/// May be a type variable or type containing type variables during type inference.