I've been reading about arrows lately, a concept invented more than 10 years ago. It allows to get more static information about computations compared to monads, while still having the power of computations depending on the previous ones.
However I couldn't find them used in recent state-of-the-art libraries. For example attoparsec doesn't even have an Arrow
instance, even though arrows were designed to speed up parsing.
Are there some nice examples of Arrows used in currently developed libraries or executables, which bring performance or other benefits?
(I understand that this is kind of a soft question - my aim is to get better understanding of the concept and its advantages.)
Checkout this tutorial for opaleye. Arrows are used extensively throughout (in addition to profunctors). The library offers a way to write composable, typesafe Postgres queries. I don't have much experience using it, but it seems like it is a well designed library, and is supposedly a good choice if you're using Postgres in the backend. Ben Kolera has a good video introduction to the library here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With