Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Development.IDE.Graph.Rule
Synopsis
- addRule :: forall key value. (RuleResult key ~ value, Typeable key, Hashable key, Eq key, Typeable value) => (key -> Maybe ByteString -> RunMode -> Action (RunResult value)) -> Rules ()
- data RunMode
- data RunChanged
- data RunResult value = RunResult {
- runChanged :: RunChanged
- runStore :: ByteString
- runValue :: value
- apply :: (Traversable f, RuleResult key ~ value, ShakeValue key, Typeable value) => f key -> Action (f value)
- apply1 :: (RuleResult key ~ value, ShakeValue key, Typeable value) => key -> Action value
- applyWithoutDependency :: (Traversable f, RuleResult key ~ value, ShakeValue key, Typeable value) => f key -> Action (f value)
Defining builtin rules
Functions and types for defining new types of Shake rules.
addRule :: forall key value. (RuleResult key ~ value, Typeable key, Hashable key, Eq key, Typeable value) => (key -> Maybe ByteString -> RunMode -> Action (RunResult value)) -> Rules () #
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
Calling builtin rules
Wrappers around calling Shake rules. In general these should be specialised to a builtin rule.
apply :: (Traversable f, RuleResult key ~ value, ShakeValue key, Typeable value) => f key -> Action (f value) #
apply1 :: (RuleResult key ~ value, ShakeValue key, Typeable value) => key -> Action value #
applyWithoutDependency :: (Traversable f, RuleResult key ~ value, ShakeValue key, Typeable value) => f key -> Action (f value) #
Evaluate a list of keys without recording any dependencies.