Closed facundominguez closed 2 years ago
A fix for this will be included in 0.7.16
!
Or (question 1) is store supposed to skip generating these instances?
IIUC generating instances here would only be useful to derive Store instances via the As
newtype added in 0.13.0.0
. While theoretically useful, other mechanisms should work too and it would be weird to use Vector's As
to derive store instances. So, I've decided to omit these.
One side question that strives from this is (question 2) whether maintenance could be made simpler by fixing the set of type class instances that are generated.
I believe overall maintenance is reduced by automatically discovering which instances should be generated based on which types are provided by dependencies. This avoids a lot of boilerplate and tedious / error prone CPP. True, in some rare cases like this one, it causes trouble.
Also as a result of this, store's current code can also build with ghc from 6 years ago (7.10), and probably earlier.
The cause of the breakage seems to be that vector-0.13.0.0 is adding some new types
UnboxViaPrim a
andAs a b
, for whichstore
can't generate instances automatically.For instance, one of the errors is
The offending generated instance is
It looks like
store
would need to be smarter to add to the context the necessary constraints. Or (question 1) isstore
supposed to skip generating these instances?One side question that strives from this is (question 2) whether maintenance could be made simpler by fixing the set of type class instances that are generated. That is
store-0.70
could generateStore
instances for types A, B, and C, no matter which version ofvector
is used. If one wants to useStore
instances for newer types D and E, then one has to upgrade tostore-0.71
, and so on whenever newer types appear in dependencies.