ghcide-2.7.0.0: The core of an IDE
Safe HaskellSafe-Inferred
LanguageGHC2021

Development.IDE.Import.FindImports

Synopsis

Documentation

locateModule Source #

Arguments

:: MonadIO m 
=> HscEnv 
-> [(UnitId, DynFlags)]

Import directories

-> [String]

File extensions

-> (ModuleName -> NormalizedFilePath -> m (Maybe NormalizedFilePath))

does file exist predicate

-> Located ModuleName

Module name

-> PkgQual

Package name

-> Bool

Is boot module

-> m (Either [FileDiagnostic] Import) 

locate a module in either the file system or the package database. Where we go from *daml to Haskell

locateModuleFile :: MonadIO m => [(UnitId, [FilePath], Set ModuleName)] -> [String] -> (ModuleName -> NormalizedFilePath -> m (Maybe NormalizedFilePath)) -> Bool -> ModuleName -> m LocateResult Source #

locate a module in the file system. Where we go from *daml to Haskell

data Import Source #

Instances

Instances details
Show Import Source # 
Instance details

Defined in Development.IDE.Import.FindImports

NFData Import Source # 
Instance details

Defined in Development.IDE.Import.FindImports

Methods

rnf :: Import -> () #

mkImportDirs :: HscEnv -> (UnitId, DynFlags) -> Maybe (UnitId, ([FilePath], Set ModuleName)) Source #

This function is used to map a package name to a set of import paths. It only returns Just for unit-ids which are possible to import into the current module. In particular, it will return Nothing for main components as they can never be imported into another package.