haskell / haskell/stylish-haskell

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

Open
#177 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Haskell
Stars
1k
Forks
153
PR merge metrics
No merged PRs in 30d

Description

Consider file with next imports:

```haskell
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:

```haskell
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`](https://github.com/serokell/serokell-util/blob/0b53cf92d3dc1d8922eb51f849325d75ecb8f588/.stylish-haskell.yaml) config. Maybe some bug in config file.

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.