lspitzner / lspitzner/brittany

Brittany unaligns Aeson `.=` operator

Open
#85 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement layouting
Dominant language
Haskell
Stars
686
Forks
69
PR merge metrics
No merged PRs in 30d

Description

Hi @lspitzner, I hope you don't mind me dropping by with more examples. I imagine you have a more general issue for this, so as always feel free to close it as a duplicate.

If I take a nicely aligned list like this...
```
payload = encode $ object
[ "a_long_binding" .= ("foo" :: Text)
, "another_long_binding" .= ("bar" :: Text)
, "a_binding" .= ("baz" :: Text)
, "bind" .= (15 :: Int)
, "biiiiind" .= (15 :: Int)
]
```

...`brittany` will reformat it to look like this:
```
payload = encode $ object
[ "a_long_binding" .= ("foo" :: Text)
, "another_long_binding" .= ("bar" :: Text)
, "a_binding" .= ("baz" :: Text)
, "bind" .= (15 :: Int)
, "biiiiind" .= (15 :: Int)
]
```

What are your thoughts on this?

Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running brittany on the Haskell snippet in issue #85 and compare its output with the aligned input. Investigate how the formatter handles the Aeson `.=` operator; done means the shown aligned list remains aligned after formatting.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.