Skip to content

Invalid formatting of Haddocks for data type fields #445

@judah

Description

@judah

From this input:

data X
  = B
     !Int -- ^ y
     C

Ormolu generates:

data X
  = B
      !-- | y
      Int
      C

which results in a parsing error:

Parsing of formatted code failed:
  <input><rendered>:(2,5)-(3,9)
  Cannot parse an infix data constructor in a data/newtype declaration:
  B !--
Please, consider reporting the bug.

Reproduced with Ormolu commit 2517d98.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingbug-upstreamSomething upstream is not working.commentsIssues related to comment placementneeds-ghc-patchTo solve this issue we need to patch GHC

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions