Learn Me A Haskell Development Tool Setup

HaskellI attended the Brisbane Functional Programing Group meetup this week, and one of the talks was by Chris McKay on “The Whirlwind tour of Haskell Development Tools”. I always enjoy these talks because often the books don’t adequately explain these things and the experts often assume that these things are known.

Here are my notes:

  • getting started books – Real World Haskell, Learn You A Haskell For Great Good, Thiinking Functionally with Haskell
  • ghc – core compiler, supported pretty much everywhere
  • Cabal – package management system for Haskell, general purpose build tool
  • Haskell Platform – bundle of the previous 2 bundled for your platform, plus commonly used libraries, safe place to start
  • Windows – pressure for the committers to kept his up-to-date, Haskell platform takes care of the hard parts
  • OS X – ghcformacosx for an installer or via brew / macports
  • sandbox – supported by Cabal – will check here before going to the system libraries
  • src/Main.hs is the starting point
  • licences – choosealicence.com or tldrlegal.com
  • default-language – Haskell2010
  • GHCi – REPL console, also use for inspections at the command line, used by editor
  • GHCi-NG – extension with better debugging and extra features, required for some plugins
  • Hlint – like lint on other languages, looks for code smells (patterns of functional rules), good for beginners
  • Hoogle is Google for Haskell – idea of what you want to do and want to know a function to do it
  • Hackage – repository of all Haskell knowledge
  • GhcMod – used by plugins, may need to install it, unlikely to use it directly
  • Emacs – haskell-mode (syntax highlighting, indentation, REPL integration), ghc-mod (access to a whole bunch of tools, nice place to start), flycheck-haskell (syntax checking, can’t use with ghc), company-ghc (auto completion), shm (structured Haskell mode, write code in a tree and it edits for you)
  • https://github.com/chrisdone/emacs-haskell-config – good place to start and works out of the box
  • vim – vim2hs (syntax highlighting), syntastic (syntax checking and lint), neco-ghc (auto completion), ghcmod-vim (compliation errors and warnings, not as good as syntastic)
  • other editors that work OK – Sublime, EclipseFP, Atom (from Github, still immature), intelliJ-haskell, FP Haskell Center
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s