hsdev-0.3.1.3: Haskell development library

Safe HaskellNone
LanguageHaskell98

HsDev.Database.Update

Synopsis

Documentation

newtype UpdateM m a Source #

Instances

MonadTrans UpdateM Source # 

Methods

lift :: Monad m => m a -> UpdateM m a #

Monad m => MonadReader UpdateState (UpdateM m) Source # 

Methods

ask :: UpdateM m UpdateState #

local :: (UpdateState -> UpdateState) -> UpdateM m a -> UpdateM m a #

reader :: (UpdateState -> a) -> UpdateM m a #

MonadBase b m => MonadBase b (UpdateM m) Source # 

Methods

liftBase :: b α -> UpdateM m α #

MonadBaseControl b m => MonadBaseControl b (UpdateM m) Source # 

Associated Types

type StM (UpdateM m :: * -> *) a :: * #

Methods

liftBaseWith :: (RunInBase (UpdateM m) b -> b a) -> UpdateM m a #

restoreM :: StM (UpdateM m) a -> UpdateM m a #

Monad m => Monad (UpdateM m) Source # 

Methods

(>>=) :: UpdateM m a -> (a -> UpdateM m b) -> UpdateM m b #

(>>) :: UpdateM m a -> UpdateM m b -> UpdateM m b #

return :: a -> UpdateM m a #

fail :: String -> UpdateM m a #

Functor m => Functor (UpdateM m) Source # 

Methods

fmap :: (a -> b) -> UpdateM m a -> UpdateM m b #

(<$) :: a -> UpdateM m b -> UpdateM m a #

Applicative m => Applicative (UpdateM m) Source # 

Methods

pure :: a -> UpdateM m a #

(<*>) :: UpdateM m (a -> b) -> UpdateM m a -> UpdateM m b #

liftA2 :: (a -> b -> c) -> UpdateM m a -> UpdateM m b -> UpdateM m c #

(*>) :: UpdateM m a -> UpdateM m b -> UpdateM m b #

(<*) :: UpdateM m a -> UpdateM m b -> UpdateM m a #

MonadPlus m => MonadPlus (UpdateM m) Source # 

Methods

mzero :: UpdateM m a #

mplus :: UpdateM m a -> UpdateM m a -> UpdateM m a #

Alternative m => Alternative (UpdateM m) Source # 

Methods

empty :: UpdateM m a #

(<|>) :: UpdateM m a -> UpdateM m a -> UpdateM m a #

some :: UpdateM m a -> UpdateM m [a] #

many :: UpdateM m a -> UpdateM m [a] #

MonadIO m => MonadIO (UpdateM m) Source # 

Methods

liftIO :: IO a -> UpdateM m a #

MonadThrow m => MonadThrow (UpdateM m) Source # 

Methods

throwM :: Exception e => e -> UpdateM m a #

MonadCatch m => MonadCatch (UpdateM m) Source # 

Methods

catch :: Exception e => UpdateM m a -> (e -> UpdateM m a) -> UpdateM m a #

MonadMask m => MonadMask (UpdateM m) Source # 

Methods

mask :: ((forall a. UpdateM m a -> UpdateM m a) -> UpdateM m b) -> UpdateM m b #

uninterruptibleMask :: ((forall a. UpdateM m a -> UpdateM m a) -> UpdateM m b) -> UpdateM m b #

(MonadIO m, MonadMask m) => MonadLog (UpdateM m) Source # 

Methods

askLog :: UpdateM m Log #

localLog :: (Log -> Log) -> UpdateM m a -> UpdateM m a #

ServerMonadBase m => CommandMonad (UpdateM m) Source # 
ServerMonadBase m => SessionMonad (UpdateM m) Source # 
Monad m => MonadWriter [ModuleLocation] (UpdateM m) Source # 

Methods

writer :: (a, [ModuleLocation]) -> UpdateM m a #

tell :: [ModuleLocation] -> UpdateM m () #

listen :: UpdateM m a -> UpdateM m (a, [ModuleLocation]) #

pass :: UpdateM m (a, [ModuleLocation] -> [ModuleLocation]) -> UpdateM m a #

type StM (UpdateM m) a Source # 

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

Post status

updater :: UpdateMonad m => [ModuleLocation] -> m () Source #

Mark module as updated

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

Run one task

runTasks :: UpdateMonad m => [m a] -> m [a] Source #

Run many tasks with numeration

runTasks_ :: UpdateMonad m => [m ()] -> m () Source #

Run many tasks with numeration

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

Scan modules

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

Scan source file, resolve dependent modules

scanFiles :: UpdateMonad m => [(FileSource, [String])] -> m () Source #

Scan source files, resolving dependent modules

scanFileContents :: UpdateMonad m => [String] -> Path -> Maybe Text -> m () Source #

Scan source file with contents and resolve dependent modules

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] -> Path -> m Project Source #

Scan project file

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

Scan project and related package-db stack

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

Scan project

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

Scan directory for source files and projects

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

Scan installed docs

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

Scan docs for inspected modules

setModTypes :: UpdateMonad m => ModuleId -> [Note TypedExpr] -> m () Source #

Set inferred types for module

inferModTypes :: UpdateMonad m => [Module] -> m () Source #

Infer types for modules

scan Source #

Arguments

:: UpdateMonad m 
=> m [Only Int :. (ModuleLocation :. Inspection)]

Get affected modules, obsolete will be removed, changed will be updated

-> [ModuleToScan]

Actual modules, other will be removed

-> [String]

Extra scan options

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

Update function

-> m () 

Generic scan function. Removed obsolete modules and calls callback on changed modules.

processEvents :: ([(Watched, Event)] -> IO ()) -> MVar (Async ()) -> MVar [(Watched, Event)] -> [(Watched, Event)] -> ClientM IO () Source #