Skip to content

Is it possible to change the "add to the import list of" message to look similar to other import messages #626

@expipiplus1

Description

@expipiplus1

I've used sizeOf in my code and haven't imported it, so I bring up the code actions menu and see this:

image

I look for an import Foreign.Storable(sizeOf) amongst all the clutter, but it's not there!

Several times I've accidentally imported something from one of those weirdy packages which reexports loads of stuff, or even imported the wrong thing!

Would it make sense to just render this as a default import action, i.e. import Foreign.Storable(Storable(sizeOf))? Almost all the time I don't care if I've already imported Foreign.Storable before or not (it would be nice to see the imports I've already go present subtly promoted by putting them at the top of the list of code actions however).

(At the moment this behaviour is actually slightly useful, because it tells me that I've got to go and correct #609 if I'm importing a constructor)

(I mentioned this issue here) but I think it deserves its own issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions