Haskell is a language with many characteristics rooted in formal mathematics. Which mathematical topics should I study to gain a deeper appreciation and understanding of the language? I imagine that Abstract Algebra and Category Theory are both good topics to explore, for example.
Generally , Discrete math, Logic, think sets or relations, induction,proofs recursion, corecurssion, some basic algebra, number theory, type theory and lambda calculus, BTW there are books that cover all the math you need while diving into haskell.
I don't think abstract algebra (groups, rings, etc.) is directly relevant to Haskell, though the style of thinking used in abstract algebra is very helpful for Haskell programmers. This is in contrast with imperative languages, which call for thought processes more like those used in calculus or analysis.
Knowing a little bit of category theory is very helpful in my opinion. If you can understand the Typeclassopedia, that may be enough. The wikibook http://en.wikibooks.org/Haskell/Category_theory is a good readable intro, that I found much more helpful than any number of monad tutorials. In fairness, that's about the limit of my own current knowledge of the subject, so maybe I'm missing something that I'm not aware of yet. More advanced category theory shows up in some advanced Haskell topics such as generics, but at least for now I think of those as rather specialized. I've started watching some Catsters videos (type "catsters" into the Youtube search box) and am finding them interesting towards building a view of "where Haskell comes from" but I haven't seen that many yet.
I think it is important to understand a bit about logic as well, enough to understand that a Haskell function is a proof of a predicate expressed by its type signature (the Curry-Howard correspondence). The fancier uses of this concept (as I see it from a distance) seem to come from knowledge of intuitionistic type theory as used in Coq and Agda. Last summer a lot of Haskellers were reading "Software Foundations" ( http://www.cis.upenn.edu/~bcpierce/sf/ ) which is about Coq and looks great, but I had too much going on to spend any time on it myself. It's on my list ;-).
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