PVP proposal: don't require major version bump when adding non-orphan instances

Henning Thielemann schlepptop at henning-thielemann.de
Wed Feb 26 18:14:04 UTC 2014


Am 26.02.2014 14:19, schrieb Christian Maeder:
> Hi,
>
> I tend to agree to this proposal, but I would like to encourage
> developers/researchers to invent something like named instances (or
> dictionaries), that are not transitively reexported and could coexist
> with current instances. (These would allow several, differently named,
> instances for the same type and class combination.)

I expressed the idea of programmable instance selection in the past:

http://www.haskell.org/pipermail/libraries/2013-March/019533.html
http://www.haskell.org/pipermail/libraries/2012-November/018831.html

This approach may also solve the orphan instance problem, but I have no 
idea how to design programmable instance selection.

However, I suspect that GHC assumes at several places that there is only 
one instance per pair of class and type. What about packing and 
unpacking of class dictionaries in existentially quantified types?



More information about the Libraries mailing list