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

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

-> Maybe FastString

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])] -> [String] -> (ModuleName -> NormalizedFilePath -> m (Maybe NormalizedFilePath)) -> Bool -> ModuleName -> m (Maybe (UnitId, NormalizedFilePath)) 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 (PackageName, (UnitId, [FilePath])) 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.