Personal tools

Mac OS X

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(Open Source: Eclipse)
Line 47: Line 47:
* [ AquaMacs], a graphical Emacs version
* [ AquaMacs], a graphical Emacs version
* [ Eclipse] with the [ EclipseFP] plugin
* [ Emacs], is installed on every Mac
* [ Emacs], is installed on every Mac
* [ MacVim], a graphical Vim version
* [ MacVim], a graphical Vim version

Revision as of 10:53, 9 October 2009



1.1 Mac OS X 10.5 (Leopard)

To install GHC on Mac OS X, there are the following options:

1.2 Mac OS X 10.6 (Snow Leopard)

Mac OS X 10.6.x (Snow Leopard) is currently not well supported. The problem is that GHC generates 32bit code, but gcc on Snow Leopard defaults to 64bit code now.

There is a workaround:

  • install the Haskell Platform
  • patch the following wrapper scripts to include the flags "-optc-m32 -opta-m32 -optl-m32":
    • /usr/bin/ghc
    • /usr/bin/ghci
    • /usr/bin/runhaskell
    • /usr/bin/runghc
    • /usr/bin/hsc2hs

Note: MacPorts' ghc package is not yet supported on Mac OS X 10.6.x (Snow Leopard).

1.3 MacPorts

MacPorts contains a Portfile for GHC. Using MacPorts to install GHC will take a while as your computer will compile all the source files itself. In most cases, you're better off installing GHC through the standalone installer (see next section).

If you have MacPorts installed and haven't told it to selfupdate in a while, do that first:

$ sudo port selfupdate

This will take up to a minute, so be patient. It tells MacPorts to retrieve the latest package information from its servers. Next, install GHC:

$ sudo port install ghc

MacPorts will first download and install any dependencies that are needed to install GHC; then it will download, build and install GHC itself. A point of caution however. MacPorts also provides GHC packages. If these are installed and then GHC is upgraded the packages need to be uninstalled and reinstalled, or they will not register properly with the upgraded GHC.


3 Editors

3.1 Open Source

  • AquaMacs, a graphical Emacs version
  • Eclipse with the EclipseFP plugin
  • Emacs, is installed on every Mac
  • MacVim, a graphical Vim version
  • Vim, is installed on every Mac
  • Yi (written in Haskell itself!), is available through cabal-install

3.2 Commercial





and Smultron:


TextEdit is Mac's default text editor, a very basic editor that works fine for most uses, you must however be careful to put it into plain text mode using the Format menu.

4 Shipping Installable Haskell Applications

  • mkbndl builds installable Mac OSX applications from your Haskell project.