A Compositional Theory for STM Haskell