| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Development.IDE.Import.FindImports
Synopsis
- locateModule :: MonadIO m => DynFlags -> [(InstalledUnitId, DynFlags)] -> [String] -> (ModuleName -> NormalizedFilePath -> m Bool) -> Located ModuleName -> Maybe FastString -> Bool -> m (Either [FileDiagnostic] Import)
- locateModuleFile :: MonadIO m => [[FilePath]] -> [String] -> (ModuleName -> NormalizedFilePath -> m Bool) -> Bool -> ModuleName -> m (Maybe NormalizedFilePath)
- data Import
- data ArtifactsLocation = ArtifactsLocation {}
- modSummaryToArtifactsLocation :: NormalizedFilePath -> Maybe ModSummary -> ArtifactsLocation
- isBootLocation :: ArtifactsLocation -> Bool
- mkImportDirs :: DynFlags -> (InstalledUnitId, DynFlags) -> Maybe (PackageName, [FilePath])
Documentation
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
Constructors
| FileImport !ArtifactsLocation | |
| PackageImport |
data ArtifactsLocation Source #
Constructors
| ArtifactsLocation | |
Fields
| |
Instances
| Show ArtifactsLocation Source # | |
Defined in Development.IDE.Import.FindImports Methods showsPrec :: Int -> ArtifactsLocation -> ShowS # show :: ArtifactsLocation -> String # showList :: [ArtifactsLocation] -> ShowS # | |
| NFData ArtifactsLocation Source # | |
Defined in Development.IDE.Import.FindImports Methods rnf :: ArtifactsLocation -> () # | |
modSummaryToArtifactsLocation :: NormalizedFilePath -> Maybe ModSummary -> ArtifactsLocation Source #
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.