
Hi, Am Freitag, den 20.11.2015, 22:20 +1000 schrieb Tony Morris:
It's a pretty nice example of further splitting of the type-class hierarchy, since if given,
instance Monoid a => Applicative (Either a) where -- we gather all the errors
then we could not have Either (NonEmpty err), since (NonEmpty err) does not have a Monoid, only a binary, associative operation (Semigroup)
I believe that there are plans to move Semigroup into Base. Eventually, there will be a transition to Monoid having Semigroup as a superclass¹, and I guess then the instance can be changed to instance Monoid a => Applicative (Either a) where and that worry is gone. Greetings, Joachim ¹ https://ghc.haskell.org/trac/ghc/ticket/10365 and https://ghc.haskell.org/trac/ghc/wiki/Proposal/SemigroupMonoid -- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0xF0FBF51F Debian Developer: nomeata@debian.org