STM is very simple to use, you create transactions in the STM monad (actions that should be executed as an atomic unit) then execute them with atomically :: STM a -> IO a. Under the hood the STM monad creates a dependency graph of the used STM primitives (TVars) in order to know when to undo/redo transactions. But from what I understand you'll pretty much only need to use (atomically . readTChan c)/(atomically . writeTChan c) which are in the IO monad |