alanz / ghc-exactprint

GHC version of haskell-src-exts exactPrint
BSD 3-Clause "New" or "Revised" License
70 stars 32 forks source link

Comments are attached quite incorrectly #77

Open mrkkrp opened 5 years ago

mrkkrp commented 5 years ago

Here is an example:

-- | Something.

data Foo
  = Foo Int
        Int
    -- ^ Foo
  | Bar Bool
        Bool
    -- ^ Bar

-- ^ Bar get attached to HsModule, while it's obvious that it should be attached to the Bar data constructor instead.