I believe I know where some of the leaks may be coming from. I’m one of the authors of hadolint, the docker file linter. We used ShellCheck as a library to lint the bash code found inside the files.
When we attempted to compile Hadolint to Javascript to embed it on a web page, we discovered that the code in ShellCheck was not optimal. The culprit for our use case was the abuse of regular expressions for checking equality of bash snippets.
In Haskell, most regexp libraries interface with external C libraries and have pinned memory objects for performance, but one must be careful not to accumulate too many of them.
The solution for us to have a usable Javascript version was to reimplement the equality operator for those cases we needed, and now memory usage was down again.
We haven’t stumbled upon our first space leak yet.
Haskell Performance Patters - Johan Tibell (2012) http://johantibell.com/files/haskell-performance-patterns.ht...
Performance (Haskell Wiki) https://wiki.haskell.org/Performance
Detecting Space Leaks - Neil Mitchell (2015) http://neilmitchell.blogspot.com/2015/09/detecting-space-lea...
The Haskell performance checklist - Chris Done, et. al. (2017 - 2019) https://github.com/haskell-perf/checklist/blob/master/README...
ThreadScope (Haskell Wiki) https://wiki.haskell.org/ThreadScope
Top tips and tools for optimising Haskell - Will Sewell (2015) https://making.pusher.com/top-tips-and-tools-for-optimising-...
State of Haskell Ecosystem: https://github.com/Gabriel439/post-rfc/blob/master/sotu.md#c...
Guide to Haskell (2018): https://lexi-lambda.github.io/blog/2018/02/10/an-opinionated...
Haskell learner milestones: https://stackoverflow.com/a/1016986
GHC optimizations (rather advanced, but interesting): https://stackoverflow.com/questions/12653787/what-optimizati...
Compilation of various Haskell tutorials on more advanced topics: https://markkarpov.com/learn-haskell.html
Despite the popular saying, there’s a wealth of knowledge about Haskell beyond just academic papers, and in digestable form, but it’s scattered around little-known blogs. I’d recommend you to check out r/haskell from time to time, or subscribe to the Haskell newsletter - at least for me, those are the places where I got to know most of Haskell blogs.
https://downloads.haskell.org/~ghc/latest/docs/html/users_gu...
It also gives you the ability to “tag” sections of code for profiling, so if you suspect that the internals of some named function are giving you grief, you simply add a tag (some pragma comment thing I think) and get profiling information for it. It’s much quicker than having to refactor just to profile sections of code.
"Parallel and Concurrent Programming in Haskell"
https://simonmar.github.io/pages/pcph.html
He also has some interesting articles like
https://simonmar.github.io/posts/2018-06-20-Finding-fixing-s...