Haskell

Haskell is a purely-functional programming language.

Gentoo and Haskell

 * Gentoo Project: Gentoo Resources for Haskell
 * Gentoo Haskell Overlay README
 * The most important part is that this overlay requires a specific unmasking procedure to prevent blockers.

Compiler and interpreter

 * The probably most important and up-to-date Haskell-implementation is the Glasgow Haskell Compiler (GHC). You can install it with:
 * The package also includes an interpreter called GHCI (except on the ARM-architecture).
 * The package also includes an interpreter called GHCI (except on the ARM-architecture).


 * Furthermore, there's Hugs, an (meanwhile (almost) out-dated) interpreter for Haskell98. You can install it with:

Cabal
With cabal you can package and build libraries and programs. Install it with:

Updating Haskell packages
Sometimes:

has trouble figuring out how to update Haskell packages. Providing emerge with the full list of dev-haskell packages that have upgrades available can sometimes help:

Unless EAPI="6" is approved sometimes we have sub-slot blockers (when updating ghc or some specific package there are a list of blockers) this issue could be solved via running

Hoogle with local installation
The Hoogle ebuild is currently only available in the offical gentoo-haskell overlay. So add that first.

In order to get the an offline installation of all hoogle data, you need to enable the "doc", "hscolour" and "hoogle" USE flag.

Enable the relevant USE flags for hoogle to store all data local, and emerge hoogle

After emerging haskell packages, the hoogle database of the locally installed packages is updated by running:

(It's normal for  to output a bunch of junk. Redirect  to  if you add it to your e.g. .)

At this point, you should be able to use Hoogle from the command-line. For example, the following will search for the  function:

Integration with GHCi
If you'd like to use Hoogle within GHCi, you can do it with a little modification to your local file. Add the following:

Now, within GHCi, you should have access to two new commands,  and. The first will perform a normal Hoogle search and print the output:

The second will display the Haddock documentation for the method:

HLint
HLint checks and simplifies your haskell source code! Install it with:

Haskell Mode
The Haskell-Mode for (X)Emacs makes programming easier; install it with

for GNU Emacs, or with

for XEmacs.

Then, you can configure it with.

ghc-mod
The official gentoo haskell overlay provides an ebuild for ghc-mod, an extension of Haskell mode. Add the overlay with

Then, install the ebuild

Haskell-Mode for Vim
There's also a Haskell-Mode for Vim.

IRC
For further information and individual help, visit  or   on.