[Haskell-cafe] Control.bimap?

Timo von Holtz timo.v.holtz at gmail.com
Wed Dec 12 23:42:09 CET 2012


Control.Categorical.Bifunctor and Data.Bifunctor are the module names
not the packages.
The corresponding packages are "categories" and "bifunctors" respectively.

2012/12/12 Gregory Guthrie <guthrie at mum.edu>:
> Yes, thanks, I've seen this; why can't cabal find the package?
>
> Is the fact that it is filed under "archive" an indicator?!
> I have tried Control.Bifunctor, and also Control.Categorical.Bifunctor, and Data.Bifunctor.
>
> Certainly it is an easy thing to define myself, but I'm both trying to be minimalistic, and to understand what failed.
> -------------------------------------------
> From: Clark Gaebel [mailto:cgaebel at uwaterloo.ca]
> Sent: Wednesday, December 12, 2012 3:12 PM
> Subject: Re: [Haskell-cafe] Control.bimap?
>
> http://hackage.haskell.org/packages/archive/categories/0.59/doc/html/Control-Categorical-Bifunctor.html
> .
>  And found a nicer approach:
>    (ns,ne) = (nub***nub) unzip g
> Or perhaps:
>    (ns.ne) = bimap nub nub $ unzip g    -- from Control.Bifunctor
>  The SO reference I saw described bimap as a way to map a function over a pair, and it seemed like a great match, but I cannot find the bimap function, and cabal reports no package Control.Bifunctor.
> ??
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list