Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the next step to learning Haskell after monads?

Tags:

haskell

I've been gradually learning Haskell, and even feel like I've got a hang of monads. However, there's still a lot of more exotic stuff that I barely understand, like Arrows, Applicative, etc. Although I'm picking up bits and pieces from Haskell code I've seen, it would be good to find a tutorial that really explains them wholly. (There seem to be dozens of tutorials on monads.. but everything seems to finish straight after that!)

like image 570
guhou Avatar asked Jul 14 '10 14:07

guhou


People also ask

What should I learn after Haskell?

I'd advise you learn Coq, which is a powerful proof assistant with syntax that will feel comfortable to the Haskell programmer. The cool thing about Coq is it can be extracted to other functional languages, including Haskell.

Should you learn Haskell in 2022?

Yes, Haskell is worth learning in 2022 because functional languages like it are getting more popular among big companies like Facebook. Functional languages are typically ideal for big data and machine learning.

What is the best way to learn Haskell?

If you would like to take a fundamentals-focused approach towards learning Haskell, Introduction to Functional Programming could be the choice for you. It is an online course taught by Erik Meijer that uses Haskell to teach you how to think about programs and write them in any functional programming language.


1 Answers

Here are a few of the resources that I've found useful after "getting the hang of" monads:

  • As SuperBloup noted, Brent Yorgey's Typeclassopedia is indispensable (and it does in fact cover arrows).
  • There's a ton of great stuff in Real World Haskell that could be considered "after monads": applicative parsing, monad transformers, and STM, for example.
  • John Hughes's "Generalizing Monads to Arrows" is a great resource that taught me as much about monads as it did about arrows (even though I thought that I already understood monads when I read it).
  • The "Yampa Arcade" paper is a good introduction to Functional Reactive Programming.
  • On type families: I've found working with them easier than reading about them. The vector-space package is one place to start, or you could look at the code from Oleg Kiselyov and Ken Shan's course on Haskell and natural language semantics.
  • Pick a couple of chapters of Chris Okasaki's Purely Functional Data Structures and work through them in detail.
  • Raymond Smullyan's To Mock a Mockingbird is a fantastically accessible introduction to combinatory logic that will change the way you write Haskell.
  • Read Gérard Huet's Functional Pearl on zippers. The code is OCaml, but it's useful (and not too difficult) to be able to translate OCaml to Haskell in your head when working through papers like this.

Most importantly, dig into the code of any Hackage libraries you find yourself using. If they're doing something with syntax or idioms or extensions that you don't understand, look it up.

like image 83
Travis Brown Avatar answered Nov 08 '22 23:11

Travis Brown