[Haskell-cafe] How can I use MACID in my existing application?

Alexander Solla ajs at 2piix.com
Thu Nov 4 14:18:57 EDT 2010

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  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20101104/302528ce/attachment.html

More information about the Haskell-Cafe mailing list