Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Development.IDE.Graph.Internal.Types
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
- data ShakeDatabase = ShakeDatabase !Int [Action ()] Database
- newtype Step = Step Int
- data KeyValue = forall a.(Eq a, Typeable a, Hashable a, Show a) => KeyValue a Text
- newtype Key = UnsafeMkKey Int
- pattern Key :: () => (Typeable a, Hashable a, Show a) => a -> Key
- data GlobalKeyValueMap = GlobalKeyValueMap !(HashMap KeyValue Key) !(IntMap KeyValue) !Int
- keyMap :: IORef GlobalKeyValueMap
- newKey :: (Eq a, Typeable a, Hashable a, Show a) => a -> Key
- lookupKeyValue :: Key -> KeyValue
- renderKey :: Key -> Text
- newtype KeySet = KeySet IntSet
- insertKeySet :: Key -> KeySet -> KeySet
- memberKeySet :: Key -> KeySet -> Bool
- toListKeySet :: KeySet -> [Key]
- nullKeySet :: KeySet -> Bool
- differenceKeySet :: KeySet -> KeySet -> KeySet
- deleteKeySet :: Key -> KeySet -> KeySet
- fromListKeySet :: [Key] -> KeySet
- singletonKeySet :: Key -> KeySet
- filterKeySet :: (Key -> Bool) -> KeySet -> KeySet
- lengthKeySet :: KeySet -> Int
- newtype KeyMap a = KeyMap (IntMap a)
- mapKeyMap :: (a -> b) -> KeyMap a -> KeyMap b
- insertKeyMap :: Key -> a -> KeyMap a -> KeyMap a
- lookupKeyMap :: Key -> KeyMap a -> Maybe a
- lookupDefaultKeyMap :: a -> Key -> KeyMap a -> a
- fromListKeyMap :: [(Key, a)] -> KeyMap a
- fromListWithKeyMap :: (a -> a -> a) -> [(Key, a)] -> KeyMap a
- toListKeyMap :: KeyMap a -> [(Key, a)]
- elemsKeyMap :: KeyMap a -> [a]
- restrictKeysKeyMap :: KeyMap a -> KeySet -> KeyMap a
- 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)
- 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
- data Result = Result {
- resultValue :: !Value
- resultBuilt :: !Step
- resultChanged :: !Step
- resultVisited :: !Step
- resultDeps :: !ResultDeps
- resultExecution :: !Seconds
- resultData :: !ByteString
- data ResultDeps
- getResultDepsDefault :: KeySet -> ResultDeps -> KeySet
- mapResultDeps :: (KeySet -> KeySet) -> ResultDeps -> ResultDeps
- data RunMode
- data RunChanged
- data RunResult value = RunResult {
- runChanged :: RunChanged
- runStore :: ByteString
- runValue :: value
- 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 #
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
.
Constructors
SRules | |
Fields
|
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
.
Constructors
Action | |
Fields
|
Instances
MonadFail Action # | |
Defined in Development.IDE.Graph.Internal.Types | |
MonadIO Action # | |
Defined in Development.IDE.Graph.Internal.Types | |
Applicative Action # | |
Functor Action # | |
Monad Action # | |
MonadCatch Action # | |
MonadMask Action # | |
Defined in Development.IDE.Graph.Internal.Types Methods 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 # | |
Defined in Development.IDE.Graph.Internal.Types | |
MonadUnliftIO Action # | |
Defined in Development.IDE.Graph.Internal.Types Methods withRunInIO :: ((forall a. Action a -> IO a) -> IO b) -> Action b # |
Constructors
SAction | |
Fields
|
data ShakeDatabase #
Constructors
ShakeDatabase !Int [Action ()] Database |
Constructors
Step Int |
Constructors
UnsafeMkKey Int |
data GlobalKeyValueMap #
Constructors
GlobalKeyValueMap !(HashMap KeyValue Key) !(IntMap KeyValue) !Int |
lookupKeyValue :: Key -> KeyValue #
Constructors
KeySet IntSet |
insertKeySet :: Key -> KeySet -> KeySet #
memberKeySet :: Key -> KeySet -> Bool #
toListKeySet :: KeySet -> [Key] #
nullKeySet :: KeySet -> Bool #
differenceKeySet :: KeySet -> KeySet -> KeySet #
deleteKeySet :: Key -> KeySet -> KeySet #
fromListKeySet :: [Key] -> KeySet #
singletonKeySet :: Key -> KeySet #
filterKeySet :: (Key -> Bool) -> KeySet -> KeySet #
lengthKeySet :: KeySet -> Int #
Constructors
KeyMap (IntMap a) |
insertKeyMap :: Key -> a -> KeyMap a -> KeyMap a #
lookupKeyMap :: Key -> KeyMap a -> Maybe a #
lookupDefaultKeyMap :: a -> Key -> KeyMap a -> a #
fromListKeyMap :: [(Key, a)] -> KeyMap a #
fromListWithKeyMap :: (a -> a -> a) -> [(Key, a)] -> KeyMap a #
toListKeyMap :: KeyMap a -> [(Key, a)] #
elemsKeyMap :: KeyMap a -> [a] #
restrictKeysKeyMap :: KeyMap a -> KeySet -> KeyMap a #
data KeyDetails #
Constructors
KeyDetails | |
Fields
|
onKeyReverseDeps :: (KeySet -> KeySet) -> KeyDetails -> KeyDetails #
Constructors
Database | |
Fields
|
getDatabaseValues :: Database -> IO [(Key, Status)] #
Constructors
Clean !Result | |
Dirty (Maybe Result) | |
Running | |
Fields
|
Constructors
Result | |
Fields
|
data ResultDeps #
Constructors
UnknownDeps | |
AlwaysRerunDeps !KeySet | |
ResultDeps !KeySet |
Instances
Monoid ResultDeps # | |
Defined in Development.IDE.Graph.Internal.Types Methods mempty :: ResultDeps mappend :: ResultDeps -> ResultDeps -> ResultDeps mconcat :: [ResultDeps] -> ResultDeps | |
Semigroup ResultDeps # | |
Defined in Development.IDE.Graph.Internal.Types Methods (<>) :: ResultDeps -> ResultDeps -> ResultDeps sconcat :: NonEmpty ResultDeps -> ResultDeps stimes :: Integral b => b -> ResultDeps -> ResultDeps | |
Show ResultDeps # | |
Defined in Development.IDE.Graph.Internal.Types Methods showsPrec :: Int -> ResultDeps -> ShowS # show :: ResultDeps -> String # showList :: [ResultDeps] -> ShowS # | |
Eq ResultDeps # | |
Defined in Development.IDE.Graph.Internal.Types |
getResultDepsDefault :: KeySet -> ResultDeps -> KeySet #
mapResultDeps :: (KeySet -> KeySet) -> ResultDeps -> ResultDeps #
What mode a rule is running in, passed as an argument to BuiltinRun
.
Constructors
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 #
How the output of a rule has changed.
Constructors
ChangedNothing | Nothing has changed. |
ChangedStore | The stored value has changed, but in a way that should be considered identical (used rarely). |
ChangedRecomputeSame | I recomputed the value and it was the same. |
ChangedRecomputeDiff | I recomputed the value and it was different. |
Instances
FromJSON RunChanged # | |
Defined in Development.IDE.Graph.Internal.Types Methods parseJSON :: Value -> Parser RunChanged # parseJSONList :: Value -> Parser [RunChanged] # omittedField :: Maybe RunChanged # | |
ToJSON RunChanged # | |
Defined in Development.IDE.Graph.Internal.Types Methods toJSON :: RunChanged -> Value # toEncoding :: RunChanged -> Encoding # toJSONList :: [RunChanged] -> Value # toEncodingList :: [RunChanged] -> Encoding # omitField :: RunChanged -> Bool # | |
Generic RunChanged # | |
Defined in Development.IDE.Graph.Internal.Types Associated Types type Rep RunChanged :: Type -> Type | |
Show RunChanged # | |
Defined in Development.IDE.Graph.Internal.Types Methods showsPrec :: Int -> RunChanged -> ShowS # show :: RunChanged -> String # showList :: [RunChanged] -> ShowS # | |
NFData RunChanged # | |
Defined in Development.IDE.Graph.Internal.Types Methods rnf :: RunChanged -> () # | |
Eq RunChanged # | |
Defined in Development.IDE.Graph.Internal.Types | |
type Rep RunChanged # | |
Defined in Development.IDE.Graph.Internal.Types type Rep RunChanged = D1 ('MetaData "RunChanged" "Development.IDE.Graph.Internal.Types" "hls-graph-2.4.0.0-c0BksrWyMh6FVIlhqyteI" 'False) ((C1 ('MetaCons "ChangedNothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ChangedStore" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ChangedRecomputeSame" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ChangedRecomputeDiff" 'PrefixI 'False) (U1 :: Type -> Type))) |
The result of BuiltinRun
.
Constructors
RunResult | |
Fields
|
Instances
data GraphException #
Constructors
forall e.Exception e => GraphException | |
Instances
Exception GraphException # | |
Defined in Development.IDE.Graph.Internal.Types Methods toException :: GraphException -> SomeException # fromException :: SomeException -> Maybe GraphException # displayException :: GraphException -> String # | |
Show GraphException # | |
Defined in Development.IDE.Graph.Internal.Types Methods showsPrec :: Int -> GraphException -> ShowS # show :: GraphException -> String # showList :: [GraphException] -> ShowS # |
fromGraphException :: Typeable b => SomeException -> Maybe b #
newtype StackException #
Constructors
StackException Stack |
Instances
Exception StackException # | |
Defined in Development.IDE.Graph.Internal.Types Methods toException :: StackException -> SomeException # fromException :: SomeException -> Maybe StackException # displayException :: StackException -> String # | |
Show StackException # | |
Defined in Development.IDE.Graph.Internal.Types Methods showsPrec :: Int -> StackException -> ShowS # show :: StackException -> String # showList :: [StackException] -> ShowS # |
memberStack :: Key -> Stack -> Bool #
emptyStack :: Stack #