OCaml for OSX

This is a small guide of how to install OCaml in Mac OSX.

First of all make sure that you have XCode command line tools installed. If you don’t, install XCode, go to Downloads and add the Command-Line Tools.

Now you should download the package from the INRIA website:

(Website)

1) Installation

Mount and install the .pkg

Open the terminal and test the main commands from the OCaml package. (If you want a hint, buy the application Cathode, simulates a much nicer console experience once you modify it for you taste)

Check if exists:
– ocaml
– ocamlc
– ocamlopt
– ocamlrun

(If all is okay proceed, if not try reainstalling it again)

2) IDE’s

There are a lot of diferent IDE’s for OCaml. They exists from very complete to very simple, but, in my humble opinion, there isn’t a dedicated medium IDE.

For large projects -> OCaIDE an Eclipse plugin
For small and medium projects -> Camelia

My choice: Either Emacs with (TypeRex Mode) ou TextMate

1) Install Emacs
2) Download TypeRex (http://www.typerex.org/download.html)
3) Intall with the instruction set on the webstie
4) Ready to go

TextMate
1) Get TextMate
2) Go to the bundles repository (http://netcetera.org/cgi-bin/tmbundles.cgi)
3) Download the OCaml bundle (copy the text to a new text file)
4) Save the file, no extension needed)
5) Execute the file with <em>bash</em> and in SUDO mode
6) Reload Bundles in TextMate
7) Ready to go

Personally, as a Mac user I prefer TextMate, although I still believe Emacs is one of the most powerful editors out there.
I just haven’t worked with TextMate, as long as I have with Emacs.

3) Testing

(In Construction)

Leave a comment