XCode 5.0 on Mac OS X 10.9 (Mavericks) no longer provides GCC, only clang. According to Haskell Platform for Mac OS X,
Xcode 5 supplies clang as the C compier, and with respect to pre-processing there are some “differences of interpretation” between it and gcc. These differences can affect some Haskell code that uses the CPP extension.
There are two alternatives to solve this problem
- Download ghc-clang-wrapper. Copy this script to /usr/bin, and make sure it is exectuable. Run it sudo.
I installed Haskell Platform using MacPorts and confirmed that the first method works well. If ghc-clang-wrapper does not find where ghc is installed, you can manually edit /opt/local/lib/ghc-7.6.3/settings by replacing the line
(“C compiler command”, “/opt/local/bin/gcc-mp-4.7”),
(“C compiler command”, “/usr/bin/ghc-clang-wrapper”),