lspitzner / brittany

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

Unprocessed comments in and around contexts with forall #300

Open ChickenProp opened 4 years ago

ChickenProp commented 4 years ago
somefunc
  :: forall m
   . ( Constraint1
     -- retained
     , Constraint2
     -- lost
     )
     -- lost
  => SomeType
  -- retained

Both of the "lost" comments are unprocessed. The "retained" ones are fine. In both cases, removing any or all of the other comments doesn't make a difference, but removing the forall m . allows them to be processed. For the first one only, removing , Constraint2 allows it to be processed.

Tested with current master and ghc 8.6 on https://hexagoxel.de/brittany/.