||Haskell is a featured book on Wikibooks because it contains substantial content, it is well-formatted, and the Wikibooks community has decided to feature it on the main page or in other places. Please continue to improve it and thanks for the great work so far! You can edit its advertisement template.|
Haskell :: Functional Programming with Types
Haskell is unique in two ways. First, it is a pure functional programming language. If you have a function and you call it twice in two different places with the same arguments then it will return exactly the same value both times. Second, Haskell provides a very modern type system which incorporates features like typeclasses and generalized algebraic data types. (we hope terms like these will roll smoothly off your tongue by the time you're done.)
So, why do Haskellers like their language? Haskell programmers enjoy their work because dealing with only pure functions makes code much easier to understand, and a function's correctness much easier to analyze and even prove. Moreover, having an advanced type system helps catch mistakes, both silly and profound.
In this book we aim to introduce you both to the Haskell language, from the very basics to the most advanced features, and to computer programming in general. Seasoned programmers, we urge you to be especially patient with this process. In all likelihood, the languages you are most familiar with differ greatly from Haskell, and habits from those languages might make it more difficult to understand how things work: simple, but different. So let learning to see the world through the warped and mathematical mindset of a functional programmer be an adventure, a brave new world.
The book is divided into three sections: the Beginner's Track, the Advanced Track, and Haskell in Practice, which is designed to cover the more day-to-day issues, and is readable with knowledge of the Beginner's Track.
|Please contribute! Anyone, regardless of Haskell competency, can help out. Spend five minutes improving a module and save someone else hours of time. Check out the notes for contributors. Even if you get confused by a page, tell us about it on the discussion page (politely, of course).|
This section will introduce you to the very basics of the language and some of the more frequently used libraries. This will enable you to build simple programs and prepare you for the advanced track.
Most chapters contain exercises where you can test yourself on what you learned in that chapter. At the end of each chapter is a link to the solutions, so you can check if your solution is correct.
This section will introduce wider functional programming concepts such as different data structures and type theory. It will also cover more practical topics like concurrency.
Haskell in Practice
This section covers the more day-to-day issues of working with Haskell, issues such as making use of the standard library, building graphical interfaces or working with databases. You should be able to jump directly to this section from the basic track.
About the book
- Notes for contributors
- Style conventions
- To do
- Templates for the Haskell wikibook
- Experimental Modules
- List of topics
- Haskell Meta-tutorial - the tutorial to find other tutorials
- Learn you a Haskell for great good - Tutorial aimed at people who have experience in imperative programming languages but haven't programmed in a functional language before.
- Real World Haskell - an O'Reilly book, available online at no charge. Built around case studies of practical applications.
- Write Yourself a Scheme in 48 Hours - (imported) An alternate approach to teaching Haskell (and perhaps Scheme), aimed at a more advanced audience (though not necessarily one that knows how to program!)
- Yet Another Haskell Tutorial - (imported) is aimed at beginners and takes a practical approach to things. It is now part of this wikibook and will eventually be mixed in to the main text.