Skip to content

Some improvements of comments, of code, and return->pure - #5026

Merged
fendor merged 2 commits into
haskell:masterfrom
Aster89:cleanups
Jul 28, 2026
Merged

Some improvements of comments, of code, and return->pure#5026
fendor merged 2 commits into
haskell:masterfrom
Aster89:cleanups

Conversation

@Aster89

@Aster89 Aster89 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Some changes, hopefully improvements, I made while working on #5014:

  • change return to pure in a file I passed by,
  • split a very long line in two,
  • update a comment according to what I did in Fix #4935 and #4871 #4937,
  • be more explicit on a pattern match on an EpToken, considering it only has 2 ctors,
  • made addMethodDecls's signature and a piece of the implemention simpler for GHC ≥ 9.10.

@fendor fendor 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.

Some small comments.

Generally, we don't really do these kinds of refactorings of return -> pure unless there is a real incentive.
We don't do this because occasionally, the code in question is directly copied from GHC, changing it just diverges from the original sources, making it harder to see that.
This time, I think it is fine.

Perhaps we should create a style guide for HLS 🤔

Comment thread plugins/hls-class-plugin/src/Ide/Plugin/Class/ExactPrint.hs Outdated
Comment thread plugins/hls-class-plugin/src/Ide/Plugin/Class/ExactPrint.hs
Comment thread plugins/hls-class-plugin/src/Ide/Plugin/Class/ExactPrint.hs Outdated

@fendor fendor 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.

LGTM, thank you!

@fendor
fendor merged commit 691f154 into haskell:master Jul 28, 2026
42 checks passed
@Aster89
Aster89 deleted the cleanups branch July 28, 2026 12:48
@Aster89 Aster89 mentioned this pull request Aug 5, 2026
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