hsdev-0.1.7.3: Haskell development library and tool with support of autocompletion, symbol info, go to declaration, find references etc.

Safe HaskellNone
LanguageHaskell98

HsDev.Database.Update

Contents

Synopsis

Documentation

postStatus :: UpdateMonad m => Task -> m () Source

Post status

waiter :: UpdateMonad m => m () -> m () Source

Wait DB to complete actions

updater :: UpdateMonad m => m Database -> m () Source

Update task result to database

loadCache :: UpdateMonad m => (FilePath -> ExceptT String IO Structured) -> m Database Source

Get data from cache without updating DB

getCache :: UpdateMonad m => (FilePath -> ExceptT String IO Structured) -> (Database -> Database) -> m Database Source

Load data from cache if not loaded yet and wait

runTask :: (Display t, UpdateMonad m, NFData a) => String -> t -> m a -> m a Source

Run one task

runTasks :: UpdateMonad m => [m ()] -> m () Source

Run many tasks with numeration

readDB :: SessionMonad m => m Database Source

Get database value

scanModule :: UpdateMonad m => [String] -> ModuleLocation -> Maybe String -> m () Source

Scan module

scanModules :: UpdateMonad m => [String] -> [ModuleToScan] -> m () Source

Scan modules

scanFile :: UpdateMonad m => [String] -> FilePath -> m () Source

Scan source file

scanFileContents :: UpdateMonad m => [String] -> FilePath -> Maybe String -> m () Source

Scan source file with contents

scanCabal :: UpdateMonad m => [String] -> m () Source

Scan cabal modules, doesn't rescan if already scanned

prepareSandbox :: UpdateMonad m => Sandbox -> m () Source

Prepare sandbox for scanning. This is used for stack project to build & configure.

scanSandbox :: UpdateMonad m => [String] -> Sandbox -> m () Source

Scan sandbox modules, doesn't rescan if already scanned

scanPackageDb :: UpdateMonad m => [String] -> PackageDbStack -> m () Source

Scan top of package-db stack, usable for rescan

scanProjectFile :: UpdateMonad m => [String] -> FilePath -> m Project Source

Scan project file

scanProjectStack :: UpdateMonad m => [String] -> FilePath -> m () Source

Scan project and related package-db stack

scanProject :: UpdateMonad m => [String] -> FilePath -> m () Source

Scan project

scanDirectory :: UpdateMonad m => [String] -> FilePath -> m () Source

Scan directory for source files and projects

scanDocs :: UpdateMonad m => [InspectedModule] -> m () Source

Scan docs for inspected modules

scan Source

Arguments

:: UpdateMonad m 
=> (FilePath -> ExceptT String IO Structured)

Read data from cache

-> (Database -> Database)

Get data from database

-> [ModuleToScan]

Actual modules. Other modules will be removed from database

-> [String]

Extra scan options

-> ([ModuleToScan] -> m ())

Function to update changed modules

-> m () 

Generic scan function. Reads cache only if data is not already loaded, removes obsolete modules and rescans changed modules.

Helpers