haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
361 stars 242 forks source link

support for multiline text doctest properties #1609

Closed thielema closed 1 month ago

thielema commented 11 months ago

Doctest supports multiline syntax :{ .. :} for doctest unit tests, e.g.

>>> :{ runMyTest
   longArgumentA
   longArgumentB
   longArgumentC
:}
expected output

but it does not support that syntax for doctest properties, that is

prop> :{ runMyTest
   longArgumentA
   longArgumentB
   longArgumentC
:}

We would like to support multiline syntax for properties in doctest-extract, though, which is currently blocked by missing support in Haddock. We have factored out the doctest parser to https://hackage.haskell.org/package/doctest-lib, thus haddock and doctest-extract and doctest could use the same parser.

See also: https://github.com/sol/doctest/issues/131

Kleidukos commented 1 month ago

Hi, thank you for this ticket, but Haddock now lives full-time in the GHC repository! Read more at https://discourse.haskell.org/t/haddock-now-lives-in-the-ghc-repository/9576.

Let me know if you feel it is still needed, and I'll migrate it. :)