[Haskell] How to use STM in GUI applications?