Re: [Haskell-cafe] How is laziness defined?

2007-02-05 Thread David House
On 05/02/07, TJ [EMAIL PROTECTED] wrote: I went through the entry on laziness on the wikipedia wikibook. Very nice. The wikibook sure has grown a lot since I last visited. http://en.wikibooks.org/wiki/Haskell/Laziness Great! I was about to suggest this! This is one of our

Re: [Haskell-cafe] How is laziness defined?

2007-02-05 Thread ajb
G'day all. Quoting Matthew Brecknell [EMAIL PROTECTED]: Although it covers irrefutable (lazy) pattern matching in the second section, it does appear to miss the point that let bindings are always irrefutable. Thus, there is no difference between these two: let (x,y) = foo in ... let

Re: [Haskell-cafe] How is laziness defined?

2007-02-05 Thread Matthew Brecknell
I said: Although it covers irrefutable (lazy) pattern matching in the second section, it does appear to miss the point that let bindings are always irrefutable. Thus, there is no difference between these two: let (x,y) = foo in ... let ~(x,y) = foo in ... Andrew Bromage said: let (x,())

Re: [Haskell-cafe] How is laziness defined?

2007-02-05 Thread ajb
G'day all. Quoting Matthew Brecknell [EMAIL PROTECTED]: In other words, the irrefutability of a pattern match does not distribute inside the top-level data constructor of the pattern. I wasn't disagreeing with you, which is why I didn't comment. Note also that if Haskell prime incorporates

[Haskell-cafe] How is laziness defined?

2007-02-04 Thread TJ
I would think that with 100% laziness, nothing would happen until the Haskell program needed to output data to, e.g. the console. Quite obviously that's not it. So how is laziness defined in Haskell? I remember vaguely someone saying that pattern matching on a value forces it to be evaluated. Is

Re: [Haskell-cafe] How is laziness defined?

2007-02-04 Thread ajb
G'day all. Quoting TJ [EMAIL PROTECTED]: I would think that with 100% laziness, nothing would happen until the Haskell program needed to output data to, e.g. the console. Quite obviously that's not it. So how is laziness defined in Haskell? It means that the program behaves as if things are

Re: [Haskell-cafe] How is laziness defined?

2007-02-04 Thread Andrew Wagner
I found it useful to work through an example where lazy evaluation was important, and wrote it up in a tutorial. It may or may not help you, no guarantees, but here it is: http://www.haskell.org/haskellwiki/Haskell/Lazy_Evaluation Any comments are welcome! Andrew On 2/4/07, TJ [EMAIL PROTECTED]

Re: [Haskell-cafe] How is laziness defined?

2007-02-04 Thread TJ
On 2/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Quoting TJ [EMAIL PROTECTED]: I would think that with 100% laziness, nothing would happen until the Haskell program needed to output data to, e.g. the console. Quite obviously that's not it. So how is laziness defined in Haskell? It

Re: [Haskell-cafe] How is laziness defined?

2007-02-04 Thread Matthew Brecknell
I would think that with 100% laziness, nothing would happen until the Haskell program needed to output data to, e.g. the console. In many cases, that's exactly what it's like. Quite obviously that's not it. So how is laziness defined in Haskell? In fact, Haskell is not defined as lazy, it

Re: [Haskell-cafe] How is laziness defined?

2007-02-04 Thread Donald Bruce Stewart
tjay.dreaming: On 2/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Quoting TJ [EMAIL PROTECTED]: I would think that with 100% laziness, nothing would happen until the Haskell program needed to output data to, e.g. the console. Quite obviously that's not it. So how is laziness defined

Re: [Haskell-cafe] How is laziness defined?

2007-02-04 Thread ajb
G'day all. tjay.dreaming: So it's just IO which makes things run huh? OK that's basically what I said there. Cool. Yeah, but you said output. Sending a signal to another process in Unix is I/O, which would force the process id to be evaluated, but there's no output as such. Cheers, Andrew

Re: [Haskell-cafe] How is laziness defined?

2007-02-04 Thread TJ
I went through the entry on laziness on the wikipedia wikibook. Very nice. The wikibook sure has grown a lot since I last visited. http://en.wikibooks.org/wiki/Haskell/Laziness I believe I've got it now. By it I mean the understanding of laziness in Haskell. Even though Haskell is, strictly

Re: [Haskell-cafe] How is laziness defined?

2007-02-04 Thread Matthew Brecknell
TJ said: I went through the entry on laziness on the wikipedia wikibook. Very nice. The wikibook sure has grown a lot since I last visited. http://en.wikibooks.org/wiki/Haskell/Laziness Thanks for the link. I hadn't seen that before. Although it covers irrefutable (lazy) pattern matching in