Skip to content

Conversation

pbrinkmeier
Copy link
Contributor

This PR adds a proof of concept for showing the description for a package when it's hovered in a .cabal file, e.g.:

image

This uses cabal info <package name> under the hood and parses its output.

@pbrinkmeier
Copy link
Contributor Author

Huh, apparently hoistMaybe was added only recently. It's trivial to add our own impl but probably not worth it for this poc.

@fendor
Copy link
Collaborator

fendor commented Oct 20, 2024

I discussed this feature with @wz1000 and GHC is aware of all the package databases in the current compiler session. The package database contains the relevant info (e.g. ghc-pkg --global describe base), so we should be able to read the package db somehow (maybe even via Cabal), and then look for the package with the given name.

In short, there should be a way forward for this feature, that avoids calling cabal info, which is great :)

@pbrinkmeier
Copy link
Contributor Author

Great news! I'll happily incorporate that. Do you have any specific ideas for a way forward?

@fendor
Copy link
Collaborator

fendor commented Oct 20, 2024

Not yet, I need to do some research, but Ill write it down and let you know once I have some idea :)

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