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

Eric Mertens emertens at gmail.com
Tue May 8 16:04:12 UTC 2018


I'm opposed to changing the names in either module. In modern code it
should be fairly rare to import Control.Arrow. In the cases that both are
needed qualified imports are available, and it wouldn't be worth breaking
existing code by renaming the class methods of Bifunctor.

On Tue, May 8, 2018 at 7:58 AM Alexandre Rodrigues <alexandrer_b at outlook.com>
wrote:

> 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.
>
>
> _______________________________________________
> Libraries mailing listLibraries at haskell.orghttp://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
>
> _______________________________________________
> Libraries mailing list
> 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/1e6c553b/attachment.html>


More information about the Libraries mailing list