Search code examples
haskellghccabalarchlinuxhaskell-stack

What is the suggested way of setting up Haskell on Archlinux?


I'd like some guidance on what's the (best) way to have Haskell work on Archlinux.

By work I mean all, in terms of the ghci command line tool, installing packages I don't have - such as vector-space, which this answer to a question of mine refers to -, and any other thing that could be necessary to a Haskell obstinate learner.

Archlinux wikipage on Haskell lists three (alternative?) packages for making Haskell work on the system, namely ghc, cabal-install, and stack. I have the first and the third installed on my system, but I think I must have installed the latter later (unless it's a dependency to ghc) while tampering around (probably in relation to Vim as a Haskell IDE). Furthermore, I have a huge amount of haskell-* packages installed (why? Who knows? As a learner I must have come multiple times to the point of say uh, let's try this!).

  • Are there any pros and cons ("cons", ahah) about each of those packages?
  • Can they all be used with/without conflicts?
  • Does any of them make any other superfluous?
  • Is there anything else I should be aware of which I seem apparently ignorant about based of what I've written?

Solution

  • Arch Linux's choice of providing dynamically linked libraries in their packages tends to get in the way if you are looking to develop Haskell code. As an Arch user myself, my default advice would be to not use Arch's Haskell packages at all, and instead to install whatever you need through ghcup or Stack, starting from the guidance in their respective project pages.