You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(incidentally none of these are what I want (import Control.Monad (mzero)), but I think that's a separate issue perhaps)
Is it possible to detect that all of these are importing the same symbol and just suggest the canonical one*?
*Exactly what this is may in fact be quite difficult to determine, for instance when something is defined in Foo.Internal but the human programmer will always import from its reexport in Foo.
I wonder how hard it would be to examine Hackage to determine the provenance of imported symbols, and for HLS to only suggest the common imports. Just scraping import lines as an approximation shouldn't be the end of the world in terms of difficulty. Not sure how much data this would be to include, perhaps it's manageable if one leaves out the long tail of infrequently used imports.
Sorry for the rambling issue, hopefully it can stimulate some discussion.
The text was updated successfully, but these errors were encountered:
When I use
mzero
in my code I get 34 suggestions for importing the same thing!(incidentally none of these are what I want (
import Control.Monad (mzero)
), but I think that's a separate issue perhaps)Is it possible to detect that all of these are importing the same symbol and just suggest the canonical one*?
*Exactly what this is may in fact be quite difficult to determine, for instance when something is defined in
Foo.Internal
but the human programmer will always import from its reexport inFoo
.I wonder how hard it would be to examine Hackage to determine the provenance of imported symbols, and for HLS to only suggest the common imports. Just scraping import lines as an approximation shouldn't be the end of the world in terms of difficulty. Not sure how much data this would be to include, perhaps it's manageable if one leaves out the long tail of infrequently used imports.
Sorry for the rambling issue, hopefully it can stimulate some discussion.
The text was updated successfully, but these errors were encountered: