No, I’m saying:
-
An instance that does what is already possible except worse is most probably only useful for collecting dust and confusing newcomers (documentation conciseness is a concern too).
Just because you can have a
Semigroup (Map a) where (<>) = union
doesn’t mean the instance deserves a spot on the documentation list. SimilarlyFactorial Text
may make sense for thelength
, but the folds in that instance are directly worse than the datatype ones. -
For serialization in either direction unambiguous conversions are quite rare.
The general expectation, it would seem, is that having separate functions for each conversion would be a mess, but
bytestring#Builder
is a great example of how that is not the case.
Violating either of these points doesn’t make the instance outright useless, it just makes it bad.
Perhaps, but out of all the problems the language has this is a relatively minor one and solving it nicely is in no way obvious, as I assume any proper solution would require changes to both GHC (with syntax additions), Hackage and Cabal.