haskell / haskell/stylish-haskell

Unusual Record Formatting (hard tabs)

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

Description

In the example

```
data Customer = Customer {
customerID :: CustomerID,
customerName :: String,
customerAddress :: Address
} deriving Show
```

stylish yields

```
data Customer = Customer {
customerID :: Cust omerID,
customerName :: Stri ng,
customerAddress :: Address
} deriving Show
```

In Utrecht style

```
data Customer = Customer {
customerID :: CustomerID
, customerName :: String
, customerAddress :: Address
} deriving Show
```

stylish yields

```
data Customer = Customer {
customerID :: Cust omerID
, customerName :: Stri ng
, customerAddress :: Address
} deriving Show
```

My global config contains

```
- records: {}
```

It appears that this is only an issue when using hard tabs. Using soft tabs yields the expected results. While this is more correct w.r.t. the Report, it may be worthwhile to add support for tabs, or provide a warning in the README about this case.

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.