ekmett / bifunctors

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

Adapt to quantified superclass changes on GHC HEAD #108

Closed RyanGlScott closed 1 year ago

RyanGlScott commented 1 year ago

This PR contains two patches needed to make the main branch typecheck on GHC HEAD, which adds quantified superclasses to various type classes in base:

Define missing {Read,Show}{,1} instances in Data.Bifunctor.ShowRead

GHC 9.6 adds quantified superclasses to {Read,Show}{1,2}, which requires defining corresponding instances in Data.Bifunctor.ShowRead in order for the existing {Read,Show}{1,2} instances to typecheck.

Define missing Functor/Foldable/Traversable instances in the test suite

A future version of GHC will add a quantified superclass to Bifunctor, which causes the bifunctors test suite to no longer typecheck due to missing Functor instances. This patch adds them, along with Foldable and Traversable instances to prepare for a future in which Bifoldable and Bitraversable have quantified superclasses as well.