use haskell platform install via haskell platform site or mac homebrew. Both should by default provide (currently) ghc 7.4.2 64bit.
cabal install gtk2hs-buildtools(this MUST be done before anything else)brew install cairo gtk gettext fontconfigbrew link cairo gettext fontconfig- download libfreetype (link to recent version, no guarantee that this remains up to date), unpack libfreetype, and then run
./configure ; make ; make install. cabal install gtk
cabal install diagrams
Create a file called example.hs
{-# LANGUAGE NoMonomorphismRestriction #-}
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
main = defaultMain (circle 1)
On the commandline run ghc --make example.hs, and verify that the build steps succeed.