FSharpType.Format(displayContext) should take into account flexible types
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 144
Description
There is an API (`FSharpType.Format(displayContext)`) that provides a common way to present F# types to show in the editor.
But for flexible types (where generic parameters with the constraint are just compiler/runtime implementation details), `Format` returns the name of the generic parameter, which can be confusing, since the code explicitly specifies the type written as `#IDisposable ( & ... & ... )`, so the name of the generic parameter appears out of nowhere and at the moment does not reflect the expected type information (especially suitable for the editor) in any way.
**Repro steps**
Enable inlay type hints in editor
```F#
open System
let f (disposables: #IDisposable list) =
for x in disposables do ()
```
**Expected behavior**
For `x` provided expected type as `#IDisposable`
**Actual behavior**
Rider

VS Code

Visual Studio

Example of FSharpType for `#IDisposable` 
I would expect that this API fully formats the flexible type, providing ready information for the editor
Contributor guide
Assessment
This issue has not been assessed yet.