[Haskell-cafe] Haskell soltion ofr I/O: is it monads or uniqueness types, after all?

2007-02-10 Thread Bulat Ziganshin
Hello haskell-cafe, just another interesting discussion in russian forum raised such idea: we all say that monads are the haskell way to do i/o. is it true? may be, uniqueness types, just like in Clean and Mercury, are real way, and monads are only the way to write programs that use uniqueness

Re: [Haskell-cafe] Haskell soltion ofr I/O: is it monads or uniqueness types, after all?

2007-02-10 Thread Nicolas Frisby
Very rarely is a nontrivial solution the only way. Monads are a construct that nicely represents the sequencing side-effecting computations in a pure and strongly-typed environment. They are a nice way to do it, but certainly not the only one. Now I'm not confident enough to boldly make this

Re: [Haskell-cafe] Haskell soltion ofr I/O: is it monads or uniqueness types, after all?

2007-02-10 Thread Stefan O'Rear
Gah. For the first time ever, I seem to have accidentally done a reply to sender. (IE Bulat please ignore this message) On Sat, Feb 10, 2007 at 07:25:19PM +0300, Bulat Ziganshin wrote: Hello haskell-cafe, just another interesting discussion in russian forum raised such idea: we all say

Re: [Haskell-cafe] Haskell soltion ofr I/O: is it monads or uniqueness types, after all?

2007-02-10 Thread Stefan O'Rear
hmm, my inexperienced forwarding attempt mangled the message... data Process = Getc (Char -Process) | Putc Char (() -Process) | forall a. NewIORef a (IORef a -Process) | forall a. ReadIORef (IORef a) (a -Process) | forall a. WriteIORef

Re: [Haskell-cafe] Haskell soltion ofr I/O: is it monads or uniqueness types, after all?

2007-02-10 Thread Lennart Augustsson
Hbc implements the IO type by request/response IO. I.e., the original Haskell I/O system. People who assume IO involves some RealWorld being passed around are just making unwarranted assumptions. The Haskell definition leaves the IO type abstract. -- Lennart On Feb 10, 2007, at 19:16