Avoid blank line separating code and comments in Bird style?

R Sidhu sidhu1f at gmail.com
Tue Jan 13 10:28:02 UTC 2015


This regarding GHC behaviour for literate Haskell programs in Bird
style. GHC expects a blank line between comment[1] and code.
Otherwise, during the literate pre-processor stage, the error
'unlit: Program line next to comment' is reported.

While above behaviour makes sense in general, there are situations
where one would like to place comments adjacent to code with no
intervening blank line. For example, in documenting a declaration
using Haddock (in standard, non-literate Haskell), as shown in
sections 3.1
and 3.2 <http://www.haskell.org/haddock/doc/html/ch03s02.html> of the
Haddock User Guide, no blank line
separates comment and code.

Any way to enable GHC to accept Bird style literate programs with
no blank lines separating comment and code?

[1] 'Comment' (in context of Bird style) refers to text on lines not
beginning with '>'.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20150113/fb811083/attachment.html>

More information about the Glasgow-haskell-users mailing list