Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
Is there documentation on how polysemy can be used with libraries using mtl? eg: MonadSnap from snap.
Looks like Polysemy.ConstraintAbsorber is the answer ...
(Though, really, I don't have to deal with MonadSnap, as the library consumes a function returning the monorphic Snap)
you're doing Obelisk with Polysemy? better move it out of the way for the frontend ;)
Yea, but just for the backend. I wouldn't dare use it in ghcjs haha
I've looked at wrapping Snap for servant-reflex for a second but it looked cumbersome. Though since then I've succesfully embedded servant/warp, maybe it's time to get back to it
At the moment I'm playing with wrapping the database (beam) stuff only. Working super well so far: image.png
And I've achieved separation of concepts that @Fintan Halpenny mentioned in https://funprog.zulipchat.com/#narrow/stream/201385-Haskell/topic/Why.20not.20.60MonadDatabase.60.3F/near/196659095 with little fanfare (compared to mtl)
yeah I did the same with Hasql
using several layers of abstraction, DbConnection, Database, Schema, Store and StoreQuery