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

address reasonable Hlint suggestions #43

Merged
merged 1 commit into from
Jan 18, 2024
Merged

address reasonable Hlint suggestions #43

merged 1 commit into from
Jan 18, 2024

Conversation

Ptival
Copy link
Contributor

@Ptival Ptival commented Jan 15, 2024

These are the Hlint suggestions that I did not find too egregious.

Happy to cherry-pick only the ones the reviewer agrees with.

@Ptival Ptival requested a review from RyanGlScott January 18, 2024 17:56
@@ -57,7 +57,7 @@ updateSegments fn = elfFileData (updateSeq impl)
let inner = updateSeq impl (elfSegmentData seg)
updateData s d = s { elfSegmentData = d }
newSeg :: f (Maybe (ElfSegment w))
newSeg = fn =<< (fmap (updateData seg) inner)
newSeg = (fn . updateData seg) =<< inner
Copy link
Contributor

Choose a reason for hiding this comment

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

If I were writing this, I'd opt to be explicit and just write:

newSeg = do x <- inner
            fn (updateData seg x)

But the way it's currently written is fine too. (Similarly for the (.)/(=<<) combo on line 79.)

@Ptival Ptival merged commit 12b6254 into main Jan 18, 2024
3 checks passed
@Ptival Ptival deleted the vr/hlint branch January 18, 2024 18:04
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