Programming in Haskell

Programming in Haskell

  • Downloads:6949
  • Type:Epub+TxT+PDF+Mobi
  • Create Date:2021-06-26 08:55:49
  • Update Date:2025-09-07
  • Status:finish
  • Author:Graham Hutton
  • ISBN:1316626229
  • Environment:PC/Android/iPhone/iPad/Kindle

Summary

Haskell is a purely functional language that allows programmers to rapidly develop clear, concise, and correct software。 The language has grown in popularity in recent years, both in teaching and in industry。 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 this book accessible to a broad spectrum of readers。 While Part I focuses on basic concepts, Part II introduces the reader to more advanced topics。 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。

Download

Reviews

Taha Metougui

being my first book for getting into haskell, and coming from a Scala/Java background it's great to start with。 Took sometime to get some basics down, but overall it's great。 being my first book for getting into haskell, and coming from a Scala/Java background it's great to start with。 Took sometime to get some basics down, but overall it's great。 。。。more

Kenneth

Not an easy book to get started with, but when you first get going it is good。

Felipe Balbi

A great introduction to HaskellGraham Hutton is a master。 This book is a masterpiece of functional programming and lazy evaluation。 Definitely a must for anyone who wants to get into functional programming

Chad

This book is a fun way to bend one's mind into new shapes。 It's reasonably well organized for reading straight through, up to the point where I stopped。I didn't stop because I don't want to read the rest。 I stopped because I knew that if I continued to the end now I wouldn't get enough from the rest of the book。 Too much other stuff demands my attention to give Haskell the attention it deserves right now, and while I was able to get up to section 7。5 (halfway through chapter 7) without any real This book is a fun way to bend one's mind into new shapes。 It's reasonably well organized for reading straight through, up to the point where I stopped。I didn't stop because I don't want to read the rest。 I stopped because I knew that if I continued to the end now I wouldn't get enough from the rest of the book。 Too much other stuff demands my attention to give Haskell the attention it deserves right now, and while I was able to get up to section 7。5 (halfway through chapter 7) without any real problems the cognitive load was getting a little heavy for me when I don't have the leisure to sit down at a computer and play around with Haskell for an hour each day to help me absorb what I've been reading。If you want to learn some interesting mathematical concepts, this book could actually serve to help you。 Some people have difficulty learning "pure" math, but get along much better learning the exact same concepts via programming。 This book is densely packed with that kind of thing。 Give it a try。I don't know when I'll get back to Haskell, but when I do I'm pretty sure I'll be happy to have this book near at hand。 It's dry, but clear, interesting, and instructive。 。。。more

Amit Sett

Very good *introductory* book for learning Haskell。 I particularly like the exercises at the end of each chapter。 They are challenging but also really engaging which results in a great learning experience when you do them。I think this book is one of the best materials for learning about how lazy evaluation works in Haskell。

Quinn Dougherty

great exercises。 learned a ton。 first half is very straightforward- in hindsight, it felt mostly like list comprehension and other things which greatly improved my python programming。 Being able to reason about maybes and functors makes a lot of basic programming things easier。 The basic philosophy of most programming examples in the book is to "write backwards" with black boxes: if you can decompose a task into foo then bar, literally write down \x -> bar (foo x) before you write down anything great exercises。 learned a ton。 first half is very straightforward- in hindsight, it felt mostly like list comprehension and other things which greatly improved my python programming。 Being able to reason about maybes and functors makes a lot of basic programming things easier。 The basic philosophy of most programming examples in the book is to "write backwards" with black boxes: if you can decompose a task into foo then bar, literally write down \x -> bar (foo x) before you write down anything else (certainly before you bother implementing the functions foo and bar)。 This philosophy also greatly improved my python programming。 Second half is where it gets weird-- applicative is really difficult for me let alone monads。 but I've made leaps and bounds and now applicative is much less difficult for me and i can even reason about monads pretty well。 of course, it's important to do all the exercises! In 2018 I did all the exercises from part 1 and did a cursory reading of part 2, didn't return to do the part 2 exercises until late 2019。 I'm excited to see how the latter's exposure to applicatives, monads, and parsing will effect my programming into 2020。 The last few chapters are some pretty serious PLT stuff that I fortunately learned in previous grinds at OPLSS and the first volume of Software Foundations, but they'd be really slow going if you weren't previously exposed to the concepts and methods。 Recommended to any programmer for sure。 。。。more

Bernie Noel

The book isn't bad, but not very practical。 The book isn't bad, but not very practical。 。。。more

Emmerson Siqueira

This was my first book on Haskell and fundamentals in Functional Programming。 I can say that it does a very good job at teaching them。 It has a good balance between theoretical and practical advice。 I could quickly grasp concepts and start writing some basic Haskell code。 I enjoyed the examples and the exercises at the end of every chapter。 In the second part of the book it goes in more advanced and complex topics。 In this part I found that the author could give some more clearer and straight to This was my first book on Haskell and fundamentals in Functional Programming。 I can say that it does a very good job at teaching them。 It has a good balance between theoretical and practical advice。 I could quickly grasp concepts and start writing some basic Haskell code。 I enjoyed the examples and the exercises at the end of every chapter。 In the second part of the book it goes in more advanced and complex topics。 In this part I found that the author could give some more clearer and straight to the point explanations。 I will for sure revisit the second part of this book, a few concepts take some time to sink in。 。。。more

Hariz Hasecic

Exceptional but badly formatted。 Code contains zero annotations line-wise。 I had to rewrite the entire book to fit my formatting needs。 Content is otherwise exceptional and spectacularly conscise despite the book being written like a novel from the early 90's。 Also love that the code is writen with actual pseudo-code symbols with real arrows instead of artifacts such as "->"。 The prettified compiled LaTex could need some syntax colorizing but。 Despite all this its a fantastic little book on abou Exceptional but badly formatted。 Code contains zero annotations line-wise。 I had to rewrite the entire book to fit my formatting needs。 Content is otherwise exceptional and spectacularly conscise despite the book being written like a novel from the early 90's。 Also love that the code is writen with actual pseudo-code symbols with real arrows instead of artifacts such as "->"。 The prettified compiled LaTex could need some syntax colorizing but。 Despite all this its a fantastic little book on about 120pages for true lovers of type-safe functional languages。 Could need some slight update to correspond to the evolution of Haskell itself。 。。。more

Adam

The first half of the text I think is good, although not exceptionally so, at explaining the syntax and ideas behind fairly standard Haskell features。 It's main competition, Learn You A Haskell, is free and does at least as good a job。 The second half of the book is about monads and monoids, which I still don't fully understand, and I think that is a reflection on the quality of explanation in this book (maybe it reflects on my own inability to grasp the topic too, who knows?)。 It seems to me th The first half of the text I think is good, although not exceptionally so, at explaining the syntax and ideas behind fairly standard Haskell features。 It's main competition, Learn You A Haskell, is free and does at least as good a job。 The second half of the book is about monads and monoids, which I still don't fully understand, and I think that is a reflection on the quality of explanation in this book (maybe it reflects on my own inability to grasp the topic too, who knows?)。 It seems to me the book has in mind a reader who has worked in industrial or commercial applications using relatively deep programming concepts and techniques, just not the particular ones in Haskell--so there isn't a lot of need, in the author's mind, for explaining a lot of the surrounding concepts。 It assumes the reader already mostly has these concepts clearly in mind, but just needs to learn how to implement them in this new language。 For me that was very much not the case, and when picking up the book, I didn't realize this background understanding was assumed。 I don't think the author fully realizes how much he assumes this in his explanations, too。 。。。more

0vai5

I read the second edition of this book。Let me summarise what I liked:- To the point explanations。- Extended examples were great for learning and getting used to of haskell syntax。- Great exercises for learning。 - Covers quite a good amount of content in a small text。- Thoroughly enjoyed the chapter on monadic parsing。- Last two chapters are quite interesting。 I had an intuition that reasoning about programs must be very challenging but it turns out that the ideas behind reasoning are quite appro I read the second edition of this book。Let me summarise what I liked:- To the point explanations。- Extended examples were great for learning and getting used to of haskell syntax。- Great exercises for learning。 - Covers quite a good amount of content in a small text。- Thoroughly enjoyed the chapter on monadic parsing。- Last two chapters are quite interesting。 I had an intuition that reasoning about programs must be very challenging but it turns out that the ideas behind reasoning are quite approachable and the complexity depends on the program。- One brilliant idea in the penultimate chapter was that mathematical induction can also help to generate optimizations of the program。 I am not sure how far this can be helpful but certainly an awesome idea。And few things that could have been better:- For a first time learner, topics like monads, and applicatives could have been explained with more examples。 Though the examples contained are good and motivating but few more examples would have helped。 In general, I felt that topics which I already had some idea(in other language) were explained in good enough detail but topics which were new felt bit more terse and lacked examples。- Few topics felt lacking the higher level view。 For eg State Monad was introduced without any motivation and only later when we go to an example the reader gets to connect the dots。 Overall, I think this is a nice introduction to haskell for readers who already have some programming experience in other languages。 。。。more

Rutvik Patel

Perfect haskell introduction book。。 concise and excellent! Book has lots of examples/exercises to help you get familiar with functional way of solving problems。Last two chapters were on modular programming and reasoning about programs which shows the power of pure and lazy evaluated languages。(This is old, new edition is available)

Rif A。 Saurous

A delightful little book on Haskell。 I'd been exposed to Haskell before, so it wasn't entirely new to me, but this book definitely deepened my understanding。 The book is concise, and focuses on the functional programming side of Haskell rather than for instance the programming-in-the-large side。 Everything in it was material I wanted to learn better or review。 This book (with some auxiliary web articles) pushed me over the line from basically being clueless about monads to basically feeling that A delightful little book on Haskell。 I'd been exposed to Haskell before, so it wasn't entirely new to me, but this book definitely deepened my understanding。 The book is concise, and focuses on the functional programming side of Haskell rather than for instance the programming-in-the-large side。 Everything in it was material I wanted to learn better or review。 This book (with some auxiliary web articles) pushed me over the line from basically being clueless about monads to basically feeling that I know what's going on (though of course there's still much more to learn)。 The last two chapters (in this second edition) detail some of the authors recent work on proving program correctness and calculating compilers, and I thoroughly enjoyed those though I wouldn't expect to see them in *every* book。 The book has a moderate-sized but excellent bibliography: all of the later chapters point to the key articles that developed the topics and I know where to go to read more deeply。 For those who are at all interested in functional programming, this is strongly recommended。 I much prefer it to Moronuki and Allen's book, which I find far too wordy and jokey。 。。。more

Rohit

I wish there were more questions at the end of the chapter。 Very well written, succinct just like the language itself。

Andres Rodriguez Guapacha

As far as Haskell books that I have had the pleasure of reading, this one is the best organised, methodical and clear in its examples and explanations。 will read it again to practice the exercises。

Nestor

Is a good companion book for a virtual course like this https://www。edx。org/course/introducti。。。 , it is more focused on functional programming rather than haskell in my opinion, lot of exercises ! If you do all exercises at the end of every chapter then you will find that this is a good book, is not a book to read, is a book to practice, but you should read other haskell books as well if you (as me) are not an experienced mathematician, this one really help me too: Learn You a Haskell for Great Is a good companion book for a virtual course like this https://www。edx。org/course/introducti。。。 , it is more focused on functional programming rather than haskell in my opinion, lot of exercises ! If you do all exercises at the end of every chapter then you will find that this is a good book, is not a book to read, is a book to practice, but you should read other haskell books as well if you (as me) are not an experienced mathematician, this one really help me too: Learn You a Haskell for Great Good! which is free and well written and explain all the obscure things of Haskell in a more common way。 。。。more

Risto Saarelma

via https://eli。thegreenplace。net/2017/bo。。。 via https://eli。thegreenplace。net/2017/bo。。。 。。。more

Dionysia

This is such an excellent book, I wish there were more like it。 So well designed it should be a blueprint for other programming books。 Graham Hutton has a way of being succinct and clear so you spend more time thinking than reading。 The exercises are interesting and get you to the next level。

Richard

There's a newer version。 Go read that one instead。 There's a newer version。 Go read that one instead。 。。。more

Giovanni Morlin

Very exhaustive explanation with good example in the 2nd edition (e。g。 Monadic Parsing, State Monad)

Emre Sevinç

This is a beautiful book for people who want to learn Haskell and functional programming as an advanced problem-solving tool。First the good bits: The author's extensive university teaching and research experience shines throughout the book。 Starting from the fundamental principles of functional programming, the author gently introduces the basic concepts and constructs of Haskell and strongly-typed functional programming。 There are a lot of examples to demonstrate how the introduced concepts of This is a beautiful book for people who want to learn Haskell and functional programming as an advanced problem-solving tool。First the good bits: The author's extensive university teaching and research experience shines throughout the book。 Starting from the fundamental principles of functional programming, the author gently introduces the basic concepts and constructs of Haskell and strongly-typed functional programming。 There are a lot of examples to demonstrate how the introduced concepts of Haskell and techniques of functional programming can be used to analyze and design solutions to problems of various complexity。 After introducing the basic building blocks of Haskell in the first part, the author goes on to introduce more complex topics such as monadic parsing, as well as modern Haskell concepts such as Applicative, Traversable and Foldable type classes。 Following these, another very important notion, "lazy evaluation" is introduced and its usage is described, why and how it fits into Haskell explained with examples。The exercises at the end of the chapter are carefully planned, and serve to force the reader's mind to understand concepts by forcing her to practice and think by herself。I have to say that the final two chapters is where the book totally shines。 First the author introduces what it means to reason about programs and shows how systematic thinking can be applied to designing a solution。 In the chapter that follows, that is the final chapter, the reader sees the full power of the ideas developed in the previous chapter applied by calculating compilers, that is, starting from a specification for a programming language, to reaching a correct compiler that can parse the statements in that language and evaluate them to produce the results。 The way to do is by using induction and realizing that this systematic method can be applied to languages of ever increasing complexity is mind-blowing moment in itself。Now the not-so-good bits: Even though the books exemplifies how to break down problems into small pieces and how to compose small building blocks to create bigger and more complex Haskell solutions, it is definitely not enough for the "working programmer"。 That is, you will definitely learn a lot of important and critical Haskell principles and techniques from this book but you'll also miss a lot of other important aspects such as:- A stronger focus on type-driven program design in Haskell- Building Haskell projects and packages- Writing tests, both traditional unit tests, and extensive automated QuickCheck style tests- Profiling your programs- How to properly benchmark your programs- More detailed parsing techniques and libraries- Web-based programming- Network programming- And few more topics that will be important if you're working in a team of Haskell developers, working to produce software products and services for your customers。And you'll definitely need another book for that, the strongest contender being Haskell Book as of 2017 (see my review at https://ileriseviye。wordpress。com/2017/01/01/one-year-with-haskell-programming-from-first-principles/。Having said that, I'd still consider this Second Edition of Programming in Haskell by Hutton to be perfectly suitable for a modern Haskell introduction, provided that it is backed up by a teacher in a classroom environment; someone that can fill in the missing parts。 The final chapters of the book will definitely appeal to programmers and students who want to continue their journey into the more research-oriented areas such as compiler design。 Overall, I'm more than satisfied to add this book to my Haskell and functional programming shelf, and whenever I'll need concise descriptions of fundamental as well as modern ideas, this will be among my go-to books for enlightenment。 。。。more

Pablo

A good book on Haskell with a different approach to LYAH [1]。 It deals with Foldable, Alternative and some other typeclasses that I have not seen treated elsewhere。 It includes a chapter on parsers。 The only objectionable choice might be to always use do notation for IO operations (but that is a matter of personal taste in the end)。

Jorge

Great book to get started in Haskell and learn about the syntax and basics

ggarlic

good book for beginner, except two things:1, it's a little old2, it has too little about monads good book for beginner, except two things:1, it's a little old2, it has too little about monads 。。。more

Willian Molinari

I read this book while studying Haskell and attending the "Functional Programming 101" course by Dr。 Erik Meijer。 It was a nice book to read and a good complement to the course。 Haskell is a great language to learn。 Even if you don't use it at all, it will give you many insights。 This book is great reference material。 I read this book while studying Haskell and attending the "Functional Programming 101" course by Dr。 Erik Meijer。 It was a nice book to read and a good complement to the course。 Haskell is a great language to learn。 Even if you don't use it at all, it will give you many insights。 This book is great reference material。 。。。more

Kartik Singhal

Great companion book to Erik Meijer's FP101x course on functional programming。 Concise。 Great companion book to Erik Meijer's FP101x course on functional programming。 Concise。 。。。more

Łukasz

+ For beginners with zero Haskell knowledge。+ Clear and concise。+ After rereading some parts multiple times, enlightenment strikes。- Too academic rather than practical。- Some examples looks like extremely expressive, clever logic puzzles rather than something that could be invented by mortals- Some examples are simplified and cannot be typed in GHCi 1:1。- After reading it, you can read Haskell basic syntax and thats all。 Need to dive deeper。。。

Alf Kåre Lefdal

Great book for learning functional programming in general, and of course also for learning Haskell。 Very to the point and concise。 You will need to concentrate to absorb the content。

Pieter-jan Delaruelle

Read this book for a course I am taking at the Open Universiteit Nederland and I must say I'm impressed with the clarity and quality of the text and exercises。 Highly recommended if you want to start learning Haskell or functional programming。 Read this book for a course I am taking at the Open Universiteit Nederland and I must say I'm impressed with the clarity and quality of the text and exercises。 Highly recommended if you want to start learning Haskell or functional programming。 。。。more

José

Introducción simple y directa a la programación funcional, el lenguaje de programación Haskell y sobre como razonar sobre programas。 Cada capitulo introduce conceptos, explica mediante ejemplos y finaliza con ejercicios para reforzar la comprensión de los temas tratados。