hakyll-3.5.2.0: A static website compiler library

Safe HaskellNone

Hakyll.Core.DependencyAnalyzer

Synopsis

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.

Constructors

DependencyAnalyzer 

Fields

analyzerGraph :: DirectedGraph a

The complete dependency graph

analyzerRemains :: Set a

A set of items yet to be compiled

analyzerDone :: Set a

A set of items already compiled

analyzerPreviousGraph :: DirectedGraph a

The dependency graph from the previous run

Instances

data Signal a Source

Constructors

Build a 
Cycle [a] 
Done 

Instances

Show a => Show (Signal a) 

makeDependencyAnalyzerSource

Arguments

:: (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

stepAll :: (Ord a, Show a) => DependencyAnalyzer a -> Maybe (Set a)Source

Step until done, creating a set of items we need to build -- mostly used for debugging purposes