Re: [Haskell-cafe] Do real programs need IO? (was IO is a bad example for Monads)

2007-12-09 Thread Daniel Fischer
Just darcs got TV and read the sources. Awesome stuff! But what do I find in Interface.TV.IO ? -- | 'Input' version of 'getContents' contentsIn :: Input IO String contentsIn = iPrim getContents -- | 'Input' version of 'readFile' fileIn :: FilePath -> Input IO String fileIn name = iPrim (readFile

Re: [Haskell-cafe] Do real programs need IO? (was IO is a bad example for Monads)

2007-12-09 Thread Lennart Augustsson
Maybe I'm exaggerating, but it's true for 96% of all programs. (96% is with a :-)) I did not express anything that was meant to be a perpetual truth, only best practice at the moment. For a living I write programs that are almost without interaction with the outside world. Still, I need a to spen

Re: [Haskell-cafe] Do real programs need IO? (was IO is a bad example for Monads)

2007-12-09 Thread Conal Elliott
Thanks for the clarification. >AFAIK, the only way to get input and produce output is via the IO monad Now you know something different, don't you? FRP, Pan, TV. Also Grapefruit, functional forms, and others I'm not thinking of or don't know about. As for your example, mixing the IO with the f

Re: [Haskell-cafe] Do real programs need IO? (was IO is a bad example for Monads)

2007-12-09 Thread Daniel Fischer
Am Sonntag, 9. Dezember 2007 21:29 schrieb Conal Elliott: > I think your real point is that some things we still haven't figured out > how to express functionally. Right? That's my point, at least. Currently, AFAIK, the only way to get input and produce output is via the IO monad, so it is de fa

Re: [Haskell-cafe] Do real programs need IO? (was IO is a bad example for Monads)

2007-12-09 Thread Conal Elliott
I think your real point is that some things we still haven't figured out how to express functionally. Right? I would certainly agree with that part. Perhaps you exaggerating when you wrote "IO is important because you can't write any real program without using it." Cheers, - Conal On Dec 9, 200

Re: [Haskell-cafe] Do real programs need IO? (was IO is a bad example for Monads)

2007-12-09 Thread Lennart Augustsson
Conal, I think TV etc. is fantastic stuff, but that mean that we cannot, say, invoke an external program in Haskell until someone has figured out a composable library for this? I sincerely hope someone will, but the only way we have right now is the ugly IO monad. -- Lennart On Dec 9, 2007 7:2

[Haskell-cafe] Do real programs need IO? (was IO is a bad example for Monads)

2007-12-09 Thread Conal Elliott
On Dec 9, 2007 10:07 AM, Daniel Fischer <[EMAIL PROTECTED]> wrote: > Interactive programmes without using IO? Cool :) And how! > I think you misunderstood Lennart. Thanks for checking. In this case, I think I understood Lennart fine and that he was saying what you're saying. > Would you deny