purescript/purescript-transformers

ZIO-like monad & transformer

bbarker opened this issue · 5 comments

Similar to how RWST/RWS are present in this repository, I'm wondering if something like ZIO might be a good fit here - or as a separate repository?

See this short discussion.

Since it would likely need to depend on Aff, so that might be a reason to create a separate project, though I suppose the core type might still be useful for many SPA-like synchronous projects meant to run in the browser without the Aff dependency.

Now the easy part (hard part?): I suppose it could be called ZIO, but alternatively it could be called Trio after the analogue in Haskell, or named similar to RWST:

REA: Reader / Error || Either / A || Aff? - I guess this depends on the eventual architecture/implementation, though.

It sounds like something which would be great to have, but I don't think it needs to be in core. I think a separate project is probably the best way forward. Have you seen purescript-rave by the way?

garyb commented

I don't think it can be implemented on top of Aff exactly, since polymorphic error handling would need to be done there. @natefaubion is the man to talk to, I think he basically has a picture in his head of how it would work, but hasn't had the time / built up the energy to face working on the internals again. 😉

It sounds like something which would be great to have, but I don't think it needs to be in core.

👍

Have you seen purescript-rave by the way?

Rave looks like a great starting point in any case. (Incidentally I had cloned it to first try out spago but had no idea what it was in that context!)

I don't think it can be implemented on top of Aff exactly, since polymorphic error handling would need to be done there. @natefaubion is the man to talk to, I think he basically has a picture in his head of how it would work, but hasn't had the time / built up the energy to face working on the internals again

Understandable! Well I'm happy to know about Rave - I'll close this, but maybe link to any of my findings on Rave after I get a chance to use it.

garyb commented

Ah thanks, I did glance at the issues but I guess I was looking for the wrong keyword.