fsharp-core-docs icon indicating copy to clipboard operation
fsharp-core-docs copied to clipboard

Include type constraints in documentation

Open TysonMN opened this issue 5 years ago • 5 comments

The documentation for hash does not say that it requires the equality constraint on its only type parameter. Another example is the documentation for compare. It requires the comparison type constraint on its only type parameter. For convenience, here is the list of all type constraints.

Could type constraints be added to the documentation for types that have them?

TysonMN avatar Aug 14 '20 03:08 TysonMN

This would have to be a feature in FSharp.Formatting: https://github.com/fsprojects/FSharp.Formatting

cartermp avatar Aug 14 '20 05:08 cartermp

Should I create an issue there?

TysonMN avatar Aug 15 '20 04:08 TysonMN

That'd be grand!

cartermp avatar Aug 15 '20 04:08 cartermp

Done. See https://github.com/fsprojects/FSharp.Formatting/issues/591.

TysonMN avatar Aug 15 '20 05:08 TysonMN

@bender2k14 I'll keep this one open for tracking

dsyme avatar Aug 16 '20 17:08 dsyme