unliftio
effectful
Our great sponsors
unliftio | effectful | |
---|---|---|
5 | 21 | |
150 | 319 | |
0.7% | 6.0% | |
3.9 | 8.0 | |
3 months ago | 9 days ago | |
Haskell | Haskell | |
GNU General Public License v3.0 or later | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
unliftio
-
How introduce `ResourceT` into my stack
Possibly interesting thread here: https://github.com/fpco/unliftio/issues/68
-
Is `MonadBaseControl` dead?
Any way quoting u/snoyberg : https://github.com/fpco/unliftio/issues/17#issuecomment-363655106
-
Try.do is dangerous
That's not true. It's just writing that instance is a bit tricky: https://github.com/fpco/unliftio/issues/68
effectful
-
Haskell in Production: Standard Chartered
Also a much simpler alternative in my opinion to monad transformers is effectful:
https://github.com/haskell-effectful/effectful
Here's a talk on it:
-
The "Services" design pattern
effectful got rid of all issues I listed (I expanded a little on it here).
-
effectful and polysemy users: How do you test? Any of "same as mtl", "novel ways enabled by effects", or "same but more efficiently because..."? Please share experiences
There is also a long document on Issues with the Transformer/mtl library.
-
Haskell ecosystem questions.
cats-effects -> https://github.com/haskell-effectful/effectful
-
Real world applications with tagless-final, ReaderT, and three-layers
API for basic usage is very similar, but things quickly go south once you want to use higher order effects (i.e. effects that make use of the m type parameter). A lot of things then become very hard to write due to complex types or outright impossible (this issue is a good example - a reasonable thing to do that is very straightforward to write with effectful, apparently impossible to do with polysemy).
FWIW effectful is an improvement in both departments (disclaimer: I'm the author).
-
How to Lose Functional Programming at Work
> Lets say you have a huge overly-convoluted Haskell program. Somewhere deep down a call hierachy of pure functions you need to print something to the console. That is not easy to refactor.
> Or vice-versa you have a huge convoluted program where everything happens inside an IO monad because at some point something is written to the console. Now you realize you dont need to write to the console.
These problems are essentially completely resolved these days by a modern effect system like effectful. Basically, they allow you to do arbitrary effects deep down a call stack with minimal plumbing (you still have adjust the types, as you should: that's the point of effect tracking!) and also to remove effects, so you can easily convert between pure code and "effectful code that just so happens to do no effects".
-
Effectful | Paweł Szulc | Lambda Days 2022
See also https://github.com/haskell-effectful/effectful/issues/99.
-
Monad transformer libraries
FYI, transformers and mtl have several subtle traps. You can read about them here.
- Comparing ZIO to Haskell effects libraries like Polysemy?
What are some alternatives?
godot-haskell - Haskell bindings for GdNative
recursion-schemes - Generalized bananas, lenses and barbed wire
lifted-base - IO operations from the base library lifted to any instance of MonadBase or MonadBaseControl
cleff - Fast and concise extensible effects
mmorph - Monad morphisms
Workflow - re-startable monad that recover the execution state from a log, and workflow patterns
exceptional - A simple Haskell type for pure code that could go wrong.
managed - A monad for managed values
effect-monad - Provides 'graded monads' and 'parameterised monads' to Haskell, enabling fine-grained reasoning about effects.
layers - Modular type class machinery for monad transformer stacks.
ReplicateEffects - Composable replication schemes of applicative functors in Haskell
motor - Type-safe effectful state machines in Haskell