purescript-0.12.0: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell2010

Language.PureScript.Linter.Imports

Synopsis

Documentation

lintImports :: forall m. MonadWriter MultipleErrors m => Module -> Env -> UsedImports -> m () Source #

Find and warn on:

  • Unused import statements (qualified or unqualified)
  • Unused references in an explicit import list
  • Implicit imports of modules
  • Implicit imports into a virtual module (unless the virtual module only has members from one module imported)
  • Imports using hiding (this is another form of implicit importing)

data Name Source #

A sum of the possible name types, useful for error and lint messages.

Instances

Eq Name Source # 

Methods

(==) :: Name -> Name -> Bool #

(/=) :: Name -> Name -> Bool #

Ord Name Source # 

Methods

compare :: Name -> Name -> Ordering #

(<) :: Name -> Name -> Bool #

(<=) :: Name -> Name -> Bool #

(>) :: Name -> Name -> Bool #

(>=) :: Name -> Name -> Bool #

max :: Name -> Name -> Name #

min :: Name -> Name -> Name #

Show Name Source # 

Methods

showsPrec :: Int -> Name -> ShowS #

show :: Name -> String #

showList :: [Name] -> ShowS #

Generic Name Source # 

Associated Types

type Rep Name :: * -> * #

Methods

from :: Name -> Rep Name x #

to :: Rep Name x -> Name #

NFData Name Source # 

Methods

rnf :: Name -> () #

type Rep Name Source # 

type UsedImports = Map ModuleName [Qualified Name] Source #

Map of module name to list of imported names from that module which have been used.