ekmett / bifunctors

Haskell 98 bifunctors, bifoldables and bitraversables
Other
57 stars 42 forks source link

bifunctor-classes-compat and old bifunctors #114

Closed phadej closed 1 year ago

phadej commented 1 year ago

It's easy to have an install plan with old bifunctors and (new) bifunctor-classes-compat thus having two Bifunctor definitions lying around for GHC-8.0 and older.

I don't recall how we have dealt with such issues previously, or did we at all?

EDIT: real world example:

Imagine I change assoc to depend on bifunctor-classes-compat: every current user of it (e.g. these) will break, as these would define Bifunctor These for bifunctors.Bifunctor.

Does this mean, that to do that change in assoc, I should make a major version bump, so the downstream would need to react? I guess so, unless there's some trick which escapes me now.

RyanGlScott commented 1 year ago

Yes, I think that if your package switches from bifunctors to bifunctor-classes-compat, then you should bump the major version number as a warning to your users. My hope is that any potential damage will be mitigated by the fact that this issue will only affect somewhat old GHC versions.

phadej commented 1 year ago

I'm fine with that. We probably should mention that in the changelog for upcoming bifunctors version.

RyanGlScott commented 1 year ago

I've amended the changelog in #115. Let me know if this is to your liking.