I get the same error relatively consistently when trying to install the stylish-haskell package off of hackage. The install went swimmingly until it got to installing condui
As mentioned in some of the other answers this is due to gcc being replaced by Clang starting with at least Xcode 5.
GHC leans on GCC's preprocessor in order to support c++ like #something
macros and it looks like Clang behaves slightly differently which causes compilation of haskell sources containing such macros to fail.
The fix is actually displayed prominently on the Haskell Platform's Mac page: https://www.haskell.org/platform/mac.html
It consists of a simple bash script which acts as a wrapper around Clang.
To install it:
Install it by running the following instructions in a terminal:
cd ~/Downloads
chmod +x ghc-clang-wrapper
./ghc-clang-wrapper
Once that's done, simply relaunch the cabal install command and it will run fine.