snapframework/snap

MonadUnliftIO support

Closed this issue · 2 comments

Hi,

aws library is almost dead and I had to rewrite code to use amazonka-ses.
The former library is based on UnliftIO monad.
My application is written on Snap and Handler type doesn't have instance for MonadUnliftIO class. Handler data constructors are not exported.

It is impossible to make MonadUnliftIO instance for snap because Snap is a short-circuiting monad, similar to ExceptT and unliftio can't be implemented for such monads

Additionally, snap has been around far longer than unliftio and has a strong commitment to keeping APIs stable and minimizing dependencies. If there is any kind of MonadUnliftIO integration to be had, it should be done as a separate package and not a part of the existing stable core (see for example amazon-emailer-client-snap).