Skip to content

Inline comment to the last constructor disapears #425

Open
@Lev135

Description

@Lev135

(with stylish-haskell 0.14.3.0):
It happens with enums, constructor with fields and records:

data Foo
  = Foo -- ^ foo
  | Bar -- ^ bar
  | Baz -- ^ baz

data Foo'
  = Foo' Int -- ^ foo
  | Bar' Int -- ^ bar
  | Baz' Int -- ^ baz

data Foo''
  = Foo''
  { foo :: Int
  }
  -- ^ foo
  | Bar''
  { bar :: Int
  }
  -- ^ bar
  | Baz''
  { baz :: Int
  }
  -- ^ baz

after stylish:

data Foo
  = Foo -- ^ foo
  | Bar -- ^ bar
  | Baz

data Foo'
  = Foo' Int -- ^ foo
  | Bar' Int -- ^ bar
  | Baz' Int

data Foo''
  = Foo''
  { foo :: Int
  }
  -- ^ foo
  | Bar''
  { bar :: Int
  }
  -- ^ bar
  | Baz''
  { baz :: Int
  }

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