Make it possible to evaluate monadic actions when assigningrecord fields

Chris Smith cdsmith at
Sun Jul 15 22:01:22 EDT 2007

Hope you don't mind my butting in.

If you're looking for a "compelling use case" to make programming with 
monads more natural in Haskell, I'd say STM makes for a good one.  There 
is no question there as to whether a monad is the right way to do STM; 
it is required.

In working on some code recently that uses STM rather heavily, what I've 
found is that there are a couple things that make the experience 
somewhat painful despite the general promise of the technique.  The most 
important is fixed by Simon's proposal for monad splices.  I'd literally 
jump for joy if something like this were included in a future version of 

Frankly, I don't think anyone will be convinced to use a more functional 
style by making programming in the STM monad more painful to do in 
Haskell.  Instead, they will be convinced to be more hesitant about 
using Haskell for concurrent programming.

Chris Smith

More information about the Haskell-prime mailing list