haskell / haddock

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

Multiline synopsis is split on lines in Hoogle output #381

Open ndmitchell opened 9 years ago

ndmitchell commented 9 years ago

Take the Cabal file http://hackage.haskell.org/package/arithmoi-0.4.1.2/arithmoi.cabal, which reads:

synopsis            : Efficient basic number-theoretic functions.
                      Primes, powers, integer logarithms.

That produces the Haddock output:

-- | Efficient basic number-theoretic functions.
Primes, powers, integer logarithms.

The second line should start with -- to indicate it is still part of the comment, or you could replace newlines with spaces.

panhania commented 9 years ago

Presumably fixed (I'm not sure when though). I get this output:

-- | Efficient basic number-theoretic functions.
--   Primes, powers, integer logarithms.
ndmitchell commented 9 years ago

Looks awesome. Would be great to get a test added as per #377 (since this is quite a subtle thing to do and hits very few libraries).