Functional programming languages are gaining in popularity so let’s hop on that Haskell bandwagon. With Haskell, you can write clean, concise, and expressive code. Don’t believe me just yet?

Now let’s dive into setting up your Haskell developer environment by

configuring two package managers installing Haskell making a “Hello, World” program sending our first SMS with Twilio using Haskell (get a Twilio phone number here )

IDEs for Haskell

There is no complete Haskell IDE (so if you want to make one, the market is wide open.) Many Haskellers use Atom because it has the language-haskell and ide-haskell packages, whose syntax-highlighting of aspects like import statements make it stand out. They also help with auto-indentation, auto-completion, and identifying types. My Haskell professor recommends Atom with Emacs which works in terminal and has good syntax highlighting and code-completion. For you Vim fans, never fear: you can set up Vim and Haskell like this. You can also try Eclipse with this colorer plugin or Leksah which is written in Haskell, uses the cabal package format, and offers multi-window support. I however prefer Sublime Text 3 mainly because I’m used to it for web development. It offers a SublimeHaskell package with smart completion, type inference, and error and warning highlighting, and is what was used to make this post.

How to Install Haskell

The interactive Glasgow Haskell Compiler is all open source on GitHub. Install both Haskell and GHC here from a Mac or visit here from a PC. To test it run $ ghci on the command line. You should see something like this if all goes well.

How to Find and Download Haskell Packages

A package is a library of Haskell modules that the compiler recognizes. These modules contain functions and types that can help you solve problems when coding, letting you work with REST APIs (hey, like Twilio!) Where can you find neat Haskell packages to code with? Check out Stackage and Hackage for open-source packages which you download using the stack and cabal package managers. The main difference between the two is that Stackage only offers a subset of the packages Hackage offers. Hackage packages could potentially have dependency issues, but most are completely fine out-of-the-box. Overall, Hackage offers a greater spread and variety to choose from.

Manage Haskell Packages with Stack

Stack is my preferred package manager for Haskell. Stack is isolated; so there are no changes made outside of specific Stack directories when you stack install on the command line. When you build with stack, it makes reproducible builds (also known as package caching) so that stack build does the same thing tomorrow as it does today if none of the code changes. Stack also offers a nice, clean developer experience.

On a Mac machine, type the following on the command line to install: