Learning Haskell: Difference between revisions

From HaskellWiki
(added page from old page at haskell.org/learning.html page)
m (→‎Course material: online text at Dalhousie U.)
 
(146 intermediate revisions by 73 users not shown)
Line 1: Line 1:
__NOTOC__
[[Category:Tutorials]]


=Learning Haskell=
This portal points to places where you can go if you want to learn Haskell.


==Introduction==
Join the [http://www.reddit.com/r/haskell Haskell subreddit], where we do regular Q&A threads called [[Hask Anything]] (that's the archive).


Haskell is a general purpose, purely functional programming language. This portal points to places where you can go if you want to learn Haskell.  
You can ask questions to members of the Haskell community on [https://matrix.to/#/#haskell:matrix.org Matrix], mailing lists, IRC, or StackOverflow.  


The [[Introduction]] on the [http://www.haskell.org Haskell] homepage tells you that Haskell gives you: substantially increased programmer productivity; shorter, clearer, and more maintainable code; fewer errors; higher reliability; a smaller "semantic gap" between the programmer and the language; shorter lead times.
To get started, [https://www.haskell.org/get-started/ set up your Haskell environment]. You can also try out Haskell in your browser on the [https://play.haskell.org/ Haskell Playground]!


There is an old -- but still relevant -- paper about [http://www.md.chalmers.se/~rjmh/Papers/whyfp.html Why Functional Programming Matters] by John Hughes. More recently Sebastian Sylvan wrote an article about [http://www.haskell.org/haskellwiki/Why_Haskell_Matters Why Haskell Matters]. And there is a [http://haskell.org/comparison.html table] comparing Haskell to other functional languages. Many questions about functional programming are answered by the [http://www.cs.nott.ac.uk/~gmh//faq.html comp.lang.functional FAQ].
== Training courses ==


==Implementations==
Short training courses aimed at existing programmers


{| border=1 cellspacing=0 cellpadding=5 bgcolor=#FFFFFF width=100%|
* [http://www.well-typed.com/services_training On-site and public training courses] by Well-Typed (2-day intro, 2-day advanced, custom on-site courses)
|-
* [http://web.archive.org/web/20161116154850/https://www.nobleprog.co.uk/haskell/training Public training courses] by NobleProg and Nilcons
|   
* [http://www.cs.ox.ac.uk/softeng/subjects/FPR.html Software Engineering course on Functional Programming] at the University of Oxford (1-week course)
! Messages
* [https://utrechtsummerschool.nl/courses/science/advanced-functional-programming Summerschool on Advanced Functional Programming] at Utrecht University (1-week course)
! Size
! Tools
! Remarks
|-
| [http://www.haskell.org/hugs/ Hugs]
| +/-
| ++
| -
| Fast compilation; used a lot for learning Haskell
|-
| [http://www.haskell.org/ghc/ GHC]
| +
| -
| ++
| Many language extensions; generated code is very fast
|-
| [http://www.cs.york.ac.uk/fp/nhc98/ NHC]
| ?
| +
| ++
| Profiling, debugging, tracing
|-
| [http://www.cs.uu.nl/helium/ Helium]
| ++
| ++
| -
| No type classes (yet!) and thus incompatible with most material on this site. Made for teaching/learning.
|}


==Books and tutorials==
== Material for self-study ==


{| border=1 cellspacing=0 cellpadding=5 width=100% valign=top style="text-align:left" |
Below there are links to certain introductory material.  If you want to dig deeper, see [[Books and tutorials]].
! Textbooks
! Tutorials


|- style="vertical-align:top"
=== Textbooks ===


|
* [https://haskellfromtheverybeginning.com/ Haskell from the Very Beginning]
 
* [https://haskellbook.com/ Haskell Programming from first principles]
* [http://www.haskell.org/soe The Haskell School of Expression]
* [http://web.archive.org/web/20190705205338/https://www.cs.yale.edu/homes/hudak/SOE/ The Haskell School of Expression]
* [http://www.cs.ukc.ac.uk/people/staff/sjt/craft2e/ Haskell: the Craft of Functional Programming]
* [http://www.haskellcraft.com/ Haskell: the Craft of Functional Programming]
* [http://www.prenhall.com/allbooks/ptr_0134843460.html Introduction to Functional Programming using Haskell]
* [https://www.pearson.com/us/higher-education/program/Bird-Introduction-Functional-Programming-2nd-Edition/PGM144889.html Introduction to Functional Programming using Haskell]
* [http://books.cambridge.org/0521277248.htm An Introduction to Functional Programming Systems Using Haskell]
* [http://www.cambridge.org/us/knowledge/isbn/item1129654/Introduction%20to%20Functional%20Programming%20Systems%20Using%20Haskell/?site_locale=en_US An Introduction to Functional Programming Systems Using Haskell]
* [http://www.iro.umontreal.ca/~lapalme/Algorithms-functional.html Algorithms: A functional programming approach]
* [http://www.iro.umontreal.ca/~lapalme/Algorithms-functional.html Algorithms: A functional programming approach]
* [http://homepages.cwi.nl/~jve/HR/ The Haskell Road to Logic, Maths, and Programming]
* [http://homepages.cwi.nl/~jve/HR/ The Haskell Road to Logic, Maths, and Programming] (also freely [http://fldit-www.cs.uni-dortmund.de/~peter/PS07/HR.pdf available online]). 
* [http://www.cs.nott.ac.uk/~gmh/book.html Programming in Haskell]
* [http://book.realworldhaskell.org/ Real World Haskell]
* [http://learnyouahaskell.com Learn You a Haskell for Great Good!]
* [http://happylearnhaskelltutorial.com Happy Learn Haskell Tutorial]


|
=== Online tutorials ===


* [http://www.isi.edu/~hdaume/htut Yet Another Haskell Tutorial]
* [[Meta-tutorial]]
* [ftp://ftp.geoinfo.tuwien.ac.at/navratil/HaskellTutorial.pdf Haskell-Tutorial]
* [http://pluralsight.com/training/Courses/Find?highlight=true&searchTerm=haskell Haskell Fundamentals - get started and learn key concepts] at Pluralsight (2-part, 5 hour online course)
* [http://www.informatik.uni-bonn.de/~ralf/teaching/Hskurs_toc.html Online Haskell Course] (German)
* [http://en.wikibooks.org/wiki/Haskell Haskell Wikibook] A thorough textbook with a step-by-step beginners track assuming no programming background. Also includes many advanced concepts, and adaptations of "Yet Another Haskell Tutorial", "Write Yourself a Scheme in 48 Hours", and "All about monads".
* [http://www.haskell.org/tutorial/ A Gentle Introduction to Haskell]
* [http://pub.hal3.name/daume02yaht.pdf YAHT - Yet Another Haskell Tutorial] (good tutorial available online)
* [http://www.cs.ou.edu/~rlpage/fpclassCurrent/textbook/haskell.shtml Two dozen short lessons]
* [http://www.cs.ou.edu/~rlpage/fpclassCurrent/textbook/haskell.shtml Two dozen short lessons]
* [http://halogen.note.amherst.edu/%7Ejdtang/scheme_in_48/tutorial/overview.html Tackling the Awkward Squad] (on monads and IO, concurrency and exceptions)
* [http://www.haskell.org/tutorial/ A Gentle Introduction to Haskell] - classic text, but not so gentle really :D
* [http://halogen.note.amherst.edu/%7Ejdtang/scheme_in_48/tutorial/overview.html Write Yourself a Scheme in 48 Hours]
* [https://fulmanski.pl/zajecia/jpsi/HaskellTutorial.pdf Haskell-Tutorial]
* [http://www.haskell.org/haskellwiki/Hitchhikers_Guide_to_the_Haskell Hitchhikers Guide to Haskell]
* [https://web.archive.org/web/20130515011818/lasche.codingcrew.de/kurse/haskell/hskurs_index.htm Online Haskell Course] (German)
* [http://collection.openlibra.com.s3.amazonaws.com/pdf/haskell_tutorial_for_c_programmers_en.pdf Haskell tutorial for C Programmers]
* [http://learnyouahaskell.com/ Learn You a Haskell for Great Good!] Beautiful, illustrated Haskell tutorial for programmers with less of a functional programming background.
* [https://learnyouahaskell.github.io/ Learn You a Haskell for Great Good! - Community version] An up-to-date community maintained version of the renowned "Learn You a Haskell" (LYAH) guide.
* [http://happylearnhaskelltutorial.com/ Happy Learn Haskell Tutorial] Up to date complete beginner illustrated tutorial that uses many basic examples and exercises , going very slowly step by step.
* [http://www.youtube.com/playlist?list=PL2672EBC57C1F5F9B Learning Haskell] Ongoing tutorial in the form of YouTube videos; updates slowly.
*[https://stevekrouse.github.io/hs.js/ Pattern matching, first-class functions, and abstracting over recursion in Haskell], a simulation of the evaluation of map, foldr and foldl.
* [https://www.schoolofhaskell.com/ School of Haskell]
* [http://learn.hfm.io/ Learning Haskell] — a tutorial combining clear explanations, graphics programming, and hands-on screencasts to teach you the essential concepts of functional programming in Haskell.
 
=== Advanced tutorials ===
 
* [[Hitchhikers guide to Haskell]]
* [http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours Write Yourself a Scheme in 48 Hours]
* [https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.13.9123&rep=rep1&type=pdf Tackling the Awkward Squad] (on I/O, interfacing to C, concurrency and exceptions)
 
=== Debugging/profiling/optimization ===


|-
=== Monads ===


! Reference
* [http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html You Could Have Invented Monads! (And Maybe You Already Have.)]
! Course Material
* [http://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/baastad.pdf Monads for Functional Programming]
* [http://www.haskell.org/haskellwiki/All_About_Monads All about monads]
* [[IO inside|IO inside: down the Rabbit Hole]]


|- style="vertical-align:top"
=== Type classes ===


|
* [http://homepages.inf.ed.ac.uk/wadler/papers/class/class.ps.gz The paper that for the first time introduced type classes and their implementation using dictionaries]
* [[Research papers/Type systems#Type classes|More papers on the type classes]]


* [http://www.haskell.org/hawiki/HaskellNewbie Haskell Newbie]
=== Generic programming ===
* [http://www.cs.uu.nl/~afie/haskell/tourofsyntax.html Tour of the Haskell Syntax]
 
* [[Scrap your boilerplate]]
 
=== Popular libraries ===
 
* [https://web.archive.org/web/20140624104743/legacy.cs.uu.nl/daan/download/parsec/parsec.html Parsec, a fast combinator parser]
* [[Modern array libraries]]
* [http://www.haskell.org/haskellwiki/Gtk2Hs/Tutorials Gtk2Hs, the GUI library]
* [https://ocharles.org.uk/blog/ 24 Days of Hackage] (blog posts about many popular libraries)
 
=== Reference ===
 
* The official language definition: [[Language and library specification]]
* [http://www.cse.chalmers.se/edu/course/TDA555/tourofprelude.html Tour of the Haskell Prelude]
* [http://zvon.org/other/haskell/Outputglobal/index.html Haskell Reference]
* [http://zvon.org/other/haskell/Outputglobal/index.html Haskell Reference]
* [http://www.haskell.org/haskellwiki/Reference_card Haskell Reference Card]
* Haskell [[Reference card]]
* [http://www.cs.uu.nl/~afie/haskell/tourofprelude.html Tour of the Haskell Prelude]
* [http://www.cs.uu.nl/research/projects/helium/docs/TourOfPrelude.html Tour of the Helium Prelude]
* [http://www.cs.uu.nl/helium/docs/TourOfPrelude.html Tour of the Helium Prelude]
* [http://www.cs.kent.ac.uk/people/staff/sjt/craft2e/errors/allErrors.html Some common Hugs error messages]
* [http://www.cs.ukc.ac.uk/people/staff/sjt/craft2e/errors/allErrors.html Some common Hugs error messages]
* [http://cheatsheet.codeslower.com/ The Haskell Cheatsheet] - A reference card and mini-tutorial in one.
* [http://www.haskell.org/haskellwiki/Category:Idioms Some Haskell Idioms]
* A [http://www.haskell.org/haskellwiki/Category:Glossary Glossary] of common terminology.
* [http://www.haskell.org/hawiki Questions and Answers (old Haskell wiki)]
* [http://dev.stephendiehl.com/hask/#intro What I Wish I Knew When Learning Haskell] by Stephen Diehl


|
=== Course material ===
 
* [http://www.cse.chalmers.se/edu/course/TDA555/ Introduction to Functional Programming, Chalmers] (for beginners at programming)
* [http://www.cs.chalmers.se/Cs/Grundutb/Kurser/d1pt/d1pta/external.html Programming in Haskell, Chalmers]
* [http://www.cse.chalmers.se/edu/course/TDA452/ Functional Programming, Chalmers]
* [http://www.cse.chalmers.se/edu/course/afp/ Advanced Functional Programming, Chalmers]
* [http://www.cse.chalmers.se/edu/course/pfp/ Parallel Functional Programming, Chalmers]
* [http://www.shuklan.com/haskell Introduction to Haskell], University of Virginia CS 1501
* [http://www.cs.caltech.edu/courses/cs11/material/haskell/index.html CS 11 Caltech]
* [http://www.cs.caltech.edu/courses/cs11/material/haskell/index.html CS 11 Caltech]
* [http://www.cs.uu.nl/docs/vakken/lfp/ Functional programming]: course notes ([http://www.cs.uu.nl/~jeroen/courses/fp-eng.pdf English], [http://www.cs.uu.nl/~jeroen/courses/fp-nl.pdf Dutch], [http://www.cs.uu.nl/~jeroen/courses/fp-sp.pdf Spanish]), slides in Dutch
* [http://web.archive.org/web/20141118180122/www.cs.uu.nl/docs/vakken/lfp/ Functional programming]: course notes ([http://web.archive.org/web/20171215071419/www.staff.science.uu.nl/~fokke101/courses/fp-eng.pdf English], [http://web.archive.org/web/20160801052854/www.staff.science.uu.nl/~fokke101/courses/fp-nl.pdf Dutch], [http://web.archive.org/web/20181222232248/www.staff.science.uu.nl/~fokke101/courses/fp-sp.pdf Spanish]), slides in Dutch
* [http://www.cse.unsw.edu.au/~cs1011/ CS1011]: Tutorials, lab exercises and solutions
* [http://www.cse.unsw.edu.au/~cs1011/05s2/ CS1011]: Tutorials, lab exercises and solutions
 
* Stanford - [http://www.scs.stanford.edu/11au-cs240h/ Functional Systems in Haskell]
|}
* [http://www.seas.upenn.edu/~cis194/spring13/lectures.html CIS 194 Introduction to Haskell], University of Pennsylvania
* [https://web.cs.dal.ca/~nzeh/Teaching/3137/haskell CSCI 3137: Haskell Programming], Dalhousie University.


== Trying Haskell online ==


Check [http://www.haskell.org/haskellwiki/Books_and_tutorials Books and tutorials] for a more comprehensive list.
There are several websites where you can enter a Haskell program and run it. They are (in no particular order):
* [https://play.haskell.org/ Haskell Playground]
* [https://cocalc.com/app CoCalc app], formerly SageMathCloud
* [http://tryhaskell.org/ Try Haskell]
* [http://www.code.world/haskell CodeWorld]
* [http://chrisuehlinger.com/LambdaBubblePop/ Bubble Pop!], the satisfaction of popping bubble wrap, combined with the satisfaction of really elegant functional programming!
* [http://web.archive.org/web/20181127035556/http://tryplayg.herokuapp.com/ Try Haste & HPlayground client-side framework]; the source code is on [https://github.com/agocorona/tryhplay GitHub]
* [https://koding.com/ Koding] is a cloud based IDE which supports Haskell and several other languages. Free accounts allow one virtual machine.


(perhaps these pages can be merged somehow, or the more introductory material can go on this page, and the advanced books and papers can go on a different page?)
To create a browser based environment yourself:
* [http://web.archive.org/web/20140928145733/gibiansky.github.io/IHaskell/ IHaskell]

Latest revision as of 05:31, 27 February 2025


This portal points to places where you can go if you want to learn Haskell.

Join the Haskell subreddit, where we do regular Q&A threads called Hask Anything (that's the archive).

You can ask questions to members of the Haskell community on Matrix, mailing lists, IRC, or StackOverflow.

To get started, set up your Haskell environment. You can also try out Haskell in your browser on the Haskell Playground!

Training courses

Short training courses aimed at existing programmers

Material for self-study

Below there are links to certain introductory material. If you want to dig deeper, see Books and tutorials.

Textbooks

Online tutorials

Advanced tutorials

Debugging/profiling/optimization

Monads

Type classes

Generic programming

Popular libraries

Reference

Course material

Trying Haskell online

There are several websites where you can enter a Haskell program and run it. They are (in no particular order):

To create a browser based environment yourself: