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

chore: changes in preparation for hlint 3.6 #1092

Merged
merged 1 commit into from
Jul 11, 2023
Merged

Conversation

brprice
Copy link
Contributor

@brprice brprice commented Jul 10, 2023

We will shortly bump our haskell.nix, which will bring in a new version of hlint. This adds some new linting checks which, before this commit, we would fail.

We will shortly bump our haskell.nix, which will bring in a new version
of hlint. This adds some new linting checks which, before this commit,
we would fail.

Signed-off-by: Ben Price <ben@hackworthltd.com>
@brprice
Copy link
Contributor Author

brprice commented Jul 10, 2023

This should address the pre-commit-checks failures in #1084

Comment on lines 274 to +278
genPrimCon' = do
genPrimCon <&> map (bimap (fmap $ PrimCon ()) (TCon ())) <&> filter (consistentTypes ty . snd) <&> \case
consistentCons <-
filter (consistentTypes ty . snd) . map (bimap (fmap $ PrimCon ()) (TCon ()))
<$> genPrimCon
pure $ case consistentCons of
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are some changes which I am less sure are improvements: 1/3

Comment on lines 391 to 396
( typeInUse tdName td tydefs defs
|| any (elem paramName . freeVarsTy) (concatMap valConArgs $ astTypeDefConstructors td)
|| elemOf
(to astTypeDefConstructors % folded % to valConArgs % folded % getting _freeVarsTy % _2)
paramName
td
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are some changes which I am less sure are improvements: 2/3

Comment on lines 910 to 916
when
(any (elem paramName . freeVarsTy) $ concatMap valConArgs $ astTypeDefConstructors td)
( elemOf
(to astTypeDefConstructors % folded % to valConArgs % folded % getting _freeVarsTy % _2)
paramName
td
)
(throwError $ TypeParamInUse tdName paramName)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are some changes which I am less sure are improvements: 3/3

@brprice brprice requested a review from a team July 10, 2023 11:41
@dhess
Copy link
Member

dhess commented Jul 10, 2023

I'm fine with these, but I'm also OK with disabling some of the new lints.

@brprice brprice added this pull request to the merge queue Jul 11, 2023
Merged via the queue into main with commit 7871d12 Jul 11, 2023
2 checks passed
@brprice brprice deleted the brprice/hlint-3.6-prep branch July 11, 2023 15:30
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.

2 participants