[Haskell-cafe] Unit and pair
tonymorris at gmail.com
Wed May 9 02:01:10 CEST 2012
On 09/05/12 03:49, MigMit wrote:
> On 8 May 2012, at 21:42, Felipe Almeida Lessa wrote:
>> On Tue, May 8, 2012 at 2:36 PM, MigMit <miguelimo38 at yandex.ru> wrote:
>>> Hi café, a quick question.
>>> Is there a somewhat standard class like this:
>>> class Something c where
>>> unit :: c () ()
>>> pair :: c x y -> c u v -> c (x, u) (y, v)
>>> I'm using it heavily in my current project, but I don't want to repeat somebody else's work, and it seems general enough to be defined somewhere; but my quick search on Hackage didn't reveal anything.
>>> I know about arrows; this, however, is something more general, and it's instances aren't always arrows.
>> Are you aware of generalized arrows ? It's still a lot more than
>> your Something, though.
> I've heard of them, but some instances of my Something class aren't categories either, which rules out GArrows too.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
data-lens has something similar (Tensor):
More information about the Haskell-Cafe