stylish-haskell icon indicating copy to clipboard operation
stylish-haskell copied to clipboard

Long types with subparts (fields or constructors) result into extremely long lines

Open chshersh opened this issue 8 years ago • 0 comments

Consider file with next imports:

import           Distribution.PackageDescription (BuildInfo (includeDirs)
                                                 , GenericPackageDescription (packageDescription))

When I run stylish-haskell over such file current import is aligned in the next less desirable way:

import           Distribution.PackageDescription (BuildInfo (includeDirs), GenericPackageDescription (packageDescription))

Instead current import shouldn't be touched. So I propose to not add break entities on separate lines if this line is already big enough (i.e. length >= columns).

I'm using this .stylish-haskell.yaml config. Maybe some bug in config file.

Possibly related issue: https://github.com/serokell/serokell-util/blob/0b53cf92d3dc1d8922eb51f849325d75ecb8f588/.stylish-haskell.yaml

chshersh avatar Jul 29 '17 16:07 chshersh