||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 TypesEdit
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.
Fun with TypesEdit
Haskell in PracticeEdit
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 bookEdit
Other Haskell tutorialsEdit
- Haskell Meta-tutorial - the tutorial to find other tutorials
- Learn You a Haskell for Great Good - Gratis (CC-BY-NC-SA license) tutorial aimed at beginners who have may 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 (CC-BY-NC license). Built around case studies of practical applications.
- Write Yourself a Scheme in 48 Hours - (imported here) 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 here) is aimed at beginners and takes a practical approach to things — now part of this wikibook, in process of being mixed into the main text.
Read in another language
This page is available in 7 languages