13
votes

While learning Haskell I had the feeling that the authors where not always telling me everything, so to truly understand it I would like to know the theory behind the type system, monads and concepts like that.

Most of these concepts come from Category Theory I heard, so what are some good books/websites on this topic and related topics?

5
The relationship between FP, denotational semantics and category theory is very subtle. Moreover, category theory is quite difficult to grasp without a solid knowledge of many areas of mathematics: since it is so abstract, you can't grasp it without many examples from very different areas. A torough reference is Saunders MacLane's book 'Category Theory for the Working Mathematician'. What amazes me with this book is that it is used equally by people who do very different things and who do not understand each other: algebraic geometers, logicians, programmers, physicists, topologists, etc.Alexandre C.

5 Answers

8
votes

Papers by Philip Wadler and Simon Peyton Jones should get you started on the theory behind Haskell. The book The Implementation of Functional Programming Languages (available online) by Simon Peyton Jones is quite old but still interesting.

4
votes

I'd recommend looking at some of the research papers on the topic. Philip Wadler's "Comprehending Monads" and "Monads for functional programming" are two good starting places for understanding monads.

You'll find links to most at http://www.haskell.org/haskellwiki/Research_papers.

4
votes

Haskell has a Hindley Milner type system. See Wikipedia and this blog post for more details.

3
votes

Maybe you'll find this blog post useful.

3
votes

Lambda calculus is definitely imortant if you truly want to understand functional languages. I can recommend Henk Barendregt's introduction, as well as his book (full text online).