Safe Haskell | Safe-Infered |
---|
- data DependencyAnalyzer a = DependencyAnalyzer {
- analyzerGraph :: DirectedGraph a
- analyzerRemains :: Set a
- analyzerDone :: Set a
- analyzerPreviousGraph :: DirectedGraph a
- data Signal a
- makeDependencyAnalyzer :: (Ord a, Show a) => DirectedGraph a -> (a -> Bool) -> DirectedGraph a -> DependencyAnalyzer a
- step :: (Ord a, Show a) => DependencyAnalyzer a -> (Signal a, DependencyAnalyzer a)
- stepAll :: (Ord a, Show a) => DependencyAnalyzer a -> Maybe (Set a)
Documentation
data DependencyAnalyzer a Source
This data structure represents the state of the dependency analyzer. It
holds a complete graph in analyzerGraph
, which always contains all items,
whether they are to be compiled or not.
The analyzerRemains
fields holds the items that still need to be compiled,
and analyzerDone
holds the items which are already compiled. This means
that initally, analyzerDone
is empty and analyzerRemains
contains the
items which are out-of-date (or items which have out-of-date dependencies).
We also hold the dependency graph from the previous run because we need it when we want to determine when an item is out-of-date. An item is out-of-date when:
- the resource from which it compiles is out-of-date, or;
- any of it's dependencies is out-of-date, or;
- it's set of dependencies has changed since the previous run.
DependencyAnalyzer | |
|
Show a => Show (DependencyAnalyzer a) | |
(Ord a, Show a) => Monoid (DependencyAnalyzer a) |
:: (Ord a, Show a) | |
=> DirectedGraph a | The dependency graph |
-> (a -> Bool) | Is an item out-of-date? |
-> DirectedGraph a | The old dependency graph |
-> DependencyAnalyzer a | Resulting analyzer |
Construct a dependency analyzer
step :: (Ord a, Show a) => DependencyAnalyzer a -> (Signal a, DependencyAnalyzer a)Source
Step a dependency analyzer