[Haskell-cafe] GSoC Project Proposal: Markdown support for Haddock

Malcolm Wallace malcolm.wallace at me.com
Mon Apr 8 19:59:18 CEST 2013

On 8 Apr 2013, at 14:52, Roman Cheplyaka wrote:

>> In my opinion, it is perfectly valid to have intentional preprocessor
>> directives inside Haskell comments.
> Could you give an example where this is useful?
> ... macro expansions inside the comments are rather exotic.

{- | Some module documentation.

#define WEBSITE http://some.really.rather.long/and/tedious/URL/that_I_dont_want_to_type_too_often
You can find more information about Foo at WEBSITE/Foo and Bar at WEBSITE/Bar

As you say, the #define could equally live outside the comment, but I don't see why we should have an arbitrary restriction that it _must_ live outside the comment.  As you also say, "the liberty to write whatever one wants inside a comment feels important", and if that includes the intentional use of CPP, why not?


More information about the Haskell-Cafe mailing list