[UPDATED] Add missing Monad instances to tuples

Fumiaki Kinoshita fumiexcel at gmail.com
Sun Apr 7 08:54:08 UTC 2019


I removed Foldable/Traversable instances from the patch with reluctance.
I'd still like to add these instances:

Functor ((,,) a b)
(Monoid a, Monoid b) => Applicative ((,,) a b)
(Monoid a, Monoid b) => Monad ((,,) a b)
Functor ((,,,) a b c)
(Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c)
(Monoid a, Monoid b, Monoid c) => Monad ((,,,) a b c)

2019年4月2日(火) 13:28 Fumiaki Kinoshita <fumiexcel at gmail.com>:

> I submitted https://gitlab.haskell.org/ghc/ghc/merge_requests/644 but it
> might be still controversial. I'd like to get more opinions again.
>
> Here's the list of proposed instances:
>
> Foldable ((,,) a b)
> Foldable ((,,,) a b c)
> Traversable ((,,) a b)
> Traversable ((,,,) a b c)
> Functor ((,,) a b)
> (Monoid a, Monoid b) => Applicative ((,,) a b)
> (Monoid a, Monoid b) => Monad ((,,) a b)
> Functor ((,,,) a b c)
> (Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c)
> (Monoid a, Monoid b, Monoid c) => Monad ((,,,) a b c)
>
> The absence of Traversable instances for tuples feels quite inconsistent
> given that there are Bitraversable instances already.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20190407/f53e407a/attachment.html>


More information about the Libraries mailing list