Replies: 1 comment
-
Don't be. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Effect.State.Static.Shared
makes use of anMVar
. This is allocated usingunsafeEff_
meaning that we can eventually run our program usingrunPureEff
. This makes me quite uncomfortable.A much more rational approach, in my opinion, would be to have the interpreter enforce that
IOE
be part of the effect stack and then we can run our program withrunEff
. As an example, I would expect something akin to Polysemy's interpreters:runAtomicStateTVar :: Member (Embed IO) r => TVar s -> Sem (AtomicState s ': r) a -> Sem r a
Could somebody explain the rational behind using unsafe actions here and how we can be sure they're safe?
Beta Was this translation helpful? Give feedback.
All reactions