Book Cover

   

Programming in Haskell

2nd Edition

Graham Hutton, University of Nottingham

Cambridge University Press, 1st September 2016

Paperback: ISBN 978-1316626221; Kindle: ASIN B01JGMEA3U

318 pages, 120 exercises

Description

Haskell is a purely functional language that allows programmers to rapidly develop software that is clear, concise and correct. This book is based on the author's experience of teaching Haskell for more than twenty years. All concepts are explained from first principles and no programming experience is required, making the book accessible to a broad spectrum of readers.

Part I introduces the basic concepts of pure programming in Haskell and is structured around the core features of the language. Part II covers impure programming and a range of more advanced topics. The book contains many extended programming examples, and each chapter includes a series of exercises and suggestions for further reading.

This new edition has been extensively updated and expanded to include recent and more advanced features of Haskell, new examples and exercises, selected solutions, and freely downloadable lecture slides and example code. The presentation is clean and simple, while also being fully compliant with the latest version of the language, including recent changes concerning applicative, monadic, foldable and traversable types.

Feedback

This book will make you a much better programmer.
-- Erik Meijer, Facebook

The monad stuff alone is worth the price.
-- Neil Mitchell on twitter

This is a beautiful book for people who want to learn Haskell.
-- Emre Sevinc on amazon.com

This book is a gem and I cannot recommend it highly enough.
-- Guillaume Koenig on amazon.com

I have seldom encountered a book so well written as this one and still so complete.
-- Gilberto Filè on amazon.com

The presentation of each topic, the exercises, and the writing in general, are all superb.
-- Peter Summerland on amazon.com

A wonderful introduction to the alien world of Haskell.
-- Jon Janzen on amazon.com

Concepts are clear, concise and well-explained.
-- Adrian Wong on amazon.com

The author's deep understanding of Haskell shines through the writing.
-- Eli Bendersky on amazon.com

Buy this book or pester someone to buy it for you. It's worth it.
-- Vilem-Benjamin Liepelt on amazon.co.uk

Loved it! Distilled complex concepts to simple components.
-- Dragan Glumac on amazon.co.uk

Amazing book!
-- Chris Hiew on amazon.co.uk

I really can't recommend this book enough.
-- Jose Lopez on goodreads

This is such an excellent book, I wish there were more like it.
-- Dionysia Sofos on goodreads

I recommend it highly.
-- Simon Thompson in Computing Reviews

The precision and concision is a benefit over so many other programming books.
-- Harald Bögeholz in c't magazine

The second edition is awesome!
-- Reynaldo Cordero on futurelearn

Clean writing, careful exposition, wonderful examples & valuable exercises.
-- Brody Berg on twitter

Refreshing brevity compared to any other book I've seen.
-- Bodil Stokke on twitter

Grab Hutton's new edition of Programming in Haskell, it's wonderful.
-- Rein Henrichs on twitter

Absolutely sublime book that made me finally "get" Haskell.
-- Timmy Jose on twitter

Contents

Foreword
Preface
Part I. Basic Concepts:
1. Introduction
2. First steps
3. Types and classes
4. Defining functions
5. List comprehensions
6. Recursive functions
7. Higher-order functions
8. Declaring types and classes
9. The countdown problem
Part II. Going Further:
10. Interactive programming
11. Unbeatable tic-tac-toe
12. Monads and more
13. Monadic parsing
14. Foldables and friends
15. Lazy evaluation
16. Reasoning about programs
17. Calculating compilers
Appendix A. Selected solutions
Appendix B. Standard prelude
Bibliography
Index

The table of contents, foreword, preface and first two chapters can be viewed here.

Author

Graham Hutton is Professor of Computer Science at the University of Nottingham. He has taught Haskell to thousands of students and received many awards for his teaching. Hutton has served as an editor of the Journal of Functional Programming, Chair of the Haskell Symposium and the International Conference on Functional Programming, and Vice-Chair of the ACM Special Interest Group on Programming Languages, and he is an ACM Distinguished Scientist.

A video interview about the new edition is available here.

Slides

Lecture slides for chapters 1-10 are available in a zip file. These slides may be used or modified for any educational or training purpose provided the original author is acknowledged.

Code

Haskell code for all the extended programming examples is available in a zip file.

Instructors

Course instructors can request an inspection copy of the book, together with a large collection of introductory and advanced exams and answers based on the content.

Errata

All known errata are listed here.