Haskell package wrapping a stream connection with an STM interface