About
I should probably start with an important disclaimer : I suck at Haskell.
I have a love-hate relationship with this language. I find it magnificent and powerful. Its compiler find my code disgusting and incorrect. Everytime I want to write Haskell, I feel like I felt when I was trying to speak german, paralyzed by the number of rules, obsessing over where I had to put my verb in my sentence, and trying to remember my declensions.
Also, most books and tutorials on Haskell will give you a good understanding of the language, but most can’t really tell you how everything get done, and there are some common tricks you see now and there, and lots of common-but-no-commonly-explained sugarized form here and there that might need more explaining for those who, like me, don’t understand them instantly.
So to improve my Haskell skills, I decided to investigate the code from various libraries and analyze it as much as I can, in an attempt to understand more about Haskell idioms. This blog is mostly my notes taken while trying to understand and to explain to myself the way some libraries work - hence “under the hood”. I will probably never analyze libraries completely, but try to understand the way they’re designed, why they’re design like this, and how some interesting parts are implemented.
It might (let’s face it, it probably will) be full of mistakes. And it is certainly not a tutorial on the various libraries I shall try to read. However, if you’re a beginner, it might help you points towards interesting code to read and idioms to copy. And if I get better, it shall show that anyone can get better because trust me, I really suck at Haskell.
Some more caveat for you:
I have no mathematical skills or training, and everytime I try to understand some basic category theory, I feel like my head is going to explode.
Understanding this blog, however, requires a general knowledge of the Haskell language and its main typeclasses. You should at the very least not be scared by the word Monad. If you don’t know what a Monad is but you desperately want to know, what finally made me have a good grasp was this interview of Brian Beckman. It’s a bit long, but it’s worth it (and in any case, understanding Monads will take time). If you don’t know Haskell, the best resource to learn is probably to buy Haskell Programming from first principles by Julie Moronuki and Christopher Allen.
I will, as much as I can, come back to the signatures of most canonical abstractions. This will probably make for a boring read for experienced haskellers who know this stuff by heart (and probably repeat it in their sleep, while they’re dreaming of monadic sheep)
English is not my native language. Though I find it much easier to use than German (or Haskell), I’ll probably make mistakes. Point these out on Twitter if they get too annoying.
Finally, I’m a notorious unfaithful blogger, so this blog might not be updated very frequently. We shall see.