5

Haddock supports blank lines, and supports REPL examples. But I can't figure out how to show a blank line in an example.

For example, if 'f' prints out two lines separated by a blank line

ghci> f
Line1

Line 2

The corresponding Haddock example

-- >>> f
-- Line1
-- 
-- Line 2

only generates

>>> f
Line1 

Line2

In other words, it ends the example at the first blank line and treats what follows as a regular comment.

Is there a way to show blank likes in Haddock REPL examples?

Community
  • 1
  • 1
orome
  • 45,163
  • 57
  • 202
  • 418

1 Answers1

5

Simply using

<BLANKLINE>

should work.

orome
  • 45,163
  • 57
  • 202
  • 418
ErikR
  • 51,541
  • 9
  • 73
  • 124