Personal tools

Learning Haskell

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(Course material)
(Online tutorials: Added Learning Haskell tutorial)
 
(36 intermediate revisions by 16 users not shown)
Line 1: Line 1:
__NOTOC__
 
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]
  
 
This portal points to places where you can go if you want to learn Haskell.  
 
This portal points to places where you can go if you want to learn Haskell.  
  
The [[Introduction|Introduction to Haskell]] on the Haskell website tells you what 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.  There is an old but still relevant paper about [http://weblog.raganwald.com/2007/03/why-why-functional-programming-matters.html Why Functional Programming Matters] (PDF) by John Hughes. More recently, Sebastian Sylvan wrote an article about [[Why Haskell Matters]].
+
The [[Introduction|Introduction to Haskell]] on the Haskell website tells you what 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.  There is an old but still relevant paper about [http://www.cse.chalmers.se/~rjmh/Papers/whyfp.html Why Functional Programming Matters] (PDF) by John Hughes. More recently, Sebastian Sylvan wrote an article about [[Why Haskell Matters]].
  
There is also a [http://www.haskell.org/haskellwiki/Comparison 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].
+
Join the [http://www.reddit.com/r/haskell 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 maillists, IRC, or StackOverflow.
+
There is also a [http://www.haskell.org/haskellwiki/Comparison 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].
  
==Implementations==
+
You can ask questions to members of the Haskell community on mailing lists, IRC, or StackOverflow. We recommend installing the [http://www.haskell.org/platform/ Haskell Platform].
  
Here is an overview about Haskell implementations (for new, or non-expert users, we recommend starting with the [http://haskell.org/platform Haskell Platform]).
+
== Training courses ==
  
{| border=1 cellspacing=0 cellpadding=5 bgcolor=#FFFFFF width=100%|
+
Short training courses aimed at existing programmers
|-
+
|   
+
! Messages
+
! Size
+
! Tools
+
! Remarks
+
|-
+
| [http://www.haskell.org/ghc/ GHC]
+
| +
+
| -
+
| ++
+
| Many language extensions; generated code is very fast. ''The most popular implementation.''
+
|-
+
| [http://www.haskell.org/hugs/ Hugs]
+
| +/-
+
| ++
+
| -
+
| Fast compilation; used a lot for learning Haskell and rapid code development. See also [[WinHugs]].
+
|-
+
| [http://www.cs.york.ac.uk/fp/nhc98/ nhc98]
+
| +
+
| +
+
| ++
+
| Profiling, debugging, tracing.  ''Not actively developed.''
+
|-
+
| [[Yhc]]
+
| +
+
| +
+
| ?
+
| Compiles to bytecodes. Runtime easily portable. ''Not actively developed.''
+
|-
+
| [http://www.cs.uu.nl/wiki/Helium Helium]
+
| ++
+
| ++
+
| -
+
| No type classes (yet!) and thus incompatible with most material on this site. Made for teaching/learning.  Excellent error messages.
+
|-
+
| [http://www.cs.uu.nl/wiki/UHC UHC]
+
| +/-
+
| -
+
| +/-
+
| Developed for experimentation with language features. As a Haskell compiler still under development.
+
|}
+
  
Detailed information on the implementations can be found in a [[Implementations|separate article]].
+
* [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://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)
 +
* [http://www.cs.uu.nl/wiki/USCS Summerschool on Applied Functional Programming] at Utrecht University (2-week course)
  
== Material ==
+
== Material for self-study ==
  
 
Below there are links to certain introductory material.  If you want to dig deeper, see [[Books and tutorials]].
 
Below there are links to certain introductory material.  If you want to dig deeper, see [[Books and tutorials]].
Line 67: Line 26:
 
=== Textbooks ===
 
=== Textbooks ===
  
 +
* [http://www.haskellbook.com/ Haskell Programming from first principles]
 
* [http://www.cs.yale.edu/homes/hudak/SOE/ The Haskell School of Expression]
 
* [http://www.cs.yale.edu/homes/hudak/SOE/ The Haskell School of Expression]
 
* [http://www.haskellcraft.com/ Haskell: the Craft of Functional Programming]
 
* [http://www.haskellcraft.com/ Haskell: the Craft of Functional Programming]
Line 76: Line 36:
 
* [http://book.realworldhaskell.org/ Real World Haskell]
 
* [http://book.realworldhaskell.org/ Real World Haskell]
 
* [http://nostarch.com/lyah.htm Learn You a Haskell for Great Good!]
 
* [http://nostarch.com/lyah.htm Learn You a Haskell for Great Good!]
 +
* [http://http://happylearnhaskelltutorial.com Happy Learn Haskell Tutorial]
  
 
=== Online tutorials ===
 
=== Online tutorials ===
  
 
* [[Meta-tutorial]]
 
* [[Meta-tutorial]]
* [http://en.wikibooks.org/wiki/Haskell Haskell Wikibook] A long tutorial on Haskell that includes "Yet Another Haskell Tutorial", "Write Yourself a Scheme in 48 Hours" and "All about monads".
+
* [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.cs.utah.edu/~hal/docs/daume02yaht.pdf YAHT - Yet Another Haskell Tutorial] (good tutorial available online, also [http://pub.hal3.name/daume02yaht.pdf here])
+
* [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://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://www.haskell.org/tutorial/ A Gentle Introduction to Haskell] - classic text, but not so gentle really :D
 
* [http://www.haskell.org/tutorial/ A Gentle Introduction to Haskell] - classic text, but not so gentle really :D
 
* [ftp://ftp.geoinfo.tuwien.ac.at/navratil/HaskellTutorial.pdf Haskell-Tutorial]
 
* [ftp://ftp.geoinfo.tuwien.ac.at/navratil/HaskellTutorial.pdf Haskell-Tutorial]
 
* [http://lasche.codingcrew.de/kurse/haskell/hskurs_index.htm Online Haskell Course] (German)
 
* [http://lasche.codingcrew.de/kurse/haskell/hskurs_index.htm Online Haskell Course] (German)
* [http://ccfit.nsu.ru/~ikuznecov/doc/Haskell%20Tutorial%20for%20C%20Programmers/intro.html Haskell for C Programmers]
+
* [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.
 
* [http://learnyouahaskell.com/ Learn You a Haskell for Great Good!] Beautiful, illustrated Haskell tutorial for programmers with less of a functional programming background.
* [http://www.youtube.com/playlist?list=PL2672EBC57C1F5F9B Learning Haskell] Ongoing tutorial in the form of youtube videos; updates slowly.
+
* [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 ===
 
=== Advanced tutorials ===
Line 94: Line 60:
 
* [[Hitchhikers guide to Haskell]]
 
* [[Hitchhikers guide to Haskell]]
 
* [http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours Write Yourself a Scheme in 48 Hours]
 
* [http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours Write Yourself a Scheme in 48 Hours]
* [http://research.microsoft.com/Users/simonpj/papers/marktoberdorf/ Tackling the Awkward Squad] (on I/O, interfacing to C, concurrency and exceptions)
+
* [http://research.microsoft.com/en-us/um/people/simonpj/papers/marktoberdorf/ Tackling the Awkward Squad] (on I/O, interfacing to C, concurrency and exceptions)
  
 
=== Debugging/profiling/optimization ===
 
=== Debugging/profiling/optimization ===
Line 100: Line 66:
 
=== Monads ===
 
=== Monads ===
  
* [http://sigfpe.blogspot.com/2006/08/you-could-have-invented-monads-and.html You Could Have Invented Monads! (And Maybe You Already Have.)]
+
* [http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html You Could Have Invented Monads! (And Maybe You Already Have.)]
 
* [http://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/baastad.pdf Monads for Functional Programming]
 
* [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]
 
* [http://www.haskell.org/haskellwiki/All_About_Monads All about monads]
 
* [[IO inside|IO inside: down the Rabbit Hole]]
 
* [[IO inside|IO inside: down the Rabbit Hole]]
* [http://spbhug.folding-maps.org/wiki/MonadsEn Monads]
 
  
 
=== Type classes ===
 
=== Type classes ===
  
* [http://homepages.inf.ed.ac.uk/wadler/papers/class/class.ps.gz The paper that at first time introduced type classes and their implementation using dictionaries]
+
* [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]]
 
* [[Research papers/Type systems#Type classes|More papers on the type classes]]
  
 
=== Generic programming ===
 
=== Generic programming ===
  
* [Dead link; [http://replay.web.archive.org/20090207090211/http://www.cs.vu.nl/boilerplate/ IA backup]] [http://www.cs.vu.nl/boilerplate/#papers Scrap your boilerplate]
+
* [[Scrap your boilerplate]]
  
 
=== Popular libraries ===
 
=== Popular libraries ===
  
 
* ByteStrings?
 
* ByteStrings?
* [http://www.cs.uu.nl/people/daan/download/parsec/parsec.html Parsec, a fast combinator parser]
+
* [http://legacy.cs.uu.nl/daan/download/parsec/parsec.html Parsec, a fast combinator parser]
 
* [[Modern array libraries]]
 
* [[Modern array libraries]]
 
* [http://www.haskell.org/haskellwiki/Gtk2Hs/Tutorials Gtk2Hs, the GUI library]
 
* [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 ===
 
=== Reference ===
  
 
* The official language definition: [[Language and library specification]]
 
* The official language definition: [[Language and library specification]]
* [Broken link][[HaskellNewbie|Haskell Newbie]]
+
* [http://www.letu.edu/people/jaytevis/Programming-Languages/Haskell/tourofprelude.html Tour of the Haskell Prelude]
* [Broken link] [http://cs.anu.edu.au/student/comp1100/haskell/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]
 
* Haskell [[Reference card]]
 
* Haskell [[Reference card]]
 
* [http://members.chello.nl/hjgtuyl/tourdemonad.html A tour of the Haskell Monad functions]
 
* [http://members.chello.nl/hjgtuyl/tourdemonad.html A tour of the Haskell Monad functions]
* [Broken link] [http://www.cs.uu.nl/helium/docs/TourOfPrelude.html Tour of the Helium Prelude]
+
* [http://www.cs.uu.nl/wiki/bin/view/Helium/ATourOfTheHeliumPrelude Tour of the Helium Prelude]
* [http://www.cs.ukc.ac.uk/people/staff/sjt/craft2e/errors/allErrors.html Some common Hugs error messages]
+
* [http://www.cs.kent.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://cheatsheet.codeslower.com/ The Haskell Cheatsheet] - A reference card and mini-tutorial in one.
 
* A [http://www.haskell.org/haskellwiki/Category:Glossary Glossary] of common terminology.
 
* A [http://www.haskell.org/haskellwiki/Category:Glossary Glossary] of common terminology.
  
 
=== Course material ===
 
=== Course material ===
* [http://www.cse.chalmers.se/edu/course/TDA555/ Introduction to Functional Programming, Chalmers]
+
* [http://www.cse.chalmers.se/edu/course/TDA555/ Introduction to Functional Programming, Chalmers] (for beginners at programming)
* [Broken link] [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/afp/ Advanced Functional Programming, Chalmers]
* [Dead link] [http://www.cs.chalmers.se/~koen/Aafp/ Advanced 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://www.cs.uu.nl/docs/vakken/lfp/ Functional programming]: course notes ([http://www.staff.science.uu.nl/~fokke101/courses/fp-eng.pdf English], [http://www.staff.science.uu.nl/~fokke101/courses/fp-nl.pdf Dutch], [http://www.staff.science.uu.nl/~fokke101/courses/fp-sp.pdf Spanish]), slides in Dutch
 
* [http://www.cse.unsw.edu.au/~cs1011/05s2/ CS1011]: Tutorials, lab exercises and solutions
 
* [http://www.cse.unsw.edu.au/~cs1011/05s2/ CS1011]: Tutorials, lab exercises and solutions
* [Hungarian] [http://pnyf.inf.elte.hu/fp/Index.xml Functional Programming]: online Haskell exercises (maybe Explorer can't show xml content)
 
 
* Stanford - [http://www.scs.stanford.edu/11au-cs240h/ Functional Systems in Haskell]
 
* 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
 +
 +
== Trying Haskell online ==
 +
 +
There are several websites where you can enter a Haskell program and run it. They are (in no particular order):
 +
* [https://cloud.sagemath.com/ SageMathCloud]
 +
* [https://www.fpcomplete.com/school/using-fphc FP Haskell Center]
 +
* [http://tryhaskell.org/ Try Haskell]
 +
* [http://www.codeworld.info/ Codeworld]
 +
* [http://chrisuehlinger.com/LambdaBubblePop/ Bubble Pop!], the satisfaction of popping bubble wrap, combined with the satisfaction of really elegant functional programming!
 +
* [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.
 +
 +
To create a browser based environment yourself:
 +
* [http://gibiansky.github.io/IHaskell/ IHaskell]

Latest revision as of 02:10, 15 August 2016


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

The Introduction to Haskell on the Haskell website tells you what 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. There is an old but still relevant paper about Why Functional Programming Matters (PDF) by John Hughes. More recently, Sebastian Sylvan wrote an article about Why Haskell Matters.

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

There is also a table comparing Haskell to other functional languages. Many questions about functional programming are answered by the comp.lang.functional FAQ.

You can ask questions to members of the Haskell community on mailing lists, IRC, or StackOverflow. We recommend installing the Haskell Platform.

Contents

[edit] 1 Training courses

Short training courses aimed at existing programmers

[edit] 2 Material for self-study

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

[edit] 2.1 Textbooks

[edit] 2.2 Online tutorials

[edit] 2.3 Advanced tutorials

[edit] 2.4 Debugging/profiling/optimization

[edit] 2.5 Monads

[edit] 2.6 Type classes

[edit] 2.7 Generic programming

[edit] 2.8 Popular libraries

[edit] 2.9 Reference

[edit] 2.10 Course material

[edit] 3 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: