Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- sCHEMA_VERSION :: Integer
- dB_VERSION :: Integer
- checkVersion :: (HieDb -> IO a) -> HieDb -> IO a
- withHieDb :: FilePath -> (HieDb -> IO a) -> IO a
- withHieDbAndFlags :: LibDir -> FilePath -> (DynFlags -> HieDb -> IO a) -> IO a
- initConn :: HieDb -> IO ()
- addArr :: HieDb -> Array TypeIndex HieTypeFlat -> IO (Array TypeIndex (Maybe Int64))
- addTypeRefs :: HieDb -> FilePath -> HieFile -> Array TypeIndex (Maybe Int64) -> IO ()
- addRefsFrom :: (MonadIO m, NameCacheMonad m) => HieDb -> FilePath -> m ()
- addRefsFromLoaded :: MonadIO m => HieDb -> FilePath -> Maybe FilePath -> Bool -> UTCTime -> HieFile -> m ()
- addSrcFile :: HieDb -> FilePath -> FilePath -> Bool -> IO ()
- deleteFileFromIndex :: HieDb -> FilePath -> IO ()
Documentation
dB_VERSION :: Integer Source #
checkVersion :: (HieDb -> IO a) -> HieDb -> IO a Source #
checkVersion f db
checks the schema version associated with given db
.
If that version is supported by hiedb, it runs the function f
with the db
.
Otherwise it throws IncompatibleSchemaVersion
exception.
withHieDb :: FilePath -> (HieDb -> IO a) -> IO a Source #
Given path to .hiedb
file, constructs HieDb
and passes it to given function.
withHieDbAndFlags :: LibDir -> FilePath -> (DynFlags -> HieDb -> IO a) -> IO a Source #
Given GHC LibDir and path to .hiedb
file,
constructs DynFlags (required for printing info from .hie
files)
and HieDb
and passes them to given function.
:: HieDb | |
-> FilePath | Path to |
-> HieFile | Data loaded from the |
-> Array TypeIndex (Maybe Int64) | Maps TypeIndex to database ID assigned to record in |
-> IO () |
Add references to types from given .hie
file to DB.
addRefsFrom :: (MonadIO m, NameCacheMonad m) => HieDb -> FilePath -> m () Source #
Adds all references from given .hie
file to HieDb
.
The indexing is skipped if the file was not modified since the last time it was indexed.
:: MonadIO m | |
=> HieDb | HieDb into which we're adding the file |
-> FilePath | Path to |
-> Maybe FilePath | Path to .hs file from which |
-> Bool | Is this a real source file? I.e. does it come from user's project (as opposed to from project's dependency)? |
-> UTCTime | The last modification time of the |
-> HieFile | Data loaded from the |
-> m () |
:: HieDb | |
-> FilePath | Path to |
-> FilePath | Path to .hs file to be added to DB |
-> Bool | Is this a real source file? I.e. does it come from user's project (as opposed to from project's dependency)? |
-> IO () |
Add path to .hs source given path to .hie
file which has already been indexed.
No action is taken if the corresponding .hie
file has not been indexed yet.