On Nov 4, 2010, at 10:48 AM, Dupont Corentin wrote:
Hello,
I'm wondering how can I use Happstack's MACID in my application
without breaking everything.
I have a monad like that:
type Comm = StateT Communication IO
...
Whereas MACID asks to use:
type Update state = Ev (StateT state STM)
How can I use this without modifying everything??
I understand that MACID must record the <someAction> from above but
the message should not.
Look at Happstack.State.Transaction. The 'update' and 'query'
functions work in any MonadIO m. The complication is that you will
need to run "Happstack" from your main function on a separate thread
to handle the requests. Look in Happstack.State.Control's
"startSystemState".
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe