haskell / haskell/stylish-haskell
Align of mutl_way_if incorrect
- Dominant language
- Haskell
- Stars
- 1k
- Forks
- 153
- PR merge metrics
- No merged PRs in 30d
Description
In my `.stylish-haskell.yaml` I have:
```
# Never align the right hand side of some elements.
- simple_align:
cases: never
top_level_patterns: never
records: never
multi_way_if: never
- squash: {}
```
and after using `stylish-haskell` on one of my files, I get the following as part of the diff:
```
st <- getFileStatus fp
if
| isRegularFile st -> pure (fp : files, dirs)
- | isDirectory st -> pure (files, fp : dirs)
- | otherwise -> pure (files, dirs)
+ | isDirectory st -> pure (files, fp : dirs)
+ | otherwise -> pure (files, dirs)
```
Using version `0.14.6.0`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the report with the shown .stylish-haskell.yaml configuration and a multi-way if containing the displayed guards, using stylish-haskell 0.14.6.0 as the baseline. Trace the simple_align handling for multi_way_if and verify that setting it to never leaves the right-hand sides unaligned; no source file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100