
Ryan, sounds good to me
On Fri, Jul 26, 2019 at 9:17 AM Ryan Scott
Hi,
You may find the discussion at https://mail.haskell.org/pipermail/libraries/2018-February/028571.html interesting. The summarized version of that post is that Data.Functor.Compose was originally brought over from the transformers library, which adheres to a very Haskell98 mindset in its design. In particular, the maintainer of transformers would likely not have added the Semigroup or Monoid instances you propose, since they require the FlexibleContexts language extension. This explains why there exists an `instance (Eq1 f, Eq1 g, Eq a) => Eq (Compose f g a)` and not an `instance Eq (f (g a)) => Eq (Compose f g a)`, among other things.
Of course, Data.Functor.Compose now lives in the base library, not transformers, so we need not prescribe to the same design philosophy. I don't feel too strongly about the issue, so if other people feel like adding Semigroup/Monoid instances that require FlexibleContexts is a good idea, I could get on board with that. What do others think?
Ryan S. _______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries