Skip to content

Follow hlint suggestion: move brackets to avoid $ - #9112

Merged
ulysses4ever merged 2 commits into
haskell:masterfrom
cabalism:hlint/move-brackets-avoid-dollar
Jul 16, 2023
Merged

ulysses4ever merged 2 commits into
haskell:masterfrom
cabalism:hlint/move-brackets-avoid-dollar

Conversation

@philderbeast

Copy link
Copy Markdown
Collaborator

See #9110.

@ffaf1 ffaf1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Apart from the do block, reasonable.

Comment on lines -398 to +404
( when (flag haddockForeignLibs) $ do
withTempDirectoryEx verbosity tmpFileOpts (buildDir lbi') "tmp" $
\tmp -> do
smsg
flibArgs <-
fromForeignLib
verbosity
tmp
lbi'
clbi
htmlTemplate
version
flib
let libArgs' = commonArgs `mappend` flibArgs
runHaddock verbosity tmpFileOpts comp platform haddockProg True libArgs'
)
when
(flag haddockForeignLibs)
( do
withTempDirectoryEx verbosity tmpFileOpts (buildDir lbi') "tmp" $
\tmp -> do
smsg
flibArgs <-

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I do not fancy this one

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I get that. I looked at it a while and concluded the difficulty in reading the code block was there beforehand.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I agree, perhaps you should consider trying to make this part it more readable.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Personally, I'm a heavy user of $ and I also don't like these new parens. But I can live with them no problem.

<<>> parens pkgkind
$+$ ( nest 4 $
vcat
$+$ nest 4 (vcat

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Closing bracket 30+ lines later, odd but followable.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I could have used indentation but didn't want to unindent so many lines, aiming for a small change.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The closing ) was also far before right?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes, +1 to Andrea's comment: it was far away in the initial version too.

[ comp2str c
J..= ( J.object $
J..= J.object
(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Again a weird Allman-style bracket, but still readable in an editor.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not sure who's Allman (Wikipedia says, his indentation style does 8 spaces for a tab, and that's about it) but an extra line that the new version takes is unfortunate, indeed. Again, hardly critical.

@andreabedini andreabedini left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I am good with this 👍

@ulysses4ever ulysses4ever left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't see any controversy here. Thanks!

@ulysses4ever ulysses4ever added merge me Tell Mergify Bot to merge squash+merge me Tell Mergify Bot to squash-merge and removed merge me Tell Mergify Bot to merge labels Jul 13, 2023
@mergify mergify Bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Jul 15, 2023
@ulysses4ever
ulysses4ever merged commit 6eed6f5 into haskell:master Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days squash+merge me Tell Mergify Bot to squash-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants