<div dir="ltr">Hi Malcolm:<div><br></div><div>cpphs is under consideration as a replacement for GCC's C preprocessor in the GHC toolchain:</div><div><a href="https://ghc.haskell.org/trac/ghc/wiki/Proposal/NativeCpp">https://ghc.haskell.org/trac/ghc/wiki/Proposal/NativeCpp</a><br></div><div><br></div><div>GHC 7.10.3's build fails when cpphs is used as the C preprocessor (--with-hs-cpp=cpphs --with-hs-cpp-flags="--cpp").</div><div><br></div><div><div>It runs into this error when preprocessing libraries/base/GHC/Natural.hs:<br></div><div><br></div><div>cpphs: macro MIN_VERSION_integer_gmp expected 3 arguments, but was given 0</div></div><div><br></div><div>I've reproduced this issue on Ubuntu 14.04 x86-64 and SmartOS 15.3.0 x86-64.</div><div><br></div><div>Interestingly the error seems to arise only when preprocessing Natural.hs while the autogenerated cabal-macros.h is present.  Removing that include from the cpphs flags leads to a clean preprocessing run.</div><div><br></div><div>I have more details of this investigation here:</div><div><a href="https://gist.github.com/AlainODea/bd5b3e0e6f7c4227f009">https://gist.github.com/AlainODea/bd5b3e0e6f7c4227f009</a></div><div><br></div><div>Is this a bug?</div><div><br></div><div>Best,</div><div>Alain</div></div>