Safe Haskell | None |
---|---|
Language | Haskell2010 |
Rebuilders take care of deciding whether a key needs to be rebuild and running the corresponding task if need be.
Synopsis
- type Rebuilder c i k v = k -> v -> Task c k v -> Task (MonadState i) k v
- adaptRebuilder :: Rebuilder Monad i k v -> Rebuilder Applicative i k v
- perpetualRebuilder :: Rebuilder Monad () k v
- modTimeRebuilder :: Ord k => Rebuilder Applicative (MakeInfo k) k v
- type Time = Integer
- type MakeInfo k = (Time, Map k Time)
- dirtyBitRebuilder :: Rebuilder Monad (k -> Bool) k v
- dirtyBitRebuilderWithCleanUp :: Ord k => Rebuilder Monad (Set k) k v
- approximateRebuilder :: (Ord k, Eq v) => Rebuilder Monad (ApproximationInfo k) k v
- type ApproximateDependencies k = Map k [k]
- type ApproximationInfo k = (Set k, ApproximateDependencies k)
- vtRebuilder :: (Eq k, Hashable v) => Rebuilder Monad (VT k v) k v
- stRebuilder :: (Eq k, Hashable v) => Rebuilder Monad (Step, ST k v) k v
- ctRebuilder :: (Eq k, Hashable v) => Rebuilder Monad (CT k v) k v
- dctRebuilder :: (Eq k, Hashable v) => Rebuilder Monad (DCT k v) k v
Documentation
type Rebuilder c i k v = k -> v -> Task c k v -> Task (MonadState i) k v Source #
Given a key-value pair and the corresponding task, a rebuilder returns a new task that has access to the build information and can use it to skip rebuilding a key if it is up to date.
adaptRebuilder :: Rebuilder Monad i k v -> Rebuilder Applicative i k v Source #
Get an applicative rebuilder out of a monadic one.
perpetualRebuilder :: Rebuilder Monad () k v Source #
Always rebuilds the key.
modTimeRebuilder :: Ord k => Rebuilder Applicative (MakeInfo k) k v Source #
This rebuilder uses modification time to decide whether a key is dirty and needs to be rebuilt. Used by Make.
dirtyBitRebuilder :: Rebuilder Monad (k -> Bool) k v Source #
If the key is dirty, rebuild it. Used by Excel.
dirtyBitRebuilderWithCleanUp :: Ord k => Rebuilder Monad (Set k) k v Source #
If the key is dirty, rebuild it and clear the dirty bit. Used by Excel.
approximateRebuilder :: (Ord k, Eq v) => Rebuilder Monad (ApproximationInfo k) k v Source #
This rebuilders uses approximate dependencies to decide whether a key needs to be rebuilt.
type ApproximateDependencies k = Map k [k] Source #
If there is an entry for a key, it is an conservative approximation of its dependencies. Otherwise, we have no reasonable approximation and assume the key is always dirty (e.g. it uses an INDIRECT reference).
type ApproximationInfo k = (Set k, ApproximateDependencies k) Source #
A set of dirty keys and information about dependencies.
vtRebuilder :: (Eq k, Hashable v) => Rebuilder Monad (VT k v) k v Source #
This rebuilder relies on verifying traces.
stRebuilder :: (Eq k, Hashable v) => Rebuilder Monad (Step, ST k v) k v Source #
This rebuilder relies on version/step traces.