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

An interface for hoogle #1833

Closed
aikrahguzar opened this issue Jan 5, 2024 · 5 comments
Closed

An interface for hoogle #1833

aikrahguzar opened this issue Jan 5, 2024 · 5 comments

Comments

@aikrahguzar
Copy link

Hi,
Sometime ago I wrote an interface for hoogle using the async completion and preview functionality provided by consult. The code can be found here https://codeberg.org/rahguzar/consult-hoogle

The code needs some reformatting which I will do but otherwise I think it works pretty well. I wanted to ask the maintainers here if it makes sense to bundle such a thing with haskell-mode. I think that will be a good thing. The only downside I see is the consult dependency but that can handled by making it optional so that people not using consult don't have to do anything. If the inclusion needs some modifications, I can put in some work for that.

If on the other hand, you think a separate GNU ELPA package will be better, please let me know.

@purcell
Copy link
Member

purcell commented Jan 5, 2024

Personally I'd suggest packaging it separately. Yes, many haskell-mode users also use hoogle, but I'd rather encourage multiple small packages that are each maintained actively. Currently there is little support for haskell-mode, and if – for example – someone writes a modern treesitter-based haskell-ts-mode and distributes it separately from haskell-mode, then it would be better for everyone if users could install the same hoogle package.

@aikrahguzar
Copy link
Author

Personally I'd suggest packaging it separately. Yes, many haskell-mode users also use hoogle, but I'd rather encourage multiple small packages that are each maintained actively. Currently there is little support for haskell-mode, and if – for example – someone writes a modern treesitter-based haskell-ts-mode and distributes it separately from haskell-mode, then it would be better for everyone if users could install the same hoogle package.

Makes sense, thanks! I will try to get it added to GNU ELPA soonish.

@purcell
Copy link
Member

purcell commented Jan 6, 2024

I forgot to mention an additional point, which is that it's rarely a good idea for a major mode package to have a dependency on a "framework" such as "consult" that not everyone would want to have installed: haskell-mode would have to depend on consult via consult-hoogle, and would force installation. The alternative of having a "soft" (or undeclared) dependency leads to compilation errors or general unsafety, so it's better to have separate packages.

@aikrahguzar
Copy link
Author

The package is now finally on GNU ELPA https://elpa.gnu.org/packages/consult-hoogle.html

@purcell
Copy link
Member

purcell commented Feb 7, 2024

Yay, I just saw that pop up in my *Packages* list. Nice work!

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

No branches or pull requests

2 participants