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

Fix Show instance #2802

Merged
merged 6 commits into from
Apr 17, 2022
Merged

Fix Show instance #2802

merged 6 commits into from
Apr 17, 2022

Conversation

pepeiborra
Copy link
Collaborator

No description provided.

deriving newtype (Eq, Show, Typeable, Hashable, NFData)
deriving newtype (Eq, Typeable, Hashable, NFData)

instance Show GhcSessionDeps where
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's wrong with the derived one? Worth a comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It prints True or False instead of the key name

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The problem is that the deriving strategy is new type instead of stock

Copy link
Collaborator

Choose a reason for hiding this comment

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

So why not use the stock deriving?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh the stock instance is very verbose and bloats traces. I have changed the custom instance to not ignore the boolean for good measure.

@pepeiborra pepeiborra merged commit 41f917e into master Apr 17, 2022
sloorush pushed a commit to sloorush/haskell-language-server that referenced this pull request May 21, 2022
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.

3 participants