Skip to content

Commit

Permalink
Use recommended postfix notation for generics (#14530)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeeren authored Jan 5, 2023
1 parent 73c9074 commit 1b3f86c
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/Compiler/Driver/CompilerConfig.fs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ type ImportedAssembly =
IsProviderGenerated: bool
mutable TypeProviders: Tainted<ITypeProvider> list
#endif
FSharpOptimizationData: Microsoft.FSharp.Control.Lazy<Option<Optimizer.LazyModuleInfo>>
FSharpOptimizationData: Microsoft.FSharp.Control.Lazy<Optimizer.LazyModuleInfo option>
}

type AvailableImportedAssembly =
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Driver/CompilerImports.fs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ type ImportedAssembly =
IsProviderGenerated: bool
mutable TypeProviders: Tainted<ITypeProvider> list
#endif
FSharpOptimizationData: Microsoft.FSharp.Control.Lazy<Option<Optimizer.LazyModuleInfo>>
FSharpOptimizationData: Microsoft.FSharp.Control.Lazy<Optimizer.LazyModuleInfo option>
}

type AvailableImportedAssembly =
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Driver/CompilerImports.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ type ImportedAssembly =
IsProviderGenerated: bool
mutable TypeProviders: Tainted<ITypeProvider> list
#endif
FSharpOptimizationData: Lazy<Option<LazyModuleInfo>> }
FSharpOptimizationData: Lazy<LazyModuleInfo option> }

/// Tables of assembly resolutions
[<Sealed>]
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Driver/CompilerOptions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ and CompilerOption =
name: string *
argumentDescriptionString: string *
actionSpec: OptionSpec *
deprecationError: Option<exn> *
deprecationError: exn option *
helpText: string option

and CompilerOptionBlock =
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Driver/CompilerOptions.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ and CompilerOption =
name: string *
argumentDescriptionString: string *
actionSpec: OptionSpec *
deprecationError: Option<exn> *
deprecationError: exn option *
helpText: string option

and CompilerOptionBlock =
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Service/FSharpCheckerResults.fs
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ type internal TypeCheckInfo
if p >= 0 then Some p else None

/// Build a CompetionItem
let CompletionItem (ty: ValueOption<TyconRef>) (assemblySymbol: ValueOption<AssemblySymbol>) (item: ItemWithInst) =
let CompletionItem (ty: TyconRef voption) (assemblySymbol: AssemblySymbol voption) (item: ItemWithInst) =
let kind =
match item.Item with
| Item.FakeInterfaceCtor _
Expand Down
4 changes: 2 additions & 2 deletions src/Compiler/TypedTree/TypedTreeOps.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1604,13 +1604,13 @@ type TyconRefMultiMap<'T>(contents: TyconRefMap<'T list>) =
//--------------------------------------------------------------------------

/// Try to create a EntityRef suitable for accessing the given Entity from another assembly
let tryRescopeEntity viewedCcu (entity: Entity) : ValueOption<EntityRef> =
let tryRescopeEntity viewedCcu (entity: Entity) : EntityRef voption =
match entity.PublicPath with
| Some pubpath -> ValueSome (ERefNonLocal (rescopePubPath viewedCcu pubpath))
| None -> ValueNone

/// Try to create a ValRef suitable for accessing the given Val from another assembly
let tryRescopeVal viewedCcu (entityRemap: Remap) (vspec: Val) : ValueOption<ValRef> =
let tryRescopeVal viewedCcu (entityRemap: Remap) (vspec: Val) : ValRef voption =
match vspec.PublicPath with
| Some (ValPubPath(p, fullLinkageKey)) ->
// The type information in the val linkage doesn't need to keep any information to trait solutions.
Expand Down
24 changes: 12 additions & 12 deletions src/Compiler/TypedTree/TypedTreeOps.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ val isTyparTy: TcGlobals -> TType -> bool

val isAnyParTy: TcGlobals -> TType -> bool

val tryAnyParTy: TcGlobals -> TType -> ValueOption<Typar>
val tryAnyParTy: TcGlobals -> TType -> Typar voption

val tryAnyParTyOption: TcGlobals -> TType -> Typar option

Expand All @@ -679,26 +679,26 @@ val isProvenUnionCaseTy: TType -> bool

val isAppTy: TcGlobals -> TType -> bool

val tryAppTy: TcGlobals -> TType -> ValueOption<TyconRef * TypeInst>
val tryAppTy: TcGlobals -> TType -> (TyconRef * TypeInst) voption

val destAppTy: TcGlobals -> TType -> TyconRef * TypeInst

val tcrefOfAppTy: TcGlobals -> TType -> TyconRef

val tryTcrefOfAppTy: TcGlobals -> TType -> ValueOption<TyconRef>
val tryTcrefOfAppTy: TcGlobals -> TType -> TyconRef voption

val tryDestTyparTy: TcGlobals -> TType -> ValueOption<Typar>
val tryDestTyparTy: TcGlobals -> TType -> Typar voption

val tryDestFunTy: TcGlobals -> TType -> ValueOption<TType * TType>
val tryDestFunTy: TcGlobals -> TType -> (TType * TType) voption

val tryDestAnonRecdTy: TcGlobals -> TType -> ValueOption<AnonRecdTypeInfo * TType list>
val tryDestAnonRecdTy: TcGlobals -> TType -> (AnonRecdTypeInfo * TType list) voption

val argsOfAppTy: TcGlobals -> TType -> TypeInst

val mkInstForAppTy: TcGlobals -> TType -> TyparInstantiation

/// Try to get a TyconRef for a type without erasing type abbreviations
val tryNiceEntityRefOfTy: TType -> ValueOption<TyconRef>
val tryNiceEntityRefOfTy: TType -> TyconRef voption

val tryNiceEntityRefOfTyOption: TType -> TyconRef option

Expand Down Expand Up @@ -1089,7 +1089,7 @@ val tagEntityRefName: xref: EntityRef -> name: string -> TaggedText
/// Return the full text for an item as we want it displayed to the user as a fully qualified entity
val fullDisplayTextOfModRef: ModuleOrNamespaceRef -> string

val fullDisplayTextOfParentOfModRef: ModuleOrNamespaceRef -> ValueOption<string>
val fullDisplayTextOfParentOfModRef: ModuleOrNamespaceRef -> string voption

val fullDisplayTextOfValRef: ValRef -> string

Expand Down Expand Up @@ -1303,10 +1303,10 @@ val wrapModuleOrNamespaceTypeInNamespace:
val wrapModuleOrNamespaceType: Ident -> CompilationPath -> ModuleOrNamespaceType -> ModuleOrNamespace

/// Given a namespace, module or type definition, try to produce a reference to that entity.
val tryRescopeEntity: CcuThunk -> Entity -> ValueOption<EntityRef>
val tryRescopeEntity: CcuThunk -> Entity -> EntityRef voption

/// Given a value definition, try to produce a reference to that value. Fails for local values.
val tryRescopeVal: CcuThunk -> Remap -> Val -> ValueOption<ValRef>
val tryRescopeVal: CcuThunk -> Remap -> Val -> ValRef voption

/// Make the substitution (remapping) table for viewing a module or namespace 'from the outside'
///
Expand Down Expand Up @@ -1526,7 +1526,7 @@ val isOptionTy: TcGlobals -> TType -> bool
val destOptionTy: TcGlobals -> TType -> TType

/// Try to take apart an option type
val tryDestOptionTy: TcGlobals -> TType -> ValueOption<TType>
val tryDestOptionTy: TcGlobals -> TType -> TType voption

/// Try to take apart an option type
val destValueOptionTy: TcGlobals -> TType -> TType
Expand All @@ -1535,7 +1535,7 @@ val destValueOptionTy: TcGlobals -> TType -> TType
val isNullableTy: TcGlobals -> TType -> bool

/// Try to take apart a System.Nullable type
val tryDestNullableTy: TcGlobals -> TType -> ValueOption<TType>
val tryDestNullableTy: TcGlobals -> TType -> TType voption

/// Take apart a System.Nullable type
val destNullableTy: TcGlobals -> TType -> TType
Expand Down
6 changes: 3 additions & 3 deletions src/FSharp.Core/result.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ module Result =
/// </code>
/// </example>
[<CompiledName("ToList")>]
val toList: result: Result<'T, 'Error> -> List<'T>
val toList: result: Result<'T, 'Error> -> 'T list

/// <summary>Convert the result to an Option value.</summary>
///
Expand All @@ -296,7 +296,7 @@ module Result =
/// </code>
/// </example>
[<CompiledName("ToOption")>]
val toOption: result: Result<'T, 'Error> -> Option<'T>
val toOption: result: Result<'T, 'Error> -> 'T option

/// <summary>Convert the result to an Option value.</summary>
///
Expand All @@ -311,4 +311,4 @@ module Result =
/// </code>
/// </example>
[<CompiledName("ToValueOption")>]
val toValueOption: result: Result<'T, 'Error> -> ValueOption<'T>
val toValueOption: result: Result<'T, 'Error> -> 'T voption

0 comments on commit 1b3f86c

Please sign in to comment.