by leoh · 7y ago · 0 comments
I picked up Haskell again last week after a long hiatus and although one does not need a heavyweight IDE, the build system still felt like a bit of a mess. After adding `parsec` (a popular library for parsing) to a stack project, my machine spent over an hour compiling dependencies at which I point I gave up.
The success of Python, I think, is largely due to pip; the success of Ruby due to bundler; the continued relative success of Java due to maven, etc. And it seems to me Haskell is still figuring this out.
https://github.com/Gabriel439/haskell-nix
More free resources about learning Haskell:
1. https://github.com/allenleein/brains/blob/master/Zen-of-Func...
2. https://github.com/allenleein/brains/tree/gh-pages/Zen-of-Fu...
Of course, there are times when you need to compile yourself, but most slow-to-compile packages, such as Aeson, Lens, Servant or the aforementioned Parsec, and many more on top of that have prebuilt binaries available when built from community snapshots (nixpkgs/nixos). You can even pin your package definitions to guarantee that you’re building something that will have prebuilt versions available. New project build is usually less than a minute or two, sometimes substantially so (anecdotally). Again, not always, but usually.
> Nix lets you download precompiled Hackage packages whereas stack compiles them on your computer the first time you depend on them
Source: https://github.com/Gabriel439/haskell-nix#background