<p dir="ltr">I'm calling haddock myself. Cabal might have some special magic for CPP, when I searched for "haddock CPP" I got some old bugs about adding cabal support. So presumably it's possible. </p>
<div class="gmail_quote">On Jul 12, 2013 1:15 PM, "Felipe Almeida Lessa" <<a href="mailto:felipe.lessa@gmail.com">felipe.lessa@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Are you using `cabal haddock` or calling haddock manually?<br>
<br>
Cheers,<br>
<br>
On Fri, Jul 12, 2013 at 3:25 PM, Evan Laforge <<a href="mailto:qdunkan@gmail.com">qdunkan@gmail.com</a>> wrote:<br>
> So haddock ignores {-# LANGUAGE CPP #-}, which makes it crash on any<br>
> file that uses it. But if you pass --optghc=-cpp, it runs CPP on<br>
> everything, which makes it crash on any file that uses string gaps, or<br>
> happens to contain a /*. /* is rare and easily fixed, but not string<br>
> gaps.<br>
><br>
> It looks like a workaround would be to manually inspect the files for<br>
> LANGUAGE CPP and run two haddock passes, but then I would have to get<br>
> the two passes to cooperate creating a single TOC and index.<br>
><br>
> Isn't there some way to run haddock on files that use CPP?<br>
><br>
> In the broader scheme, it seems perverse to be using CPP in the first<br>
> place. I use it to configure imports and exports, e.g. to swap out a<br>
> driver backend on different OSes, and to export more symbols when<br>
> testing. Would it make sense to have a haskell version of CPP that<br>
> provides only these features (e.g. just #ifdef, #else, #endif, and<br>
> #define) and leaves out the problematic C comments and backslash<br>
> expectations?<br>
><br>
> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br>
<br>
<br>
--<br>
Felipe.<br>
</blockquote></div>