On Sat, 2008-01-05 at 23:14 +0000, Alistair Bayley wrote:
Another example:
Let's say you want to produce this .hs output for Haddock:
-- | A description of x -- -- some more comments about x
x = ...
Now imagine you want to produce this .hs:
-- | A description of x
-- some comments which are interesting but we don't want Haddock to use them
x = ...
What do you write in your .lhs file to produce these outputs?
So the interim patch I just applied would produce the first output. If you wanted the second, the nearest you could get would be: | A description of x some comments which are interesting but we don't want Haddock to use them
x = ...
and this would generate: -- | A description of x -- some comments which are interesting but we don't want Haddock to use them x = ... That is, you'd put an extra blank line to separate the two comments. I'm not claiming it's necessarily a brilliant rule but it's also fairly simple. Single line breaks separate paragraphs in a comment. Double or more denote separate comments. To be honest, it's not clear to me that we need any distinction at all since people can just swap the order of the comments: -- some more comments about x -- -- | A description of x x = ... Duncan