Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Haskell cabal tool for Haskell 7.6.1 on Mac OSX?

I installed Haskell on MAC OSX according to the instructions on this page.

Version 7.6.1 http://www.haskell.org/ghc/download_ghc_7_6_1

However, it does not install the cabal tool which I need for installing packages.

How can I install cabal?

like image 981
Phil Avatar asked Mar 06 '13 04:03

Phil


People also ask

What is GHCup?

GHCup makes it easy to install specific versions of GHC on GNU/Linux, macOS (aka Darwin), FreeBSD and Windows and can also bootstrap a fresh Haskell developer environment from scratch. It follows the UNIX philosophy of do one thing and do it well. Similar in scope to rustup, pyenv and jenv.


1 Answers

From the top of that page:

Stop!

For most users, we recommend installing the Haskell Platform instead of GHC. The current Haskell Platform release includes a recent GHC release as well as some other tools (such as cabal), and a larger set of libraries that are known to work together.

So following that link will get you what you want: the Haskell Platform is GHC plus the packages and tools you want, including Cabal (the library) and cabal-install (the command-line tool). Since you're on OS X, you can also use Homebrew to get the GHC and Cabal if you want: brew install ghc cabal-install.

like image 52
Antal Spector-Zabusky Avatar answered Sep 19 '22 15:09

Antal Spector-Zabusky