Re-exporting traverse_ from Data.Traversable

Edward Kmett ekmett at gmail.com
Tue Jul 26 02:04:36 UTC 2016


Yes there is.

For existing code if anybody has already explicitly hidden it from
Data.Foldable, so they can work with traverse_ from some specific container
type, they'd now get slapped with it on the backswing by Data.Traversable.

import Data.Foldable hiding (traverse_)
import SomeContainer
import Data.Traversable

main = something that used a monomorphic traverse_ from SomeContainer

This is sort of like how users get hammered with Control.Monad methods from
all of the Control.Monad.Foo modules today, where it can be remarkably hard
to hide all the attempts they make to shove the same fail, join, etc. down
your throat.

-Edward

On Mon, Jul 25, 2016 at 9:15 PM, Christopher Allen <cma at bitemyapp.com>
wrote:

> Any reason not to do it? I realize it needs Foldable, but even knowing
> that I still forget it's in Data.Foldable. Seems like a free UX win to
> me.
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160725/d2f4c181/attachment.html>


More information about the ghc-devs mailing list