mxcl/homebrew — pull request #18779 by camillol (2013-03-27 19:08:29+00:00)
Title: better GHC formula with support for 7.6.2 and bindist installs

There have been other pull requests for GHC, but I think this is the one that takes care of all concerns.

- GHC is out of date: by default this installs the GHC compatible with haskell-platform, but you can pass `--current` to install the current stable version (these are going to be different most of the time due to the different release schedules).

- Compiling from source takes forever, and bottles only exist for a given prefix and take forever to make: the GHC bindist can actually be installed into any prefix, so we take advantage of that and we don't need to make bottles again.

- But someone may want to build from source: that's supported too (`--source`).

- But 7.4.2 has a bug and needs a patch: that's why that version builds from source by default (and of course it uses the bottle that is currently available if installing to `/usr/local`).

Bottom line, this allows people to install 7.6.2 now and makes maintenance easier in the future.

I have tested installing 7.6.2 from binary to a custom prefix, installing 7.4.2 from source to a custom prefix, and installing 7.4.2 from bottle to `/usr/local`.