Skip to content

How do I enforce import Data.Set (Set); import qualified Data.Set as Set? #1658

@JackKelly-Bellroy

Description

@JackKelly-Bellroy

A common idiom for importing container packages is to import the type name directly, and the module name qualified:

import Data.Set (Set)
import qualified Data.Set as Set

How do I configure hlint to do this? The closest I can find is something like this:

- modules:    
    - name: "Data.Set"
      importStyle: qualified
      qualifiedStyle: unrestricted
      as: Set
      asRequired: true

But this causes hlint to reject the import Data.Set (Set) import. Is there a way to whitelist that as an exception?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions