[Haskell-cafe] I/O without monads, using an event loop

2008-05-30 Thread Robin Green
I have been thinking about to what extent you could cleanly do I/O without explicit use of the I/O monad, and without uniqueness types (which are the main alternative to monads in pure functional programming, and are used in the Concurrent Clean programming language). Suppose you have a main

Re: [Haskell-cafe] I/O without monads, using an event loop

2008-05-30 Thread Edsko de Vries
On Fri, May 30, 2008 at 03:09:37PM +0100, Robin Green wrote: I have been thinking about to what extent you could cleanly do I/O without explicit use of the I/O monad, and without uniqueness types (which are the main alternative to monads in pure functional programming, and are used in the

Re: [Haskell-cafe] I/O without monads, using an event loop

2008-05-30 Thread Andrew Butterfield
Robin Green wrote: I have been thinking about to what extent you could cleanly do I/O without explicit use of the I/O monad, and without uniqueness types (which are the main alternative to monads in pure functional programming, and are used in the Concurrent Clean programming language). Suppose

Re: [Haskell-cafe] I/O without monads, using an event loop

2008-05-30 Thread Robin Green
On Fri, 30 May 2008 15:23:46 +0100 Andrew Butterfield [EMAIL PROTECTED] wrote: Robin Green wrote: I have been thinking about to what extent you could cleanly do I/O without explicit use of the I/O monad, and without uniqueness types (which are the main alternative to monads in pure

Re: [Haskell-cafe] I/O without monads, using an event loop

2008-05-30 Thread Wolfgang Jeltsch
Am Freitag, 30. Mai 2008 16:09 schrieb Robin Green: […] I'm primarily interested in embedded system and desktop UIs, Than you should take a look at http://haskell.org/haskellwiki/FRP. […] Best wishes, Wolfgang ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] I/O without monads, using an event loop

2008-05-30 Thread Jake Mcarthur
On May 30, 2008, at 9:09 AM, Robin Green wrote: eventMain :: (Event, SystemState AppState) - (Command, SystemState AppState) The first thing I would do with this type is probably wrap it up in a State monad so I don't have to keep track of the SystemState AppState stuff myself, which

Re: [Haskell-cafe] I/O without monads, using an event loop

2008-05-30 Thread Roberto Zunino
Robin Green wrote: I have been thinking about to what extent you could cleanly do I/O without explicit use of the I/O monad, and without uniqueness types Here's a way to see I/O as a pure functional data structure. To keep things simple, we model only Char I/O: data Program = Quit | Output

Re: [Haskell-cafe] I/O without monads, using an event loop

2008-05-30 Thread Bit Connor
Yeah, this sounds really similar to functionally reactive programming. I recommend you start by reading this paper: http://haskell.cs.yale.edu/frp/genuinely-functional-guis.pdf On Fri, May 30, 2008 at 11:34 AM, Wolfgang Jeltsch [EMAIL PROTECTED] wrote: Am Freitag, 30. Mai 2008 16:09 schrieb