Servant APIs written in any MonadUnliftIO m can be converted to wai
Applications without writing the natural transformation by
hand. These functions will return m Application which means that either:
- You will have to serve from inside your
MonadUnliftIO mmonad, or - You will have to unwrap your application monad to
IO, bind theApplication, and then serve it inIO.
If you choose the second option, beware ResourceT --- trying to use
the returned Application outside of a containing ResourceT risks
attempting to interact with closed resources.