-
Notifications
You must be signed in to change notification settings - Fork 88
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
Hlint suggestions #260
Hlint suggestions #260
Conversation
I have rebased this PR onto master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
90 suggestions down, not bad!
@@ -314,7 +311,7 @@ onServerHello ctx cparams sentExts (ServerHello rver serverRan serverSession cip | |||
|
|||
-- intersect sent extensions in client and the received extensions from server. | |||
-- if server returns extensions that we didn't request, fail. | |||
when (not $ null $ filter (not . flip elem sentExts . (\(ExtensionRaw i _) -> i)) exts) $ | |||
unless (null $ filter (not . flip elem sentExts . (\(ExtensionRaw i _) -> i)) exts) $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this be further simplified with all
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can. But I don't know whether or not @vincenthz likes it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of when not
-> unless
, it's much less readable IMHO, but if you guys are happy with those changes, let's move forward. same goes for all
. I either will adapt myself to the syntax or go mad :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep this as is.
Merged. Thank you for reviewing! |
This PR accepts reasonable hlint suggestions.