Skip to content

Invalid formatting of indented record with comment #447

@judah

Description

@judah

Input:

x = Just
  -- comment
  A
   { x
   }

The output incorrectly loses indendation of the record constructor A:

x = Just
-- comment
A
  { x
  }

Error:

AST of input and AST of formatted code differ.
  at <input>:(1,5)-(5,4)
Please, consider reporting the bug.

Interestingly, if you change A to a (so it's a record update), then the formatting becomes valid:

x =
  Just
    -- comment
    a
      { x
      }

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions