ghcide-2.4.0.0: The core of an IDE
Safe HaskellSafe-Inferred
LanguageHaskell2010

Development.IDE.Import.DependencyInformation

Synopsis

Documentation

data DependencyInformation #

Constructors

DependencyInformation 

Fields

newtype ModuleImports #

The imports for a given module.

Constructors

ModuleImports 

Fields

Instances

Instances details
Show ModuleImports # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

showsPrec :: Int -> ModuleImports -> ShowS #

show :: ModuleImports -> String #

showList :: [ModuleImports] -> ShowS #

data RawDependencyInformation #

Unprocessed results that we find by following imports recursively.

Constructors

RawDependencyInformation 

Fields

data NodeError #

An error attached to a node in the dependency graph.

Constructors

PartOfCycle (Located ModuleName) [FilePathId]

This module is part of an import cycle. The module name corresponds to the import that enters the cycle starting from this module. The list of filepaths represents the elements in the cycle in unspecified order.

FailedToLocateImport (Located ModuleName)

This module has an import that couldn’t be located.

ParseError ModuleParseError 
ParentOfErrorNode (Located ModuleName)

This module is the parent of a module that cannot be processed (either it cannot be parsed, is part of a cycle or the parent of another error node).

Instances

Instances details
Generic NodeError # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Associated Types

type Rep NodeError :: Type -> Type

Methods

from :: NodeError -> Rep NodeError x

to :: Rep NodeError x -> NodeError

Show NodeError # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

showsPrec :: Int -> NodeError -> ShowS #

show :: NodeError -> String #

showList :: [NodeError] -> ShowS #

NFData NodeError # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

rnf :: NodeError -> () #

type Rep NodeError # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

type Rep NodeError = D1 ('MetaData "NodeError" "Development.IDE.Import.DependencyInformation" "ghcide-2.4.0.0-2GLANXY6yWhIRmLZNYhiFQ" 'False) ((C1 ('MetaCons "PartOfCycle" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located ModuleName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePathId])) :+: C1 ('MetaCons "FailedToLocateImport" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located ModuleName)))) :+: (C1 ('MetaCons "ParseError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleParseError)) :+: C1 ('MetaCons "ParentOfErrorNode" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located ModuleName)))))

data ModuleParseError #

This does not contain the actual parse error as that is already reported by GetParsedModule.

Constructors

ModuleParseError 

Instances

Instances details
Generic ModuleParseError # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Associated Types

type Rep ModuleParseError :: Type -> Type

Show ModuleParseError # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

showsPrec :: Int -> ModuleParseError -> ShowS #

show :: ModuleParseError -> String #

showList :: [ModuleParseError] -> ShowS #

NFData ModuleParseError # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

rnf :: ModuleParseError -> () #

type Rep ModuleParseError # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

type Rep ModuleParseError = D1 ('MetaData "ModuleParseError" "Development.IDE.Import.DependencyInformation" "ghcide-2.4.0.0-2GLANXY6yWhIRmLZNYhiFQ" 'False) (C1 ('MetaCons "ModuleParseError" 'PrefixI 'False) (U1 :: Type -> Type))

newtype TransitiveDependencies #

Constructors

TransitiveDependencies 

Fields

Instances

Instances details
Generic TransitiveDependencies # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Associated Types

type Rep TransitiveDependencies :: Type -> Type

Show TransitiveDependencies # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

NFData TransitiveDependencies # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

rnf :: TransitiveDependencies -> () #

Eq TransitiveDependencies # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

type Rep TransitiveDependencies # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

type Rep TransitiveDependencies = D1 ('MetaData "TransitiveDependencies" "Development.IDE.Import.DependencyInformation" "ghcide-2.4.0.0-2GLANXY6yWhIRmLZNYhiFQ" 'True) (C1 ('MetaCons "TransitiveDependencies" 'PrefixI 'True) (S1 ('MetaSel ('Just "transitiveModuleDeps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [NormalizedFilePath])))

newtype FilePathId #

For processing dependency information, we need lots of maps and sets of filepaths. Comparing Strings is really slow, so we work with IntMap/IntSet instead and only convert at the edges.

Constructors

FilePathId 

Fields

Instances

Instances details
Show FilePathId # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

showsPrec :: Int -> FilePathId -> ShowS #

show :: FilePathId -> String #

showList :: [FilePathId] -> ShowS #

NFData FilePathId # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

rnf :: FilePathId -> () #

Eq FilePathId # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

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

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

Ord FilePathId # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

data NamedModuleDep #

Instances

Instances details
Generic NamedModuleDep # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Associated Types

type Rep NamedModuleDep :: Type -> Type

Show NamedModuleDep # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

showsPrec :: Int -> NamedModuleDep -> ShowS #

show :: NamedModuleDep -> String #

showList :: [NamedModuleDep] -> ShowS #

NFData NamedModuleDep # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

rnf :: NamedModuleDep -> () #

Eq NamedModuleDep # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

type Rep NamedModuleDep # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

type Rep NamedModuleDep = D1 ('MetaData "NamedModuleDep" "Development.IDE.Import.DependencyInformation" "ghcide-2.4.0.0-2GLANXY6yWhIRmLZNYhiFQ" 'False) (C1 ('MetaCons "NamedModuleDep" 'PrefixI 'True) (S1 ('MetaSel ('Just "nmdFilePath") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NormalizedFilePath) :*: (S1 ('MetaSel ('Just "nmdModuleName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ModuleName) :*: S1 ('MetaSel ('Just "nmdModLocation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ModLocation)))))

newtype ShowableModule #

Constructors

ShowableModule 

Instances

Instances details
Show ShowableModule # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

showsPrec :: Int -> ShowableModule -> ShowS #

show :: ShowableModule -> String #

showList :: [ShowableModule] -> ShowS #

NFData ShowableModule # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

rnf :: ShowableModule -> () #

newtype ShowableModuleEnv a #

Instances

Instances details
Show a => Show (ShowableModuleEnv a) # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

showsPrec :: Int -> ShowableModuleEnv a -> ShowS #

show :: ShowableModuleEnv a -> String #

showList :: [ShowableModuleEnv a] -> ShowS #

NFData a => NFData (ShowableModuleEnv a) # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

rnf :: ShowableModuleEnv a -> () #

data PathIdMap #

Constructors

PathIdMap 

Instances

Instances details
Generic PathIdMap # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Associated Types

type Rep PathIdMap :: Type -> Type

Methods

from :: PathIdMap -> Rep PathIdMap x

to :: Rep PathIdMap x -> PathIdMap

Show PathIdMap # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

showsPrec :: Int -> PathIdMap -> ShowS #

show :: PathIdMap -> String #

showList :: [PathIdMap] -> ShowS #

NFData PathIdMap # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

Methods

rnf :: PathIdMap -> () #

type Rep PathIdMap # 
Instance details

Defined in Development.IDE.Import.DependencyInformation

type Rep PathIdMap

transitiveDeps :: DependencyInformation -> NormalizedFilePath -> Maybe TransitiveDependencies #

returns all transitive dependencies in topological order.

transitiveReverseDependencies :: NormalizedFilePath -> DependencyInformation -> Maybe [NormalizedFilePath] #

Transitive reverse dependencies of a file

immediateReverseDependencies :: NormalizedFilePath -> DependencyInformation -> Maybe [NormalizedFilePath] #

Immediate reverse dependencies of a file

type BootIdMap = FilePathIdMap FilePathId #