20

I want to know which libraries, functions, and concepts I definitely should know about and how to use. Monad and the functions there is the typical example, but there are other good primitives to use in coding, like Arrows, Applicative, ... Who are they?

btw, I want to be up-to-date in the Haskell world, learning the new concepts, how is this done?

(the original title was: "Library primitives for coding", but this was changed)

telephone
  • 1,131
  • 1
  • 10
  • 29
  • 11
    On the off-chance you haven't read [the typeclassopedia](http://www.haskell.org/wikiupload/8/85/TMR-Issue13.pdf) yet, do so. – dave4420 May 14 '11 at 20:14
  • It seems that the answer to this question is "learn as much as possible". There was given a lot of topics to dig into here. – telephone May 16 '11 at 21:49
  • The typeclassopedia was exactly what I wanted when I wrote this question. But it was not possible to "accept" that answer (therefore there is no accepted answer). – telephone Nov 30 '12 at 21:42

3 Answers3

18

The best way to start your Haskell experience is to install The Haskell Platform, which has many of the libraries we think are important.

If you look at what abstractions ship in the base system, you'll see some things worth learning:

And don't forget the powerful tools:

Community
  • 1
  • 1
Don Stewart
  • 137,316
  • 36
  • 365
  • 468
  • Well, these libraries are almost included in every Haskell distribution. The question was not about how to start Haskell programming, but to define the "toolbox" of the Haskell programmer. – telephone May 14 '11 at 18:06
  • The Haskell Platform is the standard tookit, I guess my point is, so have a look at what has been selected there. Some of the most important things are listed above. – Don Stewart May 14 '11 at 18:08
  • OK. The idea behind this question came from the times I have looked through the modules in the "standard library", finding interesting concepts, especially "Arrow". The texts about such concepts tend to be on blogs and in the haskell wikibook, therefore I wanted an overview of such. – telephone May 14 '11 at 18:29
  • 2
    Some good resources you might turn to: [Learn you a Haskell for great good!](http://learnyouahaskell.com), and more advanced, [Patterns in FP](http://patternsinfp.wordpress.com/). – Don Stewart May 14 '11 at 18:31
16

Basic libraries to know:

Common data-centric libraries:

Packaged concepts that you should know:

  • Monads, Monad Transformers (see base, mtl)
  • Applicative (see base)
  • Arrows (see base)
  • Software Transactional Memory (stm)
  • Extensible Exceptions (in base since ~GHC 6.8)
  • Dynamic programming in Haskell (See Data.Typeable in base)
  • Sparking (light-weight parallelism hints via parallel)
  • Concurrency (see Control.Concurrent in base)
  • Memoization (monad-memo, MemoTrie)

Semi-advanced concepts:

Testing, benchmarking, and infrastructure:

External tools, GHC helpers, GHC

  • threadscope
  • alex (lexer)
  • happy (a parser generator)
  • haddock (documentation system)
  • Haskell Program Coverage (HPC)
  • GHC manual, which includes information on things like
    • Different back-ends
    • Profiling
    • Debugging
    • Optimization
    • Language extensions

Type-centric knowledge

  • GADTs
  • Rank-N Types
  • Existentials
  • Functional Dependencies and Type Families
  • This list can go on and on, but you'll know where to look if you know the above.

How to stay up-to-date on Haskell without asking a stack-overflow question:

  • Read the papers accepted by ICFP and POPL
  • Read the papers rejected by ICFP and POPL (if you can find them)
  • Connect on the social networks, Haskellers seem big on
    • Twitter (start by following whoever follows Galois or any random Haskeller you know)
    • Reddit
    • Stack Overflow (message me if you need a link)
  • Read blogs (linked from reddit or planet.haskell.org)
  • Follow conversations on the haskell-cafe mailing list or IRC.
  • Attend Galois semi-weekly tech talks
Thomas M. DuBuisson
  • 64,245
  • 7
  • 109
  • 166
  • For those of us not in Portland, it appears Galios posts the tech talks online at http://vimeo.com/channels/galois - I'll definitely be checking this out. Thanks, Galios! – Dan Burton May 15 '11 at 22:15
14

I actually sketched a list/grouping of Haskell-related things by their practical importance a while ago; it looks like this:

Haskell Basics (necessary for anything)

  • Functions
  • Partial application, currying
  • Recursion
  • Higher order functions
  • Algebraic datatypes
  • Pattern matching
  • Type classes
  • Kinds
  • Functors
  • the IO monad

Practical Necessities (you'll probably need to know about these for Serious Work, even if per chance you don't use all of them)

  • Monads
  • Monad Transformers
  • The FFI
  • Laziness/Strictness, BangPatterns and the rest
  • GADTs
  • TypeFamilies
  • FunctionalDependencies

Not Necessarily Necessary, But Probably Useful

  • Applicative
  • Higher-Rank Polymorphism
  • OverlappingInstances
  • Lenses and alternate record systems (fcLabels and the rest)
  • Iteratees
  • Concurrent Haskell (forkIO, MVars, ...)
  • Software Transactional Memory
  • TemplateHaskell
  • RULES

Extracurricular (potentially fascinating but wholly unnecessary)

glaebhoerl
  • 7,695
  • 3
  • 30
  • 41