[Question] Scoped effects in effectful
googleson78 opened this issue · 2 comments
googleson78 commented
Hi!
Does effectful
support something like polysemy
's Scoped?
If not, is there a way to handle having state transactions in my business logic in a type safe way, i.e.
- I should not be able to use my "stateful effect" outside a transaction
- I should not have to leak the implementation of the transaction (e.g. acquiring an sql connection from a pool)
?
arybczak commented
Does effectful support something like polysemy's Scoped?
There is nothing like polysemy's Scoped
in effectful
at the moment, but I'm pretty sure it can be written.
arybczak commented
@googleson78 I've read a bit about this.
Do I understand correctly that Scoped
is basically a way to abstract away running a dynamically dispatched effect into a dynamically dispatched effect itself?