Should the PVP be changed with regards to instances?

Erik Hesselink hesselink at gmail.com
Tue Dec 20 23:07:55 CET 2011


On Tue, Dec 20, 2011 at 19:26, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
>
> On Tue, 20 Dec 2011, Erik Hesselink wrote:
>
>> I'd ask you to follow the PVP here. Problems with duplicate instances
>> are often tricky to resolve, and not something you want to encounter
>> when you're developing (not upgrading dependencies). I've often added
>> orphan instances for types from other packages. Yes, I should (and
>> often do) send these upstream, but I still add them locally. I have to
>> have the instance now, to continue my work, and there's no telling
>> when a new version of the original package will be released. The other
>> option is forking the package, which means I also don't get bugfix
>> updates anymore.
>
> A better option is using a newtype and add the missing instances there.

That is indeed a good option, although newtypes can sometimes be
verbose to use. But I'll consider the option next time I run into a
missing instance.

Thanks,

Erik



More information about the Libraries mailing list