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

Add Show instances for Command and Options #71

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jhrcek
Copy link
Collaborator

@jhrcek jhrcek commented Feb 15, 2024

@@ -216,3 +217,8 @@ fieldNameSpace_maybe _ = Nothing
fieldName :: FastString -> NameSpace
fieldName _ = varName
#endif

#if __GLASGOW_HASKELL__ < 902
instance Show ModuleName where
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think we want to expose this orphan, it might conflict with other instances in ghcide etc.

Copy link
Collaborator Author

@jhrcek jhrcek Feb 16, 2024

Choose a reason for hiding this comment

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

This instance used to be defined in HLS itself before it was removed as part of this "drop support for ghc 9.0" PR:
https://github.com/haskell/haskell-language-server/pull/3875/files#diff-380432f16b40730b2d63e7ec74a15219c0efa602f03c884837c9e27cf0cc655bL126-L129

Do you have ideas about how the show instance could be defined for ghc 9.0 in hiedb? Declaring it manually with moduleNameString "inlined" doesn't sound appealing..

Is it even worth it resolving that hls TODO or would it be better to just remove it?

A third option that comes to mind: since hls dropped ghc 9.0 support perhaps we could drop support for it in hiedb as well which would make this workaround unnecessary.

@jhrcek jhrcek force-pushed the jhrcek/show-command-options branch from 3c398d3 to 4e61fcf Compare June 28, 2024 04:23
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