Here is a list of libraries or tools that I use. The list is written using a template in Artyom's blog.
I hope to update the list weekly and publish updates monthly.
|Area||What and why|
|Build tools||Nix + cabal|
Nix + cabal gives me the best user experience so far. Allows easily switch the versions. Freeze versions and have a reproducible built environment on different OS-es. Besides, nix allows to set up the entire developer environment, including tools, external programs, databases, shell scripts.
|Editor||Vim (no plugins) / Idea (no haskell plugins)|
My editor/environment is far from the one I want to advertise. Even though editors greatly improved in the Haskell ecosystem, I still not ready to invest time into setting up my environment. Just use a simple setup with no plugins; this setup at least does not harm my workflow. It's also easy to use it for work on a remote machine.
IntelliJ Idea has great non-Haskell plugins I'm very fond of
|Formatter||None, just none|
|Prelude||prelude from base/custom prelude in the project with required reexports|
Most of the preludes have very opinionated choices I don't want to deal with
Data.List + containers + own Data.List.Extra + split
I want to highlight here that I find lists very useful data structure, the one that you can write very effective and simple to understand algorithms, just make sure the lists are not materialised too much.
|Anonymous records||none. for JSON structures I use |
|JSON||aeson + lens-aeson|
I'm not always happy with aeson, but it reasonably does it's job
It's just a standard library for YAML, works quite nice, doesn't require anything except declaring
A good library with bi-directional parsing support, that can save you when you need both parser and serializer, and they should be compatible. It may be a pain otherwise. I was not convinced that TOML format in way forward format for me in my experiments, so I never had a too deep look.
For configuration, I usually use YAML files, and more often environment files. Env works great in combination with external tooling. Experiments with TOML files didn't show measurable benefit over YAML files
|File manipulation and scripting||typed-process|
process library has some quirks, so if you try to implement the nice and simple solution you'll reimplement typed-process, so it's easier to use it.
you may use
I love streaming for simplicity, but sometimes there are too many
I don't remember any good reason for not moving to lucid, for example, but blaze-HTML works for me
|Serving||servant + servant-generic|
Looks like a standard and is head and shoulders over its competitors.
Sometimes when I don't need the full power of servant I use
I used the lowest-level libraries because they work, and you never try to overcome the obstacles introduced by the "safer" API interfaces.
Besides I've experimented a bit on
A great library that uses raw SQL and doesn't try to introduce features that do not work well.
Do not puzzle with co-log; it's a combination of libraries that allow you to dump structured logs in a JSON format
|parsing||attoparsec, slowly shifting to megaparsec|
|concurrency||async, raw STM|
|S3 compatible storage||minio-hs|
A nice library that works (usually)
|metrics||My fork of |
Prometheus is almost a standard and can be easily integrated with external tooling. The extra package provides some new primitives with some more effective and others that provide useful statistics.
Pretty fast library with an easy to use API.
|Effects handing||handle pattern + transformers|
|zip files handling||zip (sometimes typed-process + zip/unzip system packages).|
|vectors handling||vector and vector-algorithms|
|error handling and validation||monad-chronicle|
|JWT manipulation||jose, + own wrappers that allow operating on unverified |
|time library||??? (clock, thyme, time)|
standard de-facto, questionable API, but it works
|templating||ede - a nice powerful and extensible templating engine, introduces its own template language|
Dedicated post about ED-E package.
|environment parser||own, but can suggest trying envy|
|base64||base64 an efficient library that works for many byte and text types|
|HaskellNet for sending emails|
email-validate — for address validation
2021-01-02: Initial layout
2021-01-10: add base64
2021-01-17: add HaskellNet and email-validate