Skip to content

Respect ImportQualifiedPost? #3362

Open
@kindaro

Description

@kindaro

Is your enhancement request related to a problem? Please describe.

I often ask HLS to import stuff for me. For example, if I write Text.toLower, I can then ask HLS to import qualified Data.Text as Text — fantastic! However, I often have the extension ImportQualifiedPost on, so my imports should look like import Data.Text qualified as Text. I have to make this change by hand.

Describe the solution you'd like

I want HLS to see that ImportQualifiedPost is on, and write qualified imports appropriately.

Describe alternatives you've considered

I can format with ormolu or fourmolu — it automatically respects ImportQualifiedPost. But this is another distraction, another step that needs to be consciously and appropriately executed. Only a few of the projects I work on are thoroughly automatically formatted, and I cannot blindly format a file because this would incur an outsized diff. Therefore, I should have to tell the formatter which lines to format. This is too hard — I should be better off repairing the problematic import line by hand.

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