Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Status
- data Progress = Progress {}
- data Task = Task {}
- isStatus :: Value -> Bool
- data Settings = Settings {
- database :: Async Database
- databaseCacheReader :: (FilePath -> ExceptT String IO Structured) -> IO (Maybe Database)
- databaseCacheWriter :: Database -> IO ()
- onStatus :: [Task] -> IO ()
- ghcOptions :: [String]
- updateDocs :: Bool
- runInferTypes :: Bool
- settingsGhcWorker :: Worker Ghc
- settingsGhcModWorker :: Worker (ReaderT WorkerMap IO)
- settingsLogger :: Log
- settingsWatcher :: Watcher
- settingsDefines :: [(String, String)]
- settings :: CommandOptions -> [String] -> Bool -> Bool -> Settings
- data UpdateDB m a
- updateDB :: (MonadBaseControl IO m, MonadCatchIO m) => Settings -> ExceptT String (UpdateDB m) () -> m ()
- postStatus :: (MonadIO m, MonadReader Settings m) => Task -> m ()
- waiter :: (MonadIO m, MonadReader Settings m) => m () -> m ()
- updater :: (MonadIO m, MonadReader Settings m, MonadWriter [ModuleLocation] m) => m Database -> m ()
- loadCache :: (MonadIO m, MonadReader Settings m, MonadWriter [ModuleLocation] m) => (FilePath -> ExceptT String IO Structured) -> m Database
- getCache :: (MonadIO m, MonadReader Settings m, MonadWriter [ModuleLocation] m) => (FilePath -> ExceptT String IO Structured) -> (Database -> Database) -> m Database
- runTask :: (Display t, MonadIO m, NFData a, MonadCatchIO m) => String -> t -> ExceptT String (UpdateDB m) a -> ExceptT String (UpdateDB m) a
- runTasks :: Monad m => [ExceptT String (UpdateDB m) ()] -> ExceptT String (UpdateDB m) ()
- readDB :: (MonadIO m, MonadReader Settings m) => m Database
- scanModule :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> ModuleLocation -> Maybe String -> ExceptT String (UpdateDB m) ()
- scanModules :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> [ModuleToScan] -> ExceptT String (UpdateDB m) ()
- scanFile :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> FilePath -> ExceptT String (UpdateDB m) ()
- scanFileContents :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> FilePath -> Maybe String -> ExceptT String (UpdateDB m) ()
- scanCabal :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> Cabal -> ExceptT String (UpdateDB m) ()
- scanProjectFile :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> FilePath -> ExceptT String (UpdateDB m) Project
- scanProject :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> FilePath -> ExceptT String (UpdateDB m) ()
- scanDirectory :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> FilePath -> ExceptT String (UpdateDB m) ()
- scanDocs :: (MonadIO m, MonadCatchIO m) => [InspectedModule] -> ExceptT String (UpdateDB m) ()
- inferModTypes :: (MonadIO m, MonadCatchIO m) => [InspectedModule] -> ExceptT String (UpdateDB m) ()
- scan :: (MonadIO m, MonadCatch m, MonadCatchIO m) => (FilePath -> ExceptT String IO Structured) -> (Database -> Database) -> [ModuleToScan] -> [String] -> ([ModuleToScan] -> ExceptT String (UpdateDB m) ()) -> ExceptT String (UpdateDB m) ()
- updateEvent :: (MonadIO m, MonadCatch m, MonadCatchIO m) => Watched -> Event -> ExceptT String (UpdateDB m) ()
- processEvent :: Settings -> Watched -> Event -> IO ()
- liftExceptT :: MonadIO m => ExceptT String IO a -> ExceptT String m a
- module HsDev.Watcher
- module Control.Monad.Except
Documentation
Task | |
|
Settings | |
|
Monad m => MonadReader Settings (UpdateDB m) Source |
Monad m => MonadReader Settings (UpdateDB m) Source | |
MonadBase b m => MonadBase b (UpdateDB m) Source | |
MonadBaseControl b m => MonadBaseControl b (UpdateDB m) Source | |
Monad m => Monad (UpdateDB m) Source | |
Functor m => Functor (UpdateDB m) Source | |
Applicative m => Applicative (UpdateDB m) Source | |
MonadCatchIO m => MonadCatchIO (UpdateDB m) Source | |
MonadThrow m => MonadThrow (UpdateDB m) Source | |
MonadCatch m => MonadCatch (UpdateDB m) Source | |
MonadIO m => MonadIO (UpdateDB m) Source | |
MonadCatchIO m => MonadLog (UpdateDB m) Source | |
Monad m => MonadWriter [ModuleLocation] (UpdateDB m) Source | |
type StM (UpdateDB m) a = StM (ReaderT Settings (WriterT [ModuleLocation] m)) a Source |
updateDB :: (MonadBaseControl IO m, MonadCatchIO m) => Settings -> ExceptT String (UpdateDB m) () -> m () Source
Run UpdateDB
monad
postStatus :: (MonadIO m, MonadReader Settings m) => Task -> m () Source
Post status
waiter :: (MonadIO m, MonadReader Settings m) => m () -> m () Source
Wait DB to complete actions
updater :: (MonadIO m, MonadReader Settings m, MonadWriter [ModuleLocation] m) => m Database -> m () Source
Update task result to database
loadCache :: (MonadIO m, MonadReader Settings m, MonadWriter [ModuleLocation] m) => (FilePath -> ExceptT String IO Structured) -> m Database Source
Get data from cache without updating DB
getCache :: (MonadIO m, MonadReader Settings m, MonadWriter [ModuleLocation] m) => (FilePath -> ExceptT String IO Structured) -> (Database -> Database) -> m Database Source
Load data from cache if not loaded yet and wait
runTask :: (Display t, MonadIO m, NFData a, MonadCatchIO m) => String -> t -> ExceptT String (UpdateDB m) a -> ExceptT String (UpdateDB m) a Source
Run one task
runTasks :: Monad m => [ExceptT String (UpdateDB m) ()] -> ExceptT String (UpdateDB m) () Source
Run many tasks with numeration
scanModule :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> ModuleLocation -> Maybe String -> ExceptT String (UpdateDB m) () Source
Scan module
scanModules :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> [ModuleToScan] -> ExceptT String (UpdateDB m) () Source
Scan modules
scanFile :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> FilePath -> ExceptT String (UpdateDB m) () Source
Scan source file
scanFileContents :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> FilePath -> Maybe String -> ExceptT String (UpdateDB m) () Source
Scan source file with contents
scanCabal :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> Cabal -> ExceptT String (UpdateDB m) () Source
Scan cabal modules
scanProjectFile :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> FilePath -> ExceptT String (UpdateDB m) Project Source
Scan project file
scanProject :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> FilePath -> ExceptT String (UpdateDB m) () Source
Scan project
scanDirectory :: (MonadIO m, MonadCatch m, MonadCatchIO m) => [String] -> FilePath -> ExceptT String (UpdateDB m) () Source
Scan directory for source files and projects
scanDocs :: (MonadIO m, MonadCatchIO m) => [InspectedModule] -> ExceptT String (UpdateDB m) () Source
Scan docs for inspected modules
inferModTypes :: (MonadIO m, MonadCatchIO m) => [InspectedModule] -> ExceptT String (UpdateDB m) () Source
:: (MonadIO m, MonadCatch m, MonadCatchIO 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] -> ExceptT String (UpdateDB m) ()) | Function to update changed modules |
-> ExceptT String (UpdateDB m) () |
Generic scan function. Reads cache only if data is not already loaded, removes obsolete modules and rescans changed modules.
updateEvent :: (MonadIO m, MonadCatch m, MonadCatchIO m) => Watched -> Event -> ExceptT String (UpdateDB m) () Source
Helpers
module HsDev.Watcher
module Control.Monad.Except