Skip to content

Conversation

@pbrisbin
Copy link
Member

Tweak fourmolu

1cb7a3c

Use prettyprinter for annotateFailureReason

c71984f

I attempted do this is the least disruptive way. At this point, there's
almost no value in prettyprinter being used. What I've done amounts to
switching T.pack for pretty and T.intercate "\n" for vsep, and
adding a pretty pointless layout and render step.

However, I plan to take more advantage in future commits.

Neatly align listed annotations

c336c14

And don't use tabs.

Use hardline, not literal

7ecb236

I attempted do this is the least disruptive way. At this point, there's
almost no value in prettyprinter being used. What I've done amounts to
switching `T.pack` for `pretty` and `T.intercate "\n"` for `vsep`, and
adding a pretty pointless layout and render step.

However, I plan to take more advantage in future commits.
And don't use tabs.
@pbrisbin pbrisbin requested a review from a team as a code owner January 13, 2026 13:51
@pbrisbin pbrisbin requested review from z0isch and removed request for a team January 13, 2026 13:51
@pbrisbin pbrisbin changed the title Tweak fourmolu Use prettyprinter for annotateFailureReason Jan 13, 2026
@pbrisbin pbrisbin requested review from chris-martin and removed request for z0isch January 13, 2026 13:51
@pbrisbin
Copy link
Member Author

pbrisbin commented Jan 13, 2026

This is part of #203, I decided to work on it in place because that's more fun than moving it.

Comment on lines +185 to +188
, " * Annotation @Text \"Visibility is poor. Visability is poor. Visability is"
, " poor. Visability is poor. Visability is poor. Visability is poor. Visability"
, " is poor. Visability is poor. Visability is poor. Visability is poor."
, " Visability is poor\""
Copy link
Member Author

@pbrisbin pbrisbin Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in the commit, using a prettyprinter for this case isn't really doing a whole lot. If it weren't already a transitive dependency, I'd be hesitant to pull it in just for this. This smart reflow is really the only thing we're getting from it, so at least there's something.

let-style: mixed
in-style: left-align
single-constraint-parens: never # ignored until v12 / ghc-9.6
trailing-section-operators: false # needs fourmolu >= v0.17
Copy link
Member Author

@pbrisbin pbrisbin Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This made the diff a little noisier; sorry I didn't do a better job isolating it.

@pbrisbin pbrisbin merged commit 11539d4 into main Jan 20, 2026
8 of 9 checks passed
@pbrisbin pbrisbin deleted the pb/pretty branch January 20, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants