I'd like to use finally
, signature IO a -> IO b -> IO a
.
However, the operations I wanna use are based on a different monad than IO
(namely Servant
's ClientM
).
I knew liftIO
, but that seems to do the opposite -- IO a -> m a
.
How can I transform my monads into IOs, or lift finally
such as to operate on my monads instead?