tweag / ormolu

A formatter for Haskell source code
https://ormolu-live.tweag.io
Other
944 stars 83 forks source link

Haddock comment in single line export list breaks format #1051

Open brandonchinn178 opened 1 year ago

brandonchinn178 commented 1 year ago

Describe the bug A multiline haddock in a single line export list incorrectly changes to a single line haddock comment.

To Reproduce

module Foo ({- | asdf -} foo) where

Currently, formatting this with --unsafe returns:

module Foo (-- | asdf foo) where

Expected behavior Should reformat to

module Foo
  ( -- | asdf
    foo
  ) where

or stay with multiline haddock

Environment

Additional context Add any other context about the problem here.