<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 16, 2014 at 2:42 AM, Kazu Yamamoto <span dir="ltr"><<a href="mailto:kazu@iij.ad.jp" target="_blank">kazu@iij.ad.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">>> If ghc-clang-wrapper causes problems with your code, I'd suggest to<br>
>> fix your code. I'm not sure this actually happens.<br>
><br>
> It does. See my previous messages. Haskell is not C, and some Haskell<br>
> constructs simply will not work with a program that must lex (and, for<br>
> ANSI, parse) C code.<br>
<br>
</div>I agree that ghc-clang-wrapper can cause problems and GHC should<br>
provide its own CPP. But have you ever experienced such problems<br>
actually?<br></blockquote><div><br></div><div>I personally have not, but that's largely because I haven't really ever needed to use -XCPP. I did earlier today talk with someone on IRC who was running into one lexical incompatibility (Haskell's allowing ' to be an identifier character), and have in the past helped diagnose issues with the clang wrapper not working with some programs on Hackage which are incompatible with ANSI C (that ' issue, plus the use of # and ##).</div>
<div><br></div><div>And I consider it nonsensical that people who need to use -XCPP to deal with different library versions or language extensions are restricted to that subset of Haskell which is lexically compatible with C. The problem here is not those people's code; it is that we are relying on a tool which by its nature lexes C code, and using it on Haskell code.</div>
<div><br></div></div>-- <br><div dir="ltr"><div>brandon s allbery kf8nh sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div>
<div>unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</div></div>