Skip to content

Newlines after every comment in Hackage source #694

Open

Description

@konsumlamm

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.

Activity

  1. Bodigrim commented on Feb 21, 2026

    @Bodigrim
    Contributor

    These files were generated by Haddock run by Hackage, they were not uploaded manually. So perhaps something is off with Haddock?..

  2. Lysxia commented on Feb 22, 2026

    @Lysxia
    Contributor
  3. matil019 commented on Feb 22, 2026

    @matil019

    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.

  4. Bodigrim commented on Feb 22, 2026

    @Bodigrim
    Contributor

    I don’t mind normalizing line endings in text source code (PRs welcome), but it definitely sounds like a bug in Haddock.

  5. konsumlamm commented on Feb 22, 2026

    @konsumlamm
    Author

    This seems to be a duplicate of https://gitlab.haskell.org/ghc/ghc/-/issues/26000.

  6. Lysxia commented on Feb 23, 2026

    @Lysxia
    Contributor

    AH. The CRLF probably come from my Windows machine. I'll remember to do future releases from Linux...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions