Why Isn’t Cabal Installed with GHC?

Given that installing Haskell packages is painless with Cabal and often exasperating without it, why isn’t it just included by default in a GHC install? Seems like an easy step to take that would make a huge difference to the user community, especially new users. Are we supposed to use the new (beta) Haskell Platform instead of the regular GHC install to get this sort of tool support?

13 Comments

  • I think you are. cabal-install uses some libraries which aren’t part of the ‘core’ GHC package, like zlib

  • Andrea Vezzosi wrote:

    There’s a little of confusion here (the names don’t help).
    Cabal the library is shipped with ghc, the standard Setup scripts use it to build and install packages.
    the command line tool named “cabal”, which comes in the package cabal-install, and can fetch dependencies from hackage for you etc. is included only in the Haskell Platform.

    And yes, the general user is supposed to use the Haskell Platform, only maintainers and testers should go fetch the latest ghc to prepare for the next platform release.
    But those are presumed to already have a cabal-install installed, so they can use it to upgrade.

  • > Are we supposed to use the new (beta) Haskell Platform instead of the regular GHC install to get this sort of tool support?

    Yes, that’s precisely what you are supposed to do. The GHC developers don’t want or need the burden of maintaining all the other tools for the community.

    That burden is happily carried by the Haskell Platform.

    The GHC download page even tells us so: http://haskell.org/ghc/download_ghc_6_12_1.html

  • Ummm…. Cabal _does_ come with GHC. You’re thinking of the new cabal-install tool (which uses Cabal).

    The “beta” Haskell Platform is (for now) just GHC + what used to be known as the “extralibs” + cabal-install. You can still install cabal-install separately if you want.

    Also, not everyone uses cabal-install to install Haskell packages: those people who use a Linux distribution with decent Haskell support will often use system packages.

  • Ganesh Sittampalam wrote:

    Yes, you’re supposed to use the platform. Where does it say it’s in beta?

  • What, you want a new (alpha) GHC install that comes ‘with batteries included’?

  • I couldn’t agree with you more, and I’ve argued for this in the past. Even if GHC don’t do anything particular, just shoved the latest cabal.exe in the installer, it would make a massive difference.

  • Quentin Moser wrote:

    Yes, precisely. The fact that the Haskell Platform is still tagged “beta” is probably a weird joke, because it definitely is the stable, supported, batteries included version of GHC Haskell.

  • In answer to the final sentence: yes.

  • Thanks, everyone. That definitely answers the question! Much appreciated. I note that the GHC home page makes no mention of Haskell Platform, so that might be a small change that would help send people in the right direction.

    @Ganesh: It’s in the page title on http://hackage.haskell.org/platform/, so while you don’t see it anywhere on the page when you visit the site, it shows up pretty clearly for anyone who googles “Haskell Platform.”

    @Ivan: Yes, cabal-install, which regrettably generates a tool called “cabal.exe.” Hence, it gets called “cabal.”

  • Keep in mind that GHC, especially from version 6.12 onwards, is probably better thought of as a module for use by systems integrators than as something for end users to download. As others have mentioned, the Haskell Platform is what you’re looking for.

    Within my company (I am a commercial Haskell developer), I build our own customized platform from (a modified version of) GHC 6.12 and various other tools. When doing this, it’s best if GHC includes the minimum amount possible, because otherwise those become things that need to be ripped out and replaced when you’re doing custom builds.

  • > Are we supposed to use the new (beta) Haskell Platform instead of the regular GHC install to get this sort of tool support?

    Yes, that’s precisely what you are supposed to do. The GHC developers don’t want or need the burden of maintaining all the other tools for the community.

    That burden is happily carried by the Haskell Platform.

    The GHC download page even tells us so: http://haskell.org/ghc/download_ghc_6_12_1.html