Hi,
Hi,
The tutorial I gave for CUFP 2011 was a multi-user web chat program using the Snap Framework. STM channels make this kind of problem super-easy to deal with. Don't be afraid of forking lots of Haskell threads for programs like this, because they're "green" threads, not OS threads (i.e. Haskell threads are M:N multiplexed onto OS threads) and as such they have very little overhead.
Maybe you'll find the code interesting: https://github.com/snapframework/cufp2011. The "business logic" of using STM channels is here: https://github.com/snapframework/cufp2011/blob/master/src/Snap/Chat/ChatRoom.hs