ShapeOfMatter / MultiChor

Type-safe and efficient choreographies for Haskell, with multiply-located values, multi-cast, and location-set polymorphism.
Other
8 stars 0 forks source link

Do we actually want to be using a local Freer monad? #9

Closed ShapeOfMatter closed 4 months ago

ShapeOfMatter commented 4 months ago

What's considered best-practice these days? Probably not Polysemy; is there a "normal" choice?

psilospore commented 4 months ago

I'm not too familiar with the effects ecosystem but I remember others talking positively about https://github.com/haskell-effectful/effectful what do you think? But that might have been more performance related which might not matter for our use case. I am slightly familiar with it. I can do an initial stab and see how it goes if you think I should try.

psilospore commented 4 months ago

Browsing the internets it's kind of hard to tell if there's much consensus. This might be useful https://discourse.haskell.org/t/the-issues-with-effect-systems/5630/12

Someone saying they are largely equivalent https://www.reddit.com/r/haskell/comments/12im0z9/comment/jg01613/

Maybe I'm mixing up effects systems and free monads

ShapeOfMatter commented 4 months ago

I think the distinction between effect systems and freer monads is simply that free monads are one mathematical abstraction you can use to build an effect system. (free monads are not different from freer monads in any way we care about, and algebraic effects in the mathematical sense are borderline impossible and nobody seems to care)

ShapeOfMatter commented 4 months ago

Having read the discourse.haskell.org thread, I'm thinking we probably shouldn't change anything about how we're doing things.

I think the question at hand is implementation, and shouldn't affect the exposed surface of our library. So the advantage of HasChor's approach of packaging their own freer-monad module is that it saves them dependencies (which matters!). I don't think this is the end of the conversation, but right now I'm feeling like the mixing of choreographies with modern effect systems might be a later project.

psilospore commented 4 months ago

Ok that makes sense to me. I also don't see a great reason to move to another effect system at the moment.

ShapeOfMatter commented 4 months ago

If we're in agreement that we're not changing implementation this month, then let's close this issue?