I still seem to be getting bug reports about the CPP implementation of Mavericks. Last I'd heard, it seemed that general consensus was that packages should *not* be patched to work around the different CPP implementation, and instead Mavericks users should be installing GCC's CPP.Is this accurate? And is there a wiki page somewhere describing the situation and how to work around it? I'd like to have some authoritative URL to point people to, especially given that I have no access to a Mac system and therefore can't test this myself.
- pretty much everyone *except* the Haskell community accepted that expecting cpp to handle anything other than C and derivatives was a mistake back when ANSI C came out;
So if I'm reading this all correctly:1. Package authors are *not* encouraged to change their code to try and work around this issue.2. Medium/long term, this won't be a problem at all due to changes in GHC itself.3. Short term, users need to follow the instructions at [1] if they're using GHC 7.6 (or earlier?).
>> If ghc-clang-wrapper causes problems with your code, I'd suggest toI agree that ghc-clang-wrapper can cause problems and GHC should
>> fix your code. I'm not sure this actually happens.
>
> It does. See my previous messages. Haskell is not C, and some Haskell
> constructs simply will not work with a program that must lex (and, for
> ANSI, parse) C code.
provide its own CPP. But have you ever experienced such problems
actually?
Erik Hesselink wrote:
> One conditional compilation feature that's used relatively often and
> not covered by your earlier proposal is bounds checks on librariesCan you point me to an example or some documentation? I am not too familiar
> through cabal. It could be handled the same way as GHC versions, of
> course, but I think the triple of version numbers is a bit more
> 'correct' and flexible.
with advanced cabal usage...
are ANSI features we don't need (assertions, token splicing) but everything else probably gets used one way or another.
On Apr 16, 2014 5:35 AM, "Ben Franksen" <ben.fr...@online.de> wrote:
> Furthermore, I strongly suggest that a suitable replacement for CPP should
> be designed in such a way that its specification can be added to a future
> Haskell language standard. This is the only way to ensure that
> implementations other than GHC can be brought along.
Do we need a Haskell-specific language preprocessor, or just one that's designed to be a general purpose preprocessor instead of specific to some language that's not Haskell? For instance, m4 should be available on most Unix-like systems, and wouldn't have most of the problems I've seen mentioned here. Not allowing single quotes in its variable names would still happen, but those should be lexically distinct from Haskell variables.
Regards, Malcolm