Then add `~/.cabal/bin:/opt/cabal/1.20/bin:/opt/ghc/7.8.2/bin:/opt/happy/1.19.3/bin:/opt/alex/3.1.3/bin` to your PATH (bash_profile, zshrc, bashrc, etc)
Install the GHC for Mac OS X app, which includes GHC and Cabal. It provides instructions on how to add GHC and Cabal to your path after you've dropped the .app somewhere.
## Yorgey course - Do this first, this is the primary way I recommend being introduced to Haskell.
http://www.seas.upenn.edu/~cis194/lectures.html Brent Yorgey's course is the best I've found so far and replaces both Yann Esposito's HF&H and the NICTA course. This course is particularly valuable as it will not only equip you to write Haskell but also help you understand parser combinators.
## Supplementary course that provides more material on intermediate topics
This is Bryan O'Sullivan's online course from the class he teaches at Stanford. If you don't know who he is, take a gander at half the libraries any Haskell application ends up needing and his name is on it. Of particular note if you've already done the Yorgey course are the modules on phantom types, information flow control, language extensions, concurrency, pipes, and lenses.
- http://dev.stephendiehl.com/hask/ (this also covers some basics for Cabal)
### Cabal guidelines
Cabal Hell was a problem for Haskell users before the introduction of sandboxes. Installing outside of a sandbox will install into your user package-db. This is *not* a good idea except for foundational packages like Cabal, alex, and happy. Nothing else should be installed in the user or global package-dbs unless you know what you're doing.
To experiment with a package or start a project, begin by doing `cabal sandbox init` in a new directory.
Put briefly:
- Always use sandboxes for installing new packages, building new or existing projects, or starting experiments
- Use `cabal repl` to start a project-scoped ghci instance
## Exercises for practice
You should do Yorgey's course before attempting this: https://github.com/NICTA/course/
[Learn You a Haskell for Great Good (LYAH)](http://learnyouahaskell.com) and [Real World Haskell](http://book.realworldhaskell.org) (Thanks bos!) are available online.
I recommend RWH as a reference (thick book). The chapters for parsing and monads are great for getting a sense for where monads are useful. Other people have said that they've liked it a lot. Perhaps a good follow-up for practical idioms after you've got the essentials of Haskell down?
## For learning some common typeclasses
Useful for understanding typeclasses in general but also some Hask-specific category theory:
Also Hayoo (which has all of hackage enabled for search by default): http://holumbus.fh-wedel.de/hayoo/hayoo.html
## Fun Stuff
After you're comfortable with Haskell, strongly consider learning Lenses and Prisms, even if just as a "user". You don't need to understand the underlying category for it to be useful.
Seen here: http://hackage.haskell.org/package/lens
If you need JavaScript, you probably want Purescript for generating JS. Purescript is *not* strictly Haskell but it is very similar and quite pleasant.
This book by Simon Marlow is probably the best I've ever read on the topics of Parallelism and Concurrency: http://chimera.labs.oreilly.com/books/1230000000929
A thorough walk-through on testing & incremental development of a multi-threaded application in Haskell: http://kukuruku.co/hub/haskell/haskell-testing-a-multithread-application
Some of the crazy *-morphism words you've heard are actually about recursion. NB - before tackling this material you should know how to implement foldr for lists and at least one other data structure, such as a tree. (folds are catamorphisms) Knowing how to implement an unfold (anamorphism) for the same will round things out a bit.
This material dovetails with traversable and foldable.
People vastly overestimate the difficulty of using Lens. Anybody comfortable with Functor/Foldable/Traversable (or even just the first one) can leverage lenses and prisms to make their life happier.
Harper's Practical Foundations for Programming Languages is the best PL focused intro to type theory I've read: http://www.cs.cmu.edu/~rwh/plbook/book.pdf