Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- data FinderCache = FinderCache {
- flushFinderCaches :: UnitEnv -> IO ()
- addToFinderCache :: InstalledModule -> InstalledFindResult -> IO ()
- lookupFinderCache :: InstalledModule -> IO (Maybe InstalledFindResult)
- lookupFileCache :: FilePath -> IO Fingerprint
- type FinderCacheState = InstalledModuleEnv InstalledFindResult
- type FileCacheState = Map FilePath Fingerprint
- data FindResult
- = Found ModLocation Module
- | NoPackage Unit
- | FoundMultiple [(Module, ModuleOrigin)]
- | NotFound {
- fr_paths :: [FilePath]
- fr_pkg :: Maybe Unit
- fr_mods_hidden :: [Unit]
- fr_pkgs_hidden :: [Unit]
- fr_unusables :: [UnusableUnit]
- fr_suggestions :: [ModuleSuggestion]
- data InstalledFindResult
- data FinderOpts = FinderOpts {
- finder_importPaths :: [OsPath]
- finder_lookupHomeInterfaces :: Bool
- finder_bypassHiFileCheck :: Bool
- finder_ways :: Ways
- finder_enableSuggestions :: Bool
- finder_workingDirectory :: Maybe OsPath
- finder_thisPackageName :: Maybe FastString
- finder_hiddenModules :: Set ModuleName
- finder_reexportedModules :: Map ModuleName ModuleName
- finder_hieDir :: Maybe OsPath
- finder_hieSuf :: OsString
- finder_hiDir :: Maybe OsPath
- finder_hiSuf :: OsString
- finder_dynHiSuf :: OsString
- finder_objectDir :: Maybe OsPath
- finder_objectSuf :: OsString
- finder_dynObjectSuf :: OsString
- finder_stubDir :: Maybe OsPath
Documentation
data FinderCache Source #
FinderCache | |
|
type FinderCacheState = InstalledModuleEnv InstalledFindResult Source #
The FinderCache
maps modules to the result of
searching for that module. It records the results of searching for
modules along the search path. On :load
, we flush the entire
contents of this cache.
type FileCacheState = Map FilePath Fingerprint Source #
data FindResult Source #
The result of searching for an imported module.
NB: FindResult manages both user source-import lookups
(which can result in Module
) as well as direct imports
for interfaces (which always result in InstalledModule
).
Found ModLocation Module | The module was found |
NoPackage Unit | The requested unit was not found |
FoundMultiple [(Module, ModuleOrigin)] | _Error_: both in multiple packages |
NotFound | Not found |
|
data InstalledFindResult Source #
data FinderOpts Source #
Locations and information the finder cares about.
Should be taken from DynFlags
via initFinderOpts
.
FinderOpts | |
|