mihaimaruseac / hindent

Haskell pretty printer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The haddock above the first element of an export list is replaced in the wrong position

toku-sa-n opened this issue · comments

Problem

  • I checked the issue tracker for existing issues about this problem.
  • I'm using the latest version of hindent.

Input haskell

module HIndent
  (-- * Formatting functions.
   reformat
  -- * Testing
  ,test
  )
  where

Expected output haskell

module HIndent
  ( 
  -- * Formatting functions.
    reformat
  -- * Testing
  , test
  ) where

Actual output haskell

module HIndent
   -- * Formatting functions.
  ( reformat
  -- * Testing
  , test
  ) where

On GHC 8.10.7, cabal haddock for the expected output succeeds but fails for the actual output. On GHC 9.2.2, cabal haddock succeeds for both the expected and actual outputs. However, I think the expected one has better beauty.