snapframework / snap

Top-level package for the official Snap Framework libraries, includes the snaplets API as well as infrastructure for sessions, auth, and templates.
http://snapframework.com/
BSD 3-Clause "New" or "Revised" License
455 stars 68 forks source link

MonadUnliftIO support #221

Closed yaitskov closed 3 years ago

yaitskov commented 3 years ago

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.

sopvop commented 3 years ago

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

mightybyte commented 3 years ago

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).