Re: fixed point

2003-10-28 Thread Josef Svenningsson
Sorry about replying to my own mail. On Mon, 27 Oct 2003, Josef Svenningsson wrote: On Mon, 27 Oct 2003, Paul Hudak wrote: Thomas L. Bevan wrote: Is there a simple transformation that can be applied to all recursive functions to render them non-recursive with fix. Suppose you

Re: Cast from and to CChar

2003-10-28 Thread Christian Buschmann
Marcin 'Qrczak' Kowalczyk wrote: This is the same - instance Show Char displays non-ASCII characters that way. You get the same effect if you just type ''. Thanks to you and John for the hints. But what is the good reason that show is doing it that way? Wouldn't it be better to output the '' as a

Re: Cast from and to CChar

2003-10-28 Thread Marcin 'Qrczak' Kowalczyk
W licie z wto, 28-10-2003, godz. 12:30, Christian Buschmann pisze: But what is the good reason that show is doing it that way? Wouldn't it be better to output the '' as a '' instead of a code? Then don't use show, output characters directly (putChar, putStr). I thought that Char in Haskell

Re: fixed point

2003-10-28 Thread Ross Paterson
On Tue, Oct 28, 2003 at 11:56:21AM +0100, Josef Svenningsson wrote: On Mon, 27 Oct 2003, Josef Svenningsson wrote: This is a very nice technique. As an exercise to the reader I suggest the following program: \being{code} data Tree a = Branch a (Tree (a,a)) | Leaf cross f (a,b) = (f