tentatively :: forall a b e m r . (MonadCatch m, MonadRef m, Eq a, Exception e)
               => Proxy e -> TransM a m b -> m b
tentatively _ f = do
  stack <- newRef []
  indubitably f 
{-  (do result <- runReaderT f stack
      transactions <- readRef stack
      forM_ transactions commit
      return result) -}
    `catch` \(e :: e) -> do
      transactions <- readRef stack
      forM_ transactions rollback
      throwM e
tentatively :: forall a b e m r . (MonadCatch m, MonadRef m, Eq a, Exception e)
               => Proxy e -> TransM a m b -> m b
tentatively _ f = do
  stack <- newRef []
  indubitably f 
{-  (do result <- runReaderT f stack
      transactions <- readRef stack
      forM_ transactions commit
      return result) -}
    `catch` \(e :: e) -> do
      transactions <- readRef stack
      forM_ transactions rollback
      throwM e
tentatively _ f = do
  stack <- newRef []
  indubitably f 
{-  (do result <- runReaderT f stack
      transactions <- readRef stack
      forM_ transactions commit
      return result) -}
    `catch` \(e :: e) -> do
      transactions <- readRef stack
      forM_ transactions rollback
      throwM e