The standard ways to install the Glasgow Haskell Compiler and related tools are given at the main Haskell webpage. However, there are many other ways to install GHC, suited for different purposes.
Haskell for Mac is an easy-to-use integrated programming environment for Haskell on OS X. It is a one-click install of a complete Haskell system, including Haskell compiler, editor, many libraries, and a novel form of interactive Haskell playgrounds. Haskell playgrounds support exploration and experimentation with code. They are convenient to learn functional programming, prototype Haskell code, interactively visualize data, and to create interactive animations.
Features include the following:
- Avoid dealing with complicated installation instructions.
- Built-in Haskell editor with customisable themes and context-sensitive identifier completion.
- Interactive Haskell playgrounds provide immediate and continuous feedback.
- You can immediately see what you program is doing while you develop it.
- Playground results can be text or images produced by the Rasterific, Diagrams, and Chart packages.
- Add code and multimedia files to a Haskell project with drag'n'drop.
- Haskell binding to Apple's 2D animation and games framework SpriteKit.
Haskell for Mac requires OS X Yosemite or above.
The Nix package manager (part of NixOS but usable independently) can install GHC, related tools, and Haskell packages across Linux and other Unix systems (including OS X).
The key advantages of adopting Nix as a Haskell distribution are isolation and reproducibility, with environments fully specified. This can simplify dependency management by reducing hidden state.
The users' guide to Haskell infrastructure is the most important reference: https://haskell4nix.readthedocs.io/nixpkgs-users-guide.html
Also helpful are blog posts of and articles of various users describing their environments:
Nix support for Haskell is very much under active development, and many users have begun to adopt the new haskell-ng workflow: http://stackoverflow.com/questions/29033580/how-do-i-use-the-new-haskell-ng-infrastructure-on-nixos
Halcyon is a system for installing Haskell apps and development tools, including GHC and Cabal. It is a simple system which also archives and caches all build products, and can automatically restore archived build products, saving time during development, continuous integration, and deployment. It allows sandbox sources, build tools, and native OS packages to be declared as dependencies and installed together with the app. It can be used to construct deployment systems, such as Deploying Haskell with Heroku.
CoCalc is a platform for collaborative computational mathematics. It provides both free and paid accounts. Among the many tools it provides (including SageMath, R, Jupyter, Numpy/Scipy/Matplotlib, Octave, Cython, GAP, Pari, Macaulay2, and Singular) is GHC. It allows the editing of Haskell files and the creation of Haskell projects, and interaction with GHC through an embedded terminal in the command line.
With CoCalc, developers have access to a shared cloud environment for Haskell, usable from any computer with an internet connection, and requiring no installation.
Other Online Evaluators
There are other tools available that allow the compilation and execution of small amounts of Haskell code for testing, illustration and education purposes. These include: