Re: [Haskell-cafe] Chuch encoding of data structures in Haskell

2010-05-27 Thread Jason Dagit
2010/5/27 Günther Schmidt > Hello C, > > thank you for explaining. > > The funny thing is that I have never seen anybody take this even a single > step further than you have in your email. > > In particular I have not found anything where someone might use church > encoding to solve a quite pract

Re: [Haskell-cafe] Chuch encoding of data structures in Haskell

2010-05-27 Thread Dan Doel
On Thursday 27 May 2010 7:15:15 pm Brandon S. Allbery KF8NH wrote: > On May 27, 2010, at 19:07 , Brandon S. Allbery KF8NH wrote: > > reordered_cons :: (t -> (t1 -> t2)) -> t -> (t1 -> t2) > > churchedNumeral :: (t -> t ) -> t -> t > > > > t unifies with (t1 -> t2), giving us a Church nume

Re: [Haskell-cafe] Chuch encoding of data structures in Haskell

2010-05-27 Thread Stephen Tetley
Of interest, (.+.) is the T combinator - called (##) in Peter Thiemann's Wash and the queer bird in Raymond Smullyan's To Mock a Mockingbird. Your technique might well relate to the 'element transforming style' of Wash, see the Modelling HTML in Haskell paper. Best wishes Stephen ___

Re: [Haskell-cafe] Chuch encoding of data structures in Haskell

2010-05-27 Thread Brandon S. Allbery KF8NH
On May 27, 2010, at 13:44 , Günther Schmidt wrote: The approach is so simple and trivial that it must have occurred to people a hundred times over. Yet I do not find any other examples of this. Whenever I google for church encoding the examples don't go beyond church numerals. Hm. If I r

Re: [Haskell-cafe] Chuch encoding of data structures in Haskell

2010-05-27 Thread Ivan Lazar Miljenovic
Günther Schmidt writes: > Hi all, > > I'm exploring the use of church encodings of algebraic data types in > Haskell. > Since it's hard to imagine being the first to do so I wonder if folks > here could point me to some references on the subject. > > I'm looking for examples of church encodings i

Re: [Haskell-cafe] Chuch encoding of data structures in Haskell

2010-05-27 Thread Claus Reinke
The approach is so simple and trivial that it must have occurred to people a hundred times over. Yet I do not find any other examples of this. Whenever I google for church encoding the examples don't go beyond church numerals. Am I googling for the wrong keywords? You might find "Typing Reco

Re: [Haskell-cafe] Chuch encoding of data structures in Haskell

2010-05-27 Thread Brandon S. Allbery KF8NH
On May 27, 2010, at 19:07 , Brandon S. Allbery KF8NH wrote: reordered_cons :: (t -> (t1 -> t2)) -> t -> (t1 -> t2) churchedNumeral :: (t -> t ) -> t -> t t unifies with (t1 -> t2), giving us a Church numeral made up of (t1,t2). (I think.) Which also explains why that record repres

Re: [Haskell-cafe] Chuch encoding of data structures in Haskell

2010-05-27 Thread Günther Schmidt
Hello C, thank you for explaining. The funny thing is that I have never seen anybody take this even a single step further than you have in your email. In particular I have not found anything where someone might use church encoding to solve a quite practical problem, namely for implementing

Re: [Haskell-cafe] Chuch encoding of data structures in Haskell

2010-05-27 Thread C. McCann
2010/5/27 Günther Schmidt : > I'm exploring the use of church encodings of algebraic data types in > Haskell. > Since it's hard to imagine being the first to do so I wonder if folks here > could point me to some references on the subject. > > I'm looking for examples of church encodings in Haskell

[Haskell-cafe] Chuch encoding of data structures in Haskell

2010-05-27 Thread Günther Schmidt
Hi all, I'm exploring the use of church encodings of algebraic data types in Haskell. Since it's hard to imagine being the first to do so I wonder if folks here could point me to some references on the subject. I'm looking for examples of church encodings in Haskell a little bit beyond Churc