generalize ReaderT state of SessionM from IORef Table to Env