How to include a blank line in a Haddock example?

Haddock supports blank lines and supports REPL examples . But I can’t figure out how to show an empty string in the example.

For example, if 'f' prints two lines separated by an empty line

ghci> f
Line1

Line 2

Relevant Haddock Example

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

only generates

>>> f
Line1 

Line 2

In other words, he ends the example on the first empty line and looks at what follows the regular comment.

Is there a way to show empty likes in READ Haddock examples?

+4
source share
1 answer

Just using

<BLANKLINE>

should work .

+4
source

Source: https://habr.com/ru/post/1608164/


All Articles