Haskell
Haskell is an advanced, purely functional programming language with Hindley-Milner type system, concurrent runtime and lazy (non-strict) evaluation.
Things to keep in mind:
- Static type system doesn't necessarily mean wrestling with types like in C thanks to the advanced type inference in Haskell: in fact on many occassions you can let the compiler write your logic for you based on the type signatures
- Lazy evaluation is much more aligned with mathematical reasoning and abstractions: it allows for e.g. manipulations on infinite lists
- One of the defining features of purely functional languages, referential transparency, lets us reason about our programs in a much more structured way
- What's more, Haskell programs are, to an extent, provable: you can prove things like termination or even correctness of algorithm implementation, see Curry-Howard correspondence
- That said, Haskell flexibility prevents it from having some of the critical capabilities required to be a fully operational proof assistant like Coq: it's a trade-off
- Haskell carries deep ideas applicable to modern imperative dynamically typed languages (such as Python): it just might make you a better programmer (but you don't have to program to learn Haskell!)
Format I have in mind is to focus on LYAH (one chapter per week) and supplement with exercises and relevant chapters from HFFP. During weekly meetings we would then discuss our reflections on the chapter, things we found hard or interesting, go through the solutions for exercises and review relevant blogposts to a level of detail dependent on time constraints.
It would be also great to try and connect what we learn here to our university curriculum, especially MA211 and MA203.
Below you'll find a long list of links, loosely partitioned into vague categories. Have a look and skim a couple pages to get an overall feeling for Haskell. Bold font means it's quality content.
Motivation
- Why Functional Programming Matters
- Why Haskell Matters
- What is Good About Haskell?
- Galois testimony
- Haskell <-> Mathematics
- Comparison with other functional languages
- Why is Haskell so fast?
- Haskell Fan Site
- A Brief Guide to A Few Algebraic Structures
- Eleven Reasons to use Haskell as a Mathematician
- Phrasebook (a fairly cute starting point)
- Writing fast Haskell code (old, but quality showcase)
Formal verification and type theory
- Proving things in Haskell
- Can Haskell be proved?
- Verifying Haskell Programs by Combining Testing and Proving
- Writing Haskell with Coq
- A Primer on Type Systems
- What To Know Before Debating Type Systems
- Attractive Types
- Implement With Types, Not Your Brain!
Fundamental resources
- Learn You a Haskell for Great Good! - introductory, easy to follow book, some people with strong opinions fiercely advise against it due to the supposed "illusion of learning" - imho not true
- Haskell Programming from First Principles - modern and comprahensive source, regarded as the best book by far, imho it's way too overrated and doesn't explain things as well as people say it does
- Real World Haskell - pool of relevant, real-world application-oriented examples
- How To Organize a Picnic on a Computer - engaging tutorial on Haskell thought process
- What I Wish I Knew When Learning Haskell
- Usefull functions in Prelude.hs
- Typeclassopedia
- Haskell Programming Tips
- Hitchhikers' Guide to Haskell
- Functors, Applicatives, And Monads In Pictures
- H-99: Ninety-Nine Haskell Problems
Advanced resources
- Oleg Kiselyov
- Useful Idioms that will blow your mind
- Category Theory for Programmers
- Haskell Symposium
- Creative uses of monads
- Twelve Monads of Christmas
Environment
Miscellaneous
- Notes for first year Computing at Imperial College London
- Lobsters search query
- What a Haskell Study Group is Not
- Hakyll
- dataHaskell
- Desugaring Haskell
- Understanding basic error messages
- Specific topics in bitemyapp/learnhaskell
- Adapted Agda style guide