Re: [Haskell-cafe] Unit and pair

2012-05-08 Thread Tony Morris
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 wrote: >>> Hi café, a quick question. >>> >>> Is there a somewhat standard class like this: >>> >>> class Something c where >>>unit :: c () () >>>pair :: c x

Re: [Haskell-cafe] Unit and pair

2012-05-08 Thread MigMit
That's an interesting idea, thanks. Отправлено с iPad 08.05.2012, в 23:31, Daniel Peebles написал(а): > To expand on that, this class basically allows you to prove your relation c > holds pointwise across arbitrary binary trees, represented by nested tuples > and terminated by ()s. If individ

Re: [Haskell-cafe] Unit and pair

2012-05-08 Thread Daniel Peebles
To expand on that, this class basically allows you to prove your relation cholds pointwise across arbitrary binary trees, represented by nested tuples and terminated by ()s. If individual instances of the class had additional ways of constructing values (i.e., proving the relation for the two type

Re: [Haskell-cafe] Unit and pair

2012-05-08 Thread Daniel Peebles
FullBinaryTreeRelation? :P On Tue, May 8, 2012 at 1:36 PM, MigMit 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 pro

Re: [Haskell-cafe] Unit and pair

2012-05-08 Thread MigMit
On 8 May 2012, at 21:42, Felipe Almeida Lessa wrote: > On Tue, May 8, 2012 at 2:36 PM, MigMit 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) >> >> ? >>

Re: [Haskell-cafe] Unit and pair

2012-05-08 Thread Felipe Almeida Lessa
On Tue, May 8, 2012 at 2:36 PM, MigMit 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 rep

[Haskell-cafe] Unit and pair

2012-05-08 Thread MigMit
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 de