Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Compiler.Service/11.0.100.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
* IL: hold custom attributes in fields rather than a union case ([PR #20287](https://github.com/dotnet/fsharp/pull/20287))
* IL: reuse the cached ILTypeRef in ILTypeInfo.FromType ([PR #20255](https://github.com/dotnet/fsharp/pull/20255))
* Name resolution: group C#-style extension members per `open` and extended type ([PR #20298](https://github.com/dotnet/fsharp/pull/20298))
* Symbols: add `FSharpDisplayContext.WithNullnessAnnotations` ([PR #20507](https://github.com/dotnet/fsharp/pull/20507))

### Improved

Expand Down
3 changes: 3 additions & 0 deletions src/Compiler/Symbols/Symbols.fs
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,9 @@ type FSharpDisplayContext(denv: TcGlobals -> DisplayEnv) =
member _.WithShortTypeNames shortNames =
FSharpDisplayContext(fun g -> { denv g with shortTypeNames = shortNames })

member _.WithNullnessAnnotations show =
FSharpDisplayContext(fun g -> { denv g with showNullnessAnnotations = Some show })

member _.WithPrefixGenericParameters () =
FSharpDisplayContext(fun g -> { denv g with genericParameterStyle = GenericParameterStyle.Prefix } )

Expand Down
2 changes: 2 additions & 0 deletions src/Compiler/Symbols/Symbols.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ type FSharpDisplayContext =

member WithShortTypeNames: bool -> FSharpDisplayContext

member WithNullnessAnnotations: bool -> FSharpDisplayContext

/// Causes type signatures to be formatted with prefix-style generic parameters,
/// for example `list<int>`.
member WithPrefixGenericParameters: unit -> FSharpDisplayContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5269,6 +5269,7 @@ FSharp.Compiler.Symbols.FSharpDelegateSignature: System.Collections.Generic.ILis
FSharp.Compiler.Symbols.FSharpDelegateSignature: System.Collections.Generic.IList`1[System.Tuple`2[Microsoft.FSharp.Core.FSharpOption`1[System.String],FSharp.Compiler.Symbols.FSharpType]] get_DelegateArguments()
FSharp.Compiler.Symbols.FSharpDelegateSignature: System.String ToString()
FSharp.Compiler.Symbols.FSharpDisplayContext: FSharp.Compiler.Symbols.FSharpDisplayContext Empty
FSharp.Compiler.Symbols.FSharpDisplayContext: FSharp.Compiler.Symbols.FSharpDisplayContext WithNullnessAnnotations(Boolean)
FSharp.Compiler.Symbols.FSharpDisplayContext: FSharp.Compiler.Symbols.FSharpDisplayContext WithPrefixGenericParameters()
FSharp.Compiler.Symbols.FSharpDisplayContext: FSharp.Compiler.Symbols.FSharpDisplayContext WithShortTypeNames(Boolean)
FSharp.Compiler.Symbols.FSharpDisplayContext: FSharp.Compiler.Symbols.FSharpDisplayContext WithSuffixGenericParameters()
Expand Down
Loading