Open chshersh opened 6 years ago
Also, maybe we should change ShowUnit
name? This type class is used not only in Show
instances, but in Read
. And if it's named as ShowUnit
it means that it shows units while in reality it just contains unit suffix. I propose to use UnitName
instead.
We decided to not go with type class approach because our initial problem wasn't solved by moving to this approach (as @vrom911 discovered). So this approach currently doesn't have any benefits from current one. Thus @vrom911 did only renaming.
We need to create GHC proposal to allow type family applications inside instancec. cc @int-index
Okay, I can comment there.
I commented. But people want proposal...
It allows to write instances like this: