hiedb-0.2.0.0: Generates a references DB from .hie files
Safe HaskellNone
LanguageHaskell2010

HieDb.Query

Synopsis

Documentation

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

List all modules indexed in HieDb.

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

Lookup UnitId 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)

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

Lookup HieModule row from HieDb given its ModuleName and UnitId

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

Lookup HieModule row from HieDb given the path to the Haskell source 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 UnitId) 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 #