hiedb-0.6.0.0: Generates a references DB from .hie files
Safe HaskellSafe-Inferred
LanguageHaskell2010

HieDb.Query

Synopsis

Documentation

getAllIndexedMods :: HieDb -> IO [HieModuleRow] Source #

List all modules indexed in HieDb.

getAllIndexedExports :: HieDb -> IO [ExportRow] Source #

List all module exports

getExportsForModule :: HieDb -> ModuleName -> IO [ExportRow] Source #

List all exports of the given module

findExporters :: HieDb -> OccName -> ModuleName -> Unit -> IO [ModuleName] Source #

Find all the modules that export an identifier |

resolveUnitId :: HieDb -> ModuleName -> IO (Either HieDbErr Unit) Source #

Lookup Unit associated with given ModuleName. HieDbErr is returned if no module with given name has been indexed or if ModuleName is ambiguous (i.e. there are multiple packages containing module with given name)

lookupPackage :: HieDb -> Unit -> IO [HieModuleRow] Source #

Lookup all HieModule rows from HieDb that are part of a given Unit

lookupHieFile :: HieDb -> ModuleName -> Unit -> IO (Maybe HieModuleRow) Source #

Lookup HieModule row from HieDb given its ModuleName and Unit

lookupHieFileFromSource :: HieDb -> FilePath -> IO (Maybe HieModuleRow) Source #

Lookup HieModule row from HieDb given the path to the Haskell source file

lookupHieFileFromHash :: HieDb -> Fingerprint -> IO (Maybe HieModuleRow) Source #

Lookup HieModule row from HieDb given the hash of the HIE file

withTarget :: HieDb -> HieTarget -> (HieFile -> a) -> IO (Either HieDbErr a) Source #

withTarget db t f runs function f with HieFile specified by HieTarget t. In case the target is given by ModuleName (and optionally Unit) it is first resolved from HieDb, which can lead to error if given file is not indexed/Module name is ambiguous.

html :: (NameCacheMonad m, MonadIO m) => HieDb -> [Symbol] -> m () Source #

splitByReachability :: Ord a => AdjacencyMap a -> [a] -> (Set a, Set a) Source #