lspitzner / brittany

haskell source code formatter
GNU Affero General Public License v3.0
690 stars 72 forks source link

Haddock comments in import list aren't treated correctly #220

Closed sevanspowell closed 3 years ago

sevanspowell commented 5 years ago

Brittany reformats this:

module Some.Polling
  (
  -- * Types
    PollIntervalMicroseconds(PollIntervalMicroseconds)
  , PollPredicate(PollPredicate)
  , PollMaxAttempts(PollMaxAttempts)
  , PollingTimeoutError(PollingTimeoutError)
  , AsPollingTimeoutError(_PollingTimeoutError)
  -- * Polling
  , pollUntil
  , pollUntilTimeout
  )
where

to this:

module Some.Polling
  (
  -- * Types
    PollIntervalMicroseconds(PollIntervalMicroseconds)
  , PollPredicate(PollPredicate)
  , PollMaxAttempts(PollMaxAttempts)
  , PollingTimeoutError(PollingTimeoutError)
  , AsPollingTimeoutError
    ( _PollingTimeoutError
  -- * Polling
    )
  , pollUntil
  , pollUntilTimeout
  )
where

which Haddock won't accept:

error:
    parse error on input ‘-- * Polling’
   |
20 |   -- * Polling
   |   ^^^^^^^^^^^^
tfausak commented 3 years ago

Fixed by 38cdd152218799b91993e6483903fd5618b7d6d9.