[Haskell-cafe] STM and FFI

Arnar Birgisson arnarbi at gmail.com
Tue Sep 9 09:02:04 EDT 2008

On Tue, Sep 9, 2008 at 13:58, Sterling Clover <s.clover at gmail.com> wrote:
> I've been playing with this, and on top of STM as it exists, managed to
> neatly interleave it with sqite3 and postgres. To do so with postgres,
> however, required setting the locking mode to be a bit more restrictive than
> it is out-of-the-box. Clever use of encapsulation and monad transformers
> gets you 90% of the way there quite easily. Note, however, that
> unsafeIOToSTM is *much* more unsafe at the moment than you would expect --
> in fact there is no "safe" way to use it at all, due to the interaction of
> exceptions and rollbacks at the moment. The thread about this on
> glasgow-haskell-users[1], along with my initial note, has a very useful
> reply by Simon Marlow where he both explains some things about the STM
> implementation and logic behind it that I didn't understand, and also
> describes how the GHC team intends to fix this at some point in the future.

This is very interesting, do you have any code to release?

Thanks for the ghu link, registering for that ML now :)


More information about the Haskell-Cafe mailing list