News for hackers. Stuff that matters.
Re:Exploratory Haskell (2015) by wyager on Saturday November 19, 2016 @11:55AM (#12994259)
There's not a huge gap between understanding types and monads and stuff like that and being able to write useful code. You just have to try things so you can learn the ecosystem and the idioms people use. I found multiple times learning Haskell that I'd re-invented a concept someone else had already turned into a popular library.

Building a website is a good place to start. Haskell has several very good web frameworks. "Very good" means fast, correct, and well-designed. I don't recommend Snap for beginners; it uses too many strange idioms that aren't used elsewhere in Haskell.

I personally use Happstack because it's very straightforward; it just gives you a monad in which you can do "web stuff" like inspect the URL, read cookies, send back HTTP responses, etc. You can start doing everything the "manual" way, like passing around state in arguments or doing janky text formatting yourself. As you get fed up with that, you can gradually integrate things like monad transformers, custom monads with typeclass derivation, various high-performance formatting libs like blaze, aeson, heist, etc. If you do database stuff you can learn about weird template Haskell and typeclass stuff with Persistent and Esqueleto.

There are no comments on this comment yet.