MonadCIO and MonadSTM instances for Serialize