Avoiding "Cabal hell"

A common problem with version-dependency based package managers, such as the Haskell standard package manager Cabal, is that dependency conflicts between multiple package can lead to dependency hell, or Cabal hell. A common reason for these conflicts is that an application relies on two different packages A and B, which in turn rely on a common third package C. Without any coordination between the authors of A and B, they may rely on incompatible versions of C.

Haskell for Mac solves this problem by relying on LTS Haskell, a community-curated, consistent set of over 1700 packages provided by the fine folks at FP Complete. Each version of Haskell for Mac embeds a specific version of the Glasgow Haskell Compiler (GHC) and of LTS Haskell. Haskell for Mac already comes with over 200 library packages pre-installed and further packages from LTS Haskell can be added by using the Haskell for Mac command line tools, whose usage is described in a separate article.

Consequently, Haskell for Mac users can use a wide variety of Haskell libraries without having to worry about dependency conflicts. Moreover, Haskell for Mac automatically adds build configuration files to all Haskell projects that ensure long-term and cross-platform repeatable and deterministic project building using the Stack build tool.

Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    Can Akçura

    Good article. So, you encourage to use stack instead of cabal right?

    Edited by Can Akçura
  • 0
    Avatar
    Manuel Chakravarty

    Actually, with Haskell for Mac, there is no need to use `stack` for development. It is however useful to build your Haskell projects on machines where you don't have Haskell for Mac. Therefore, Haskell for Mac automatically adds a stack configuration file to each project.

Please sign in to leave a comment.
Powered by Zendesk