Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant bracket granularity #1225

Closed
Ptival opened this issue Mar 18, 2021 · 2 comments
Closed

Redundant bracket granularity #1225

Ptival opened this issue Mar 18, 2021 · 2 comments

Comments

@Ptival
Copy link

Ptival commented Mar 18, 2021

While I like most hlint's suggestions, I really don't like the suggestion of turning:

function (Ctor (Rec { field })) = ...
-- into:
function (Ctor Rec { field }) = ...

or likewise

function (A { a }) (B { b }) = ...
-- into:
function A { a } B { b } = ...

I find the latter versions harder to read because I think of unparenthesized whitespaces as separating function arguments which is not the case with the named field puns syntax.

Unfortunately, I feel like my options are either to turn off all redundant bracket warnings, or live with it.
Would it be conceivable/reasonable to split the redundant brackets into some sub-categories?

@ndmitchell
Copy link
Owner

I think it would be quite reasonable to pretend that you do need a bracket in this case - and I thought we even did in the past. So make remove redundant bracket not warn in this case.

@ndmitchell
Copy link
Owner

The next version of HLint won't suggest these bracket removals.

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

No branches or pull requests

2 participants