Resolve name collsion of `first` and `second` by Control.Arrow and Data.Bifunctor

Alexandre Rodrigues alexandrer_b at outlook.com
Tue May 8 14:57:40 UTC 2018


Name collisions are always an issue, and I think you raise a valid point. However, in this case, does Haskell not already offer a solution? Qualified imports do add some overhead, but doing

```

import qualified Control.Arrow  as A

import qualified Data.Bifunctor as B

foo :: Foo

foo = f . A.first . g


baz :: Baz

baz = h . B.first . i

```

does not seem too difficult.

On 08-05-2018 15:35, 박신환 wrote:

I had to import both Control.Arrow and Data.Bifunctor, and the name collision is annoying.



`first` and `second` from Data.Bifunctor should be given other names. I suggest (<$<) and (>$>), respectively.

[https://mail.naver.com/readReceipt/notify/?img=JeRCbHFTpz%2FYaqgZKrRZpzK%2FMoE%2FKoFvF4Mqp6JopACSMovdpxkvFx%2B0M6t9tzFXp6UwaLl5WLl51zlqDBFdp6d5MreRhoRn16iZMBiGpBFg1zJq1rknWVlTb4b%3D.gif]



_______________________________________________
Libraries mailing list
Libraries at haskell.org<mailto:Libraries at haskell.org>
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20180508/b56e1637/attachment.html>


More information about the Libraries mailing list