STM Generalized with MonadIO