CPP within Haddock
<p>I can change haddocks based on a flag if I put the entire block within the CPP conditional branches:</p>

<pre><code>#if SOME_MACRO
-- | Whether SOME_MACRO is true
-- &gt;&gt;&gt; someMacro
-- True
someMacro :: Bool
someMacro = macroVal
#else
-- | Whether SOME_MACRO is true
-- &gt;&gt;&gt; someMacro
-- False
someMacro :: Bool
someMacro = macroVal
#endif
</code></pre>

<p>And the documentation looks as you'd expect it to, and <code>doctest</code> also works as expected.</p>

<p>But that's maintenance nightmare for larger comments or code blocks. On the other hand, this does not seem to work:</p>

<pre><code>-- | Whether SOME_MACRO is true
-- &gt;&gt;&gt; someMacro
#if SOME_MACRO
-- True
#else
-- False
#endif
someMacro :: Bool
someMacro = macroVal
</code></pre>

<p>Why is that? Isn't CPP processed before Haddock? I have the intuition that it's because a newline is staying on after the CPP stage, but it's just an intuition</p>