Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- unwrapDynamic :: forall a. Typeable a => Dynamic -> a
- type TheRules = HashMap TypeRep Dynamic
- newtype Rules a = Rules (ReaderT SRules IO a)
- data SRules = SRules {
- rulesExtra :: !Dynamic
- rulesActions :: !(IORef [Action ()])
- rulesMap :: !(IORef TheRules)
- newtype Action a = Action {
- fromAction :: ReaderT SAction IO a
- data SAction = SAction {
- actionDatabase :: !Database
- actionDeps :: !(IORef ResultDeps)
- actionStack :: !Stack
- getDatabase :: Action Database
- waitForDatabaseRunningKeysAction :: Action ()
- data ShakeDatabase = ShakeDatabase !Int [Action ()] Database
- newtype Step = Step Int
- newtype Value = Value Dynamic
- data KeyDetails = KeyDetails {
- keyStatus :: !Status
- keyReverseDeps :: !KeySet
- onKeyReverseDeps :: (KeySet -> KeySet) -> KeyDetails -> KeyDetails
- data Database = Database {
- databaseExtra :: Dynamic
- databaseRules :: TheRules
- databaseStep :: !(TVar Step)
- databaseValues :: !(Map Key KeyDetails)
- waitForDatabaseRunningKeys :: Database -> IO ()
- getDatabaseValues :: Database -> IO [(Key, Status)]
- data Status
- = Clean !Result
- | Dirty (Maybe Result)
- | Running {
- runningStep :: !Step
- runningWait :: !(IO ())
- runningResult :: Result
- runningPrev :: !(Maybe Result)
- viewDirty :: Step -> Status -> Status
- getResult :: Status -> Maybe Result
- waitRunning :: Status -> IO ()
- data Result = Result {
- resultValue :: !Value
- resultBuilt :: !Step
- resultChanged :: !Step
- resultVisited :: !Step
- resultDeps :: !ResultDeps
- resultExecution :: !Seconds
- resultData :: !ByteString
- data ResultDeps
- = UnknownDeps
- | AlwaysRerunDeps !KeySet
- | ResultDeps ![KeySet]
- getResultDepsDefault :: KeySet -> ResultDeps -> KeySet
- mapResultDeps :: (KeySet -> KeySet) -> ResultDeps -> ResultDeps
- data RunMode
- data RunChanged
- data RunResult value = RunResult {
- runChanged :: RunChanged
- runStore :: ByteString
- runValue :: value
- runHook :: STM ()
- data GraphException = forall e.Exception e => GraphException {}
- fromGraphException :: Typeable b => SomeException -> Maybe b
- data Stack = Stack [Key] !KeySet
- newtype StackException = StackException Stack
- addStack :: Key -> Stack -> Either StackException Stack
- memberStack :: Key -> Stack -> Bool
- emptyStack :: Stack
Documentation
unwrapDynamic :: forall a. Typeable a => Dynamic -> a Source #
A computation that defines all the rules that form part of the computation graph.
Rules
has access to IO
through MonadIO
. Use of IO
is at your own risk: if
you write Rules
that throw exceptions, then you need to make sure to handle them
yourself when you run the resulting Rules
.
SRules | |
|
An action representing something that can be run as part of a Rule
.
Action
s can be pure functions but also have access to IO
via MonadIO
and 'MonadUnliftIO.
It should be assumed that actions throw exceptions, these can be caught with
actionCatch
. In particular, it is
permissible to use the MonadFail
instance, which will lead to an IOException
.
Action | |
|
Instances
MonadFail Action Source # | |
Defined in Development.IDE.Graph.Internal.Types | |
MonadIO Action Source # | |
Defined in Development.IDE.Graph.Internal.Types | |
Applicative Action Source # | |
Functor Action Source # | |
Monad Action Source # | |
MonadCatch Action Source # | |
Defined in Development.IDE.Graph.Internal.Types | |
MonadMask Action Source # | |
Defined in Development.IDE.Graph.Internal.Types mask :: HasCallStack => ((forall a. Action a -> Action a) -> Action b) -> Action b # uninterruptibleMask :: HasCallStack => ((forall a. Action a -> Action a) -> Action b) -> Action b # generalBracket :: HasCallStack => Action a -> (a -> ExitCase b -> Action c) -> (a -> Action b) -> Action (b, c) # | |
MonadThrow Action Source # | |
Defined in Development.IDE.Graph.Internal.Types throwM :: (HasCallStack, Exception e) => e -> Action a # | |
MonadUnliftIO Action Source # | |
Defined in Development.IDE.Graph.Internal.Types |
SAction | |
|
waitForDatabaseRunningKeysAction :: Action () Source #
waitForDatabaseRunningKeysAction waits for all keys in the database to finish running.
data ShakeDatabase Source #
ShakeDatabase !Int [Action ()] Database |
data KeyDetails Source #
KeyDetails | |
|
onKeyReverseDeps :: (KeySet -> KeySet) -> KeyDetails -> KeyDetails Source #
Database | |
|
waitForDatabaseRunningKeys :: Database -> IO () Source #
Clean !Result | |
Dirty (Maybe Result) | |
Running | |
|
waitRunning :: Status -> IO () Source #
Result | |
|
data ResultDeps Source #
Instances
Monoid ResultDeps Source # | |
Defined in Development.IDE.Graph.Internal.Types mempty :: ResultDeps # mappend :: ResultDeps -> ResultDeps -> ResultDeps # mconcat :: [ResultDeps] -> ResultDeps # | |
Semigroup ResultDeps Source # | |
Defined in Development.IDE.Graph.Internal.Types (<>) :: ResultDeps -> ResultDeps -> ResultDeps # sconcat :: NonEmpty ResultDeps -> ResultDeps # stimes :: Integral b => b -> ResultDeps -> ResultDeps # | |
Show ResultDeps Source # | |
Defined in Development.IDE.Graph.Internal.Types showsPrec :: Int -> ResultDeps -> ShowS # show :: ResultDeps -> String # showList :: [ResultDeps] -> ShowS # | |
Eq ResultDeps Source # | |
Defined in Development.IDE.Graph.Internal.Types (==) :: ResultDeps -> ResultDeps -> Bool # (/=) :: ResultDeps -> ResultDeps -> Bool # |
getResultDepsDefault :: KeySet -> ResultDeps -> KeySet Source #
mapResultDeps :: (KeySet -> KeySet) -> ResultDeps -> ResultDeps Source #
What mode a rule is running in, passed as an argument to BuiltinRun
.
RunDependenciesSame | My dependencies have not changed. |
RunDependenciesChanged | At least one of my dependencies from last time have changed, or I have no recorded dependencies. |
data RunChanged Source #
How the output of a rule has changed.
ChangedNothing | Nothing has changed. |
ChangedRecomputeSame | I recomputed the value and it was the same. |
ChangedRecomputeDiff | I recomputed the value and it was different. |
Instances
The result of BuiltinRun
.
RunResult | |
|
data GraphException Source #
forall e.Exception e => GraphException | |
Instances
Exception GraphException Source # | |
Defined in Development.IDE.Graph.Internal.Types | |
Show GraphException Source # | |
Defined in Development.IDE.Graph.Internal.Types showsPrec :: Int -> GraphException -> ShowS # show :: GraphException -> String # showList :: [GraphException] -> ShowS # |
fromGraphException :: Typeable b => SomeException -> Maybe b Source #
newtype StackException Source #
Instances
Exception StackException Source # | |
Defined in Development.IDE.Graph.Internal.Types | |
Show StackException Source # | |
Defined in Development.IDE.Graph.Internal.Types showsPrec :: Int -> StackException -> ShowS # show :: StackException -> String # showList :: [StackException] -> ShowS # |
emptyStack :: Stack Source #