## Docs

- Syllabus
- Haskell style guide
- lhs2TeX and SProof

## Lectures

T 16 Jan — Introduction to Haskell

In-class codeTh 18 Jan — Lists, algebraic data types & pattern matching

In-class codeT 23 Jan — basic polymorphism, inference rules & propositional logic

In-class codeTh 25 Jan — Propositional logic

T 31 Jan — Polymorphism and recursion patterns

In-class codeTh 1 Feb — Folds

In-class codeT 6 Feb — Currying, induction

In-class codeTh 8 Feb — Structural induction

T 13 Feb — Untyped

*λ*-calculus I (definitions)Th 15 Feb — Untyped

*λ*-calculus II (Turing-completeness)

## Assignments

Weekly assignments will be posted here, and are due every **Tuesday** before the beginning of class.

Please submit assignments via this form.

Week 1: Intro to Haskell [ lhs ]. Due Tuesday, 23 January.

Week 2: Algebraic Data Types and Proof Trees [ lhs, Proof.hs ]. Due Tuesday, 30 January.

Week 3: Polymorphism and Recursion Patterns [ lhs ]. Due Tuesday, 6 February.

Week 4: Idiomatic Haskell and Induction [ lhs ]. Due Thursday, 15 February.

Week 5: Lambda calculus. Due Thursday, 22 February.

To install the command-line lambda-calculus interpreter:

If you do not already have the

`stack`

tool installed, do so by following the instructions here.In the directory where you extracted the above, run

`stack build`

(you may have to run`stack setup`

first). This may take a while.Once

`stack build`

has completed successfully, you should be able to run`stack exec lc`

to run the lambda calculus interpreter.

## Resources

### Installation and coding environment

You can try using repl.it. I haven’t tried it, but it looks nice, and could be a convenient way to write and run Haskell code without having to install anything.

If you want to install Haskell on your computer, follow the instructions here to install the

`stack`

tool. You should then be able to run`ghci`

using the command`stack ghci`

. (You may have to run`stack setup`

first.) Come ask for help if you are stuck.If you have a favorite text editor it will probably work just fine for editing Haskell programs. If you use emacs I recommend installing Intero. Other editors commonly used with Haskell include Atom, TextMate, and Sublime Text.

### Help/community

The #haskell IRC channel is a great place to get help. Strange as it may seem if you’ve spent time in other IRC channels, #haskell tends to be full of friendly, helpful people.

tryhaskell.org gives you a ghci session in your browser, and includes a very simple tutorial. It also features an interface to the #haskell IRC channel.

lpaste.net is a good place to paste programs you’re having trouble with in order to get help from people in #haskell.

Many people from the Haskell community are active on StackOverflow, which can be a good place to ask questions.

The Haskell-beginners mailing list is a good place to ask beginner-level questions.

The Haskell-cafe mailing list can also be a good place to ask questions, but is much higher-traffic.

The Haskell wiki has a list of frequently asked questions.

### Reading

Graham Hutton’s Programming in Haskell is a required text for the class.

Haskell Programming from first principles is a book in progress which has been getting good reviews. An early access, electronic version is currently available for purchase.

The Typeclassopedia explains many of the type classes in the standard libraries (

`Functor`

,`Applicative`

,`Monad`

,`Monoid`

,`Arrow`

,`Foldable`

,`Traversable`

…).The Haskell wikibook actually contains a substantial amount of well-written information; a great resource if you’re having trouble understanding a particular topic and want a different approach.

Learn You a Haskell for Great Good! is a whimsical Haskell tutorial with funny illustrations. Might be good as an extra reference though I disagree with many of the pedagogical choices it makes. Available for free online or in dead tree form.

The Haskell wiki is a huge grab-bag of all sorts of information, examples, explanations. The quality varies but it’s definitely a great resource.

Planet Haskell aggregates blog posts from the Haskell community.

There is a Haskell subreddit for aggregating Haskell-related websites, blog posts, and news.

### Reference

A useful Haskell cheatsheet.

Hackage is a huge repository of Haskell packages. If it isn’t on Hackage, it doesn’t exist. Packages can be automatically downloaded and installed from Hackage using the cabal-install tool.

Looking for a function but don’t know what it’s called? Want to see the documentation for a particular function? Hoogle searches many standard libraries and can search either by name or by type.

Hayoo is another search engine for the Haskell documentation, which is much more complete (it searches all of Hackage).

If you really want the nitty-gritty details of the Haskell language standard, see the 2010 Haskell report.