Search code examples
haskellhaddock

How do I incorporate a blank line into a Haddock example?


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?


Solution

  • Simply using

    <BLANKLINE>
    

    should work.