You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Newlines after every comment in Hackage source #694
I've noticed that the source code Hackage displays shows a newline after every comment (see e.g. https://hackage-content.haskell.org/package/text-2.1.4/docs/src/Data.Text.html), but those newlines are not present in the actual source that was uploaded to Hackage (or on GitHub). I'm not sure if this is a bug in Hackage, Haddock, text, or somewhere else, but I only saw this problem with text.
It seems the newlines are inserted when the line endings of a source file are CRLF instead of LF. src/Data/Text.hs uses CRLF. I was able to confirm that empty lines go away by changing newlines to LF then building a doc with cabal haddock . --haddock-for-hackage in text-2.1.4 directory.
Activity
Bodigrim commentedon Feb 21, 2026
These files were generated by Haddock run by Hackage, they were not uploaded manually. So perhaps something is off with Haddock?..
Lysxia commentedon Feb 22, 2026
I've opened a haddock issue https://gitlab.haskell.org/ghc/ghc/-/issues/26942
matil019 commentedon Feb 22, 2026
It seems the newlines are inserted when the line endings of a source file are CRLF instead of LF.
src/Data/Text.hsuses CRLF. I was able to confirm that empty lines go away by changing newlines to LF then building a doc withcabal haddock . --haddock-for-hackageintext-2.1.4directory.Bodigrim commentedon Feb 22, 2026
I don’t mind normalizing line endings in
textsource code (PRs welcome), but it definitely sounds like a bug in Haddock.konsumlamm commentedon Feb 22, 2026
This seems to be a duplicate of https://gitlab.haskell.org/ghc/ghc/-/issues/26000.
Lysxia commentedon Feb 23, 2026
AH. The CRLF probably come from my Windows machine. I'll remember to do future releases from Linux...