Incorrect indentation after case of block
- Dominant language
- Haskell
- Stars
- 1.3k
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Description
The following valid code
```elm
a =
case Nothing of
Just _ ->
0
Nothing ->
0
|> List.singleton
```
gets reformatted into
```elm
a =
case Nothing of
Just _ ->
0
Nothing ->
0
|> List.singleton
```
which is invalid due to `|> List.singleton` now applying only to the nothing case instead of the entire case of block.
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue provides a minimal Elm input and the incorrect formatted output; start by reproducing this case with elm-format and comparing the indentation around the case expression. Done means the pipe remains aligned outside the Nothing branch and the formatted result remains valid Elm.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elm, haskell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100