ghcide-1.2.0.2: The core of an IDE
Safe HaskellNone
LanguageHaskell2010

Development.IDE.Import.FindImports

Synopsis

Documentation

locateModule Source #

Arguments

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

Import directories

-> [String]

File extensions

-> (ModuleName -> NormalizedFilePath -> m Bool)

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