r/purescript • • Apr 17 '17

purescript-run: an extensible-effects implementation

https://github.com/natefaubion/purescript-run
13 Upvotes

8 comments sorted by

View all comments

Show parent comment

2

u/dtwhitney Apr 26 '17

Ah ok I assumed Purescript's Eff was the equivalent of Haskell's because the names are the same.

I've been using Scala's Eff for the last few months. The example code in your test folder is going to make me cry the next time I'm an hour into fighting Scala's type inferencer :(

That said I do like Eff in Scala. A nice addition it has that you may consider is some algebras for working with standard types like Either, Maybe, List, and Stream (or whatever the purescript equivalent is). It's very nice to stare at an uncluttered happy path (including Maybe and others) that you know will "do the the right thing" if an error state is encountered.

Anyway! The lib looks great and hopefully I'll get to try some of this stuff out in the not too distant future!

1

u/natefaubion Apr 26 '17

Thanks for the feedback! One nice thing about piggy-backing off the row system is that inference is very good and type errors are what you'd expect. I don't think it's actually necessary to annotate any of the test code. I'm currently working on updating it to use my polymorphic variants library, and I hope to add more batteries.