The [documentation for `hash`](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-operators.html#hash) does not say that it requires the `equality` constraint on its only type parameter. Another example is the [documentation for `compare`](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-operators.html#compare). It requires the `comparison` type constraint on its only type parameter. For convenience, here is the [list of all type constraints](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/generics/constraints). Could type constraints be added to the documentation for types that have them?
Activity
cartermp commentedon Aug 14, 2020
This would have to be a feature in FSharp.Formatting: https://github.com/fsprojects/FSharp.Formatting
TysonMN commentedon Aug 15, 2020
Should I create an issue there?
cartermp commentedon Aug 15, 2020
That'd be grand!
TysonMN commentedon Aug 15, 2020
Done. See fsprojects/FSharp.Formatting#591.
dsyme commentedon Aug 16, 2020
@bender2k14 I'll keep this one open for tracking